/* Estilos para la página de Armas de Wuchang (en construcción) */
:root {
  --bg: #0e0b09;
  --ink: #f3ebdf;
  --muted: #c9b8a8;
  --ember: #d7863c;
  --ember-2: #f0b277;
  --steel: #19110d;
  --card: #14100c;
  --accent: #9c5f32;
  --accent-2: #c47d46;
  --border: #3a2a21;
  --title: #f4e4d2;
  --success: #2f7d4b;
}
.wuchang-weapons-page {
  background: var(--bg);
  color: var(--ink);
}
/* Copia del header/hero de objetos para que quede idéntico */
.wuchang-hero.small {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wuchang-hero .hero-content {
  padding: 2.2rem 0;
}
.wuchang-hero.small {
  border-bottom: 0 !important;
}
.wuchang-hero.small::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
      1200px 500px at 50% 0%,
      rgba(0, 0, 0, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(20, 12, 8, 0.62), rgba(8, 6, 5, 0.86));
}
.wuchang-hero.small .container,
.wuchang-hero.small .hero-content {
  position: relative;
  z-index: 2;
}
.wuchang-hero.small .hero-content h1 {
  text-shadow: 0 14px 44px rgba(0, 0, 0, 0.65), 0 0 2px rgba(0, 0, 0, 0.7);
}
.wuchang-hero.small .hero-content p {
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.65);
}
/* Difuminado inferior como en objetos */
.wuchang-hero.small::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -18px;
  height: 72px;
  pointer-events: none;
  z-index: 3;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  background: linear-gradient(
    to bottom,
    rgba(20, 12, 8, 0.28),
    rgba(20, 12, 8, 0)
  );
}
.wuchang-hero.small .hero-bg {
  transform: scale(1.03);
  transform-origin: center top;
  background-size: cover;
  background-position: center 46%;
  will-change: transform;
}
.weapons-section {
  position: relative;
  padding-bottom: 96px;
  background: var(--bg);
}
@media (max-width: 640px) {
  .weapons-section {
    padding-bottom: 64px;
  }
}
.weapons-section .breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 18px;
  margin-bottom: 12px;
  color: var(--muted);
  padding: 4px 6px;
  background: #16100c;
  border: 1px solid #2f231c;
  border-radius: 999px;
}
.weapons-section .breadcrumbs a,
.weapons-section .breadcrumbs span[aria-current="page"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: #ccb8a6;
  text-decoration: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease;
}
.weapons-section .breadcrumbs a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #efe4d7;
}
.weapons-section .breadcrumbs a:active {
  transform: translateY(1px);
}
.weapons-section .breadcrumbs a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(215, 134, 60, 0.22);
  color: #f3ebdf;
}
.weapons-section .breadcrumbs span[aria-current="page"] {
  background: rgba(215, 134, 60, 0.08);
  color: #f3ebdf;
  cursor: default;
}
/* Hide literal arrow spans and use separators via pseudo-elements on items */
.weapons-section .breadcrumbs > span[aria-hidden="true"] {
  display: none;
}
.weapons-section .breadcrumbs > a:not(:first-child)::before,
.weapons-section
  .breadcrumbs
  > span[aria-current="page"]:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 16px;
  background: #2f231c;
  margin: 0 6px 0 2px;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .weapons-section .breadcrumbs {
    margin-top: 14px;
    margin-bottom: 10px;
    padding: 3px 5px;
  }
  .weapons-section .breadcrumbs a,
  .weapons-section .breadcrumbs span[aria-current="page"] {
    padding: 5px 9px;
  }
}
.weapons-section .toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1.5rem 0 1.5rem;
}
.weapons-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}
.weapons-main {
  min-width: 0;
}
.weapons-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 1.5rem;
}
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.sidebar-title {
  margin: 0 0 0.5rem;
  color: var(--title);
  font: 600 1.05rem/1.2 Cinzel, serif;
}

