/* ==========================================================================
   AION 2 INTERACTIVE WIKI - MODERN MMORPG DARK THEME
   ========================================================================== */

:root {
  --bg-primary: #070a12;
  --bg-secondary: #0d1220;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(26, 36, 56, 0.85);
  --bg-glass: rgba(13, 18, 32, 0.65);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(212, 175, 55, 0.35);
  --border-active: #d4af37;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --gold-primary: #e6b73c;
  --gold-glow: rgba(230, 183, 60, 0.25);
  --blue-arcane: #38bdf8;
  --blue-glow: rgba(56, 189, 248, 0.2);
  --crimson-pvp: #f43f5e;
  --crimson-glow: rgba(244, 63, 94, 0.25);
  --emerald-pve: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --purple-epic: #a855f7;

  /* ==========================================================================
     QUESTLOG.GG AUTHENTIC RARITY DESIGN TOKENS
     ========================================================================== */
  --rarity-special-color: #04ddd9;
  --rarity-special-glow: 0 0 13px #04ddd9;
  --rarity-special-bg: url('img/rarity/bg_special.webp');

  --rarity-mythic-color: #d21046;
  --rarity-mythic-glow: 0 0 13px #d21046;
  --rarity-mythic-bg: url('img/rarity/bg_mythic.webp');

  --rarity-eternal-color: #ce560a;
  --rarity-eternal-glow: 0 0 13px #ce560a;
  --rarity-eternal-bg: url('img/rarity/bg_eternal.webp');

  --rarity-fabled-color: #d3ad0f;
  --rarity-fabled-glow: 0 0 13px #d3ad0f;
  --rarity-fabled-bg: url('img/rarity/bg_fabled.webp');

  --rarity-heroic-color: #1383b6;
  --rarity-heroic-glow: 0 0 13px #1383b6;
  --rarity-heroic-bg: url('img/rarity/bg_heroic.webp');

  --rarity-superior-color: #498b35;
  --rarity-superior-glow: 0 0 13px #498b35;
  --rarity-superior-bg: url('img/rarity/bg_superior.webp');

  --rarity-common-color: #808080;
  --rarity-common-glow: 0 0 13px #808080;
  --rarity-common-bg: url('img/rarity/bg_common.webp');

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(212, 175, 55, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #070a12 0%, #05070d 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 10, 18, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.85rem 1.5rem;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
}

.brand-badge {
  background: linear-gradient(135deg, #d4af37, #f59e0b);
  color: #000;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: #fff;
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-accent);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* HERO SECTION */
.hero {
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 40%, #cbd5e1 80%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.75rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value {
  color: var(--gold-primary);
  font-weight: 700;
}

/* MAIN CONTAINER */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* SECTION TABS */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CLASS SELECTOR GRID */
.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.class-card-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.65rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.class-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.class-card-btn.active {
  border-color: var(--gold-primary);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, rgba(13, 18, 32, 0.85) 100%);
  box-shadow: 0 4px 20px var(--gold-glow);
}

.class-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.class-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.class-card-btn:hover .class-icon-img {
  transform: scale(1.1);
}

.class-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.class-card-role {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.class-card-btn.active .class-card-role {
  color: var(--gold-primary);
}

/* CLASS DETAIL PANE */
.class-detail-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}

.class-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.class-avatar-box {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-accent);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.class-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.class-meta-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.class-emblem-badge {
  width: 36px;
  height: 36px;
  object-fit: contain;
  vertical-align: middle;
}

.class-role-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-arcane);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  text-transform: uppercase;
  font-weight: 700;
}

