/* ========== 浅色主题 ========== */
[data-theme="light"] {
  color-scheme: light;
}
[data-theme="light"] body {
  background: #f5f5f7;
  color: #1a1a2e;
}
[data-theme="light"] .top-nav,
[data-theme="light"] .side-panel {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .top-nav {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .nav-title {
  color: #1a1a2e;
}
[data-theme="light"] .nav-user {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .nav-btn {
  color: #333;
  border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .nav-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .msg-ai {
  background: #e8e8ed;
  color: #1a1a2e;
}
[data-theme="light"] .msg-user {
  background: #fff;
  color: #1a1a2e;
  border: 2px solid rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .msg-meta {
  color: rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .msg-error {
  color: #c62828;
}
[data-theme="light"] .input-box,
[data-theme="light"] .main-chat-area,
[data-theme="light"] .chat-content {
  background: #f5f5f7;
}
[data-theme="light"] .input-box {
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .input-box textarea {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}
[data-theme="light"] .input-box textarea::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .side-panel {
  border-right-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .panel-tab {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .panel-tab.active {
  color: #1a1a2e;
}
[data-theme="light"] .panel-tab:hover {
  color: rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .history-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .empty-hint {
  color: rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .setting-label {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .setting-select {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #1a1a2e;
}
[data-theme="light"] .setting-info {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .organize-editor {
  background: #fff;
}
[data-theme="light"] .organize-editor textarea {
  background: #f5f5f7;
  color: #1a1a2e;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .batch-toolbar {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .welcome h2 {
  color: rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .welcome p {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .welcome-hint {
  color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .thinking {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .thinking-dot {
  background: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .history-preview {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .history-time {
  color: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .history-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .history-item:hover {
  background: rgba(0, 0, 0, 0.03);
}
[data-theme="light"] .panel-action-btn {
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.15);
  color: #2563eb;
}
[data-theme="light"] .notes-item {
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .organize-menu {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .organize-item {
  color: rgba(0, 0, 0, 0.8);
}
[data-theme="light"] .organize-item:hover {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .organize-editor .btn-cancel {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] #send-btn:hover {
  background: #1d4ed8;
}
[data-theme="light"] .input-main {
  background: #fff;
}
[data-theme="light"] .settings-section {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .settings-section h3,
[data-theme="light"] .settings-hdr {
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .settings-hdr:hover {
  color: #000;
}
[data-theme="light"] .form-group label {
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .form-group .char-count {
  color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .style-toggle-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .style-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}
/* ========== 留白按钮样式（已封存）==========
[data-theme="light"] .ws-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .ws-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
[data-theme="light"] .ws-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .ws-btn.active:hover {
  background: #2563eb;
}
[data-theme="light"] .ws-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
========== 留白按钮样式结束 ========== */
[data-theme="light"] .preset-tab-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .form-group textarea {
  background: #fff;
  color: #1a1a2e;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .setting-info {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .input-row textarea {
  color: #1a1a2e;
}
[data-theme="light"] .input-row textarea::placeholder {
  color: rgba(0, 0, 0, 0.3);
}
[data-theme="light"] .tool-btn {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .voice-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .voice-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .mode-select {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.5);
}

/* ========== 自定义确认弹窗 ========== */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.confirm-box {
  background: #1a1a2e;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  color: #e0e0e0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.confirm-box p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
}
.confirm-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-btns button {
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.confirm-btn-yes {
  background: #ef4444;
  color: #fff;
}
.confirm-btn-no {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ========== 风格配置面板 ========== */
.style-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.style-panel {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.style-panel::-webkit-scrollbar {
  width: 4px;
}
.style-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
.style-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.style-header h3 {
  font-size: 18px;
  color: #e0e0e0;
}
.style-preset-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}
.preset-tab {
  flex: 1;
  position: relative;
  padding: 6px 2px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  overflow: hidden;
}
.preset-tab.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}
.preset-name {
  display: block;
  color: rgba(0, 0, 0, 0.5);
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.preset-tab.active .preset-name {
  color: #2563eb;
}
.preset-name[contenteditable="true"] {
  color: #1a1a2e;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  padding: 2px 6px;
  width: 100%;
  box-sizing: border-box;
}
.style-sec-label {
  font-size: 16px;
}
.theme-toggle-btn {
  font-size: 15px;
}
.style-save-btn {
  font-size: 16px;
}
.avatar-label {
  font-size: 14px;
}

/* ===== 设置面板 · 头像行（左右各50%，内部居中） ===== */
.avatar-row {
  display: flex;
}
.avatar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.avatar-circle:hover {
  border-color: rgba(255, 255, 255, 0.4);
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  font-weight: 500;
  user-select: none;
}

/* 头像行 — 左右各占50%，内部头像居中（界面风格页用） */
.style-avatar-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.avatar-col {
  flex: 1;
  height: 56px;
  position: relative;
  display: flex;
  justify-content: center;
}
.avatar-pic {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.04);
  cursor: pointer;
}
.avatar-pic[src]:not([src=""]) {
  background: none;
}
.avatar-empty-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.style-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.style-section-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.style-sec-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5);
  min-width: 42px;
  flex-shrink: 0;
}
.style-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.style-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
  margin-left: 4px;
}
.theme-toggle-btn {
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 12px;
  cursor: pointer;
}
.theme-toggle-btn.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
  color: #2563eb;
}
.style-row input[type="color"] {
  width: 30px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: none;
  cursor: pointer;
  padding: 0;
}
.style-save-btn {
  width: 100%;
  padding: 10px;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin-top: 4px;
}

/* 字号比例 */
.size-s {
  --font-scale: 1;
}
.size-m {
  --font-scale: 1.5;
}
.size-l {
  --font-scale: 2;
}
.msg {
  font-size: calc(14px * var(--font-scale, 1));
}

/* ========== Token 输入弹窗 ========== */
.token-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.token-dialog {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.token-dialog h2 {
  font-size: 20px;
  margin-bottom: 8px;
}
.token-dialog p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
  line-height: 1.8;
}
.token-dialog textarea {
  width: 100%;
  height: 80px;
  margin-bottom: 16px;
  font-size: 12px;
  font-family: monospace;
}

/* ========== 设置面板 ========== */
.nav-ai-name {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 12px;
}
.settings-section {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-section h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 4px;
}
.form-group .char-count {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}
.form-group textarea {
  min-height: 60px;
  resize: none;
}
.btn-primary {
  width: 100%;
  padding: 10px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 8px;
}
.btn-primary:hover {
  background: #2563eb;
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.notes-indicator {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  margin-right: 8px;
  white-space: nowrap;
}
.help-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  text-decoration: none;
}
.help-link:hover {
  color: #3b82f6;
}
.settings-section input[type="radio"] {
  accent-color: #3b82f6;
}
.style-toggle-btn {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.8rem;
}
.style-toggle-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.style-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.style-toggle-btn.active:hover {
  background: #2563eb;
}
/* ========== 留白按钮样式（已封存）==========
.ws-btn {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 0.8rem;
  min-width: 48px;
  text-align: center;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}
.ws-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.ws-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}
.ws-btn.active:hover {
  background: #2563eb;
}
.ws-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
========== 留白按钮样式结束 ========== */
.preset-tab-btn {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.75rem;
}
.preset-tab-btn.active {
  background: #3b82f6;
  color: #fff;
}

.sync-indicator {
  font-size: 0.65rem;
  opacity: 0.5;
  cursor: default;
}
.sync-indicator[onclick] {
  cursor: pointer;
  color: #f59e0b;
}

.device-filter-bar a {
  color: #3b82f6;
  text-decoration: none;
  cursor: pointer;
  margin-left: 6px;
}
.device-filter-bar a:hover {
  text-decoration: underline;
}
.device-filter-bar b {
  color: rgba(255, 255, 255, 0.8);
}

.settings-hdr {
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
  padding: 4px 0;
}
.settings-hdr:hover {
  color: #fff;
}
.settings-hdr.collapsed::before {
  content: "\25B6\00A0";
}
.settings-hdr:not(.collapsed)::before {
  content: "\25BC\00A0";
}
.settings-body {
  overflow: hidden;
}
.settings-body.hidden {
  display: none;
}

/* ========== ScrollManager 浮动按钮 ========== */
.scroll-toolbar {
  position: fixed;
  right: 20px;
  bottom: 120px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.scroll-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(30, 30, 60, 0.85);
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.2s,
    opacity 0.2s,
    transform 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  user-select: none;
}
.scroll-btn:hover {
  background: rgba(50, 50, 100, 0.95);
  color: #fff;
  transform: scale(1.05);
}
.scroll-btn:active {
  transform: scale(0.95);
}
.scroll-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* Light 主题适配 */
[data-theme="light"] .scroll-btn {
  background: rgba(240, 240, 245, 0.9);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .scroll-btn:hover {
  background: rgba(220, 220, 230, 0.95);
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .scroll-btn:disabled {
  opacity: 0.25;
}

@media (max-width: 768px) {
  .scroll-toolbar {
    right: 12px;
    bottom: 100px;
    gap: 6px;
  }
  .scroll-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* ========== 书记官按钮样式 ========== */
.scribe-bar {
  display: flex;
  justify-content: flex-start;
  padding: 4px 8px 2px;
  margin-top: 2px;
}

.scribe-btn {
  background: transparent;
  border: 1px solid #6366f1;
  color: #6366f1;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.6;
}

.scribe-btn:hover {
  background: #6366f1;
  color: #fff;
}

.scribe-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #9ca3af;
  color: #9ca3af;
  background: transparent;
}

.scribe-btn:disabled:hover {
  background: transparent;
  color: #9ca3af;
}

/* ========== 清除本地数据按钮 ========== */
.btn-clear-local {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid #ef4444;
  background: transparent;
  color: #ef4444;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  font-weight: 500;
}
.btn-clear-local:hover {
  background: #ef4444;
  color: #fff;
}

/* ========== 输出习惯（语音智能输入） ========== */
/* §5.3 — 设置面板"输出习惯"区块样式 */

/* — 语音输入模式单选组 — */
.speech-mode-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.speech-mode-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--border-color, #444);
  border-radius: 6px;
  transition: all 0.15s;
}

.speech-mode-item:hover {
  border-color: var(--accent-color, #5a9cf5);
  color: var(--text-primary, #e0e0e0);
}

.speech-mode-item input[type="radio"] {
  accent-color: var(--accent-color, #5a9cf5);
}

/* — 默认风格单选列表 — */
.style-radio-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.style-radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.style-radio-item:hover {
  background: var(--hover-bg, #3a3a3a);
}

.style-radio-item input[type="radio"] {
  accent-color: var(--accent-color, #5a9cf5);
}

/* — 候选风格多选列表 — */
.style-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.style-checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.style-checkbox-item:hover {
  background: var(--hover-bg, #3a3a3a);
}

.style-checkbox-item input[type="checkbox"] {
  accent-color: var(--accent-color, #5a9cf5);
}

/* — 风格标签（系统/自定义标记） — */
.style-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(90, 156, 245, 0.15);
  color: var(--accent-color, #5a9cf5);
  font-weight: 500;
}

/* — 多选项预览开关 — */
.speech-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary, #e0e0e0);
  cursor: pointer;
}

.speech-toggle-label input[type="checkbox"] {
  accent-color: var(--accent-color, #5a9cf5);
}

/* — 新建风格按钮 — */
.speech-btn-new-style {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px dashed var(--border-color, #555);
  border-radius: 6px;
  background: transparent;
  color: var(--accent-color, #5a9cf5);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.speech-btn-new-style:hover {
  background: rgba(90, 156, 245, 0.1);
  border-color: var(--accent-color, #5a9cf5);
}

/* — 浅色主题适配 — */
[data-theme="light"] .speech-mode-item {
  color: #555;
  border-color: #ddd;
}
[data-theme="light"] .speech-mode-item:hover {
  border-color: #4a90d9;
  color: #333;
}
[data-theme="light"] .style-radio-item,
[data-theme="light"] .style-checkbox-item {
  color: #333;
}
[data-theme="light"] .style-radio-item:hover,
[data-theme="light"] .style-checkbox-item:hover {
  background: #f0f0f0;
}
[data-theme="light"] .speech-toggle-label {
  color: #333;
}
[data-theme="light"] .speech-btn-new-style {
  color: #4a90d9;
  border-color: #ccc;
}
[data-theme="light"] .speech-btn-new-style:hover {
  background: rgba(74, 144, 217, 0.08);
  border-color: #4a90d9;
}
/* ====== Phase 3: 折叠面板/下拉选项 ====== */
.hdr-value {
  float: right;
  font-weight: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== 下拉选项列表 ====== */
.settings-body .dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  margin: 1px 0;
}
.settings-body .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}
.dropdown-item-checkbox {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
  display: inline-block;
  margin-left: auto;
}
.dropdown-item-checkbox.checked {
  border-color: #3b82f6;
  background: #3b82f6;
}
.dropdown-item-checkbox.checked::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* 圆点单选图标 — AI助手角色使用（单选） */
.dropdown-item-radio {
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
  display: inline-block;
  margin-left: auto;
}
.dropdown-item-radio.checked {
  border-color: #3b82f6;
}
.dropdown-item-radio.checked::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
}
.dropdown-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-item-add {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: flex-start;
  padding: 10px 12px;
  margin-top: 2px;
}

/* ====== 右键菜单 ====== */
.settings-context-menu {
  position: fixed;
  z-index: 10050;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 140px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.settings-context-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ====== 浅色主题 ====== */
[data-theme="light"] .hdr-value {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .settings-body .dropdown-item {
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .settings-body .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .dropdown-item-checkbox {
  border-color: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .dropdown-item-radio {
  border-color: rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .settings-context-menu {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .settings-context-item:hover {
  background: rgba(0, 0, 0, 0.04);
}