.search-below {
  margin-top: 0.25rem;
}
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  border: 1px solid var(--border);
  background: #1a130e;
  color: #f3ebdf;
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.filter-btn.active {
  background: #25180f;
  border-color: #704a2a;
}
.search {
  display: flex;
  align-items: center;
}
.search input {
  background: #1a130e;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  color: #f3ebdf;
  min-width: 220px;
}
@media (max-width: 720px) {
  .weapons-section .toolbar {
    gap: 0.75rem;
  }
}
@media (max-width: 1100px) {
  .weapons-layout {
    grid-template-columns: 1fr 300px;
  }
}
@media (max-width: 920px) {
  .weapons-layout {
    grid-template-columns: 1fr;
  }
  .weapons-sidebar {
    position: relative;
    top: auto;
    margin-top: 0;
  }
}
.views .view-btn {
  border: 1px solid var(--border);
  background: #1a130e;
  color: #f3ebdf;
  border-radius: 999px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
.views .view-btn.active {
  background: #25180f;
  border-color: #704a2a;
}
#states .state {
  color: var(--muted);
  padding: 0.75rem 0;
}
/* Ocultar el estado de carga como en objetos */
#loadingState {
  display: none !important;
}

/* Progreso circular en sidebar */
.progress-circle {
  position: relative;
  display: grid;
  place-items: center;
}
.progress-circle svg {
  width: 100%;
  height: auto;
  max-width: 220px;
  display: block;
}
.progress-circle .circle-bg {
  fill: none;
  stroke: #2a2019;
  stroke-width: 12;
}
.progress-circle .circle-fg {
  fill: none;
  stroke: url(#gradProgress);
  stroke-width: 12;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 339.292;
  stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 0.4s ease;
}
.progress-circle .circle-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}
.progress-circle .percent {
  font: 700 1.3rem/1 Cinzel, serif;
  color: #e9e0d6;
}
.progress-circle .fraction {
  font: 500 0.95rem/1.2 Cinzel, serif;
  color: #d7cabd;
  margin-top: 0.25rem;
}

/* Fallback gradient for stroke */
.weapons-sidebar {
  --grad-from: #2fa368;
  --grad-to: #3dcf86;
}
.weapons-sidebar svg {
  overflow: visible;
}
.weapons-sidebar svg defs linearGradient stop:first-child {
  stop-color: var(--grad-from);
}
.weapons-sidebar svg defs linearGradient stop:last-child {
  stop-color: var(--grad-to);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.category-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}
.category-meta {
  font-size: 0.9rem;
  color: #dabfa7;
}
.category-track {
  height: 10px;
  background: #1b140f;
  border: 1px solid #3a2a21;
  border-radius: 999px;
  overflow: hidden;
}
.category-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--grad-from), var(--grad-to));
  width: 0%;
  transition: width 0.3s ease;
}

/* Grid */
.weapons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .weapons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .weapons-grid {
    grid-template-columns: 1fr;
  }
}
.weapons-grid.compact-view .weapon-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.weapon-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.weapon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  border-color: #4a3428;
}
.weapon-card .obtained-check {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #a6f3c6;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}
.weapon-card.obtained::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(22, 96, 54, 0.28);
  box-shadow: inset 0 0 0 2px rgba(74, 168, 108, 0.45);
  pointer-events: none;
}
.weapon-card.obtained .obtained-check {
  opacity: 1;
}

/* Tarjetas estilo objetos */
.weapon-image {
  aspect-ratio: 16/9;
  background: #0f0b09;
  display: flex;
  align-items: center;
  justify-content: center;
}
.weapon-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.weapon-info {
  padding: 0.9rem 1rem;
}
.weapon-info h3 {
  margin: 0 0 0.25rem;
  color: var(--title);
  font: 600 clamp(0.95rem, 1.8vw, 1.08rem) / 1.2 Cinzel, serif;
  word-break: break-word;
}
.weapon-type {
  font-size: 0.9rem;
  color: #dabfa7;
  margin-bottom: 0.35rem;
}
.weapon-description {
  color: #f3ebdf;
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: normal;
}
.weapon-description br {
  display: block;
  content: "";
}

