/* Wiki de Classes — canvas 2D interativo */
body:has(.cw-page--interactive) .site-main {
  padding: 0 !important;
  overflow: hidden;
  height: calc(100vh - var(--topbar-h));
}

.cw-page--interactive {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  gap: 0 !important;
  max-width: none !important;
}

@media (min-width: 900px) {
  .cw-page--interactive {
    padding-right: 0 !important;
  }
}

.cw-arena {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #0a0a0c;
}

.cw-arena-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.cw-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: cwOrbFloat 12s ease-in-out infinite;
}
.cw-orb--1 {
  width: 420px; height: 420px;
  top: -8%; left: 10%;
  background: rgba(230, 126, 34, 0.45);
}
.cw-orb--2 {
  width: 360px; height: 360px;
  bottom: 5%; right: 15%;
  background: rgba(180, 80, 20, 0.35);
  animation-delay: -4s;
}
.cw-orb--3 {
  width: 280px; height: 280px;
  top: 40%; left: 45%;
  background: rgba(255, 160, 60, 0.2);
  animation-delay: -7s;
}
@keyframes cwOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}
.cw-grid-floor {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(230, 126, 34, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 126, 34, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 55%, black 20%, transparent 75%);
  animation: cwGridPulse 6s ease-in-out infinite;
}
@keyframes cwGridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}

.cw-hud {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 10px;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.95), rgba(10, 10, 12, 0.4));
  border-bottom: 1px solid rgba(230, 126, 34, 0.15);
}
.cw-hud h1 {
  margin: 2px 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}
.cw-hud-stats {
  display: flex;
  gap: 16px;
  font-size: .88rem;
  color: var(--text-muted);
}
.cw-hud-stats strong {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-right: 3px;
}
.cw-hud-stats-accent strong { color: var(--accent-hover); }

.cw-race-dock {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 14px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 126, 34, 0.35) transparent;
  background: rgba(8, 8, 10, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cw-race-dock::-webkit-scrollbar {
  height: 5px;
}
.cw-race-dock::-webkit-scrollbar-track {
  background: transparent;
}
.cw-race-dock::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
.cw-race-dock::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 126, 34, 0.45);
}
.cw-race-pill {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 14px;
  min-width: 110px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(20, 20, 24, 0.85);
  color: var(--text-secondary);
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s, background .25s;
}
.cw-race-pill-glow {
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(230, 126, 34, 0.5), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.cw-race-pill-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  transition: border-color .25s, box-shadow .25s, transform .25s;
  overflow: hidden;
}
.cw-race-pill-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.cw-race-pill-name {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.cw-race-pill:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(230, 126, 34, 0.45);
}
.cw-race-pill:hover .cw-race-pill-glow { opacity: 0.6; }
.cw-race-pill:hover .cw-race-pill-ring {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(230, 126, 34, 0.35);
}
.cw-race-pill.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(230, 126, 34, 0.15), rgba(20, 20, 24, 0.9));
  box-shadow: 0 8px 32px rgba(230, 126, 34, 0.2);
  transform: translateY(-2px);
}
.cw-race-pill.active .cw-race-pill-glow { opacity: 1; }
.cw-race-pill.active .cw-race-pill-ring {
  border-color: var(--accent-hover);
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.2), 0 0 32px rgba(230, 126, 34, 0.4);
  animation: cwRacePulse 2.5s ease-in-out infinite;
}
@keyframes cwRacePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.2), 0 0 24px rgba(230, 126, 34, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(230, 126, 34, 0.35), 0 0 40px rgba(230, 126, 34, 0.55); }
}

.cw-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 10px;
  background: rgba(8, 8, 10, 0.5);
}
.cw-search-wrap {
  position: relative;
  width: min(280px, 100%);
}
.cw-search-wrap > i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.cw-search {
  width: 100%;
  padding: 10px 12px 10px 38px;
  font-size: .92rem;
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.1);
}
.cw-zoom-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.cw-zoom-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s, color .2s, background .2s;
}
.cw-zoom-btn:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  background: var(--accent-dim);
}
.cw-zoom-label {
  min-width: 48px;
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
}
.cw-toolbar-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: .78rem;
  color: var(--text-muted);
  opacity: .85;
}
.cw-toolbar-hint i { color: var(--accent); margin-right: 4px; }

.cw-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}

.cw-viewport {
  position: relative;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(230, 126, 34, 0.03), transparent);
}
.cw-viewport.is-dragging { cursor: grabbing; }
.cw-viewport.is-dragging .cw-tree-node { pointer-events: none; }

