#wuwa-app {
  position: relative;
  zoom: 1.25;
  --bg-primary: transparent;
  --bg-secondary: var(--color-wrap);
  --bg-card: var(--color-wrap);
  --bg-hover: var(--color-code-background);
  --border-color: var(--color-border);
  --accent: var(--red-1);
  --accent-dim: var(--red-2);
  --accent-glow: var(--color-red-6-shadow);
  --text-primary: var(--color-default);
  --text-secondary: var(--grey-9);
  --text-muted: #b0b0b0;
  --gold-bg: linear-gradient(145deg, #3d2e0a, #5a4010, #3d2e0a);
  --purple-bg: linear-gradient(145deg, #2a1a3d, #3d2555, #2a1a3d);
  --gold-border: #c9a84c;
  --purple-border: #9b6dcc;
  --danger: #f56565;
  --success: #48bb78;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
}
/* Native form controls must inherit the site's font explicitly. */
#wuwa-app button,
#wuwa-app input,
#wuwa-app select,
#wuwa-app textarea {
  font-family: inherit;
}
#wuwa-app * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
#wuwa-app {
  font-family: inherit;
  background: transparent;
  color: var(--text-primary);
  min-height: 40vh;
  overflow-x: hidden;
}
#wuwa-app::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at 15% 0%,
      rgba(255, 82, 82, 0.06) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 85% 100%,
      rgba(255, 82, 82, 0.04) 0%,
      transparent 55%
    );
  pointer-events: none;
  z-index: 0;
}
#wuwa-app .app {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  padding: 0;
  height: auto;
  min-height: 40vh;
  max-width: 1800px;
  margin: 0 auto;
} /* ===== LEFT ===== */
#wuwa-app .left-panel {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
#wuwa-app .header {
  text-align: center;
  padding: 8px 0 6px;
  flex-shrink: 0;
}
#wuwa-app .header h1 {
  font-size: calc(22px * var(--site-text-scale, 1));
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--red-1), #ff8a80);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#wuwa-app .header p {
  color: var(--text-muted);
  font-size: calc(12px * var(--site-text-scale, 1));
  margin-top: 2px;
}
#wuwa-app .header-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 4px;
}
#wuwa-app .data-info {
  font-size: calc(10px * var(--site-text-scale, 1));
  color: var(--text-muted);
} /* Filter */
#wuwa-app .filter-bar {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
  flex-shrink: 0;
}
#wuwa-app .filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: calc(13px * var(--site-text-scale, 1));
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
#wuwa-app .filter-btn:hover {
  border-color: rgba(255, 82, 82, 0.4);
  color: var(--text-primary);
  background: var(--bg-hover);
}
#wuwa-app .filter-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
#wuwa-app .filter-btn img {
  width: 16px;
  height: 16px;
} /* Pool */
#wuwa-app .pool-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 10px;
  margin-bottom: 8px;
  flex-shrink: 0;
  transition: padding 0.2s;
}
#wuwa-app .pool-section.collapsed .char-pool {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
}
#wuwa-app .pool-section.collapsed .filter-bar-inner {
  display: none;
}
#wuwa-app .pool-section.collapsed {
  padding-bottom: 4px;
}
#wuwa-app .pool-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
#wuwa-app .pool-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: calc(11px * var(--site-text-scale, 1));
  padding: 2px 6px;
  transition: color 0.15s;
  border-radius: 4px;
}
#wuwa-app .pool-toggle:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
#wuwa-app .search-input {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--r);
  background: var(--color-code-background);
  color: var(--text-primary);
  font-size: calc(14px * var(--site-text-scale, 1));
  outline: none;
  transition: all 0.2s;
}
#wuwa-app .search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow);
}
#wuwa-app .search-input::placeholder {
  color: var(--text-muted);
}
#wuwa-app .char-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 130px;
  overflow-y: auto;
  margin-top: 6px;
  transition: max-height 0.25s;
} /* Char icon */
#wuwa-app .char-icon {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  cursor: grab;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  user-select: none;
  flex-shrink: 0;
}
#wuwa-app .char-icon:hover {
  box-shadow: var(--shadow-md);
  z-index: 10;
}
#wuwa-app .char-icon:active {
  cursor: grabbing;
  transform: scale(0.98);
}
#wuwa-app .char-icon.rarity-5 {
  background: var(--gold-bg);
  border: 1.5px solid var(--gold-border);
}
#wuwa-app .char-icon.rarity-4 {
  background: var(--purple-bg);
  border: 1.5px solid var(--purple-border);
}
#wuwa-app .char-icon img.char-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
#wuwa-app .char-icon .element-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#wuwa-app .char-icon .element-badge img {
  width: 15px;
  height: 15px;
}
#wuwa-app .char-icon .char-name-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  font-size: calc(9px * var(--site-text-scale, 1));
  font-weight: 500;
  text-align: center;
  padding: 8px 2px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#wuwa-app .char-icon.dragging {
  opacity: 0.4;
}
#wuwa-app .char-icon.used {
  opacity: 0.25;
  filter: grayscale(0.9);
  pointer-events: none;
}
#wuwa-app .char-icon.selected {
  box-shadow:
    inset 0 0 0 2px rgba(255, 138, 128, 0.6),
    0 0 8px rgba(255, 138, 128, 0.15);
} /* ===== TEAMS ===== */
#wuwa-app .teams-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 2px;
}
#wuwa-app .teams-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
  padding: 0 2px;
}
#wuwa-app .teams-toolbar h2 {
  font-size: calc(16px * var(--site-text-scale, 1));
  font-weight: 600;
  color: var(--text-secondary);
}
#wuwa-app .toolbar-btns {
  display: flex;
  gap: 6px;
  align-items: center;
}
#wuwa-app .btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: calc(13px * var(--site-text-scale, 1));
  font-weight: 500;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#wuwa-app .btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #fff;
  box-shadow: 0 2px 6px var(--accent-glow);
}
#wuwa-app .btn-primary:hover {
  box-shadow: 0 4px 12px var(--accent-glow);
  transform: translateY(-1px);
}
#wuwa-app .btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
#wuwa-app .btn-ghost:hover {
  border-color: rgba(255, 82, 82, 0.4);
  color: var(--text-primary);
  background: var(--bg-hover);
} /* Toggle */
#wuwa-app .toggle-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
#wuwa-app .toggle-label {
  font-size: calc(13px * var(--site-text-scale, 1));
  color: var(--text-secondary);
}
#wuwa-app .toggle {
  width: 32px;
  height: 18px;
  background: var(--border-color);
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
#wuwa-app .toggle.active {
  background: var(--accent);
}
#wuwa-app .toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
#wuwa-app .toggle.active::after {
  transform: translateX(14px);
}
#wuwa-app .teams-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
} /* Team Card */
#wuwa-app .team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  transition: all 0.2s;
  display: flex;
  overflow: hidden;
}
#wuwa-app .team-card:hover {
  border-color: rgba(255, 82, 82, 0.2);
  box-shadow: var(--shadow-sm);
}
#wuwa-app .team-card.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}
#wuwa-app .team-card.team-used {
  opacity: 0.4;
  filter: grayscale(0.75);
}
#wuwa-app .team-card.team-used:hover {
  opacity: 0.55;
} /* Used sidebar */
#wuwa-app .team-used-sidebar {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  border-right: 1px solid var(--border-color);
  background: var(--bg-secondary);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: calc(10px * var(--site-text-scale, 1));
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 2px;
  user-select: none;
}
#wuwa-app .team-used-sidebar:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
#wuwa-app .team-used-sidebar.active {
  background: rgba(255, 82, 82, 0.1);
  color: var(--accent);
  border-right-color: var(--accent);
}
#wuwa-app .team-body {
  flex: 1;
  padding: 8px 10px;
  min-width: 0;
}
#wuwa-app .team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
#wuwa-app .team-label {
  font-size: calc(14px * var(--site-text-scale, 1));
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  outline: none;
  cursor: text;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s;
  width: 110px;
  font-family: inherit;
}
#wuwa-app .team-label:hover {
  background: var(--bg-hover);
}
#wuwa-app .team-label:focus {
  background: var(--bg-hover);
  color: var(--text-primary);
}
#wuwa-app .team-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: calc(14px * var(--site-text-scale, 1));
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1;
  opacity: 0.5;
}
#wuwa-app .team-card:hover .team-remove-btn {
  opacity: 1;
}
#wuwa-app .team-remove-btn:hover {
  color: var(--danger);
  background: rgba(245, 101, 101, 0.1);
}
#wuwa-app .team-slots {
  display: flex;
  gap: 6px;
  justify-content: center;
}
#wuwa-app .team-slot {
  width: 72px;
  height: 72px;
  border: 1.5px dashed var(--color-border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
  background: var(--color-code-background);
}
#wuwa-app .team-slot.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(255, 82, 82, 0.06);
}
#wuwa-app .team-slot.active-slot {
  border-color: rgba(255, 138, 128, 0.6);
  border-style: solid;
  background: rgba(255, 138, 128, 0.08);
}
#wuwa-app .team-slot .slot-placeholder {
  color: var(--text-muted);
  font-size: calc(18px * var(--site-text-scale, 1));
  opacity: 0.4;
}
#wuwa-app .team-slot .char-icon {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  z-index: 1;
}
#wuwa-app .team-slot .char-icon:hover {
  transform: none;
  box-shadow: none;
  z-index: 1;
}
#wuwa-app .team-slot .remove-char {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  color: #fff;
  font-size: calc(9px * var(--site-text-scale, 1));
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
}
#wuwa-app .team-slot:hover .remove-char {
  display: flex;
}
#wuwa-app .team-slot .char-icon.selected {
  box-shadow: inset 0 0 0 2px rgba(255, 138, 128, 0.5);
} /* Matrix */
#wuwa-app .matrix-row {
  margin-top: 5px;
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 4px 6px;
  background: rgba(255, 82, 82, 0.04);
  border-radius: 6px;
  border: 1px solid rgba(255, 82, 82, 0.08);
}
#wuwa-app .matrix-row .matrix-label {
  font-size: calc(9px * var(--site-text-scale, 1));
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
#wuwa-app .matrix-char {
  width: 36px;
  height: 36px;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
  flex-shrink: 0;
  opacity: 0.45;
  border: 1.5px solid transparent;
}
#wuwa-app .matrix-char:hover {
  opacity: 0.75;
}
#wuwa-app .matrix-char.selected {
  opacity: 1;
  border-color: rgba(255, 138, 128, 0.5);
  box-shadow: 0 0 6px rgba(255, 138, 128, 0.15);
}
#wuwa-app .matrix-char img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#wuwa-app .matrix-char .matrix-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.75);
  font-size: calc(6px * var(--site-text-scale, 1));
  color: #fff;
  text-align: center;
  padding: 1px;
  font-weight: 500;
} /* ===== RIGHT PANEL ===== */
#wuwa-app .right-panel {
  flex: 0 0 420px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  max-height: calc(80vh - 64px);
  position: sticky;
  top: 56px;
}
#wuwa-app .detail-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: calc(13px * var(--site-text-scale, 1));
  text-align: center;
  padding: 20px;
}
#wuwa-app .detail-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}
#wuwa-app .detail-header {
  position: relative;
  padding: 16px;
  display: flex;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(
    180deg,
    rgba(255, 82, 82, 0.03) 0%,
    transparent 100%
  );
}
#wuwa-app .detail-portrait {
  width: 100px;
  height: 100px;
  border-radius: var(--r-lg);
  overflow: hidden;
  flex-shrink: 0;
}
#wuwa-app .detail-portrait.rarity-5 {
  border: 2px solid var(--gold-border);
  background: var(--gold-bg);
}
#wuwa-app .detail-portrait.rarity-4 {
  border: 2px solid var(--purple-border);
  background: var(--purple-bg);
}
#wuwa-app .detail-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#wuwa-app .detail-info {
  flex: 1;
  min-width: 0;
}
#wuwa-app .detail-name {
  font-size: calc(22px * var(--site-text-scale, 1));
  font-weight: 700;
  margin-bottom: 2px;
}
#wuwa-app .detail-subtitle {
  font-size: calc(14px * var(--site-text-scale, 1));
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 400;
}
#wuwa-app .detail-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
#wuwa-app .detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: calc(13px * var(--site-text-scale, 1));
  color: var(--text-secondary);
  background: var(--color-code-background);
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 500;
}
#wuwa-app .detail-meta-item img {
  width: 14px;
  height: 14px;
}
#wuwa-app .detail-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
#wuwa-app .detail-tag {
  font-size: calc(12px * var(--site-text-scale, 1));
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
#wuwa-app .detail-tag img {
  width: 12px;
  height: 12px;
}
#wuwa-app .detail-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}
#wuwa-app .detail-section:last-child {
  border-bottom: none;
}
#wuwa-app .detail-section-title {
  font-size: calc(15px * var(--site-text-scale, 1));
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}
#wuwa-app .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
#wuwa-app .stat-item {
  background: var(--color-code-background);
  border-radius: 6px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid rgba(55, 65, 81, 0.4);
}
#wuwa-app .stat-label {
  font-size: calc(12px * var(--site-text-scale, 1));
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
#wuwa-app .stat-label img {
  width: 14px;
  height: 14px;
}
#wuwa-app .stat-value {
  font-size: calc(17px * var(--site-text-scale, 1));
  font-weight: 700;
  color: var(--text-primary);
}
#wuwa-app .skill-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 8px;
}
#wuwa-app .skill-tab {
  padding: 4px 10px;
  font-size: calc(12px * var(--site-text-scale, 1));
  border-radius: 5px;
  background: var(--color-code-background);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}