.weapon-stats {
  padding: 0 16px 12px;
}
.weapon-stats .stats-title {
  font-weight: 600;
  color: #e8d9c9;
  margin: 0 0 6px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
}
.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 8px;
  min-width: 0;
  white-space: nowrap;
  background: #1a130e;
  border: 1px solid #33241c;
  border-radius: 8px;
  padding: 6px 8px;
  color: #e9e0d6;
}
.stat-name {
  color: #dac2ae;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  flex: 0 0 auto;
  margin-left: 6px;
}

.weapon-abilities {
  padding: 0 10px 10px;
}
.abilities-title {
  font-weight: 600;
  color: #e8d9c9;
  margin: 0 0 6px;
}
.ability-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #17110d;
  border: 1px solid #2d2019;
  border-radius: 8px;
  padding: 6px 8px;
  color: #f1e7dc;
  cursor: pointer;
}
.ability-item + .ability-item {
  margin-top: 6px;
}
.ability-item .ability-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ability-cost {
  display: flex;
  align-items: center;
  gap: 6px;
}
.celestial-diamond {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: linear-gradient(180deg, #7ec3ff, #4a90e2);
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(90, 160, 240, 0.35);
}
.ability-gain {
  color: #9ef0c2;
  font-weight: 600;
}

.weapon-actions {
  padding: 10px 16px 14px;
}
.weapon-actions .view-details-btn {
  background: #1a130e;
  border: 1px solid #3a2a21;
  color: #f3ebdf;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.weapon-actions .view-details-btn:hover {
  background: #22160f;
}
.weapon-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}
/* Nueva estructura de modal: overlay en .modal y caja en .modal-dialog */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 1000;
}
.modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.modal .modal-dialog {
  position: relative;
  background: linear-gradient(180deg, #160f0b, #120e0b);
  border: 1px solid #3a2a21;
  border-radius: 14px;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  transform: translateY(10px);
  opacity: 0;
  animation: modalIn 0.18s ease-out forwards;
}
/* Minimal video modal variant */
.modal .modal-dialog.minimal {
  background: transparent;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  max-width: none;
  width: auto;
  padding: 0;
}
.modal .modal-dialog.minimal .media-frame {
  display: block;
  background: #0f0b09;
  border: 2px solid #3a2a21;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  overflow: hidden;
  width: 92vw;
  height: 86vh;
  max-width: 100vw;
  max-height: 100vh;
}
.modal .modal-dialog.minimal .media-frame video,
.modal .modal-dialog.minimal .media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.modal .modal-dialog.minimal .media-frame img {
  image-rendering: auto;
}
/* Hide native controls overlay in WebKit just in case */
.modal .modal-dialog.minimal .media-frame video::-webkit-media-controls {
  display: none !important;
}
/* Ability modal a un ancho más contenido */
#abilityModal .modal-dialog {
  max-width: 720px;
}
@keyframes modalIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 0;
  background: linear-gradient(180deg, #1a130e, #17110d);
}
.modal-header h3 {
  margin: 0;
  color: #f4e4d2;
  font: 700 1.05rem/1.2 Cinzel, serif;
  letter-spacing: 0.2px;
}
.modal-close {
  background: #20160f;
  border: 1px solid #3a2a21;
  color: #e8d9c9;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.modal-close:hover {
  background: #2a1b12;
}
.modal-body {
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: #efe4d7;
}
.weapon-detail {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}
.weapon-media {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.weapon-media img {
  width: 100%;
  max-width: 240px;
  height: auto;
  object-fit: contain;
  background: #0f0b09;
  border-radius: 10px;
  border: 1px solid #2d2019;
  display: block;
}
.weapon-media .weapon-basic {
  width: 100%;
}
.weapon-media .weapon-basic h3 {
  margin: 0.5rem 0 0.25rem;
  font: 700 1rem/1.2 Cinzel, serif;
  color: #f4e4d2;
}
.weapon-media .weapon-basic .weapon-type {
  color: #dabfa7;
  font-size: 0.95rem;
}
.weapon-tabs {
  min-width: 0;
}
@media (max-width: 820px) {
  .weapon-detail {
    grid-template-columns: 1fr;
  }
  .weapon-media img {
    max-width: 220px;
  }
}
.weapon-tabs-header {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid #33241c;
  margin-top: 4px;
}
.weapon-tab-btn {
  background: #1a130e;
  border: 1px solid #3a2a21;
  color: #f3ebdf;
  border-radius: 8px 8px 0 0;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
.weapon-tab-btn.active {
  background: #22160f;
  border-color: #704a2a;
}
.weapon-tab-pane {
  display: none;
  padding: 10px 2px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
/* Asegurar que las pestañas activas sean visibles incluso sin la clase de animación */
.weapon-tab-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
/* La clase animate-in se mantiene para transiciones suaves al cambiar de pestaña */
.weapon-tab-pane.animate-in {
  opacity: 1;
  transform: translateY(0);
}
.ability-item-modal {
  border: 1px solid #2d2019;
  border-radius: 10px;
  margin: 8px 0;
  overflow: hidden;
}
.ability-item-modal .ability-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #17110d;
  cursor: pointer;
}
.ability-item-modal .ability-header .ability-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ability-name-previews .eye-btn {
  padding: 4px;
  line-height: 0;
  border-radius: 8px;
}
.ability-name-previews .eye-btn svg {
  width: 18px;
  height: 18px;
}
/* Baseline fixes para que el icono no quede descentrado respecto al texto */
.ability-item-modal .ability-header .eye-btn {
  vertical-align: middle;
}
.ability-item-modal .ability-header .eye-btn svg {
  display: block; /* elimina hueco por baseline del SVG inline */
}
/* Ajuste específico en cabecera para centrar y compactar el botón del ojo */
.ability-item-modal .ability-header .ability-name-previews .eye-btn {
  width: 26px;
  height: 26px;
  padding: 0; /* anula padding heredado */
  display: inline-grid;
  place-items: center;
}
.ability-item-modal .ability-header .ability-name-previews .eye-btn svg {
  width: 16px;
  height: 16px;
  transform: translateY(-0.5px); /* ajuste fino de centrado visual */
}
/* Alinear correctamente el grupo de previews (icono del ojo) dentro del header */
.ability-name-previews {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}
/* Ajuste opcional de tamaño para encajar mejor en el header, manteniendo centrado */
.ability-item-modal .ability-header .ability-name-previews .eye-btn {
  display: inline-grid; /* asegura centrado del SVG */
  place-items: center;
}
.ability-item-modal .ability-content {
  display: block;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
  padding: 0 12px;
  background: #130e0b;
}
.ability-item-modal.expanded .ability-content {
  max-height: 1000px;
  opacity: 1;
  transform: translateY(0);
  padding: 10px 12px;
}
.ability-expand-icon {
  margin-right: 8px;
  opacity: 0.6;
}
.ability-combo {
  margin-top: 8px;
}
.combo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.combo-button {
  background: #1b1410;
  border: 1px solid #3a2a21;
  border-radius: 6px;
  padding: 2px 6px;
  color: #d7cabd;
}

/* Inputs y botones dentro de modales */
.modal-body input[type="text"],
.modal-body input[type="search"],
.modal-body select,
.modal-body textarea {
  background: #1a130e;
  border: 1px solid #3a2a21;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  color: #f3ebdf;
}
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: #704a2a;
  box-shadow: 0 0 0 2px rgba(215, 134, 60, 0.18);
}
.modal-body .btn,
.modal-body button {
  background: #1a130e;
  border: 1px solid #3a2a21;
  color: #f3ebdf;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.modal-body .btn.solid,
.modal-body button.solid {
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  border-color: #d78d52;
  color: #1a120d;
}
.modal-body .btn:hover,
.modal-body button:hover {
  background: #22160f;
}

/* Ability modal polish */
.ability-details {
  display: grid;
  gap: 12px;
}
.platform-toggle-minimal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #17110d;
  border: 1px solid #2d2019;
  border-radius: 999px;
}
.platform-toggle-minimal {
  position: relative;
  overflow: hidden;
}
.platform-toggle-minimal .pt-option {
  appearance: none;
  background: transparent;
  border: 0;
  color: #ccb8a6;
  font: 600 0.92rem/1.1 Cinzel, serif;
  letter-spacing: 0.2px;
  padding: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease,
    transform 0.12s ease;
  position: relative;
  z-index: 1;
}
.platform-toggle-minimal .pt-option:hover {
  color: #efe4d7;
}
.platform-toggle-minimal .pt-option.active {
  color: #f3ebdf;
  text-decoration: none;
}
.platform-toggle-minimal .pt-highlight {
  position: absolute;
  left: 6px;
  bottom: 2px;
  height: 24px;
  width: 60px;
  background: linear-gradient(
    90deg,
    rgba(215, 134, 60, 0.26),
    rgba(240, 178, 119, 0.26)
  );
  border-radius: 999px;
  transition: left 180ms ease, width 180ms ease, background 180ms ease;
  pointer-events: none;
  z-index: 0;
}
.platform-toggle-minimal .pt-option:active {
  transform: scale(0.98);
}
.platform-toggle-minimal .pt-sep {
  color: #6b5a4b;
  .platform-toggle-minimal:hover .pt-highlight,
  .platform-toggle-minimal:focus-within .pt-highlight {
    background: linear-gradient(
      90deg,
      rgba(215, 134, 60, 0.36),
      rgba(240, 178, 119, 0.32)
    ) !important;
    border-color: rgba(240, 178, 119, 0.38) !important;
  }
  .modal-body .platform-toggle-minimal .pt-option,
  .platform-toggle-minimal .pt-option {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .modal-body .platform-toggle-minimal .pt-option:hover,
  .modal-body .platform-toggle-minimal .pt-option:focus,
  .modal-body .platform-toggle-minimal .pt-option:active,
  .platform-toggle-minimal .pt-option:hover,
  .platform-toggle-minimal .pt-option:focus {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .platform-toggle-minimal .pt-option:hover,
  .platform-toggle-minimal .pt-option:focus,
  .platform-toggle-minimal .pt-option:active {
    color: inherit !important;
  }
  .platform-toggle-minimal .pt-option.active:hover,
  .platform-toggle-minimal .pt-option.active:focus,
  .platform-toggle-minimal .pt-option.active:active {
    color: #fff7eb !important;
  }
  .platform-toggle-minimal:hover {
    background: #1a130e;
    border-color: #3a2a21;
  }
  opacity: 0.65;
}
.ability-video {
  border: 1px solid #3a2a21;
  border-radius: 10px;
  overflow: hidden;
  background: #0b0908;
}
.ability-video video {
  display: block;
  width: 100%;
  height: auto;
}
.ability-cost-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: #16100c;
  border: 1px solid #33241c;
  border-radius: 10px;
  padding: 10px 12px;
}
.ability-cost-display .ability-previews-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 2px;
}
.ability-previews-inline .eye-btn {
  padding: 4px;
  line-height: 0;
  border-radius: 8px;
}
.ability-previews-inline .eye-btn svg {
  width: 18px;
  height: 18px;
}
.input-preview-tooltip .ipt-video,
.sg-tooltip .ipt-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: transparent;
}
.input-preview-tooltip.loading .ipt-loading,
.sg-tooltip.loading .ipt-loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-preview-tooltip.show-video .ipt-video,
.sg-tooltip.show-video .ipt-video {
  display: block;
}
.input-preview-tooltip .ipt-loading,
.sg-tooltip .ipt-loading {
  position: absolute;
  inset: 0;
  color: #e9dfd3;
  font: 600 14px/1.2 Cinzel, serif;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35));
}
.ability-cost-display .cost-label {
  font-weight: 700;
  color: #e8d9c9;
  letter-spacing: 0.2px;
}
.ability-cost-display .cost-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1b1410;
  border: 1px solid #3a2a21;
  border-radius: 999px;
  padding: 4px 8px;
  color: #f1e7dc;
}
.ability-cost-display .celestial-diamond {
  width: 10px;
  height: 10px;
}
.ability-cost-display .ability-gain {
  margin-left: auto;
  background: #0f2218;
  border: 1px solid #265b3c;
  border-radius: 999px;
  padding: 4px 8px;
  color: #a6f3c6;
}
.ability-description {
  color: #efe4d7;
}
.combo-sequence {
  margin-top: 2px;
}
.combo-title {
  font-weight: 700;
  color: #e8d9c9;
  margin-bottom: 6px;
}
.combo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.combo-button {
  background: linear-gradient(180deg, #1e1611, #1a130e);
  border: 1px solid #3a2a21;
  border-radius: 10px;
  padding: 6px 10px;
  color: #e9dfd3;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

/* Polvo/brasas como en objetos (canvas decorativo en .has-dust) */
.has-dust {
  position: relative;
}
.has-dust .dust-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
  z-index: 0;
}
.has-dust > *,
.has-dust .container {
  position: relative;
  z-index: 1;
}

/* Demostración tab (inputs list) */
.weapon-inputs-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}
.weapon-inputs-list .eye-btn {
  padding: 4px;
  line-height: 0;
  border-radius: 8px;
}
.weapon-inputs-list .eye-btn svg {
  width: 18px;
  height: 18px;
}
.weapon-input-item {
  display: contents;
}
.weapon-input-item .input-label {
  font-weight: 600;
  color: #e8d9c9;
}
.weapon-input-item .input-play {
  padding: 4px 10px;
  line-height: 1;
}
.demo-legend {
  margin-bottom: 8px;
  color: #bca995;
  font-size: 0.95rem;
}
.demo-legend {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-help {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #17110d;
  border: 1px solid #2d2019;
  color: #e8d9c9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 14px/1 Cinzel, serif;
  padding: 0;
  cursor: pointer;
  vertical-align: middle;
}
.legend-bubble {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(18, 18, 22, 0.96);
  background-image: linear-gradient(
      180deg,
      rgba(18, 18, 22, 0.96),
      rgba(9, 9, 12, 0.96)
    ),
    linear-gradient(140deg, var(--accent, #9c5f32), #e9b96e);
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  display: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 480px;
  color: #e9dfd3;
}
.legend-bubble::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: 18px;
  top: -6px;
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.96),
    rgba(9, 9, 12, 0.96)
  );
  transform: rotate(45deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  border-bottom: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}
.demo-legend .legend-help:hover + .legend-bubble,
.demo-legend.legend-open .legend-bubble {
  display: block;
}
.legend-bubble div + div {
  margin-top: 4px;
}
/* Flip hacia arriba si no cabe abajo */
.demo-legend.flip .legend-bubble {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 6px;
}
.demo-legend.flip .legend-bubble::after {
  top: auto;
  bottom: -6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: none;
  border-top: none;
}
.input-notes {
  color: #9f8c7d;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Dos columnas para 11 demos (6 + 5) */
.inputs-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.inputs-two-columns.no-previews .inputs-col {
  grid-template-columns: 1fr; /* solo etiqueta + notas */
}
.inputs-two-columns .inputs-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.weapon-input-item {
  display: block;
}
.weapon-input-item .input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.weapon-input-item .input-label {
  font-weight: 700;
  color: #e8d9c9;
}
.weapon-input-item .input-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.weapon-input-item .input-actions .eye-btn {
  padding: 4px;
  line-height: 0;
  border-radius: 8px;
}
.weapon-input-item .input-actions .eye-btn svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 720px) {
  .inputs-two-columns {
    grid-template-columns: 1fr;
  }
}

/* Tooltip previews (CSP-safe; used by JS tooltip) */
.input-preview-tooltip {
  position: fixed;
  z-index: 9999;
  display: none;
  color: var(--ink);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  padding: 8px 8px 10px;
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.96),
    rgba(9, 9, 12, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 340px;
  max-height: 220px;
  overflow: hidden;
}
.sg-tooltip {
  position: fixed;
  z-index: 10000;
  display: none;
  pointer-events: none;
  max-width: 380px;
  width: max-content;
  color: var(--sgtt-fg, #ece7de);
  border-radius: 14px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  padding: 0; /* sin marco interior para que el video encaje al borde */
  background: linear-gradient(
    180deg,
    rgba(18, 18, 22, 0.96),
    rgba(9, 9, 12, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: saturate(120%) blur(6px);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.sg-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.input-preview-tooltip .ipt-frame,
.sg-tooltip .ipt-frame {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  /* default size so loader is visible before metadata */
  width: 300px;
  height: 170px;
  background: rgba(0, 0, 0, 0.3);
}

/* Platform toggle minimal with animated background highlight */
.platform-toggle-minimal {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid #3a2a21;
  background: #1a130e;
  border-radius: 999px;
  overflow: hidden;
}
.platform-toggle-minimal,
.platform-toggle-minimal:hover,
.platform-toggle-minimal:focus-within {
  background: #1a130e !important;
  border-color: #3a2a21 !important;
}
.platform-toggle-minimal .pt-sep {
  color: #6d5646;
}
.platform-toggle-minimal .pt-highlight {
  position: absolute;
  left: 6px;
  top: 3px;
  height: calc(100% - 6px);
  width: 60px;
  background: linear-gradient(
    90deg,
    rgba(215, 134, 60, 0.36),
    rgba(240, 178, 119, 0.32)
  );
  border: 1px solid rgba(240, 178, 119, 0.38);
  border-radius: 999px;
  transition: left 180ms ease, width 180ms ease, background 180ms ease;
  pointer-events: none;
  opacity: 1;
}
.platform-toggle-minimal .pt-option {
  position: relative;
  z-index: 1;
  background: transparent;
  border: 0;
  color: #e8d9c9;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: none !important;
}
.platform-toggle-minimal .pt-option:hover,
.platform-toggle-minimal .pt-option:focus,
.platform-toggle-minimal .pt-option:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
}
.platform-toggle-minimal .pt-option.active:hover,
.platform-toggle-minimal .pt-option.active:focus,
.platform-toggle-minimal .pt-option.active:active {
  color: #fff7eb !important;
}
.platform-toggle-minimal:hover .pt-highlight,
.platform-toggle-minimal:focus-within .pt-highlight {
  background: linear-gradient(
    90deg,
    rgba(215, 134, 60, 0.36),
    rgba(240, 178, 119, 0.32)
  ) !important;
  border-color: rgba(240, 178, 119, 0.38) !important;
}
.platform-toggle-minimal .pt-option.active {
  color: #fff7eb;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.platform-toggle-minimal .pt-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(215, 134, 60, 0.3);
}

/* Generic eye button for previews */
.eye-btn {
  display: inline-grid;
  place-items: center;
  background: #1a130e;
  color: #eadfd3;
  border: 1px solid #3a2a21;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
}
.eye-btn:hover {
  background: #21160f;
}