.cw-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  opacity: 0;
  transition: opacity .35s ease;
}
.cw-canvas--ready { opacity: 1; }
.cw-canvas--empty { opacity: 0.3; }

.cw-lines-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.cw-link-group {
  opacity: 0.72;
  transition: opacity .3s ease;
}
.cw-link-track {
  stroke: rgba(8, 8, 12, 0.92);
  stroke-width: 11;
  opacity: 0.95;
}
.cw-link-glow {
  stroke: rgba(230, 126, 34, 0.28);
  stroke-width: 16;
  opacity: 0.22;
}
.cw-link-core {
  stroke-dasharray: 14 9;
  animation: cwLinkFlow 1.6s linear infinite;
  opacity: 0.88;
  transition: stroke-width .25s, opacity .25s, filter .25s;
}
.cw-link-joint {
  fill: url(#cwLinkJoint);
  opacity: 0.82;
  transition: opacity .25s, r .25s;
}
.cw-link-joint-ring {
  fill: none;
  stroke: rgba(230, 126, 34, 0.35);
  stroke-width: 1.5;
  opacity: 0.45;
  animation: cwJointPulse 2.4s ease-out infinite;
}
.cw-link-spark {
  fill: #ffcc70;
  opacity: 0.75;
}
.cw-link-group.is-active {
  opacity: 1;
}
.cw-link-group.is-active .cw-link-track {
  stroke: rgba(30, 18, 8, 0.95);
  stroke-width: 12;
}
.cw-link-group.is-active .cw-link-glow {
  opacity: 0.5;
  stroke: rgba(255, 170, 70, 0.55);
}
.cw-link-group.is-active .cw-link-core {
  stroke: url(#cwLinkGradActive);
  stroke-width: 4.5;
  stroke-dasharray: 18 10;
  animation-duration: 0.9s;
  filter: drop-shadow(0 0 6px rgba(255, 180, 80, 0.9));
  marker-end: url(#cwArrowHeadActive);
}
.cw-link-group.is-active .cw-link-joint {
  opacity: 1;
}
.cw-link-group.is-active .cw-link-joint-ring {
  opacity: 0.85;
  stroke: rgba(255, 200, 120, 0.75);
}
.cw-link-group.is-active .cw-link-spark {
  fill: #ffe8a8;
  opacity: 1;
}
@keyframes cwLinkFlow {
  to { stroke-dashoffset: -23; }
}
@keyframes cwJointPulse {
  0% { opacity: 0.55; }
  70% { opacity: 0; }
  100% { opacity: 0; }
}

.cw-nodes-layer {
  position: absolute;
  inset: 0;
}

.cw-tree-line-label {
  position: absolute;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 320px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 16, 0.75);
  backdrop-filter: blur(8px);
  transition: border-color .25s, box-shadow .25s, background .25s;
  pointer-events: none;
}
.cw-tree-line-label.is-active {
  border-color: var(--accent);
  background: rgba(230, 126, 34, 0.1);
  box-shadow: 0 0 28px rgba(230, 126, 34, 0.2);
}
.cw-tree-line-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 800;
  background: var(--accent-dim);
  color: var(--accent-hover);
  border: 1px solid rgba(230, 126, 34, 0.4);
}
.cw-tree-line-label strong {
  display: block;
  font-size: .95rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.cw-tree-line-label em {
  display: block;
  font-style: normal;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.cw-tree-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s, filter .2s;
  z-index: 2;
  animation: cwNodeAppear .55s cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes cwNodeAppear {
  from { opacity: 0; transform: scale(0.6) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.cw-tree-node.is-filtered-out {
  opacity: 0.12;
  pointer-events: none;
}
.cw-tree-node.is-line-lit {
  opacity: 0.75;
  filter: saturate(0.7);
}
.cw-tree-node.is-hovered {
  transform: scale(1.12);
  z-index: 10;
}
.cw-tree-node-tier {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 6px;
  text-shadow: 0 0 12px rgba(230, 126, 34, 0.6);
}
.cw-tree-node-ring {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 5px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.08), rgba(0,0,0,0.5));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: border-color .25s, box-shadow .25s;
}
.cw-tree-node-ring img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.cw-tree-node-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: cwNodePulse 2s ease-out infinite;
}
.cw-tree-node.is-hovered .cw-tree-node-pulse { opacity: 1; }
.cw-tree-node.is-hovered .cw-tree-node-ring {
  border-color: var(--accent-hover);
  box-shadow:
    0 0 0 5px rgba(230, 126, 34, 0.25),
    0 0 48px rgba(230, 126, 34, 0.45),
    0 16px 48px rgba(0, 0, 0, 0.5);
}
@keyframes cwNodePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 0; }
}
.cw-tree-node-name {
  margin-top: 10px;
  max-width: 160px;
  font-size: .88rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: var(--text-secondary);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.cw-tree-node.is-hovered .cw-tree-node-name {
  color: var(--accent-hover);
  font-size: .95rem;
}

.cw-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--text-muted);
  z-index: 3;
  pointer-events: none;
}
.cw-empty i { font-size: 2rem; color: var(--accent); display: block; margin-bottom: 10px; }