#wuwa-app .skill-tab:hover {
  border-color: rgba(255, 82, 82, 0.3);
}
#wuwa-app .skill-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-color: transparent;
  color: #fff;
}
#wuwa-app .skill-tab img {
  width: 16px;
  height: 16px;
}
#wuwa-app .skill-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
#wuwa-app .skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bg-hover);
}
#wuwa-app .skill-title {
  font-size: calc(16px * var(--site-text-scale, 1));
  font-weight: 600;
}
#wuwa-app .skill-type-badge {
  font-size: calc(11px * var(--site-text-scale, 1));
  color: var(--accent);
  background: rgba(255, 82, 82, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
#wuwa-app .skill-desc {
  font-size: calc(13px * var(--site-text-scale, 1));
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 8px;
}
#wuwa-app .skill-desc color-s {
  color: #ffe066;
}
#wuwa-app .skill-desc color-g,
#wuwa-app .skill-desc color-white {
  color: var(--text-primary);
  font-weight: 500;
}
#wuwa-app .skill-level-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
#wuwa-app .skill-level-bar label {
  font-size: calc(12px * var(--site-text-scale, 1));
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}
#wuwa-app .skill-slider {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--border-color);
  outline: none;
}
#wuwa-app .skill-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 4px var(--accent-glow);
}
#wuwa-app .skill-level-num {
  font-size: calc(13px * var(--site-text-scale, 1));
  color: var(--accent);
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}
#wuwa-app .skill-attr-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: calc(13px * var(--site-text-scale, 1));
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}
#wuwa-app .skill-attr-row:last-child {
  border-bottom: none;
}
#wuwa-app .skill-attr-name {
  color: var(--text-muted);
}
#wuwa-app .skill-attr-val {
  color: var(--text-primary);
  font-weight: 600;
}
#wuwa-app .chain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#wuwa-app .chain-item {
  display: flex;
  gap: 8px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  border: 1px solid rgba(55, 65, 81, 0.3);
}
#wuwa-app .chain-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg-hover);
  overflow: hidden;
}
#wuwa-app .chain-icon img {
  width: 100%;
  height: 100%;
}
#wuwa-app .chain-info {
  flex: 1;
  min-width: 0;
}
#wuwa-app .chain-idx {
  font-size: calc(12px * var(--site-text-scale, 1));
  color: var(--accent);
  font-weight: 700;
}
#wuwa-app .chain-name {
  font-size: calc(14px * var(--site-text-scale, 1));
  font-weight: 600;
  margin-bottom: 2px;
}
#wuwa-app .chain-desc {
  font-size: calc(12px * var(--site-text-scale, 1));
  color: var(--text-secondary);
  line-height: 1.5;
}
#wuwa-app .chain-desc color-s,
#wuwa-app .chain-desc color-white,
#wuwa-app .chain-desc color-g {
  color: var(--text-primary);
  font-weight: 500;
}
#wuwa-app .tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: calc(12px * var(--site-text-scale, 1));
  color: var(--text-primary);
  pointer-events: none;
  z-index: 200;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.12s;
}
#wuwa-app .tooltip.show {
  opacity: 1;
}
#wuwa-app ::-webkit-scrollbar {
  width: 4px;
}
#wuwa-app ::-webkit-scrollbar-track {
  background: transparent;
}
#wuwa-app ::-webkit-scrollbar-thumb {
  background: rgba(55, 65, 81, 0.6);
  border-radius: 2px;
}
#wuwa-app ::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 65, 81, 0.9);
}