.class-weapon-tag {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* SPECIALTIES ROW (DAEVANION) */
.specialties-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.specialty-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.specialty-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* BUILD TOGGLE (PVE VS PVP) */
.build-toggle-wrapper {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  gap: 0.35rem;
}

.build-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.build-mode-btn:hover {
  color: #fff;
}

.build-mode-btn.active.pve {
  background: var(--emerald-pve);
  color: #fff;
  box-shadow: 0 0 15px var(--emerald-glow);
}

.build-mode-btn.active.pvp {
  background: var(--crimson-pvp);
  color: #fff;
  box-shadow: 0 0 15px var(--crimson-glow);
}

/* BUILD DETAILS CARDS */
.build-overview-card {
  background: rgba(13, 18, 32, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.build-overview-card.pve-theme {
  border-left: 4px solid var(--emerald-pve);
}

.build-overview-card.pvp-theme {
  border-left: 4px solid var(--crimson-pvp);
}

.build-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.build-playstyle-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

/* ROTATION LIST */
.rotation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.rotation-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* STIGMA PILLS */
.stigma-list {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.stigma-pill {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #d8b4fe;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* STAT PRIORITIES */
.stat-priority-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-prio-tag {
  background: rgba(230, 183, 60, 0.1);
  border: 1px solid rgba(230, 183, 60, 0.25);
  color: var(--gold-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* SKILLS SECTION WITH ICONS & LEVEL 16 BREAKPOINTS */
.section-subtitle {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.skill-card {
  background: rgba(13, 18, 32, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  position: relative;
  transition: var(--transition);
}

.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(18, 25, 44, 0.85);
}

.skill-card.breakpoint-active {
  border-color: rgba(212, 175, 55, 0.45);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(13, 18, 32, 0.85) 100%);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.skill-card-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.skill-icon-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  object-fit: cover;
  flex-shrink: 0;
  background: #000;
}

.skill-card.breakpoint-active .skill-icon-thumb {
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.skill-title-block {
  flex: 1;
}

.skill-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  display: block;
}

.skill-level-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-block;
  margin-top: 0.2rem;
}

.skill-level-badge.lvl-16 {
  background: rgba(230, 183, 60, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.skill-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.65rem;
}

.skill-breakpoint-box {
  background: rgba(230, 183, 60, 0.08);
  border: 1px dashed rgba(230, 183, 60, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* GAMING HOTBAR WITH ICONS */
.hotbar-container {
  display: flex;
  gap: 0.65rem;
  margin: 1.25rem 0;
  flex-wrap: wrap;
}

.hotbar-slot {
  width: 56px;
  height: 56px;
  background: #090e1a;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6);
}

.hotbar-slot.highlight {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.hotbar-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotbar-keycap {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  padding: 0.05rem 0.3rem;
}

/* HOTBAR & MACRO TOOL */
.tool-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.macro-code-box {
  background: #05070d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  color: #38bdf8;
  white-space: pre-wrap;
  margin-bottom: 1rem;
  position: relative;
}

.btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37, #b48c1e);
  color: #000;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e6c14f, #c69b27);
  box-shadow: 0 0 15px var(--gold-glow);
}

/* PET ATLAS */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.pet-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.pet-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
}

.pet-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.pet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.pet-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.pet-rarity-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.rarity-Gewöhnlich,
.rarity-Common {
  background: #334155;
  color: #94a3b8;
}

.rarity-Ungewöhnlich,
.rarity-Uncommon {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.rarity-Selten,
.rarity-Rare {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.rarity-Episch,
.rarity-Epic {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.rarity-Legendär,
.rarity-Legendary {
  background: rgba(230, 183, 60, 0.2);
  color: #fde047;
  border: 1px solid var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
}

.pet-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.pet-cp-highlight {
  color: var(--gold-primary);
  font-weight: 800;
}

/* CHECKLIST */
.checklist-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.checklist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.checklist-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.checklist-item.done {
  opacity: 0.55;
  text-decoration: line-through;
  border-color: rgba(16, 185, 129, 0.3);
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
  transition: var(--transition);
}

.checklist-item.done .checkbox-custom {
  background: var(--emerald-pve);
  border-color: var(--emerald-pve);
}

.checklist-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

/* EVENTS & COUNTDOWN WITH ARTWORK */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-card-banner {
  width: calc(100% + 3.5rem);
  height: 120px;
  margin: -1.75rem -1.75rem 1rem -1.75rem;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
  filter: brightness(0.85);
}

.event-countdown-box {
  background: #040711;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  margin: 1.25rem 0;
}

.countdown-digits {
  font-family: 'Consolas', monospace;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-arcane);
  letter-spacing: 0.1em;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(13, 18, 32, 0.95);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px var(--gold-glow);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* FOOTER */
.footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(4, 7, 13, 0.8);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer a {
  color: var(--gold-primary);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .class-header {
    flex-direction: column;
  }

  .class-avatar-box {
    width: 72px;
    height: 72px;
  }

  .classes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .classes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .build-toggle-wrapper {
    width: 100%;
  }

  .build-mode-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   WAKAYASHI STYLE ENHANCEMENTS: LANGUAGE SEGMENT, DAEVANION & GROUPED HOTBAR
   ========================================================================== */

/* Language Toggle Segmented Control */
.lang-seg {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.is-active {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 10px var(--gold-glow);
}

/* Daevanion Board UI */
.cg-daev-container {
  background: rgba(9, 13, 24, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.cg-daev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.cg-daev-stages-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cg-stage-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cg-stage-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.cg-stage-btn.is-active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.05) 100%);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 15px var(--gold-glow);
}

.cg-stage-btn b {
  color: var(--gold-primary);
}

/* Daevanion Board Tabs */
.cg-board-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.cg-board-tab-btn {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cg-board-tab-btn:hover {
  color: var(--text-main);
}

.cg-board-tab-btn.is-active {
  border-color: var(--blue-arcane);
  color: var(--blue-arcane);
  background: rgba(56, 189, 248, 0.1);
  box-shadow: 0 0 10px var(--blue-glow);
}

/* Visual Node Matrix Grid */
.cg-node-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cg-node-card {
  background: rgba(13, 18, 32, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  transition: var(--transition);
  cursor: pointer;
}

.cg-node-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.cg-node-card.unlocked {
  border-color: rgba(212, 175, 55, 0.5);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08) 0%, rgba(13, 18, 32, 0.9) 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.cg-node-card.locked {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.cg-node-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.cg-node-badge.core {
  background: rgba(56, 189, 248, 0.2);
  color: var(--blue-arcane);
  border: 1px solid var(--blue-arcane);
}

.cg-node-badge.stat {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.cg-node-badge.major {
  background: rgba(168, 85, 247, 0.2);
  color: var(--purple-epic);
  border: 1px solid var(--purple-epic);
}

.cg-node-badge.keystone {
  background: rgba(230, 183, 60, 0.2);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.cg-node-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}

.cg-node-bonus {
  font-size: 0.82rem;
  color: #fde047;
  font-weight: 600;
}

/* Cumulative Daevanion Stat Summary */
.cg-daev-summary-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  align-items: center;
}

.cg-summary-item {
  display: flex;
  flex-direction: column;
}

.cg-summary-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cg-summary-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-primary);
}

/* Grouped Hotbar (Wakayashi Exact Structure) */
.cg-hotbar-panel {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 2rem;
}

.cg-hotbar-group-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.cg-hotbar-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cg-hotbar-group-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.cg-hotbar-group-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cg-hotbar-slots-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cg-hotbar-key-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  background: #080c18;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
  transition: var(--transition);
}

.cg-hotbar-key-wrapper:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

.cg-hotbar-key-img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.cg-key-pill {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}


/* ==========================================================================
   MODERN DASHBOARD & COLLAPSIBLE SIDEBAR LAYOUT (MMORPG FANTASY + GAMING UI)
   ========================================================================== */

/* Main App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-main);
  position: relative;
}

/* Collapsible Left Sidebar */
.app-sidebar {
  width: 260px;
  background-color: #0b111e;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
}

.app-sidebar.collapsed {
  width: 68px;
}

/* Sidebar Brand Header */
.sidebar-header {
  padding: 1.15rem 1rem 1rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  min-height: 64px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-brand-text {
  transition: opacity 0.15s ease;
}

.app-sidebar.collapsed .sidebar-brand-text {
  opacity: 0;
  pointer-events: none;
  width: 0;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--border-subtle);
}

/* Sidebar Navigation Groups */
.sidebar-nav {
  padding: 0.85rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.sidebar-group-title {
  padding: 0 0.65rem 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
}

.app-sidebar.collapsed .sidebar-group-title {
  display: none;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.sidebar-link.active {
  background: rgba(56, 189, 248, 0.1);
  color: var(--blue-arcane);
  border-color: rgba(56, 189, 248, 0.25);
  font-weight: 700;
}

.sidebar-link.active.gold-accent {
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  border-color: rgba(212, 175, 55, 0.3);
}

.sidebar-link-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-link-text {
  transition: opacity 0.15s ease;
}

.app-sidebar.collapsed .sidebar-link-text {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.app-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 0.65rem 0;
}

/* Sidebar Footer (Language & Version) */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.app-sidebar.collapsed .sidebar-footer {
  display: none;
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: 260px;
  transition: margin-left 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-sidebar.collapsed~.app-main {
  margin-left: 68px;
}

/* Sticky Top Utility Bar */
.app-topbar {
  height: 60px;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  gap: 1.5rem;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.topbar-breadcrumb span {
  color: #fff;
  font-weight: 700;
}

/* Global Quick Search */
.topbar-search-box {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.45rem 2.25rem 0.45rem 2.25rem;
  color: #fff;
  font-size: 0.85rem;
  transition: var(--transition);
}

.topbar-search-input:focus {
  outline: none;
  border-color: var(--blue-arcane);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 12px var(--blue-glow);
}

.topbar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.topbar-search-shortcut {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: monospace;
}

/* Quick Action Shortcuts in Topbar */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   PAGE 1: STARTSEITE / DASHBOARD COMPONENTS
   ========================================================================== */

.dashboard-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(11, 15, 25, 0.98) 100%),
    url('assets/img/aion2-abyss-reshanta.webp') center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.dashboard-hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.dashboard-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.dashboard-hero-title {
  font-size: 2.15rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.dashboard-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* KPI Summary Cards Grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.dashboard-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.dashboard-kpi-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.kpi-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.kpi-icon-box svg {
  width: 24px;
  height: 24px;
  display: block;
}

.kpi-icon-box.gold {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-primary);
}

.kpi-icon-box.blue {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--blue-arcane);
}

.kpi-icon-box.green {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--emerald-pve);
}

.kpi-icon-box.purple {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: var(--purple-epic);
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.kpi-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}

/* Quick Class Selector Strip */
.dashboard-classes-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.dash-class-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: #fff;
}

.dash-class-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dash-class-emblem {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.dash-class-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.dash-class-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* Split 2-Column Section (Meta Builds & Patch Radar) */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.meta-build-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  transition: var(--transition);
}

.meta-build-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.meta-tier-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.meta-tier-badge.s-tier {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-primary);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.meta-tier-badge.a-tier {
  background: rgba(56, 189, 248, 0.2);
  color: var(--blue-arcane);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   PAGE 3: ITEMDATENBANK (COMPACT STONESHARD/POE TABLE)
   ========================================================================== */

.item-db-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.item-filter-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.item-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.item-compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}

.item-compact-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.item-compact-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.item-compact-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.item-cell-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.item-thumb-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #0b0f19;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-thumb-box:hover {
  transform: scale(1.06);
  z-index: 2;
}

.item-thumb-box.special,
.item-thumb-box.ancient {
  border-color: #04ddd9;
  box-shadow: 0 0 10px rgba(4, 221, 217, 0.45);
  background-image: var(--rarity-special-bg);
}

.item-thumb-box.heroic,
.item-thumb-box.mythic,
.item-thumb-box.eternal {
  border-color: #d21046;
  box-shadow: 0 0 10px rgba(210, 16, 70, 0.45);
  background-image: var(--rarity-mythic-bg);
}

.item-thumb-box.unique,
.item-thumb-box.fabled {
  border-color: #d3ad0f;
  box-shadow: 0 0 10px rgba(211, 173, 15, 0.45);
  background-image: var(--rarity-fabled-bg);
}

.item-thumb-box.epic,
.item-thumb-box.legend {
  border-color: #1383b6;
  box-shadow: 0 0 10px rgba(19, 131, 182, 0.45);
  background-image: var(--rarity-heroic-bg);
}

.item-thumb-box.rare,
.item-thumb-box.superior {
  border-color: #498b35;
  box-shadow: 0 0 10px rgba(73, 139, 53, 0.45);
  background-image: var(--rarity-superior-bg);
}

.item-thumb-box.common {
  border-color: #808080;
  box-shadow: 0 0 8px rgba(128, 128, 128, 0.35);
  background-image: var(--rarity-common-bg);
}

.item-thumb-img {
  width: 100%;
  height: 100%;
  padding: 2px;
  box-sizing: border-box;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.item-rarity-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  text-transform: uppercase;
  display: inline-block;
}

.item-rarity-pill.special,
.item-rarity-pill.ancient {
  background: rgba(4, 221, 217, 0.15);
  color: #04ddd9;
  border: 1px solid rgba(4, 221, 217, 0.4);
}

.item-rarity-pill.heroic,
.item-rarity-pill.mythic,
.item-rarity-pill.eternal {
  background: rgba(210, 16, 70, 0.15);
  color: #d21046;
  border: 1px solid rgba(210, 16, 70, 0.4);
}

.item-rarity-pill.unique,
.item-rarity-pill.fabled {
  background: rgba(211, 173, 15, 0.15);
  color: #d3ad0f;
  border: 1px solid rgba(211, 173, 15, 0.4);
}

.item-rarity-pill.epic,
.item-rarity-pill.legend {
  background: rgba(19, 131, 182, 0.15);
  color: #1383b6;
  border: 1px solid rgba(19, 131, 182, 0.4);
}

.item-rarity-pill.rare,
.item-rarity-pill.superior {
  background: rgba(73, 139, 53, 0.15);
  color: #498b35;
  border: 1px solid rgba(73, 139, 53, 0.4);
}

.item-rarity-pill.common {
  background: rgba(128, 128, 128, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(128, 128, 128, 0.3);
}

.item-action-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--blue-arcane);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.item-action-btn:hover {
  background: var(--blue-arcane);
  color: #000;
}

/* ==========================================================================
   PAGE 4: 3-COLUMN BUILD PLANER WORKSPACE (POB / TL STYLE)
   ========================================================================== */

.planner-3col-workspace {
  display: grid;
  grid-template-columns: 340px 1fr 380px;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1200px) {
  .planner-3col-workspace {
    grid-template-columns: 1fr;
  }
}

.planner-col {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.planner-center-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  min-height: 480px;
}

.planner-char-artwork {
  max-height: 380px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8));
}


/* ==========================================================================
   ENHANCED CLASS SELECTOR & DETAIL STYLING (ISSUE 2 FIX)
   ========================================================================== */

.classes-hero-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.75) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.classes-role-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.class-filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.class-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.class-filter-pill.active {
  background: var(--blue-arcane);
  color: #040812;
  border-color: var(--blue-arcane);
  font-weight: 800;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.class-card {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.class-card:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

.class-card.active {
  border-color: var(--gold-primary);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12) 0%, #0d1322 100%);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.3), 0 10px 30px rgba(0, 0, 0, 0.8);
}

.class-card-banner {
  height: 140px;
  position: relative;
  overflow: hidden;
  background: #080c16;
}

.class-card-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.class-card:hover .class-card-portrait {
  transform: scale(1.08);
}

.class-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f1523 0%, rgba(15, 21, 35, 0.4) 60%, transparent 100%);
}

.class-card-info {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.class-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.class-emblem-mini {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.class-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.2;
}

.class-role {
  font-size: 0.72rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.class-tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   BUILD PLANNER GEAR SLOTS REPAIR (ISSUE 4 FIX)
   ========================================================================== */

.planner-col {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.planner-gear-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  transition: all 0.2s ease;
}

.planner-gear-card:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(255, 255, 255, 0.22);
}

.planner-gear-card.has-item {
  border-color: rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.planner-gear-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.planner-gear-slot-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.planner-gear-rarity-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.planner-gear-rarity-pill.mythic {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-primary);
  border-color: rgba(212, 175, 55, 0.4);
}

.planner-gear-rarity-pill.heroic {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-arcane);
  border-color: rgba(56, 189, 248, 0.4);
}

.planner-gear-select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: #090d16 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f1f5f9 !important;
  padding: 0.45rem 0.65rem !important;
  border-radius: 5px !important;
  font-size: 0.8rem !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.planner-gear-select:focus {
  border-color: var(--gold-primary) !important;
  outline: none;
}

.planner-gear-stat-pill {
  font-size: 0.72rem;
  color: var(--blue-arcane);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   WAKAYASHI DAEVANION BOARD (ISSUE 8 FIX)
   ========================================================================== */

.wakayashi-daev-container {
  background: #0d121f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin: 2rem 0;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.7);
}

.wakayashi-daev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wakayashi-daev-title {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

.wakayashi-stage-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wakayashi-stage-btn {
  background: #151b2b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wakayashi-stage-btn:hover {
  background: #1e263c;
  color: #fff;
}

.wakayashi-stage-btn.active {
  background: #f59e0b;
  color: #0b0f19;
  border-color: #f59e0b;
  font-weight: 800;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* 6 Deity Navigation Tabs */
.wakayashi-deity-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .wakayashi-deity-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}

.wakayashi-deity-tab {
  background: #111726;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.65rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wakayashi-deity-tab:hover {
  background: #172033;
  border-color: rgba(255, 255, 255, 0.2);
}

.wakayashi-deity-tab.active {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.15) 0%, #151d30 100%);
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.wakayashi-deity-tab-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
}

.wakayashi-deity-tab-pts {
  font-size: 0.75rem;
  color: var(--gold-primary);
  font-weight: 700;
}

.wakayashi-deity-tab-lvl {
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* 2-Column Split: 9x9 Matrix on Left, Stats & Skills on Right */
.wakayashi-board-split {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 380px;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 1050px) {
  .wakayashi-board-split {
    grid-template-columns: 1fr;
  }
}

/* 9x9 Node Matrix */
.wakayashi-matrix-box {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wakayashi-grid-9x9 {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
}

.wakayashi-node {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.wakayashi-node.stone {
  background: #141b2a;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.wakayashi-node.stone:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

.wakayashi-node.active-crest {
  background: #16243d;
  border: 1px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.wakayashi-node.skill {
  background: #182238;
  border: 1.5px solid #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  overflow: hidden;
}

.wakayashi-node.skill:hover {
  transform: scale(1.12);
  z-index: 10;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.7);
}

.wakayashi-node-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daev-crest-svg {
  width: 80%;
  height: 80%;
  opacity: 0.6;
}

.daev-crest-svg.active {
  opacity: 1;
  filter: drop-shadow(0 0 4px #38bdf8);
}

/* Right Detail Pane */
.wakayashi-right-pane {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wakayashi-right-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
}

.wakayashi-right-deity-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.wakayashi-right-points-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold-primary);
}

.wakayashi-right-milestone {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.wakayashi-section-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
}

.wakayashi-skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.wakayashi-skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}

.wakayashi-skill-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.wakayashi-skill-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wakayashi-skill-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.wakayashi-skill-level {
  font-size: 0.85rem;
  font-weight: 800;
  color: #4ade80;
}

.wakayashi-stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wakayashi-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.wakayashi-stat-row span:first-child {
  color: var(--text-muted);
}

.wakayashi-stat-row span:last-child {
  font-weight: 800;
  color: #fff;
}

/* ==========================================================================
   FORMULAS & DPS CALCULATOR VIEW (ISSUE 5 FIX)
   ========================================================================== */

.formulas-calc-container {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 1050px) {
  .formulas-calc-container {
    grid-template-columns: 1fr;
  }
}

.formulas-calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.calc-slider-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.calc-slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 700;
}

.calc-slider-input {
  width: 100%;
  accent-color: var(--gold-primary);
  cursor: pointer;
}

.calc-results-card {
  background: #090d16;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.calc-result-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.calc-result-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.calc-result-val {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
}

/* ==========================================================================
   WAKAYASHI 1:1 SKILL-SETUP & CLASS BUILD SYSTEM
   ========================================================================== */

:root {
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-14: 14px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-28: 28px;
  --space-36: 36px;
  --text-2xs: 0.65rem;
  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-base: 0.9rem;
  --text-md: 0.95rem;
  --r-pill: 9999px;
}

.cg-part {
  padding: 1.75rem 0 0 0;
  width: 100%;
}

.cg-part-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  flex-wrap: wrap;
  margin-bottom: var(--space-14);
}

.cg-part-head h4 {
  margin: 0;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.01em;
}

.cg-part-head span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.cg-panel {
  --cg-ink: #e8e6df;
  --cg-ink-strong: #ffffff;
  --cg-ink-muted: #c9ccd3;
  --cg-ink-subtle: #8d93a0;
  --cg-line: rgba(255, 255, 255, 0.08);
  --cg-gold: #c9a961;
  --cg-gold-bright: #f2d27a;
  --cg-tile: #0d1118;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #161c28 0%, #0f141e 100%);
  border: 1px solid var(--cg-line);
  border-radius: 14px;
  color: var(--cg-ink);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.cg-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 480px;
  gap: var(--space-28);
  padding: var(--space-20) var(--space-24);
  border-bottom: 1px solid var(--cg-line);
}

@media (max-width: 1100px) {
  .cg-setup {
    grid-template-columns: 1fr;
  }
}

/* Detail Pane (Left) */
.cg-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-14);
  min-width: 0;
}

.cg-detail-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-10);
  flex-wrap: wrap;
}

.cg-detail-title h5 {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--cg-ink-strong);
  line-height: 1.2;
}

.cg-detail-title h5 span {
  color: var(--cg-gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 0.35rem;
}

.cg-detail-title small {
  font-size: var(--text-base);
  color: var(--cg-ink-subtle);
  font-style: italic;
}

.cg-detail-rank {
  margin-left: auto;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-pill);
  background: var(--cg-gold);
  color: #1a1206;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(201, 169, 97, 0.4);
}

.cg-detail-tags {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.cg-tag {
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #2a303d;
  color: var(--cg-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cg-tag--type {
  background: #1e3a6a;
  color: #c8dcff;
  border-color: #2b4c8a;
}

.cg-detail-text {
  display: flex;
  align-items: flex-start;
  gap: var(--space-14);
  padding-top: var(--space-14);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cg-detail-text img {
  width: 58px;
  height: 58px;
  border-radius: 6px;
  border: 1.5px solid var(--cg-gold);
  flex: none;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cg-detail-text p {
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.55;
  color: #d1d5db;
}

.cg-detail-sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-10);
  padding-top: var(--space-14);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-md);
  font-weight: 800;
  color: var(--cg-ink-strong);
}

.cg-detail-sub span+span {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--cg-ink-subtle);
  text-align: right;
}

/* Specialties List */
.cg-specs {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.cg-specs li {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: 0.45rem var(--space-10);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: var(--text-base);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.15s ease;
}

.cg-specs li.is-pick {
  background: rgba(201, 169, 97, 0.12);
  border-color: rgba(201, 169, 97, 0.45);
}

.cg-specs li.is-pick .cg-spec-text {
  color: var(--cg-ink-strong);
  font-weight: 600;
}

.cg-slot {
  position: relative;
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  overflow: hidden;
  background: #090d14;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cg-slot img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.35;
  filter: grayscale(0.7);
  object-fit: cover;
}

.cg-slot.is-pick img {
  opacity: 1;
  filter: none;
}

.cg-spec-level {
  font-size: 0.72rem;
  color: var(--cg-gold);
  font-weight: 800;
  min-width: 42px;
}

.cg-spec-text {
  font-size: 0.85rem;
  color: var(--cg-ink-muted);
}

.cg-detail-note {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: var(--space-10) var(--space-12);
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 8px;
  background: rgba(201, 169, 97, 0.08);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.cg-detail-note b {
  color: var(--cg-gold-bright);
}

/* Skill Tiles (Right) */
.cg-tiles {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.cg-tile-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.cg-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.35rem var(--space-10);
  border: 1px solid var(--cg-line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--cg-ink-strong);
}

.cg-bar span+span {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--cg-ink-subtle);
}

.cg-tile-row {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.cg-level-tag {
  min-width: 48px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cg-level-tag--gold {
  background: rgba(201, 169, 97, 0.2);
  color: var(--cg-gold-bright);
  border: 1px solid rgba(201, 169, 97, 0.5);
}

.cg-level-tag--mid {
  background: rgba(56, 189, 248, 0.15);
  color: var(--blue-arcane);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.cg-level-tag--muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cg-tile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cg-tile {
  position: relative;
  width: 60px;
  height: 60px;
  padding: 0;
  flex: none;
  border-radius: 6px;
  background: var(--cg-tile);
  border: 1.5px solid #8e6f32;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.cg-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(242, 210, 122, 0.4), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.cg-tile.is-selected {
  border: 2px solid #f2d27a;
  box-shadow: 0 0 0 2px rgba(242, 210, 122, 0.6), 0 0 15px rgba(242, 210, 122, 0.8);
}

.cg-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cg-tile-level {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 0 2px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

.cg-rank {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2d27a;
  color: #1a1206;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 0 0 2px #0f141e;
  z-index: 5;
}

.cg-rank--sm {
  width: 15px;
  height: 15px;
  font-size: 0.62rem;
  top: -3px;
  right: -3px;
}

/* Plan Summary Table (Bottom) */
.cg-plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding: var(--space-16) var(--space-24) var(--space-20);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 0 0 14px 14px;
}

.cg-plan-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cg-ink-strong);
}

.cg-plan-head span+span {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--cg-ink-subtle);
}

.cg-plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6) var(--space-24);
}

@media (max-width: 900px) {
  .cg-plan-list {
    grid-template-columns: 1fr;
  }
}

.cg-plan-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 48px 180px;
  gap: var(--space-10);
  align-items: center;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
}

.cg-plan-list li>img {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid rgba(201, 169, 97, 0.5);
  object-fit: cover;
}

.cg-plan-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cg-ink-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cg-plan-slots {
  display: flex;
  gap: 5px;
}