/* Barra lateral de informações — coluna fixa à direita */
.cw-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 440px;
  flex-shrink: 0;
  border-left: 1px solid rgba(230, 126, 34, 0.25);
  background: rgba(8, 8, 10, 0.98);
  overflow: hidden;
  position: relative;
  z-index: 5;
}
.cw-sidebar--class {
  border-left-color: var(--accent);
  background: linear-gradient(180deg, rgba(230, 126, 34, 0.08), rgba(10, 10, 12, 0.98));
}
.cw-sidebar-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.cw-sidebar-head i { color: var(--accent); font-size: 1rem; }
.cw-sidebar-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 126, 34, 0.42) transparent;
}
.cw-sidebar-body::-webkit-scrollbar {
  width: 6px;
}
.cw-sidebar-body::-webkit-scrollbar-track {
  background: transparent;
  margin: 10px 0;
}
.cw-sidebar-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(230, 126, 34, 0.5), rgba(230, 126, 34, 0.22));
  border-radius: 999px;
  border: 1px solid rgba(230, 126, 34, 0.18);
  min-height: 48px;
}
.cw-sidebar-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.72), rgba(230, 126, 34, 0.45));
  border-color: rgba(243, 156, 18, 0.32);
}
.cw-sidebar-body::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, var(--accent-hover), var(--accent));
}
.cw-sidebar-panel {
  padding: 18px;
  animation: cwDockIn .25s ease;
}
.cw-sidebar-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cw-sidebar-intro strong { font-size: 1rem; }
.cw-sidebar-panel > p {
  margin: 0;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.cw-sidebar-class-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.cw-sidebar-class-meta { min-width: 0; flex: 1; }
.cw-sidebar-class-meta h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.15;
}
.cw-sidebar-desc {
  margin: 0 0 16px;
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* —— Painel de detalhes da classe —— */
.cw-class-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cw-class-hero-portrait { position: relative; flex-shrink: 0; }
.cw-class-hero-tier {
  position: absolute;
  bottom: -6px;
  right: -6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #1a1008;
  background: linear-gradient(135deg, #ffd080, #e67e22);
  border: 2px solid rgba(8, 8, 10, 0.9);
  box-shadow: 0 4px 14px rgba(230, 126, 34, 0.45);
  white-space: nowrap;
}
.cw-class-hero-body { min-width: 0; flex: 1; }
.cw-class-hero-body h2 {
  margin: 0 0 4px;
  font-size: 1.22rem;
  line-height: 1.2;
  word-break: break-word;
}
.cw-class-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.cw-badge {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.2;
}
.cw-badge--race {
  color: var(--accent-hover);
  border-color: rgba(230, 126, 34, 0.4);
  background: var(--accent-dim);
}
.cw-badge--line {
  color: #c8d4ff;
  border-color: rgba(120, 140, 255, 0.35);
  background: rgba(80, 100, 200, 0.12);
}
.cw-class-key {
  margin: 0;
  font-size: .7rem;
  color: var(--text-muted);
  font-family: ui-monospace, Consolas, monospace;
  opacity: 0.7;
  word-break: break-all;
}

.cw-class-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.cw-class-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}
.cw-class-meta-item > i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.cw-class-meta-item > div { min-width: 0; }
.cw-class-meta-item span {
  display: block;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.cw-class-meta-item strong {
  display: block;
  font-size: .84rem;
  color: var(--text-primary, #f0f0f0);
  line-height: 1.3;
  word-break: break-word;
}

.cw-detail-section {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.cw-detail-section.hidden { display: none; }
.cw-detail-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.cw-detail-heading i {
  color: var(--accent);
  font-size: .95rem;
  flex-shrink: 0;
}
.cw-detail-hint {
  margin: -4px 0 12px;
  font-size: .76rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.cw-detail-hint i { color: var(--accent); margin-right: 4px; }
.cw-detail-hint--line {
  margin: 0 0 12px;
  font-style: italic;
  color: var(--text-secondary);
  font-size: .82rem;
}

.cw-stat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.cw-stat-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(230, 126, 34, 0.08);
  border: 1px solid rgba(230, 126, 34, 0.22);
  min-width: 0;
}
.cw-stat-chip-label {
  font-size: .76rem;
  color: var(--text-secondary);
  line-height: 1.2;
}
.cw-stat-chip-value {
  font-size: .9rem;
  font-weight: 800;
  color: var(--accent-hover);
  flex-shrink: 0;
}

.cw-power-card {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.cw-power-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cw-power-type {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--accent-hover);
  background: rgba(230, 126, 34, 0.15);
  border: 1px solid rgba(230, 126, 34, 0.35);
  flex-shrink: 0;
}
.cw-power-card-head strong {
  font-size: .96rem;
  color: var(--text-primary, #f2f2f2);
  line-height: 1.25;
}
.cw-detail-subheading {
  margin: 0 0 8px;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.cw-detail-subheading.hidden { display: none; }
.cw-power-card > p {
  margin: 0 0 12px;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(230, 126, 34, 0.5);
}
.cw-power-tags {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cw-power-tags.hidden { display: none; }
.cw-power-tag {
  font-size: .68rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
}
.cw-power-tag--aura {
  color: #c8b0ff;
  background: rgba(120, 80, 200, 0.15);
  border-color: rgba(160, 120, 255, 0.35);
}
.cw-power-tag--mech {
  color: #90d8ff;
  background: rgba(52, 152, 219, 0.12);
  border-color: rgba(52, 152, 219, 0.3);
}
.cw-modifier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.cw-modifier-list.hidden { display: none; }
.cw-modifier-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.3;
}
.cw-modifier-list li::before {
  content: '▲';
  font-size: .55rem;
  color: #2ecc71;
  flex-shrink: 0;
}

.cw-ability-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cw-ability-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.cw-ability-item.is-featured {
  background: linear-gradient(135deg, rgba(230, 126, 34, 0.14), rgba(120, 40, 10, 0.08));
  border-color: rgba(230, 126, 34, 0.45);
  box-shadow: 0 0 16px rgba(230, 126, 34, 0.1);
}
.cw-ability-index {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .78rem;
  font-weight: 800;
  color: var(--accent-hover);
  background: var(--accent-dim);
  border: 1px solid rgba(230, 126, 34, 0.35);
  flex-shrink: 0;
  grid-row: 1 / span 2;
  align-self: center;
}
.cw-ability-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cw-ability-body strong {
  display: block;
  font-size: .86rem;
  color: var(--text-primary, #eee);
  line-height: 1.25;
}
.cw-ability-body p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.cw-ability-item.is-featured .cw-ability-body strong {
  color: var(--accent-hover);
}

/* Linha evolutiva — timeline vertical */
.cw-dock-chain { padding-top: 0; border-top: none; }
.cw-chain-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cw-chain-connector {
  width: 2px;
  height: 14px;
  margin-left: 22px;
  background: linear-gradient(180deg, rgba(230,126,34,0.6), rgba(230,126,34,0.2));
  border-radius: 2px;
}
.cw-chain-step {
  display: grid;
  grid-template-columns: 44px 40px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.cw-chain-step:hover {
  border-color: rgba(230, 126, 34, 0.45);
  background: rgba(230, 126, 34, 0.05);
}
.cw-chain-step.is-current {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(230, 126, 34, 0.25);
}
.cw-chain-step-tier {
  grid-row: 1 / span 2;
  grid-column: 1;
  align-self: center;
  justify-self: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--accent-hover);
  background: rgba(230, 126, 34, 0.12);
  border: 2px solid rgba(230, 126, 34, 0.35);
}
.cw-chain-step.is-current .cw-chain-step-tier {
  background: var(--accent);
  color: #1a1008;
  border-color: var(--accent-hover);
}
.cw-chain-step-tier-label {
  grid-column: 3;
  grid-row: 1;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  line-height: 1;
}
.cw-chain-step.is-current .cw-chain-step-tier-label {
  color: var(--accent-hover);
}
.cw-chain-step img {
  grid-row: 1 / span 2;
  grid-column: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  align-self: center;
}
.cw-chain-step-name {
  grid-column: 3;
  grid-row: 2;
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
  word-break: break-word;
}
.cw-chain-step.is-current .cw-chain-step-name {
  color: var(--accent-hover);
}

.cw-dock-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 1.4rem;
  flex-shrink: 0;
}
.cw-dock-portrait {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 16px;
  border: 2px solid rgba(230, 126, 34, 0.45);
  background: var(--bg-primary);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}
.cw-dock-portrait img { width: 100%; height: 100%; object-fit: contain; }
@keyframes cwDockIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cw-dock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.cw-dock-meta span {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cw-dock-meta span:first-child {
  color: var(--accent-hover);
  border-color: rgba(230, 126, 34, 0.45);
  background: var(--accent-dim);
}
.cw-dock-line-badge {
  display: inline-block;
  font-size: .74rem;
  color: var(--accent-hover);
  background: var(--accent-dim);
  border: 1px solid rgba(230, 126, 34, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
}
.cw-dock-power {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(52, 152, 219, 0.08);
  border: 1px solid rgba(52, 152, 219, 0.28);
}

.cw-dock-power strong {
  display: block;
  color: #5dade2;
  font-size: .92rem;
  margin-bottom: 6px;
}

.cw-dock-power p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--text-secondary, #b8b8b8);
}

.cw-dock-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: .86rem;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(230, 126, 34, 0.12);
  color: var(--accent-hover);
  border: 1px solid rgba(230, 126, 34, 0.35);
  font-weight: 600;
}
.cw-dock-chain {
  padding-top: 0;
  border-top: none;
}
.cw-dock-chain-title {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.cw-dock-chain-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
}
.cw-dock-chain-arrow {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 14px;
  opacity: 0.85;
}
.cw-dock-chain-arrow::before,
.cw-dock-chain-arrow::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.cw-dock-chain-arrow::before {
  left: 0;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, rgba(230,126,34,0.15), rgba(230,126,34,0.85));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(230, 126, 34, 0.35);
}
.cw-dock-chain-arrow::after {
  right: 0;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid rgba(230, 126, 34, 0.9);
  filter: drop-shadow(0 0 4px rgba(255, 180, 80, 0.6));
}
.cw-trait-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.cw-trait-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .86rem;
  line-height: 1.45;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.cw-trait-list li i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: .82rem;
}
.cw-trait-list--up li { color: #8fd9a8; }
.cw-trait-list--up li i { color: #2ecc71; }
.cw-trait-list--down li { color: #f0a8a8; }
.cw-trait-list--down li i { color: #e74c3c; }

.cw-dock-chain-node {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  max-width: calc(50% - 18px);
  padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-family: inherit;
  font-size: .86rem;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s;
}
.cw-dock-chain-node:hover {
  border-color: rgba(230, 126, 34, 0.5);
  background: rgba(230, 126, 34, 0.06);
}
.cw-dock-chain-node img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}
.cw-dock-chain-tier {
  flex-shrink: 0;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--accent-hover);
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(230, 126, 34, 0.35);
}
.cw-dock-chain-label {
  font-size: .8rem;
  line-height: 1.2;
  min-width: 0;
}
.cw-dock-chain-node.is-current {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-hover);
  font-weight: 600;
}

.cw-dock-traits {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cw-dock-trait { font-size: .88rem; }
.cw-dock-trait strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.cw-dock-trait ul { margin: 0; padding-left: 18px; line-height: 1.55; color: var(--text-secondary); }
.cw-dock-trait--up strong { color: var(--accent-hover); }
.cw-dock-trait--down strong { color: #e74c3c; }

.hidden { display: none !important; }

@media (max-width: 1099px) {
  body:has(.cw-page--interactive) .site-main { height: auto; overflow: auto; }
  .cw-page--interactive { min-height: calc(100vh - var(--topbar-h)); }
  .cw-arena { min-height: calc(100vh - var(--topbar-h)); }
  .cw-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }
  .cw-viewport { min-height: 50vh; }
  .cw-sidebar {
    max-height: min(42vh, 400px);
    border-left: none;
    border-top: 1px solid rgba(230, 126, 34, 0.2);
  }
}

@media (max-width: 640px) {
  .cw-race-pill { min-width: 88px; padding: 10px 12px; }
  .cw-race-pill-ring { width: 56px; height: 56px; }
  .cw-race-pill-name { font-size: .72rem; }
  .cw-toolbar-hint { display: none; }
  .cw-sidebar-class-head { flex-direction: column; align-items: center; text-align: center; }
  .cw-dock-meta { justify-content: center; }
  .cw-dock-tag { align-self: center; }
}
