    /* 弹出菜单 */
    .context-menu {
      position: fixed;
      background: var(--bg-elevated);
      border: 2px solid var(--accent-primary);
      border-radius: 8px;
      padding: 6px 0;
      min-width: 180px;
      z-index: 1000;
      box-shadow: 0 8px 30px rgba(0, 212, 170, 0.3), 0 0 0 1px rgba(0, 212, 170, 0.1);
    }

    .context-menu-item {
      padding: 10px 16px;
      font-size: 13px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: all 0.15s ease;
      color: var(--text-primary);
    }

    .context-menu-item:hover {
      background: rgba(0, 212, 170, 0.15);
      color: var(--accent-primary);
    }

    .context-menu-divider {
      height: 1px;
      background: var(--border-color);
      margin: 6px 0;
    }

    /* 颜色选择器弹窗 */
    .color-picker-dialog {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--bg-elevated);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      padding: 20px;
      z-index: 1001;
      width: 400px;
      max-height: 80vh;
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }

    .dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .dialog-title {
      font-size: 16px;
      font-weight: 600;
    }

    .dialog-close {
      width: 32px;
      height: 32px;
      border: none;
      background: var(--bg-tertiary);
      color: var(--text-secondary);
      border-radius: 6px;
      cursor: pointer;
      font-size: 18px;
    }

    .dialog-close:hover {
      background: var(--danger);
      color: white;
    }

    .color-search {
      margin-bottom: 12px;
    }

    .color-search input {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--border-color);
      background: var(--bg-tertiary);
      color: var(--text-primary);
      border-radius: 6px;
      font-size: 13px;
    }

    .color-search input:focus {
      outline: none;
      border-color: var(--accent-primary);
    }

    .palette-section {
      margin-bottom: 16px;
    }

    .palette-title {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-muted);
      margin-bottom: 8px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .palette-grid {
      display: grid;
      grid-template-columns: repeat(8, 1fr);
      gap: 6px;
    }

    .palette-color {
      aspect-ratio: 1;
      border-radius: 4px;
      border: 2px solid transparent;
      cursor: pointer;
      transition: all 0.15s ease;
    }

    .palette-color:hover {
      transform: scale(1.15);
      z-index: 1;
    }

    .palette-color.selected {
      border-color: white;
      box-shadow: 0 0 0 2px var(--accent-primary);
    }
    
    .palette-color {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .palette-color.empty-bead-checker {
      background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                        linear-gradient(-45deg, #ccc 25%, transparent 25%),
                        linear-gradient(45deg, transparent 75%, #ccc 75%),
                        linear-gradient(-45deg, transparent 75%, #ccc 75%);
      background-size: 8px 8px;
      background-position: 0 0, 0 4px, 4px -4px, -4px 0;
      background-color: #fff;
    }
    
    .palette-color-id {
      font-size: 8px;
      font-weight: 600;
      color: #fff;
      text-shadow: 0 0 2px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.6);
      line-height: 1;
      text-align: center;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 0 1px;
    }
    
    .brand-selector {
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 12px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
      border-radius: 6px;
      margin-bottom: 8px;
      transition: all 0.2s ease;
      font-size: 13px;
    }
    
    .brand-selector:hover {
      background: var(--bg-secondary);
      border-color: var(--accent-primary);
    }
    
    .brand-selector:active {
      transform: scale(0.98);
    }
    
    .brand-selector .brand-name-text {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    
    .brand-switch-hint {
      font-size: 11px;
      color: var(--text-muted);
      margin-left: 8px;
      flex-shrink: 0;
    }
    
    .brand-selector:hover .brand-switch-hint {
      color: var(--accent-primary);
    }
    
    /* Step2 中的品牌选择器（内联版本） */
    .brand-selector-inline {
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      padding: 6px 12px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
      border-radius: 6px;
      transition: all 0.2s ease;
      font-size: 13px;
      min-width: 140px;
    }
    
    .brand-selector-inline:hover {
      background: var(--bg-secondary);
      border-color: var(--accent-primary);
    }
    
    .brand-selector-inline:active {
      transform: scale(0.98);
    }
    
    .brand-selector-inline .brand-name-text {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    
    .brand-selector-inline .brand-switch-hint {
      font-size: 11px;
      color: var(--text-muted);
      margin-left: 8px;
      flex-shrink: 0;
    }
    
    .brand-selector-inline:hover .brand-switch-hint {
      color: var(--accent-primary);
    }
    
    .brand-dropdown {
      position: absolute;
      left: 16px;
      right: 16px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.3);
      max-height: 300px;
      overflow-y: auto;
      z-index: 100;
    }
    
    .brand-option {
      padding: 10px 14px;
      cursor: pointer;
      border-bottom: 1px solid var(--border-color);
      font-size: 13px;
    }
    
    .brand-option:last-child {
      border-bottom: none;
    }
    
    .brand-option:hover {
      background: var(--bg-tertiary);
    }
    
    .brand-option.active {
      background: var(--accent-primary);
      color: white;
    }

    /* 遮罩层 */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      z-index: 999;
    }

    /* 恢复会话弹窗 */
    .restore-dialog {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--bg-elevated);
      border-radius: 16px;
      padding: 24px;
      z-index: 1000;
      width: calc(100vw - 48px);
      max-width: 340px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
      text-align: center;
      animation: dialogFadeIn 0.3s ease;
    }

    @keyframes dialogFadeIn {
      from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
      }
    }

    .restore-dialog-icon {
      margin-bottom: 12px;
      color: var(--accent-primary);
    }
    
    .restore-dialog-icon svg {
      display: block;
      margin: 0 auto;
    }

    .restore-dialog-title {
      font-size: 18px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 16px;
    }

    .restore-dialog-info {
      background: var(--bg-tertiary);
      border-radius: 8px;
      padding: 12px;
      margin-bottom: 20px;
      text-align: left;
    }

    .restore-info-row {
      display: flex;
      justify-content: space-between;
      padding: 6px 0;
      border-bottom: 1px solid var(--border-color);
    }

    .restore-info-row:last-child {
      border-bottom: none;
    }

    .restore-info-label {
      color: var(--text-secondary);
      font-size: 13px;
    }

    .restore-info-value {
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 500;
    }

    .restore-dialog-buttons {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .restore-btn {
      padding: 12px 20px;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      border: none;
      width: 100%;
    }

    .restore-btn-primary {
      background: var(--accent-primary);
      color: white;
    }

    .restore-btn-primary:hover {
      background: var(--accent-secondary);
      transform: translateY(-1px);
    }

    .restore-btn-primary:active {
      background: var(--accent-secondary);
    }

    .restore-btn-secondary {
      background: var(--bg-tertiary);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
    }

    .restore-btn-secondary:hover {
      background: var(--bg-secondary);
      border-color: var(--border-hover);
    }

    .restore-btn-secondary:active {
      background: var(--bg-secondary);
    }

    /* 品牌选择弹窗 */
    /* 品牌弹窗遮罩层（需要比颜色选择器更高） */
    .brand-dialog-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      z-index: 1010;
    }

    .brand-dialog {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: var(--bg-elevated);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      z-index: 1011;
      width: 600px;
      max-width: calc(100vw - 32px);
      max-height: 80vh;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      animation: dialogFadeIn 0.3s ease;
      display: flex;
      flex-direction: column;
    }

    .brand-dialog .dialog-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 0;
      flex-shrink: 0;
    }

    .brand-dialog-body {
      display: flex;
      flex: 1;
      min-height: 0;
      overflow: hidden;
    }

    /* 左侧品牌列表 */
    .brand-list {
      width: 180px;
      border-right: 1px solid var(--border-color);
      overflow-y: auto;
      flex-shrink: 0;
      background: var(--bg-secondary);
    }

    .brand-list-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      cursor: pointer;
      border-bottom: 1px solid var(--border-color);
      transition: all 0.15s ease;
    }

    .brand-list-item:last-child {
      border-bottom: none;
    }

    .brand-list-item:hover {
      background: var(--bg-tertiary);
    }

    .brand-list-item.active {
      background: var(--accent-primary);
      color: white;
    }

    .brand-list-item .brand-name {
      font-size: 14px;
      font-weight: 500;
    }

    .brand-list-item .brand-count {
      font-size: 12px;
      background: var(--bg-tertiary);
      padding: 2px 8px;
      border-radius: 10px;
      color: var(--text-secondary);
    }

    .brand-list-item.active .brand-count {
      background: rgba(255,255,255,0.2);
      color: white;
    }

    /* 右侧规格列表 */
    .spec-list {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
    }

    .spec-list-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border-color);
    }

    .spec-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 12px;
    }

    .spec-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 16px 8px;
      background: var(--bg-tertiary);
      border: 2px solid transparent;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .spec-item:hover {
      background: var(--bg-secondary);
      border-color: var(--accent-primary);
      transform: translateY(-2px);
    }

    .spec-item.active {
      background: var(--accent-primary);
      border-color: var(--accent-primary);
      color: white;
    }

    .spec-color-count {
      font-size: 24px;
      font-weight: 700;
      line-height: 1;
    }

    .spec-label {
      font-size: 12px;
      color: var(--text-secondary);
      margin-top: 4px;
    }

    .spec-item.active .spec-label {
      color: rgba(255,255,255,0.8);
    }

    .spec-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 200px;
      color: var(--text-muted);
      font-size: 14px;
    }

    /* 移动端品牌弹窗适配 */
    @media (max-width: 640px) {
      .brand-dialog {
        width: calc(100vw - 24px);
        max-height: 85vh;
      }

      /* 保持左右布局，左侧窄一些 */
      .brand-list {
        width: 90px;
        flex-shrink: 0;
      }

      .brand-list-item {
        padding: 10px 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
      }

      .brand-list-item .brand-name {
        font-size: 13px;
      }

      .brand-list-item .brand-count {
        font-size: 10px;
        padding: 1px 6px;
      }

      .spec-list {
        padding: 12px;
      }

      .spec-list-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 8px;
      }

      .spec-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
      }

      .spec-item {
        padding: 10px 4px;
        border-radius: 8px;
      }

      .spec-color-count {
        font-size: 18px;
      }

      .spec-label {
        font-size: 10px;
      }
    }

    /* 像素显示模式选择器 */
    .display-mode-option {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 16px 20px;
      border: 2px solid var(--border-color);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      color: var(--text-secondary);
      background: var(--bg-secondary);
      min-width: 80px;
    }

    .display-mode-option:hover {
      border-color: var(--accent-primary);
      color: var(--accent-primary);
      transform: translateY(-2px);
    }

    .display-mode-option.active {
      border-color: var(--accent-primary);
      background: var(--accent-primary);
      color: white;
    }

    .display-mode-option span {
      font-size: 12px;
      font-weight: 500;
    }

    .display-mode-option svg {
      stroke: currentColor;
    }

    /* 移动端显示模式选择器适配 */
    @media (max-width: 640px) {
      .display-mode-option {
        padding: 12px 14px;
        min-width: 70px;
      }

      .display-mode-option svg {
        width: 28px;
        height: 28px;
      }

      .display-mode-option span {
        font-size: 11px;
      }
    }
