    :root {
      --bg: #1a1a2e;
      --card-bg: #16213e;
      --primary: #e8b85a;
      --primary-dark: #c49a3c;
      --accent: #0f3460;
      --text: #e0e0e0;
      --text-secondary: #a0a0b8;
      --border: #2a2a4a;
      --success: #4caf84;
      --error: #e0556a;
      --input-bg: #1e2a3a;
      --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scrollbar-width: thin;
      scrollbar-color: rgba(232,184,90,0.55) rgba(255,255,255,0.04);
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    html::-webkit-scrollbar-track,
    body::-webkit-scrollbar-track {
      background: rgba(255,255,255,0.04);
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb {
      background: rgba(232,184,90,0.55);
      border: 2px solid rgba(26,26,46,0.95);
      border-radius: 999px;
    }

    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover {
      background: rgba(232,184,90,0.8);
    }

    body {
      font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
      background: var(--bg);
      background-image:
        radial-gradient(ellipse at 50% 0%, rgba(232, 184, 90, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(15, 52, 96, 0.3) 0%, transparent 50%);
      min-height: 100vh;
      color: var(--text);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 20px;
    }

    .header-banner {
      max-width: 600px;
      width: 100%;
      border-radius: 12px;
      box-shadow: var(--shadow);
    }

    /* ===== 主卡片 ===== */
    .main-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 32px 28px;
      max-width: 520px;
      width: 100%;
      box-shadow: var(--shadow);
      animation: fadeInUp 0.6s ease;
    }

    .card-title {
      text-align: center;
      font-size: 1.1rem;
      color: var(--primary);
      margin-bottom: 24px;
      font-weight: 600;
      letter-spacing: 1px;
    }

    /* ===== 表单区 ===== */
    .form-group {
      margin-bottom: 18px;
    }

    .form-group label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 6px;
    }

    .form-group label .hint-link {
      font-size: 0.75rem;
      color: var(--primary);
      cursor: pointer;
      font-weight: 400;
      text-decoration: underline;
      margin-left: 4px;
    }

    .form-group select,
    .form-group input,
    .form-group textarea {
      width: 100%;
      padding: 12px 14px;
      background: var(--input-bg);
      border: 2px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      font-size: 0.95rem;
      font-family: inherit;
      transition: all 0.3s ease;
      outline: none;
    }

    .form-group select:focus,
    .form-group input:focus,
    .form-group textarea:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(232, 184, 90, 0.12);
    }

    .form-group textarea {
      resize: vertical;
      min-height: 80px;
      line-height: 1.6;
    }

    .form-group textarea::placeholder {
      color: #555;
      line-height: 1.6;
    }

    .form-group select {
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23e8b85a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 36px;
    }

    /* ===== 模式切换 ===== */
    .mode-tabs {
      display: flex;
      gap: 0;
      margin-bottom: 20px;
      background: var(--input-bg);
      border-radius: 10px;
      padding: 3px;
    }

    .mode-tab {
      flex: 1;
      padding: 10px 16px;
      text-align: center;
      cursor: pointer;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      transition: all 0.3s ease;
      border: none;
      background: transparent;
      font-family: inherit;
    }

    .mode-tab.active {
      background: var(--primary);
      color: #1a1a2e;
      box-shadow: 0 2px 8px rgba(232, 184, 90, 0.3);
    }

    /* ===== 按钮 ===== */
    .btn {
      width: 100%;
      padding: 14px;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s ease;
      letter-spacing: 1px;
      font-family: inherit;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      color: #1a1a2e;
      box-shadow: 0 4px 16px rgba(232, 184, 90, 0.25);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 24px rgba(232, 184, 90, 0.4);
    }

    .btn-primary:active {
      transform: translateY(0);
    }

    .btn-primary:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    .btn-upload {
      background: linear-gradient(135deg, #4a9eda, #2d7bb8);
      color: #fff;
      box-shadow: 0 4px 16px rgba(74, 158, 218, 0.25);
    }
    .btn-upload:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 24px rgba(74, 158, 218, 0.4);
    }
    .btn-upload:active { transform: translateY(0); }
    .btn-upload:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
      box-shadow: none;
    }

    /* ===== 结果区 ===== */
    .results-section {
      margin-top: 20px;
    }

    .results-title {
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin-bottom: 8px;
      font-weight: 600;
    }

    .result-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      background: var(--input-bg);
      border-radius: 8px;
      margin-bottom: 8px;
      border-left: 4px solid var(--border);
      animation: fadeIn 0.3s ease;
      font-size: 0.9rem;
    }

    .result-item.success {
      border-left-color: var(--success);
    }

    .result-item.error {
      border-left-color: var(--error);
    }

    .result-icon {
      font-size: 1.2rem;
      flex-shrink: 0;
    }

    .result-info {
      flex: 1;
      min-width: 0;
    }

    .result-code {
      font-weight: 600;
      color: var(--primary);
      font-family: 'Consolas', 'Courier New', monospace;
      font-size: 0.85rem;
    }

    .result-msg {
      color: var(--text-secondary);
      font-size: 0.8rem;
      margin-top: 2px;
    }

    .progress-bar-wrap {
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      margin: 12px 0;
      overflow: hidden;
    }

    .progress-bar {
      height: 100%;
      background: var(--primary);
      border-radius: 2px;
      transition: width 0.3s ease;
      width: 0%;
    }

    /* ===== Toast ===== */
    .toast {
      position: fixed;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      padding: 12px 24px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 0.9rem;
      z-index: 999;
      animation: slideDown 0.4s ease;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .toast.success {
      background: var(--success);
      color: #fff;
    }

    .toast.error {
      background: var(--error);
      color: #fff;
    }

    /* ===== 注意事项 ===== */
    .notes {
      margin-top: 24px;
      padding: 16px;
      background: var(--input-bg);
      border-radius: 10px;
      border: 1px solid var(--border);
    }

    .notes h4 {
      color: var(--primary);
      font-size: 0.85rem;
      margin-bottom: 8px;
    }

    .notes ul {
      list-style: none;
      padding: 0;
    }

    .notes li {
      font-size: 0.8rem;
      color: var(--text-secondary);
      padding: 3px 0;
      padding-left: 16px;
      position: relative;
    }

    .notes li::before {
      content: '•';
      position: absolute;
      left: 0;
      color: var(--primary);
    }

    /* ===== 页脚 ===== */
    .footer {
      margin-top: 28px;
      text-align: center;
      font-size: 0.78rem;
      color: var(--text-secondary);
    }

    .footer a {
      color: var(--primary);
      text-decoration: none;
    }

    /* ===== 模态框 ===== */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      animation: fadeIn 0.2s ease;
    }

    .modal {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 24px;
      max-width: 400px;
      width: 90%;
      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    }

    .modal h4 {
      color: var(--primary);
      margin-bottom: 12px;
      font-size: 1rem;
    }

    .modal p {
      color: var(--text-secondary);
      font-size: 0.85rem;
      line-height: 1.6;
      margin-bottom: 16px;
    }

    .modal .btn {
      width: auto;
      padding: 10px 24px;
      font-size: 0.9rem;
    }

    /* ===== 动画 ===== */
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    /* ===== AI 面板样式 ===== */
    .ai-main-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 20px;
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 5px;
    }
    .ai-main-tab {
      flex: 1;
      padding: 10px 0;
      border: none;
      border-radius: 9px;
      background: transparent;
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.92rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.22s ease;
      letter-spacing: 0.05em;
    }
    .ai-main-tab:hover { color: var(--primary); }
    .ai-main-tab.active {
      background: linear-gradient(135deg, rgba(232,184,90,0.18), rgba(232,184,90,0.08));
      color: var(--primary);
      box-shadow: inset 0 0 0 1.5px rgba(232,184,90,0.55);
    }
    .ai-tab-panel { display: none; animation: fadeInUp 0.35s ease; }
    .ai-tab-panel.active { display: block; }

    .ai-sub-tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 16px;
      flex-wrap: wrap;
    }
    .ai-sub-tab {
      padding: 7px 18px;
      border: 1px solid var(--border);
      border-radius: 20px;
      background: transparent;
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .ai-sub-tab:hover { border-color: var(--primary); color: var(--primary); }
    .ai-sub-tab.active {
      background: rgba(232,184,90,0.15);
      border-color: rgba(232,184,90,0.6);
      color: var(--primary);
    }
    .ai-sub-panel { display: none; animation: fadeInUp 0.3s ease; }
    .ai-sub-panel.active { display: block; }

    /* AI 基础介绍卡 */
    .ai-intro-card {
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px 18px 16px;
    }
    .ai-intro-badge {
      display: inline-block;
      padding: 3px 12px;
      border-radius: 20px;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      background: linear-gradient(135deg, rgba(232,184,90,0.15), rgba(232,184,90,0.05));
      color: var(--primary);
      border: 1px solid rgba(232,184,90,0.35);
      margin-bottom: 12px;
    }
    .ai-intro-text {
      font-size: 0.9rem;
      line-height: 1.75;
      color: var(--text);
    }
    .ai-highlight {
      color: var(--primary);
      font-weight: 700;
    }
    .ai-tech-pills {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      margin-top: 14px;
    }
    .ai-pill {
      padding: 4px 11px;
      border-radius: 20px;
      font-size: 0.78rem;
      font-weight: 600;
      background: rgba(232,184,90,0.1);
      color: var(--primary);
      border: 1px solid rgba(232,184,90,0.25);
    }

    /* AI 对比图表 */
    .ai-chart-wrap {
      margin-top: 18px;
      background: rgba(0,0,0,0.18);
      border: 1px solid rgba(232,184,90,0.2);
      border-radius: 12px;
      padding: 16px 16px 10px;
    }
    .ai-chart-title {
      font-size: 0.82rem;
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 14px;
      letter-spacing: 0.04em;
      text-align: center;
    }
    .ai-chart-bars { display: flex; flex-direction: column; gap: 12px; }
    .ai-bar-row { display: flex; align-items: center; gap: 10px; }
    .ai-bar-label {
      display: flex;
      align-items: center;
      gap: 6px;
      width: 110px;
      flex-shrink: 0;
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--text);
    }
    .ai-bar-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .ai-bar-track {
      flex: 1;
      height: 26px;
      background: rgba(255,255,255,0.06);
      border-radius: 6px;
      overflow: hidden;
      position: relative;
    }
    .ai-bar-fill {
      height: 100%;
      width: 0;
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: 8px;
      font-size: 0.72rem;
      font-weight: 700;
      animation: barGrow 1.1s cubic-bezier(0.22,1,0.36,1) 0.25s forwards;
      position: relative;
    }
    .ai-bar-our {
      background: linear-gradient(90deg, #c49a3c, #e8b85a, #f5d88a);
      color: #1a1a2e;
      box-shadow: 0 0 16px rgba(232,184,90,0.45);
    }
    .ai-bar-other { background: linear-gradient(90deg, #3a3a5a, #4a4a6a); color: var(--text-secondary); }
    .ai-bar-pct { white-space: nowrap; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; }
    @keyframes barGrow {
      from { width: 0; opacity: 0.4; }
      to { width: var(--bar-width); opacity: 1; }
    }
    .ai-chart-note {
      font-size: 0.7rem;
      color: var(--text-secondary);
      margin-top: 10px;
      text-align: right;
      opacity: 0.7;
    }

    /* AI 展望 */
    .ai-coming-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      margin-top: 14px;
    }
    .ai-coming-item {
      padding: 9px 14px;
      border-radius: 9px;
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--border);
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* AI WIP 卡 */
    .ai-wip-wrap {
      text-align: center;
      padding: 44px 20px 40px;
    }
    .ai-wip-icon { font-size: 2.8rem; margin-bottom: 12px; }
    .ai-wip-title {
      font-size: 1.2rem;
      font-weight: 800;
      color: var(--primary);
      margin-bottom: 10px;
      letter-spacing: 1px;
    }
    .ai-wip-desc {
      font-size: 0.88rem;
      color: var(--text-secondary);
      line-height: 1.7;
      max-width: 300px;
      margin: 0 auto 18px;
    }
    .ai-wip-badge {
      display: inline-block;
      padding: 6px 20px;
      border-radius: 20px;
      background: linear-gradient(135deg, rgba(232,184,90,0.18), rgba(232,184,90,0.06));
      border: 1px solid rgba(232,184,90,0.45);
      color: var(--primary);
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      animation: pulse 2.4s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { box-shadow: 0 0 0 0 rgba(232,184,90,0.3); }
      50% { box-shadow: 0 0 0 6px rgba(232,184,90,0); }
    }

    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(24px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slideDown {
      from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .spinner {
      display: inline-block;
      width: 18px;
      height: 18px;
      border: 2px solid transparent;
      border-top-color: #1a1a2e;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      vertical-align: middle;
      margin-right: 6px;
    }

    /* ===== 开关按钮 ===== */
    .toggle-switch {
      position: relative;
      display: inline-block;
      width: 52px;
      height: 28px;
      flex-shrink: 0;
    }

    .toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    .toggle-slider {
      position: absolute;
      cursor: pointer;
      inset: 0;
      background: var(--border);
      border-radius: 28px;
      transition: 0.3s;
    }

    .toggle-slider::before {
      content: '';
      position: absolute;
      height: 22px;
      width: 22px;
      left: 3px;
      bottom: 3px;
      background: #fff;
      border-radius: 50%;
      transition: 0.3s;
    }

    .toggle-switch input:checked + .toggle-slider {
      background: var(--primary);
    }

    .toggle-switch input:checked + .toggle-slider::before {
      transform: translateX(24px);
    }

    /* ===== CDK 标签 ===== */
    .cdk-tag {
      display: inline-block;
      padding: 4px 10px;
      background: rgba(232, 184, 90, 0.12);
      border: 1px solid rgba(232, 184, 90, 0.25);
      border-radius: 6px;
      font-size: 0.78rem;
      font-family: 'Consolas', 'Courier New', monospace;
      color: var(--primary);
    }

    /* ===== 响应式 ===== */
    @media (max-width: 540px) {
      .main-card,
      .rank-card,
      .data-card {
        padding: 20px 16px;
      }
      .top-nav { gap: 2px; padding: 4px; }
      .top-nav-item { font-size: 0.72rem; padding: 8px 4px; }
    }

    /* ===== 布局容器 ===== */
    .app-container {
      max-width: 900px;
      width: 100%;
    }

    .logo-splash {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: flex;
      flex-direction: column;
      gap: 14px;
      align-items: center;
      justify-content: center;
      background: rgba(10, 14, 30, 0.88);
      backdrop-filter: blur(2px);
      pointer-events: none;
      opacity: 1;
      transition: opacity 0.4s ease;
    }

    .logo-splash.hide {
      opacity: 0;
    }

    .logo-splash img {
      width: min(72vw, 620px);
      max-height: 72vh;
      object-fit: contain;
      filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.6));
    }

    .logo-splash-title {
      color: var(--primary);
      font-size: clamp(20px, 3.4vw, 34px);
      font-weight: 800;
      letter-spacing: 0.14em;
      text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    }

    /* ===== 顶部胶囊 Tab 栏 ===== */
    .top-nav {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 6px;
      gap: 4px;
      box-shadow: var(--shadow);
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .top-nav::-webkit-scrollbar {
      display: none;
    }

    .top-nav-item {
      flex: 1 1 0;
      padding: 10px 0;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      letter-spacing: 0.03em;
    }

    .top-nav-item:hover {
      color: var(--primary);
    }

    .top-nav-item.active {
      background: rgba(232,184,90,0.15);
      color: var(--primary);
      box-shadow: inset 0 0 0 2px rgba(232,184,90,0.5);
    }

    .nav-scroll-hint {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-top: 6px;
      margin-bottom: 16px;
      color: var(--text-secondary);
      font-size: 0.75rem;
      letter-spacing: 0.02em;
      opacity: 0.9;
      transition: opacity 0.25s ease;
      user-select: none;
      pointer-events: none;
    }

    .nav-scroll-hint.hidden {
      opacity: 0;
    }

    .nav-scroll-hint .arrow {
      color: var(--primary);
      font-size: 0.82rem;
      font-weight: 700;
    }

    /* ===== 主内容区 ===== */
    .main-content {
      width: 100%;
    }

    .content-panel {
      display: none;
      animation: fadeInUp 0.4s ease;
    }

    .content-panel.active {
      display: block;
    }

    /* 兑换码卡片调整 */
    .main-card.sidebar-mode {
      border-radius: 14px;
      margin: 0 auto;
    }

    @media (max-width: 640px) {
      .top-nav-item { font-size: 0.82rem; }
      .rank-card { padding: 20px 14px; }
    }

    /* ===== 符文质检 - 代理配置卡片 ===== */
    .rune-proxy-card {
      background: var(--input-bg);
      border: 1px solid rgba(232,184,90,0.2);
      border-radius: 14px;
      padding: 16px 18px;
      animation: runeCardIn 0.38s cubic-bezier(0.22,1,0.36,1);
      position: relative;
    }

    @keyframes runeCardIn {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .rune-proxy-header {
      display: flex;
      align-items: center;
      gap: 7px;
      margin-bottom: 10px;
    }

    .rune-proxy-label-text {
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 1.5px;
      text-transform: uppercase;
    }

    .rune-live-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--success);
      box-shadow: 0 0 6px var(--success);
      animation: runeLivePulse 1.8s ease-in-out infinite;
      flex-shrink: 0;
    }

    .rune-proxy-card.expired .rune-live-dot {
      background: var(--error);
      box-shadow: 0 0 6px var(--error);
      animation: none;
    }

    @keyframes runeLivePulse {
      0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--success); }
      50%       { opacity: 0.5; box-shadow: 0 0 12px var(--success), 0 0 4px var(--success); }
    }

    .rune-countdown {
      margin-left: auto;
      font-size: 0.76rem;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.2px;
      background: rgba(0,0,0,0.25);
      border-radius: 6px;
      padding: 2px 8px;
      border: 1px solid var(--border);
    }

    .rune-countdown:empty { display: none; }

    .rune-proxy-row {
      display: flex;
      align-items: center;
      gap: 2px;
      background: rgba(0,0,0,0.22);
      border: 1px solid rgba(232,184,90,0.16);
      border-radius: 10px;
      padding: 10px 14px;
      margin-bottom: 10px;
    }

    .rune-addr {
      font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;
      font-size: 1.08rem;
      color: var(--primary);
      font-weight: 700;
      letter-spacing: 0.5px;
    }

    .rune-addr-sep {
      font-family: monospace;
      color: var(--text-secondary);
      font-size: 1rem;
      margin: 0 2px;
      opacity: 0.5;
    }

    .rune-copy-btn {
      margin-left: auto;
      background: none;
      border: 1px solid rgba(232,184,90,0.22);
      border-radius: 7px;
      color: var(--text-secondary);
      padding: 5px 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }

    .rune-copy-btn:hover {
      color: var(--primary);
      border-color: rgba(232,184,90,0.5);
      background: rgba(232,184,90,0.07);
    }

    .rune-copy-btn.copied {
      color: var(--success);
      border-color: rgba(76,175,132,0.45);
    }

    .rune-proxy-status-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .rune-adb-row {
      display: flex;
      gap: 8px;
      margin-bottom: 10px;
    }

    .rune-adb-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.5px;
      padding: 6px 10px;
      border-radius: 8px;
      cursor: pointer;
      border: 1px solid rgba(76,175,132,0.35);
      background: rgba(76,175,132,0.08);
      color: var(--success);
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }

    .rune-adb-btn:hover {
      background: rgba(76,175,132,0.16);
      border-color: rgba(76,175,132,0.6);
    }

    .rune-adb-btn.copied {
      color: var(--primary);
      border-color: rgba(232,184,90,0.5);
      background: rgba(232,184,90,0.1);
    }

    .rune-adb-btn-off {
      border-color: rgba(224,85,106,0.3);
      background: rgba(224,85,106,0.07);
      color: var(--error);
    }

    .rune-adb-btn-off:hover {
      background: rgba(224,85,106,0.14);
      border-color: rgba(224,85,106,0.55);
    }

    .rune-adb-btn-off.copied {
      color: var(--primary);
      border-color: rgba(232,184,90,0.5);
      background: rgba(232,184,90,0.1);
    }

    .rune-status-spinner {
      width: 13px;
      height: 13px;
      border: 1.8px solid rgba(160,160,184,0.2);
      border-top-color: var(--text-secondary);
      border-radius: 50%;
      animation: runeSpin 1s linear infinite;
      flex-shrink: 0;
    }

    .rune-proxy-card.expired .rune-status-spinner {
      animation: none;
      border-color: rgba(224,85,106,0.3);
      border-top-color: var(--error);
    }

    @keyframes runeSpin {
      to { transform: rotate(360deg); }
    }

    /* ===== 排名面板 ===== */
    .rank-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 28px 24px;
      box-shadow: var(--shadow);
    }

    .rank-card .card-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .rank-table-wrap {
      overflow-x: auto;
      margin-top: 16px;
      border-radius: 8px;
      border: 1px solid var(--border);
      scrollbar-width: thin;
      scrollbar-color: rgba(128,128,128,0.25) transparent;
      scrollbar-gutter: stable;
    }

    .rank-table-wrap::-webkit-scrollbar {
      width: 4px;
      height: 4px;
    }

    .rank-table-wrap::-webkit-scrollbar-track {
      background: transparent;
    }

    .rank-table-wrap::-webkit-scrollbar-thumb {
      background: rgba(128,128,128,0.25);
      border-radius: 2px;
    }

    .rank-table-wrap::-webkit-scrollbar-thumb:hover {
      background: rgba(128,128,128,0.4);
    }

    .rank-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.92rem;
    }

    .rank-table th {
      background: var(--input-bg);
      color: var(--primary);
      padding: 13px 16px;
      text-align: left;
      font-weight: 600;
      font-size: 0.82rem;
      border-bottom: 2px solid var(--border);
      white-space: nowrap;
    }

    .rank-table td {
      padding: 12px 16px;
      border-bottom: 1px solid rgba(255,255,255,0.05);
      color: var(--text);
      white-space: nowrap;
    }

    .rank-table tbody tr:hover td {
      background: rgba(232,184,90,0.05);
    }

    /* 自适应字体：屏幕越窄字越小，始终保持横排 */
    @media (max-width: 600px) {
      .rank-table { font-size: 0.72rem; }
      .rank-table th { font-size: 0.66rem; padding: 8px 8px; }
      .rank-table td { padding: 7px 8px; }
      .rank-position { min-width: 24px; height: 22px; font-size: 0.68rem; padding: 0 5px; }
      .rank-avatar, .rank-avatar-placeholder { width: 22px; height: 22px; }
    }
    @media (max-width: 420px) {
      .rank-table { font-size: 0.62rem; }
      .rank-table th { font-size: 0.58rem; padding: 6px 5px; }
      .rank-table td { padding: 6px 5px; }
      .rank-position { min-width: 20px; height: 20px; font-size: 0.6rem; padding: 0 4px; }
      .rank-avatar, .rank-avatar-placeholder { width: 20px; height: 20px; }
    }

    .rank-position {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 36px;
      height: 32px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.88rem;
      padding: 0 8px;
    }

    .rank-position.r1 { background: linear-gradient(135deg,#FFD700,#FFA500); color:#1a1a2e; }
    .rank-position.r2 { background: linear-gradient(135deg,#C0C0C0,#A0A0A0); color:#1a1a2e; }
    .rank-position.r3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color:#fff; }
    .rank-position.rn { background: var(--input-bg); color: var(--text-secondary); }

    .rank-loading {
      text-align: center;
      padding: 40px;
      color: var(--text-secondary);
    }

    .rank-empty {
      text-align: center;
      padding: 40px;
      color: var(--text-secondary);
      font-size: 0.9rem;
    }
    .ai-monster-card {
      flex: 0 0 80px;
      min-width: 0;
      box-sizing: border-box;
    }
    @media (max-width: 600px) {
      .ai-monster-card {
        flex: 0 0 calc(25% - 6px);
      }
    }

    .win-rate-high {
      color: #4caf84;
      font-weight: 700;
    }

    .rank-online-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 700;
      background: rgba(76, 175, 132, 0.15);
      border: 1px solid rgba(76, 175, 132, 0.5);
      color: #4caf84;
      white-space: nowrap;
    }

    .rank-offline-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 0.72rem;
      font-weight: 700;
      background: rgba(120, 120, 140, 0.12);
      border: 1px solid rgba(120, 120, 140, 0.3);
      color: rgba(180, 180, 190, 0.6);
      white-space: nowrap;
    }

    .rank-active-pending {
      color: rgba(180, 180, 190, 0.4);
      font-size: 0.72rem;
    }

    .rank-name-link {
      color: var(--primary);
      cursor: pointer;
      text-decoration: none;
      transition: color 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .rank-avatar {
      width: 36px;
      height: 36px;
      border-radius: 4px;
      object-fit: cover;
      flex-shrink: 0;
      border: 1px solid var(--border);
    }

    .rank-avatar-placeholder {
      width: 36px;
      height: 36px;
      border-radius: 4px;
      flex-shrink: 0;
      background: var(--border);
      display: inline-block;
    }

    .rank-name-link:hover {
      color: #fff;
      text-decoration: underline;
    }

    /* ===== 数据面板 ===== */
    .data-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 28px 24px;
      box-shadow: var(--shadow);
    }

    .data-loading {
      text-align: center;
      padding: 40px;
      color: var(--text-secondary);
    }

    .data-empty {
      text-align: center;
      padding: 40px;
      color: var(--text-secondary);
      font-size: 0.9rem;
    }

    .data-section {
      margin-bottom: 24px;
    }

    .data-section-title {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--primary);
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--border);
    }

    /* ===== battle type tabs ===== */
    .battle-tabs {
      display: flex;
      align-items: center;
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 4px;
      gap: 4px;
      margin-bottom: 12px;
    }
    .btab-btn {
      flex: 1;
      padding: 7px 0;
      border-radius: 8px;
      border: none;
      background: transparent;
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.85rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .btab-btn:hover { color: var(--primary); }
    .btab-btn.active {
      background: rgba(232,184,90,0.15);
      color: var(--primary);
      box-shadow: inset 0 0 0 2px rgba(232,184,90,0.5);
    }
    .btab-cnt {
      font-size: 0.72rem;
      opacity: 0.75;
    }

    .unit-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 8px;
    }

    .name-history-timeline {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 4px;
    }

    .nh-node {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 5px 12px;
      background: var(--input-bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.82rem;
    }

    .nh-node.nh-current {
      border-color: var(--primary);
      background: rgba(232, 184, 90, 0.12);
    }

    .nh-node.nh-current .nh-name {
      color: var(--primary);
    }

    .nh-name {
      color: var(--text);
      font-weight: 600;
    }

    .nh-date {
      color: var(--text-secondary);
      font-size: 0.70rem;
    }

    .nh-arrow {
      color: var(--text-secondary);
      font-size: 0.85rem;
      flex-shrink: 0;
    }

    .unit-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 8px 6px;
      background: var(--input-bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      font-size: 0.78rem;
      color: var(--text);
      text-align: center;
    }
    .unit-item img {
      width: 40px;
      height: 40px;
      border-radius: 4px;
    }

    /* ===== 光暗池 ===== */
    .ld-period-badge {
      font-size: 0.68rem;
      font-weight: 500;
      color: var(--text-secondary);
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1px 7px;
      margin-left: 8px;
      vertical-align: middle;
    }
    .ld-pool {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    .ld-unit {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      padding: 0;
      border-radius: 6px;
      border: 2px solid transparent;
      overflow: hidden;
      cursor: default;
    }
    .ld-unit img {
      width: 40px;
      height: 40px;
      border-radius: 4px;
      display: block;
    }
    .ld-unit.ld-light {
      background: rgba(255, 230, 100, 0.08);
      border-color: rgba(255, 220, 60, 0.55);
    }
    .ld-unit.ld-dark {
      background: rgba(160, 100, 240, 0.08);
      border-color: rgba(160, 100, 240, 0.55);
    }
    .ld-elem-dot {
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 0.02em;
    }
    .ld-unit.ld-light .ld-elem-dot { color: #f0c830; }
    .ld-unit.ld-dark  .ld-elem-dot { color: #b478f0; }

    .battle-left-strip {
      width: 18px;
      min-width: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      writing-mode: vertical-lr;
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.1em;
    }
    .battle-left-strip.win  { background: rgba(76,175,80,0.22);  color: var(--success); }
    .battle-left-strip.lose { background: rgba(244,67,54,0.22);  color: var(--error); }

    .battle-body {
      flex: 1;
      min-width: 0;
      padding: 10px 14px;
    }

    .battle-player {
      flex: 1;
      min-width: 0;
    }

    /* ===== battle rank inline ===== */
    .bic {
      display: flex;
      flex-direction: row;
      align-items: baseline;
      gap: 5px;
      margin-top: 3px;
    }
    .bic-right { justify-content: flex-end; }
    .bic-score {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--primary);
      font-variant-numeric: tabular-nums;
    }
    .bic-rank {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
      font-variant-numeric: tabular-nums;
    }

    /* ===== rank tier stars ===== */
    .rtb { display: inline-flex; align-items: center; gap: 0; vertical-align: middle; margin-left: 4px; }
    .rtb-s { font-size: 0.7rem; line-height: 1; color: #444; }
    .rtb.red   .rtb-s.on { color: #e84040; text-shadow: 0 0 4px rgba(232,64,64,.7); }
    .rtb.green .rtb-s.on { color: #30d060; text-shadow: 0 0 4px rgba(48,208,96,.7); }
    .rtb.legend { font-size: 0.82rem; color: #c040e8; text-shadow: 0 0 6px rgba(192,64,232,.9); margin-left: 4px; }

    /* ===== rank announce bar ===== */
    .rank-announce-bar {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      gap: 10px;
      margin-bottom: 12px;
      padding: 10px 14px;
      border-radius: 8px;
      background: rgba(30, 100, 200, 0.1);
      border: 1px solid rgba(80, 150, 255, 0.6);
      box-shadow: 0 0 8px rgba(80, 150, 255, 0.15);
    }
    .rank-announce-label {
      flex-shrink: 0;
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 0.05em;
      color: #fff;
      background: rgba(80, 150, 255, 0.85);
      border-radius: 4px;
      padding: 2px 7px;
      line-height: 1.4;
    }
    .rank-announce-list {
      display: flex;
      flex-direction: column;
      gap: 5px;
      flex: 1;
      min-width: 0;
    }
    .rank-announce-item {
      display: flex;
      align-items: baseline;
      gap: 8px;
      line-height: 1.5;
    }
    .rank-announce-date {
      flex-shrink: 0;
      font-size: 0.65rem;
      font-weight: 600;
      color: rgba(160, 200, 255, 0.7);
      background: rgba(80, 150, 255, 0.12);
      border-radius: 3px;
      padding: 0 5px;
      letter-spacing: 0.3px;
      white-space: nowrap;
    }
    .rank-announce-text {
      font-size: 0.78rem;
      font-weight: 500;
      color: #ffffff;
      letter-spacing: 0.3px;
    }

    /* ===== score threshold bar ===== */
    .score-threshold-bar {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 14px;
      padding: 8px 12px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px;
      font-size: 0.78rem;
    }
    .sth-item {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: rgba(255,255,255,0.04);
      border-radius: 6px;
      white-space: nowrap;
    }
    .sth-item .rtb { margin-left: 0; }
    .sth-score {
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      color: var(--primary, #e8b85a);
      font-size: 0.82rem;
    }
    .sth-delta-up   { font-size: 0.72rem; font-weight: 600; color: #e84040; margin-left: 2px; }
    .sth-delta-down { font-size: 0.72rem; font-weight: 600; color: #30d060; margin-left: 2px; }
    .sth-delta-flat { font-size: 0.72rem; color: #8892aa; margin-left: 2px; }

    /* ===== score threshold trend chart ===== */
    .threshold-chart-wrap {
      margin-bottom: 14px;
      padding: 12px;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px;
    }
    .threshold-chart-wrap canvas {
      height: 260px !important;
      max-height: 260px;
    }
    .tch-legend {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 6px 16px;
      margin-bottom: 10px;
    }
    .tch-legend-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .tch-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* ===== unit mini stats ===== */
    .ums {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1px;
      margin-top: 2px;
    }
    .ums-rates {
      display: flex;
      align-items: baseline;
      gap: 2px;
      white-space: nowrap;
    }
    .ums-count {
      font-size: 0.67rem;
      font-weight: 400;
      color: var(--text-secondary);
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    /* 移动端列布局时隐藏 ums-rates 前导圆点 */
    .ums-rates > .ums-dot:first-child {
      display: none;
    }
    .ums-dot {
      font-size: 0.67rem;
      color: rgba(255,255,255,0.18);
      line-height: 1;
    }
    .ums-pct {
      font-size: 0.67rem;
      font-weight: 600;
      color: var(--primary);
      font-variant-numeric: tabular-nums;
    }
    .ums-wr {
      font-size: 0.67rem;
      font-variant-numeric: tabular-nums;
    }

    .battle-item {
      display: flex;
      overflow: hidden;
      background: var(--input-bg);
      border-radius: 8px;
      margin-bottom: 8px;
      border: 1px solid var(--border);
      padding: 0;
    }

    .battle-item.battle-win {
      border-color: rgba(76,175,80,0.35);
    }

    .battle-item.battle-lose {
      border-color: rgba(244,67,54,0.25);
    }

    /* ===== 对战记录 - 阵型布局 ===== */
    .battle-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
      gap: 8px;
    }

    .battle-name {
      font-weight: 600;
      font-size: 0.82rem;
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      flex: 1;
    }
    .battle-name.win      { color: var(--success); }
    .battle-name.lose     { color: var(--error); }
    .battle-name.opp-win  { color: var(--error);   text-align: right; }
    .battle-name.opp-lose { color: var(--success); text-align: right; }

    .battle-teams {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      overflow: visible;
    }

    .battle-vs {
      flex-shrink: 0;
      font-size: 0.62rem;
      font-weight: 900;
      letter-spacing: 0.1em;
      color: transparent;
      background: linear-gradient(135deg, var(--primary), #f5d88a);
      -webkit-background-clip: text;
      background-clip: text;
      user-select: none;
    }

    /* ===== 魔灵阵型容器 =====
       40px 图标 · 6px 间距 · 3列
       容器: 132px × 86px
    */
    .unit-formation {
      position: relative;
      width: 132px;
      height: 86px;
      flex-shrink: 0;
    }

    .unit-formation .u {
      position: absolute;
      width: 40px;
      height: 40px;
    }

    .unit-formation .u img {
      width: 40px;
      height: 40px;
      border-radius: 4px;
      object-fit: cover;
      display: block;
      background: var(--input-bg);
      border: 1px solid var(--border);
    }

    /* 禁用：半透明但保留属性色；队长：金框 */
    .unit-formation .u.is-ban  img { filter: opacity(0.55) saturate(0.65); }
    .unit-formation .u.is-leader img { outline: 2px solid #FFD700; outline-offset: 0; }

    .ban-icon {
      position: absolute;
      bottom: -4px;
      right:  -4px;
      width: 14px;
      height: 14px;
      border: 2px solid #e53935;
      border-radius: 50%;
      background: rgba(20,10,10,0.55);
      pointer-events: none;
      user-select: none;
      z-index: 2;
    }
    .ban-icon::after {
      content: '';
      position: absolute;
      width: 2px;
      height: calc(100% + 6px);
      background: #e53935;
      top: -3px;
      left: 50%;
      transform: translateX(-50%) rotate(45deg);
      transform-origin: center;
    }

    /*
     * Layout A — 单图标居中左 + 右侧 2×2
     *   先手「我方」 / 后手「对手」
     *
     *        1  3
     *   0
     *        2  4
     */
    .layout-a .u-0 { left:  0px; top: 23px; }
    .layout-a .u-1 { left: 46px; top:  0px; }
    .layout-a .u-2 { left: 46px; top: 46px; }
    .layout-a .u-3 { left: 92px; top:  0px; }
    .layout-a .u-4 { left: 92px; top: 46px; }

    /*
     * Layout B — 左侧 2×2 + 单图标居中右
     *   先手「对手」 / 后手「我方」
     *
     *   0  2
     *           4
     *   1  3
     */
    .layout-b .u-0 { left:  0px; top:  0px; }
    .layout-b .u-1 { left:  0px; top: 46px; }
    .layout-b .u-2 { left: 46px; top:  0px; }
    .layout-b .u-3 { left: 46px; top: 46px; }
    .layout-b .u-4 { left: 92px; top: 23px; }

    .battle-footer {
      font-size: 0.72rem;
      color: var(--text-secondary);
      margin-top: 8px;
      text-align: center;
    }

    @media (max-width: 640px) {
      .top-nav {
        gap: 6px;
        padding: 6px 8px;
      }

      .top-nav-item {
        flex: 0 0 auto;
        min-width: 92px;
        padding: 9px 12px;
        font-size: 0.82rem;
        white-space: nowrap;
      }

      .nav-scroll-hint {
        display: flex;
      }

      .rank-card { padding: 20px 14px; }
      .logo-splash img { width: min(84vw, 520px); }
    }

    /* ╔═════════════════════════════════════════════╗
       ║              AI BP 智能推荐                  ║
       ╚═════════════════════════════════════════════╝ */

    /* ── loading 动画 ── */
    .bp-loading {
      text-align: center;
      padding: 36px 0;
      color: var(--text-secondary);
      font-size: 0.9rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .bp-loading-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
      background: var(--primary);
      display: inline-block;
      animation: bpPulse 1.1s ease-in-out infinite;
    }
    @keyframes bpPulse {
      0%,100% { opacity: 1; transform: scale(1); }
      50%      { opacity: 0.35; transform: scale(0.7); }
    }

    /* ── 错误页 ── */
    .bp-error-wrap {
      text-align: center;
      padding: 28px 16px;
      color: var(--text);
      font-size: 0.9rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
    }
    .bp-error-icon { font-size: 2.2rem; }
    .bp-error-title { font-weight: 700; font-size: 1rem; color: var(--error); }
    .bp-error-msg   { font-size: 0.8rem; color: var(--text-secondary); }
    .bp-error-hint  { font-size: 0.75rem; color: var(--text-secondary); }
    .bp-error-hint code {
      background: var(--input-bg);
      padding: 1px 5px;
      border-radius: 4px;
      font-family: 'Consolas','Courier New',monospace;
    }

    /* ── 选择先手/后手页 ── */
    .bp-setup {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 28px 16px 22px;
      gap: 14px;
    }
    .bp-setup-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--primary);
    }
    .bp-setup-meta-row {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: center;
    }
    .bp-meta-badge {
      font-size: 0.72rem;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 20px;
      letter-spacing: 0.02em;
    }
    .bp-meta-date {
      background: rgba(232,184,90,0.12);
      color: var(--primary);
      border: 1px solid rgba(232,184,90,0.35);
    }
    .bp-meta-count {
      background: rgba(74,158,218,0.12);
      color: #7eb8f5;
      border: 1px solid rgba(74,158,218,0.35);
    }
    .bp-setup-meta { font-size: 0.76rem; font-weight: 400; color: var(--text-secondary); }
    .bp-setup-hint  { font-size: 0.8rem; color: var(--text-secondary); text-align: center; }

    .bp-notice {
      background: rgba(126,184,245,0.07);
      border: 1px solid rgba(126,184,245,0.22);
      border-radius: 10px;
      padding: 10px 14px;
      margin: 2px 0 4px;
      text-align: left;
    }
    .bp-notice-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 5px;
    }
    .bp-notice-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 17px;
      height: 17px;
      border-radius: 50%;
      background: rgba(126,184,245,0.18);
      color: #7eb8f5;
      font-size: 0.7rem;
      font-weight: 700;
      flex-shrink: 0;
      font-style: normal;
    }
    .bp-notice-title {
      font-size: 0.78rem;
      font-weight: 700;
      color: #7eb8f5;
      letter-spacing: 0.02em;
    }
    .bp-notice-body {
      font-size: 0.75rem;
      color: var(--text-secondary);
      line-height: 1.65;
      padding-left: 23px;
    }
    .bp-notice-body strong {
      color: var(--text);
      font-weight: 600;
    }

    .bp-hand-row {
      display: flex;
      gap: 16px;
      margin-top: 4px;
      width: 100%;
      justify-content: center;
    }
    .bp-hand-btn {
      flex: 1;
      max-width: 180px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 20px 12px 16px;
      border-radius: 16px;
      border: 2px solid var(--border);
      background: var(--input-bg);
      color: var(--text);
      cursor: pointer;
      transition: all 0.22s ease;
      font-family: inherit;
    }
    .bp-hand-btn:hover {
      transform: translateY(-4px);
      box-shadow: 0 10px 32px rgba(0,0,0,0.3);
    }
    .bp-hand-first {
      border-color: rgba(232,184,90,0.4);
      background: linear-gradient(160deg, rgba(232,184,90,0.07) 0%, var(--input-bg) 100%);
    }
    .bp-hand-first:hover {
      border-color: var(--primary);
      background: linear-gradient(160deg, rgba(232,184,90,0.15) 0%, var(--input-bg) 100%);
      box-shadow: 0 10px 32px rgba(232,184,90,0.2);
    }
    .bp-hand-second {
      border-color: rgba(74,158,218,0.4);
      background: linear-gradient(160deg, rgba(74,158,218,0.07) 0%, var(--input-bg) 100%);
    }
    .bp-hand-second:hover {
      border-color: #4a9eda;
      background: linear-gradient(160deg, rgba(74,158,218,0.15) 0%, var(--input-bg) 100%);
      box-shadow: 0 10px 32px rgba(74,158,218,0.2);
    }
    .bp-hand-arrow {
      font-size: 1.2rem;
      line-height: 1;
    }
    .bp-hand-arrow-first  { color: var(--primary); }
    .bp-hand-arrow-second { color: #4a9eda; }
    .bp-hand-name { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.04em; }
    .bp-hand-subdesc { font-size: 0.68rem; color: var(--text-secondary); letter-spacing: 0.02em; }
    .bp-hand-icon { font-size: 1.8rem; }
    .bp-hand-desc { font-size: 0.72rem; color: var(--text-secondary); }

    /* ── 主看板 ── */
    .bp-board {
      display: flex;
      flex-direction: column;
      gap: 14px;
      padding: 4px 0;
    }

    /* 进度条 */
    .bp-progress-wrap {
      height: 3px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
    }
    .bp-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--primary), #f5d88a);
      border-radius: 2px;
      transition: width 0.4s ease;
    }

    /* 步骤标签 */
    .bp-board-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .bp-step-label-text {
      flex: 1;
      text-align: center;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.5px;
    }
    .bp-btn-back {
      flex-shrink: 0;
      white-space: nowrap;
      padding: 5px 14px;
      border-radius: 8px;
      border: 1px solid rgba(74,158,218,0.4);
      background: rgba(74,158,218,0.1);
      color: #7eb8f5;
      font-family: inherit;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.18s ease;
    }
    .bp-btn-back:hover {
      background: rgba(74,158,218,0.22);
      border-color: rgba(74,158,218,0.75);
      color: #a8d4f8;
    }
    .bp-step-label {
      text-align: center;
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.5px;
    }
    .bp-side-me  { color: var(--primary); font-weight: 700; }
    .bp-side-opp { color: #7eb8f5; font-weight: 700; }

    /* 两队布局 - 参考 battle-teams 样式 */
    .bp-teams-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
    }
    .bp-vs-col {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .bp-vs {
      font-size: 0.75rem;
      font-weight: 900;
      letter-spacing: 0.15em;
      color: #e53935;
      text-shadow: 0 0 8px rgba(229,57,53,0.5);
      user-select: none;
    }

    /* 单队容器 */
    .bp-team {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    .bp-team-label {
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 1px;
    }
    .bp-team-my  .bp-team-label { color: var(--primary); }
    .bp-team-opp .bp-team-label { color: #7eb8f5; }

    /* 5格选手网格 (3+2 布局，参照 layout-a/layout-b) */
    .bp-pick-grid {
      position: relative;
      width: 174px;
      height: 114px;
      flex-shrink: 0;
    }
    /* 左侧单独1格 + 右侧2×2 (layout-a) — 先手我方 / 后手对方 */
    .bp-layout-a > .bp-slot:nth-child(1) { left:  0; top: 30px; }
    .bp-layout-a > .bp-slot:nth-child(2) { left: 60px; top:  0; }
    .bp-layout-a > .bp-slot:nth-child(3) { left: 60px; top: 60px; }
    .bp-layout-a > .bp-slot:nth-child(4) { left: 120px; top:  0; }
    .bp-layout-a > .bp-slot:nth-child(5) { left: 120px; top: 60px; }

    /* 左侧2×2 + 右侧单独1格 (layout-b) — 先手对方 / 后手我方 */
    .bp-layout-b > .bp-slot:nth-child(1) { left:  0; top:  0; }
    .bp-layout-b > .bp-slot:nth-child(2) { left:  0; top: 60px; }
    .bp-layout-b > .bp-slot:nth-child(3) { left: 60px; top:  0; }
    .bp-layout-b > .bp-slot:nth-child(4) { left: 60px; top: 60px; }
    .bp-layout-b > .bp-slot:nth-child(5) { left: 120px; top: 30px; }

    /* 通用格子 */
    .bp-slot {
      position: absolute;
      width: 54px;
      height: 54px;
      border-radius: 6px;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .bp-slot img {
      width: 54px; height: 54px;
      border-radius: 5px;
      object-fit: cover;
      display: block;
      background: var(--input-bg);
    }
    .bp-slot-filled {
      border: 1px solid rgba(232,184,90,0.25);
    }
    .bp-team-opp .bp-slot-filled {
      border-color: rgba(126,184,245,0.25);
    }
    .bp-slot-empty {
      border: 1px dashed var(--border);
      background: rgba(255,255,255,0.02);
    }
    .bp-slot-active {
      border-color: var(--primary);
      box-shadow: 0 0 0 2px rgba(232,184,90,0.25);
      animation: bpSlotPulse 1.2s ease-in-out infinite;
    }
    .bp-team-opp .bp-slot-active {
      border-color: #4a9eda;
      box-shadow: 0 0 0 2px rgba(74,158,218,0.25);
    }
    @keyframes bpSlotPulse {
      0%,100% { opacity: 1; }
      50%      { opacity: 0.55; }
    }
    .bp-slot-dot {
      width: 5px; height: 5px;
      border-radius: 50%;
      background: var(--border);
      display: block;
    }
    .bp-slot-noid {
      font-size: 0.5rem;
      color: var(--text-secondary);
      text-align: center;
      padding: 2px;
      word-break: break-all;
    }

    /* 联动魔灵分割图 */
    .bp-collab-wrap {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
    }
    .bp-collab-a,
    .bp-collab-b {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      object-fit: cover;
    }
    .bp-collab-a { animation: bp-collab-a 5s linear infinite; }
    .bp-collab-b { animation: bp-collab-b 5s linear infinite; }
    @keyframes bp-collab-a {
      0%,  40% { opacity: 1; }
      50%, 90% { opacity: 0; }
      100%     { opacity: 1; }
    }
    @keyframes bp-collab-b {
      0%,  40% { opacity: 0; }
      50%, 90% { opacity: 1; }
      100%     { opacity: 0; }
    }
    /* 推荐卡内联动包装适配高度 */
    .bp-collab-rec {
      height: 68px;
    }

    /* Ban 槽 */
    .bp-ban-row {
      display: flex;
      justify-content: center;
      margin-top: 2px;
    }
    .bp-ban-slot {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 4px 8px;
      border-radius: 6px;
      border: 1px dashed rgba(229,57,53,0.35);
      background: rgba(229,57,53,0.04);
      min-height: 28px;
    }
    .bp-ban-active {
      border-color: rgba(229,57,53,0.7);
      background: rgba(229,57,53,0.1);
      animation: bpSlotPulse 1.2s ease-in-out infinite;
    }
    .bp-ban-filled {
      border-color: rgba(229,57,53,0.5);
      background: rgba(229,57,53,0.08);
    }
    .bp-ban-label {
      font-size: 0.62rem;
      font-weight: 700;
      color: #e53935;
      letter-spacing: 1px;
      flex-shrink: 0;
    }
    .bp-ban-slot img {
      width: 26px; height: 26px;
      border-radius: 3px;
      object-fit: cover;
      opacity: 0.7;
      filter: saturate(0.6);
    }
    .bp-ban-dot {
      width: 12px; height: 12px;
      border-radius: 50%;
      border: 1px dashed rgba(229,57,53,0.4);
      display: inline-block;
    }
    .bp-ban-noid {
      font-size: 0.5rem;
      color: #e53935;
      max-width: 40px;
      text-align: center;
      word-break: break-all;
    }

    /* ── AI 推荐区 ── */
    .bp-rec-area {
      background: var(--input-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
    }
    .bp-rec-title {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--primary);
      margin-bottom: 10px;
    }
    .bp-rec-loading {
      text-align: center;
      color: var(--text-secondary);
      font-size: 0.82rem;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 8px 0;
    }
    .bp-rec-empty {
      text-align: center;
      color: var(--text-secondary);
      font-size: 0.8rem;
      padding: 8px 0;
    }
    .bp-rec-row {
      display: flex;
      gap: 10px;
      justify-content: center;
    }
    .bp-rec-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      cursor: pointer;
      padding: 8px 10px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.03);
      transition: all 0.2s ease;
      flex: 1;
      max-width: 100px;
    }
    .bp-rec-card:hover {
      border-color: var(--primary);
      background: rgba(232,184,90,0.08);
      transform: translateY(-3px);
      box-shadow: 0 6px 20px rgba(232,184,90,0.15);
    }
    .bp-rec-card img {
      width: 68px; height: 68px;
      border-radius: 7px;
      object-fit: cover;
      display: block;
      border: 1px solid rgba(232,184,90,0.15);
    }
    .bp-rec-noid {
      width: 68px; height: 68px;
      background: var(--input-bg);
      border-radius: 6px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.55rem;
      color: var(--text-secondary);
      text-align: center;
      padding: 3px;
    }
    .bp-rec-score {
      font-size: 0.78rem;
      font-weight: 700;
      color: var(--primary);
    }

    /* ── 对方操作 Picker ── */
    .bp-picker-area {
      background: var(--input-bg);
      border: 1px solid rgba(126,184,245,0.25);
      border-radius: 12px;
      padding: 12px 14px;
      max-height: 480px;
      overflow-y: auto;
    }
    .bp-picker-area::-webkit-scrollbar { width: 4px; }
    .bp-picker-area::-webkit-scrollbar-track { background: transparent; }
    .bp-picker-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    .bp-picker-title {
      font-size: 0.82rem;
      font-weight: 600;
      color: #7eb8f5;
      margin-bottom: 10px;
    }

    /* picker 标题行（含排序切换） */
    .bp-picker-header {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      margin-bottom: 10px;
    }
    .bp-picker-header .bp-picker-title { margin-bottom: 0; }
    .bp-sort-tabs {
      display: flex;
      gap: 4px;
    }
    .bp-sort-btn {
      font-size: 0.72rem;
      padding: 3px 10px;
      border-radius: 10px;
      border: 1px solid rgba(126,184,245,0.3);
      background: transparent;
      color: var(--text-secondary);
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .bp-sort-btn.active,
    .bp-sort-btn:hover {
      background: rgba(126,184,245,0.18);
      color: #7eb8f5;
    }

    /* 属性标签栏 */
    .bp-elem-tabs {
      display: flex;
      gap: 6px;
      margin-bottom: 10px;
      flex-wrap: wrap;
    }
    .bp-elem-tab {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 12px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.12);
      background: transparent;
      color: var(--text-secondary);
      font-size: 0.78rem;
      cursor: pointer;
      transition: background 0.15s, color 0.15s;
    }
    .bp-elem-tab.active,
    .bp-elem-tab:hover {
      background: rgba(255,255,255,0.1);
      color: var(--text-primary);
      border-color: rgba(255,255,255,0.25);
    }
    .bp-elem-icon {
      width: 18px;
      height: 18px;
      object-fit: contain;
    }
    .bp-mgr-elem-tab {
      min-width: 42px;
      justify-content: center;
      padding: 4px 10px;
    }
    .bp-picker-elem-tab {
      min-width: 42px;
      justify-content: center;
      padding: 4px 10px;
    }
    /* Tab 上的数量角标 */
    .bp-elem-cnt {
      font-size: 0.65rem;
      opacity: 0.6;
      margin-left: 1px;
    }
    /* Tab 上的已有数量（金色） */
    .bp-elem-owned-dot {
      font-size: 0.62rem;
      font-weight: 700;
      color: var(--primary);
      background: rgba(232,184,90,0.15);
      border-radius: 8px;
      padding: 0 4px;
      margin-left: 2px;
    }

    /* 单位格子网格 */
    .bp-unit-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
      gap: 6px;
      padding-right: 2px;
    }

    /* 分组区块 */
    .bp-picker-section {
      margin-bottom: 10px;
    }
    .bp-picker-sec-title {
      font-size: 0.72rem;
      color: var(--text-secondary);
      font-weight: 600;
      letter-spacing: 0.02em;
      margin-bottom: 6px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .bp-picker-sec-count {
      background: rgba(255,255,255,0.08);
      border-radius: 10px;
      padding: 1px 7px;
      font-size: 0.67rem;
      font-weight: 400;
    }

    .bp-unit-cell {
      width: 52px; height: 52px;
      border-radius: 6px;
      overflow: hidden;
      cursor: pointer;
      border: 1px solid var(--border);
      background: rgba(255,255,255,0.02);
      transition: all 0.15s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .bp-unit-cell:hover {
      border-color: #4a9eda;
      transform: scale(1.08);
      box-shadow: 0 2px 10px rgba(74,158,218,0.25);
    }
    .bp-unit-cell img {
      width: 52px; height: 52px;
      object-fit: cover;
      display: block;
      border-radius: 4px;
    }
    .bp-unit-excl {
      opacity: 0.25;
      cursor: not-allowed;
      pointer-events: none;
    }
    .bp-unit-noid {
      font-size: 0.5rem;
      color: var(--text-secondary);
      text-align: center;
      padding: 2px;
      word-break: break-all;
    }
    .bp-grid-empty {
      grid-column: 1 / -1;
      text-align: center;
      color: var(--text-secondary);
      font-size: 0.78rem;
      padding: 12px;
    }

    /* ── 完成 / 底部按钮 ── */
    .bp-done-wrap {
      text-align: center;
      padding: 18px 0 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .bp-done-msg {
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary);
    }
    .bp-footer {
      display: flex;
      align-items: center;
      gap: 8px;
      padding-top: 2px;
    }
    .bp-btn {
      padding: 7px 18px;
      border-radius: 8px;
      border: none;
      font-family: inherit;
      font-size: 0.82rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .bp-btn-reset {
      background: rgba(255,255,255,0.06);
      color: var(--text-secondary);
      border: 1px solid var(--border);
    }
    .bp-btn-reset:hover {
      background: rgba(255,255,255,0.1);
      color: var(--text);
    }
    .bp-btn-small {
      padding: 6px 16px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--input-bg);
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.8rem;
      cursor: pointer;
    }
    .bp-btn-small:hover { color: var(--text); }

    /* Ban 阶段：对方队伍高亮边框 */
    .bp-team-ban-target {
      outline: 1px solid rgba(229,57,53,0.35);
      border-radius: 8px;
      padding: 4px;
    }
    /* Ban 阶段对方格子可点击 */
    .bp-slot-bannable {
      cursor: pointer;
      border-color: rgba(229,57,53,0.45) !important;
    }
    .bp-slot-bannable:hover {
      border-color: #e53935 !important;
      box-shadow: 0 0 0 2px rgba(229,57,53,0.25);
      transform: scale(1.06);
    }
    /* 已 Ban 格子 */
    .bp-slot-banned {
      overflow: visible;
    }
    .bp-slot-banned img {
      filter: opacity(0.35) saturate(0.25);
    }
    /* AI 推荐序号徽章（叠加在格子右上角）*/
    .bp-rec-rank {
      position: absolute;
      top: -4px;
      right: -4px;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      font-size: 0.62rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* ===== 桌面端图标放大（>640px） ===== */
    @media (min-width: 641px) {
      /* 常用魔灵 stats: 一行显示 */
      .ums {
        flex-direction: row;
        align-items: baseline;
        gap: 2px;
      }
      .ums-rates {
        display: contents; /* 子元素直接流入父 flex，保持单行 */
      }
      /* 桌面端恢复前导圆点 */
      .ums-rates > .ums-dot:first-child {
        display: inline;
      }
      /* 常用魔灵 */
      .unit-list {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
      }
      .unit-item img {
        width: 44px;
        height: 44px;
      }

      /* 光暗池 */
      .ld-unit img {
        width: 48px;
        height: 48px;
        border-radius: 4px;
      }

      /* 对战记录阵型：48px图标，步距54px，容器156×102 */
      .unit-formation {
        width: 156px;
        height: 102px;
      }
      .unit-formation .u {
        width: 48px;
        height: 48px;
      }
      .unit-formation .u img {
        width: 48px;
        height: 48px;
      }
      .layout-a .u-0 { left:   0px; top: 27px; }
      .layout-a .u-1 { left:  54px; top:  0px; }
      .layout-a .u-2 { left:  54px; top: 54px; }
      .layout-a .u-3 { left: 108px; top:  0px; }
      .layout-a .u-4 { left: 108px; top: 54px; }
      .layout-b .u-0 { left:   0px; top:  0px; }
      .layout-b .u-1 { left:   0px; top: 54px; }
      .layout-b .u-2 { left:  54px; top:  0px; }
      .layout-b .u-3 { left:  54px; top: 54px; }
      .layout-b .u-4 { left: 108px; top: 27px; }
    }
      line-height: 1;
      pointer-events: none;
      z-index: 2;
    }
    .bp-rec-rank-1 { background: var(--primary); color: #1a1a2e; }
    .bp-rec-rank-2 { background: #9aa0aa;        color: #1a1a2e; }
    .bp-rec-rank-3 { background: #9c6b2a;        color: #fff;    }
    /* Ban 阶段提示文字 */
    .bp-ban-hint {
      font-size: 0.74rem;
      color: var(--text-secondary);
      margin-bottom: 8px;
    }
    /* Ban 推荐卡片红色边框 */
    .bp-rec-card-ban {
      border-color: rgba(229,57,53,0.25) !important;
    }
    .bp-rec-card-ban:hover {
      border-color: #e53935 !important;
      background: rgba(229,57,53,0.08) !important;
      box-shadow: 0 6px 20px rgba(229,57,53,0.15) !important;
    }
    /* 完成页 Ban 信息 */
    .bp-done-ban {
      font-size: 0.8rem;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .bp-done-ban-thumb {
      display: inline-block;
      width: 28px; height: 28px;
      border-radius: 4px;
      overflow: hidden;
      position: relative;
      flex-shrink: 0;
      opacity: 0.6;
      filter: saturate(0.5);
    }
    .bp-done-ban-thumb img {
      width: 100%; height: 100%;
      object-fit: cover;
      display: block;
    }

    /* ── 我的魔灵按钮（设置界面） ── */
    .bp-btn-myunits {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 18px;
      border-radius: 10px;
      border: 1px dashed rgba(232,184,90,0.45);
      background: rgba(232,184,90,0.06);
      color: var(--primary);
      font-family: inherit;
      font-size: 0.83rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .bp-btn-myunits:hover {
      background: rgba(232,184,90,0.14);
      border-color: rgba(232,184,90,0.75);
    }
    .bp-myunits-badge {
      font-size: 0.72rem;
      font-weight: 400;
      opacity: 0.85;
    }

    /* ── 仅推我有的 切换按钮（对战看板底部） ── */
    .bp-filter-row {
      margin-bottom: 6px;
    }
    .bp-filter-btn {
      padding: 6px 14px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--input-bg);
      color: var(--text-secondary);
      font-family: inherit;
      font-size: 0.79rem;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .bp-filter-btn:hover { color: var(--text); }
    .bp-filter-btn.bp-filter-on {
      background: rgba(232,184,90,0.12);
      border-color: rgba(232,184,90,0.55);
      color: var(--primary);
    }

    /* ── Picker 头部过滤标签 ── */
    .bp-filter-active-badge {
      font-size: 0.7rem;
      color: var(--text-secondary);
      background: rgba(255,255,255,0.05);
      border: 1px solid var(--border);
      padding: 2px 8px;
      border-radius: 10px;
      white-space: nowrap;
      transition: all 0.15s ease;
    }
    .bp-filter-active-badge.bp-filter-on {
      color: var(--primary);
      background: rgba(232,184,90,0.10);
      border-color: rgba(232,184,90,0.3);
    }

    /* ── 我的魔灵管理界面 ── */
    .bp-mgr-wrap {
      display: flex;
      flex-direction: column;
      gap: 11px;
      padding: 16px;
    }
    .bp-mgr-header {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .bp-mgr-title {
      flex: 1;
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary);
    }
    .bp-mgr-count {
      font-size: 0.76rem;
      color: #7eb8f5;
      background: rgba(74,158,218,0.12);
      border: 1px solid rgba(74,158,218,0.35);
      padding: 2px 10px;
      border-radius: 20px;
    }
    .bp-mgr-hint {
      font-size: 0.74rem;
      color: var(--text-secondary);
      line-height: 1.55;
    }
    .bp-mgr-tools {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
      justify-content: space-between;
    }
    .bp-mgr-bulk {
      display: flex;
      gap: 8px;
    }
    .bp-btn-clear {
      color: #e57373;
      border-color: rgba(229,115,115,0.35);
    }
    .bp-btn-clear:hover {
      background: rgba(229,115,115,0.08);
      border-color: rgba(229,115,115,0.6);
      color: #ef9a9a;
    }
    .bp-mgr-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
      gap: 8px;
      padding-right: 2px;
    }
    .bp-mgr-grid::-webkit-scrollbar { width: 4px; }
    .bp-mgr-grid::-webkit-scrollbar-track { background: transparent; }
    .bp-mgr-grid::-webkit-scrollbar-thumb { background: rgba(128,128,128,0.25); border-radius: 2px; }
    .bp-mgr-grid::-webkit-scrollbar-thumb:hover { background: rgba(128,128,128,0.4); }
    .bp-mgr-cell {
      position: relative;
      border-radius: 8px;
      cursor: pointer;
      text-align: center;
      padding: 6px 4px 4px;
      background: var(--input-bg);
      border: 1px solid var(--border);
      transition: all 0.15s ease;
    }
    .bp-mgr-cell .bp-mgr-collab {
      border-radius: 4px;
    }
    .bp-mgr-cell:hover {
      background: rgba(232,184,90,0.06);
      border-color: rgba(232,184,90,0.3);
    }
    .bp-mgr-cell.bp-mgr-owned {
      border-color: rgba(232,184,90,0.5);
      background: rgba(232,184,90,0.08);
    }
    .bp-mgr-cell img,
    .bp-mgr-cell-img {
      width: 100%;
      aspect-ratio: 1;
      object-fit: contain;
      display: block;
      margin: 0 auto;
      border-radius: 4px;
    }
    .bp-mgr-collab {
      width: 100%;
      aspect-ratio: 1;
      margin: 0 auto;
      position: relative;
      overflow: hidden;
      border-radius: 4px;
    }
    .bp-mgr-check {
      position: absolute;
      top: 2px;
      right: 2px;
      background: var(--primary);
      color: #000;
      font-size: 0.6rem;
      font-weight: 700;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }
.search-result-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 6px;
}
@media (max-width: 600px) {
  .search-result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .bp-mgr-grid {
    grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
    gap: 4px;
  }
  .bp-mgr-cell {
    padding: 3px 2px 3px;
  }
}
