:root {
  --bg-deep: #070b14;
  --bg-surface: #0f1629;
  --bg-card: #131c33;
  --bg-card-hover: #192542;
  --bg-elevated: #1c2847;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-accent: rgba(56, 189, 248, 0.35);
  --border-gold: rgba(251, 191, 36, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-gold: #fbbf24;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --font-display: 'Cinzel', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 10px 28px -6px rgba(0, 0, 0, 0.55);
}

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

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.09), transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(251, 191, 36, 0.06), transparent 35%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}

code {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #7dd3fc;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.86em;
}

/* -----------------------------------------------------------
   Top Navigation Bar
----------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0 1.5rem;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}

.brand-crest {
  width: 36px;
  height: 36px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: 0.07em;
  color: #fff;
  line-height: 1.1;
}

.brand-accent {
  color: var(--accent-gold);
}

.brand-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Global Search */
.topbar-search {
  position: relative;
  flex: 1;
  max-width: 520px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

#globalSearchInput {
  width: 100%;
  background: rgba(19, 28, 51, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.55rem 2.4rem 0.55rem 2.35rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#globalSearchInput:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.search-kbd {
  position: absolute;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 6px;
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 440px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  z-index: 200;
  padding: 0.4rem;
}

.search-dropdown.hidden {
  display: none;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.search-result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-result-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: rgba(19, 28, 51, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.7rem;
  border-radius: 99px;
}

.sync-pill-btn {
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.sync-pill-btn:hover {
  border-color: var(--accent-cyan);
  color: #fff;
  background: var(--bg-card-hover);
}
.sync-refresh-icon {
  font-size: 0.88rem;
  opacity: 0.75;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.btn-icon {
  background: rgba(19, 28, 51, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}
.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.48rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
  text-decoration: none !important;
}
.btn-primary:hover {
  filter: brightness(1.12);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.84rem;
  padding: 0.48rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: #fff;
}

/* -----------------------------------------------------------
   Main Wiki Layout (Sidebar + Article Container)
----------------------------------------------------------- */
.wiki-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: calc(100vh - 66px);
}

.wiki-sidebar {
  background: rgba(11, 17, 32, 0.78);
  border-right: 1px solid var(--border-subtle);
  padding: 1.25rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  padding: 0 0.65rem;
  margin-bottom: 0.45rem;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s;
}

.nav-item:hover {
  background: rgba(30, 41, 59, 0.55);
  color: #fff;
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.13);
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
  font-weight: 600;
}

.nav-icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-label {
  flex: 1;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-secondary);
  padding: 1px 7px;
  border-radius: 99px;
}

.sidebar-sublist {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.job-Quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.42rem 0.7rem;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.job-Quick-link:hover {
  background: rgba(30, 41, 59, 0.6);
  color: #fff;
}

.job-pill-mini {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 0.5rem;
  color: #090d16;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}
.meta-line strong {
  color: var(--text-secondary);
}

/* -----------------------------------------------------------
   Main Wiki Content Area & Typography
----------------------------------------------------------- */
.wiki-main {
  padding: 2rem 2.5rem 4rem;
  max-width: 1260px;
  width: 100%;
  margin: 0 auto;
}

.wiki-hero {
  background: linear-gradient(135deg, rgba(19, 28, 51, 0.95), rgba(15, 23, 42, 0.92));
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.wiki-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.12), transparent 68%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid var(--border-gold);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  margin-bottom: 0.85rem;
}

.wiki-hero h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin: 0 0 0.65rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.wiki-hero p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.02rem;
  max-width: 820px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-card {
  background: rgba(11, 17, 32, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cards & Grids */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.2rem;
}

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

.wiki-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
}

.wiki-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wiki-card p {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  letter-spacing: 0.02em;
}

.badge-gold {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.badge-cyan {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-cyan);
  border: 1px solid var(--border-accent);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* -----------------------------------------------------------
   Job Soul Crystals Encyclopedia Cards
----------------------------------------------------------- */
.job-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.14s;
}
.filter-chip:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}
.filter-chip.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #06101e;
}

.crystal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.crystal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
}

.crystal-title-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.crystal-job-crest {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #090d16;
  flex-shrink: 0;
}

.crystal-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.crystal-role {
  font-size: 0.88rem;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 2px;
}

.crystal-columns {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.highlight-list {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.highlight-list li::marker {
  color: var(--accent-cyan);
}

/* Tables */
.wiki-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(10, 15, 29, 0.6);
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.wiki-table th,
.wiki-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.wiki-table th {
  background: rgba(19, 28, 51, 0.9);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wiki-table tr:last-child td {
  border-bottom: none;
}

.wiki-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}

.ability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.ability-box {
  background: rgba(11, 17, 32, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
}

.ability-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ability-box-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.94rem;
}

.ability-box-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-gold);
}

/* Playstyle Guide Panel inside Crystal Cards */
.guide-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.15rem;
}

.guide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.guide-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-emerald);
}

.guide-glance {
  font-size: 0.95rem;
  color: #f8fafc;
  margin: 0 0 0.85rem;
  line-height: 1.5;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
}

.guide-section h5 {
  margin: 0 0 0.4rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.guide-section.guide-tips-sec h5 {
  color: var(--accent-gold);
}

.guide-list,
.guide-steps {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.guide-steps li::marker {
  color: var(--accent-emerald);
  font-weight: 700;
}

.guide-list li::marker {
  color: var(--accent-cyan);
}

.guide-tips-sec .guide-list li::marker {
  color: var(--accent-gold);
}

.view-mode-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

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

/* -----------------------------------------------------------
   Weaponskill Talent Tree Explorer
----------------------------------------------------------- */
.ws-explorer-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.ws-list-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: 760px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ws-list-scroll {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

.ws-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  background: rgba(11, 17, 32, 0.55);
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s;
}
.ws-item-btn:hover {
  background: var(--bg-card-hover);
  color: #fff;
}
.ws-item-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-cyan);
  color: #fff;
  font-weight: 600;
}

.ws-tree-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.tier-block {
  margin-top: 1.25rem;
  background: rgba(10, 15, 29, 0.68);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.tier-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-gold);
}

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

.talent-node-card {
  background: var(--bg-card);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.talent-node-card.sc-node {
  border-color: rgba(168, 85, 247, 0.42);
  background: linear-gradient(160deg, rgba(30, 20, 56, 0.7), rgba(19, 28, 51, 0.9));
}

.talent-node-card.capstone-node {
  border-color: var(--border-gold);
  background: linear-gradient(160deg, rgba(45, 33, 12, 0.65), rgba(19, 28, 51, 0.9));
}

.node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.node-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.node-ranks {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
}

.node-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* -----------------------------------------------------------
   Modal Dialog
----------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 6, 14, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 1rem;
}
.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
}
.modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.modal-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 7px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.55rem 0.75rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border-subtle);
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
  .wiki-layout {
    grid-template-columns: 1fr;
  }
  .wiki-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }
  .crystal-columns,
  .ws-explorer-layout {
    grid-template-columns: 1fr;
  }
  .wiki-main {
    padding: 1.25rem;
  }
}