@media (max-width: 1000px) {
  #wuwa-app .app {
    flex-direction: column;
    height: auto;
  }
  #wuwa-app .left-panel,
  #wuwa-app .right-panel {
    flex: none;
    width: 100%;
  }
  #wuwa-app .right-panel {
    min-height: 500px;
  }
  #wuwa-app .teams-grid {
    grid-template-columns: 1fr;
  }
} /* Tower Mode */
#wuwa-app .tower-layout {
  display: flex;
  gap: 8px;
  height: 100%;
}
#wuwa-app .tower-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#wuwa-app .tower-title {
  text-align: center;
  font-size: calc(13px * var(--site-text-scale, 1));
  font-weight: 600;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  letter-spacing: 1px;
}
#wuwa-app .tower-title.left {
  color: #f6ad55;
}
#wuwa-app .tower-title.mid {
  color: #fc8181;
}
#wuwa-app .tower-title.right {
  color: #76e4f7;
}
#wuwa-app .tower-floor {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 6px 8px;
  transition: all 0.2s;
}
#wuwa-app .tower-floor.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
#wuwa-app .tower-floor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
#wuwa-app .tower-floor-label {
  font-size: calc(11px * var(--site-text-scale, 1));
  font-weight: 600;
  color: var(--text-muted);
}
#wuwa-app .tower-floor-cost {
  font-size: calc(10px * var(--site-text-scale, 1));
  color: var(--text-muted);
}
#wuwa-app .tower-floor .team-slots {
  justify-content: flex-start;
}
#wuwa-app .tower-floor .team-slot {
  width: 60px;
  height: 60px;
} /* Body count badge on char */
#wuwa-app .body-badge {
  position: absolute;
  bottom: 14px;
  right: 2px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: calc(8px * var(--site-text-scale, 1));
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
#wuwa-app .body-badge.low {
  color: #f6ad55;
}
#wuwa-app .body-badge.empty {
  color: var(--danger);
} /* Modal */
#wuwa-app .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
}
#wuwa-app .modal-overlay.show {
  display: flex;
}
#wuwa-app .modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--r-xl);
  width: 520px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
#wuwa-app .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}
#wuwa-app .modal-header h3 {
  font-size: calc(16px * var(--site-text-scale, 1));
  font-weight: 600;
}
#wuwa-app .modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: calc(18px * var(--site-text-scale, 1));
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
#wuwa-app .modal-close:hover {
  color: var(--danger);
  background: rgba(245, 101, 101, 0.1);
}
#wuwa-app .modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
}
#wuwa-app .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
} /* Profile modal content */
#wuwa-app .profile-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
#wuwa-app .profile-input-row input {
  flex: 1;
}
#wuwa-app .profile-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
#wuwa-app .profile-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--color-code-background);
  border-radius: var(--r);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s;
}
#wuwa-app .profile-item:hover {
  border-color: rgba(255, 138, 128, 0.4);
  background: var(--bg-hover);
}
#wuwa-app .profile-item.active {
  border-color: rgba(255, 138, 128, 0.5);
  background: rgba(255, 138, 128, 0.08);
}
#wuwa-app .profile-item-name {
  flex: 1;
  font-size: calc(13px * var(--site-text-scale, 1));
  font-weight: 500;
}
#wuwa-app .profile-item-count {
  font-size: calc(11px * var(--site-text-scale, 1));
  color: var(--text-muted);
}
#wuwa-app .profile-item-btns {
  display: flex;
  gap: 4px;
}
#wuwa-app .profile-item-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: calc(12px * var(--site-text-scale, 1));
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.15s;
}
#wuwa-app .profile-item-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
#wuwa-app .profile-item-btn.del:hover {
  color: var(--danger);
  background: rgba(245, 101, 101, 0.1);
}
#wuwa-app .char-select-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#wuwa-app .char-select-item {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.15s;
  opacity: 0.4;
  border: 2px solid transparent;
}
#wuwa-app .char-select-item:hover {
  opacity: 0.7;
}
#wuwa-app .char-select-item.owned {
  opacity: 1;
  border-color: var(--success);
}
#wuwa-app .char-select-item.owned::after {
  content: '✓';
  position: absolute;
  top: 1px;
  right: 2px;
  font-size: calc(10px * var(--site-text-scale, 1));
  color: var(--success);
  font-weight: 700;
}
#wuwa-app .char-select-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#wuwa-app .char-select-item .cs-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  font-size: calc(7px * var(--site-text-scale, 1));
  color: #fff;
  text-align: center;
  padding: 1px;
  font-weight: 500;
}
#wuwa-app .char-select-item.rarity-5 {
  background: var(--gold-bg);
}
#wuwa-app .char-select-item.rarity-4 {
  background: var(--purple-bg);
}
#wuwa-app .char-select-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  align-items: center;
  flex-wrap: wrap;
}
#wuwa-app .char-select-toolbar .btn {
  padding: 3px 10px;
  font-size: calc(11px * var(--site-text-scale, 1));
} /* Profile selector in pool */
#wuwa-app .profile-select {
  padding: 4px 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: calc(12px * var(--site-text-scale, 1));
  outline: none;
  cursor: pointer;
  font-family: inherit;
  min-width: 80px;
}
#wuwa-app .profile-select:focus {
  border-color: var(--accent);
} /* Drop overlay */
#wuwa-app .drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15, 23, 43, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
#wuwa-app .drop-overlay.show {
  display: flex;
  pointer-events: auto;
}
#wuwa-app .drop-box {
  width: 340px;
  padding: 40px;
  text-align: center;
  border: 2px dashed rgba(255, 138, 128, 0.5);
  border-radius: var(--r-xl);
  background: rgba(31, 41, 55, 0.6);
}
#wuwa-app .drop-box-icon {
  font-size: calc(48px * var(--site-text-scale, 1));
  margin-bottom: 12px;
  opacity: 0.5;
}
#wuwa-app .drop-box-text {
  font-size: calc(15px * var(--site-text-scale, 1));
  color: var(--text-secondary);
  font-weight: 500;
}
#wuwa-app .drop-box-hint {
  font-size: calc(11px * var(--site-text-scale, 1));
  color: var(--text-muted);
  margin-top: 6px;
}
#wuwa-app .loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: wuwa-spin 0.7s linear infinite;
}
@keyframes wuwa-spin {
  to {
    transform: rotate(360deg);
  }
}

body:has(#wuwa-app) #content {
  max-width: 1650px;
}
body:has(#wuwa-app) .article-meta {
  display: none;
}
body:has(#wuwa-app) .hr-line {
  display: none;
}
body:has(#wuwa-app) .article-entry {
  padding: 0 16px;
}
/* theme hides .article-entry img until lazyload marks it; app images are dynamic.
   also cancel dark-mode brightness(70%) and blur-darken animation on app images */
#wuwa-app img {
  opacity: 1;
  filter: none;
  animation: none;
}
/* no hover name tooltip */
#wuwa-app #tooltip {
  display: none !important;
}
/* strip theme's h2 red-bar decorations from app headings (e.g. 隊伍配置) */
#wuwa-app h2:before,
#wuwa-app h2:after {
  content: normal;
  display: none;
}
/* hide the empty article-footer dashed decoration on this page */
body:has(#wuwa-app) .article-footer:before {
  display: none;
}
/* tool page: left-side text not selectable; right character-info panel stays selectable */
#wuwa-app {
  user-select: none;
  -webkit-user-select: none;
}
#wuwa-app .right-panel {
  user-select: text;
  -webkit-user-select: text;
}
