/* PieBoard - 简洁清爽版 */
/* 设计:白底 + 单色强调 + 等宽数字 */

:root {
  --bg: #F8F8FA;
  --card: #FFFFFF;
  --ink: #1A1A2E;
  --ink-2: #5A5A6E;
  --ink-3: #A8A8B8;
  --line: #ECECF0;
  --accent: #FF6B35;
  --accent-soft: #FFE9DD;
  --shadow: 0 2px 12px rgba(26, 26, 46, 0.06);
  --shadow-lg: 0 8px 28px rgba(26, 26, 46, 0.10);
  --radius: 12px;
  --radius-lg: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum';
}

.phone-frame {
  width: 100%;
  max-width: 500px;
  height: 100%;
  margin: 0 auto;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 状态栏 */
.status-bar {
  height: 28px;
  background: var(--bg);
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top, 0);
}

/* 周进度条:简洁 */
.week-bar {
  background: var(--card);
  margin: 8px 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  flex-shrink: 0;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.week-bar:hover {
  box-shadow: var(--shadow);
}

.week-bar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.week-bar-label {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
}

.week-bar-value {
  margin-left: auto;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  font-feature-settings: 'tnum';
}

.week-bar-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.week-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 日期切换器 */
.date-switcher {
  background: transparent;
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
  transition: all 0.15s;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.date-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.weekday-text {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.btn-text {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink-2);
}

.btn-text:disabled {
  color: var(--ink-3);
  cursor: not-allowed;
}

/* 饼图区 - 响应式 */
.pie-section {
  background: var(--card);
  margin: 8px 16px;
  padding: 16px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

#pie-canvas {
  display: block;
  cursor: pointer;
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
}

/* 图例 */
.legend {
  padding: 8px 16px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 100px;
  color: var(--ink-2);
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-value {
  color: var(--ink-3);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 2px;
}

/* 录入表单 */
.entry-form {
  margin: 8px 16px;
  background: var(--card);
  padding: 10px;
  display: flex;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.entry-form:focus-within {
  border-color: var(--accent);
}

.form-hint {
  padding: 0 20px 4px;
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
  flex-shrink: 0;
}

.select-category {
  flex: 2;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.input-duration {
  flex: 2;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 14px;
  color: var(--ink);
}

.input-duration:focus {
  outline: none;
}

.btn-add {
  width: 44px;
  height: 40px;
  border: none;
  background: var(--accent);
  color: #FFF;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
}

.btn-add:active {
  transform: scale(0.92);
}

/* 条目列表 - 展开版 */
.entry-list {
  flex: 1;
  padding: 8px 16px;
  overflow-y: visible;
  background: transparent;
}

.entry-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 64px;
}

.entry-row:active {
  transform: scale(0.98);
  background: var(--bg);
}

.entry-emoji {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 8px;
}

.entry-cat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;  // 防止 flex 挤压
}

.entry-cat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.entry-time {
  font-size: 11px;
  color: var(--ink-3);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}

.entry-duration {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-delete {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--ink-3);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* 底部按钮 */
.bottom-buttons {
  padding: 8px 16px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-secondary {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}

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

.btn-secondary:disabled {
  color: var(--ink-3);
  cursor: not-allowed;
}

.btn-sync-main {
  background: var(--accent);
  color: #FFF;
  border-color: var(--accent);
}

/* AI 总结按钮 */
.ai-bar {
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.btn-ai {
  width: 100%;
  height: 44px;
  border: none;
  background: var(--ink);
  color: #FFF;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-ai:hover { opacity: 0.85; }
.btn-ai:disabled { background: var(--ink-3); cursor: not-allowed; }

/* 日记卡片 */
.diary-card {
  margin: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  flex-shrink: 0;
}

.diary-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.diary-icon { font-size: 18px; }
.diary-title { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1; }
.diary-status { font-size: 11px; color: var(--ink-3); margin-right: 8px; }
.diary-status.has-content { color: var(--accent); }

.diary-edit-btn {
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.diary-edit-btn:hover { background: var(--accent); color: #FFF; }
.diary-edit-btn:active { transform: scale(0.95); }

.diary-preview {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
  max-height: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
}

.diary-preview.empty { color: var(--ink-3); font-style: italic; }

/* 日记弹窗 */
.diary-modal-content { height: auto; max-height: 85vh; }

.diary-body { padding: 16px; }

.diary-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.diary-textarea {
  width: 100%;
  min-height: 280px;
  max-height: 50vh;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
  color: var(--ink);
  resize: vertical;
  background: var(--bg);
}

.diary-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
}

.diary-stats {
  text-align: right;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.diary-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.diary-actions button {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.diary-actions .btn-secondary {
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
}

/* 桌面小组件 */
.widget-preview {
  margin: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  flex-shrink: 0;
}

.widget-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.widget-header {
  display: none;
}

.widget-ring {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.widget-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.widget-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
}

.widget-unit {
  font-size: 9px;
  color: var(--ink-3);
  margin-top: 2px;
}

.widget-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.widget-top-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
}

.widget-top-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.widget-top-name {
  flex: 1;
}

.widget-top-val {
  color: var(--ink-3);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}

/* 调试栏 */
.debug-bar {
  background: var(--bg);
  padding: 6px 16px;
  display: flex;
  gap: 4px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.btn-debug {
  flex: 1;
  height: 28px;
  border: 1px dashed var(--ink-3);
  background: transparent;
  border-radius: 4px;
  font-size: 10px;
  color: var(--ink-2);
  cursor: pointer;
}

/* ===== 弹窗(统一) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.btn-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 16px;
  color: var(--ink-2);
  cursor: pointer;
}

/* 周详情弹窗 */
.week-modal-content { padding-bottom: 12px; }

.week-summary {
  text-align: center;
  padding: 20px 16px;
  background: var(--bg);
  margin: 12px 16px;
  border-radius: var(--radius);
}

.week-summary-total {
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
}

.week-summary-label {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 4px;
}

.week-summary-percent {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 6px;
}

.week-days {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.week-day-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12px;
}

.week-day-row.today {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.week-day-label {
  flex: 0 0 70px;
  color: var(--ink-2);
  font-weight: 500;
}

.week-day-row.today .week-day-label {
  color: var(--accent);
  font-weight: 600;
}

.week-day-track {
  flex: 1;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.week-day-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.week-day-value {
  flex: 0 0 50px;
  text-align: right;
  color: var(--ink-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.week-footer {
  padding: 8px 16px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
}

/* 同步弹窗 */
.sync-modal-content { padding-bottom: 12px; }

.sync-body { padding: 12px 16px; }

.sync-info { text-align: center; line-height: 1.6; }

.sync-tabs {
  display: flex;
  margin-bottom: 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.sync-tab {
  flex: 1;
  height: 36px;
  border: none;
  background: var(--card);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  border-right: 1px solid var(--line);
}

.sync-tab:last-child { border-right: none; }

.sync-tab.active {
  background: var(--accent);
  color: #FFF;
  font-weight: 600;
}

.sync-tab-panel { display: none; padding: 8px 0; }
.sync-tab-panel.active { display: block; }

.qr-display {
  display: flex;
  justify-content: center;
  margin: 16px 0;
  padding: 16px;
  background: #FFF;
  border-radius: 12px;
  border: 1px dashed var(--ink-3);
}

#my-qr-canvas {
  max-width: 100%;
  height: auto !important;
}

.sync-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  padding: 10px;
  border-radius: 6px;
  background: var(--accent-soft);
  margin: 12px 0;
  word-break: break-all;
}

.btn-copy {
  width: 100%;
  height: 40px;
  border: none;
  background: var(--ink);
  color: #FFF;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.btn-block { width: 100%; margin-top: 8px; }

.sync-code-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  margin: 12px 0;
}

.sync-divider {
  text-align: center;
  margin: 16px 0 8px;
  color: var(--ink-3);
  font-size: 11px;
  position: relative;
}

.sync-divider::before,
.sync-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--line);
}

.sync-divider::before { left: 0; }
.sync-divider::after { right: 0; }

/* 扫码弹窗 */
.scan-modal-content { height: auto; max-height: 85vh; }

.scan-body { padding: 16px 0; text-align: center; }

.scan-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

#scan-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scan-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 4px solid var(--accent);
}

.scan-corner.tl { top: 20%; left: 20%; border-right: none; border-bottom: none; border-top-left-radius: 8px; }
.scan-corner.tr { top: 20%; right: 20%; border-left: none; border-bottom: none; border-top-right-radius: 8px; }
.scan-corner.bl { bottom: 20%; left: 20%; border-right: none; border-top: none; border-bottom-left-radius: 8px; }
.scan-corner.br { bottom: 20%; right: 20%; border-left: none; border-top: none; border-bottom-right-radius: 8px; }

.scan-hint { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.scan-status { margin-top: 8px; font-size: 12px; color: var(--ink-2); min-height: 20px; }

/* 分享菜单 */
.share-modal-content { height: auto; max-height: 80vh; }
.share-menu-body { padding: 16px 16px 8px; }
.share-info { text-align: center; line-height: 1.6; }

#share-preview {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* 解析/AI 弹窗 */
.parse-modal-content { height: auto; padding-bottom: 16px; }
.parse-body { padding: 12px 16px; font-size: 14px; }
.parse-raw { background: var(--bg); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; font-size: 12px; color: var(--ink-3); font-style: italic; }
.parse-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--bg); border-radius: 6px; margin-bottom: 6px; }
.parse-label { color: var(--ink-3); font-size: 13px; }
.parse-value { color: var(--ink); font-weight: 600; font-size: 14px; }
.parse-cat-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.parse-actions { display: flex; gap: 8px; padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.parse-actions button { flex: 1; height: 40px; border-radius: 8px; font-size: 13px; cursor: pointer; }

.parse-confirm, .btn-primary { background: var(--accent); color: #FFF; border: none; font-weight: 600; }
.parse-cancel, .btn-modal-secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }

/* AI 弹窗 */
.ai-modal-content { height: auto; max-height: 70vh; }
.ai-body { padding: 12px 16px; max-height: 50vh; overflow-y: auto; }
.ai-loading { text-align: center; padding: 30px 0; color: var(--ink-3); }
.ai-loading::after { content: '...'; animation: dots 1.5s infinite; }
@keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60%, 100% { content: '...'; } }

.ai-section { margin-bottom: 14px; }
.ai-section-title { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.ai-section-content { font-size: 13px; color: var(--ink); }
.ai-suggestion { background: var(--bg); padding: 10px 12px; margin-bottom: 6px; border-radius: 6px; font-size: 13px; color: var(--ink); border-left: 3px solid var(--accent); }

.ai-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  margin-right: 4px;
  margin-bottom: 4px;
  font-weight: 500;
}

.ai-footer { border-top: 1px solid var(--line); padding: 10px 16px; display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.ai-model-badge { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 100px; font-weight: 600; }

/* 分类管理弹窗 */
.category-list { padding: 8px 16px; max-height: 50vh; overflow-y: auto; }
.cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.cat-color-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.cat-name-input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink);
}
.cat-name-input:focus { border-color: var(--line); background: var(--card); outline: none; }
.cat-name-input:disabled { color: var(--ink-2); }
.cat-color-options { display: flex; gap: 4px; }
.cat-color-option { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.cat-color-option.selected { border-color: var(--ink); }
.btn-cat-delete { width: 28px; height: 28px; border: none; background: var(--accent-soft); color: var(--accent); border-radius: 50%; font-size: 12px; cursor: pointer; }

.add-category-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  align-items: center;
}
.add-category-row input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
}
.color-picker { display: flex; gap: 4px; }
.color-picker-dot { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.color-picker-dot.selected { border-color: var(--ink); }

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #FFF;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 13px;
  z-index: 200;
  pointer-events: none;
  animation: fadeInOut 1.8s ease-in-out;
  box-shadow: var(--shadow-lg);
  max-width: 90%;
  text-align: center;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

/* 调试栏 */
.btn-debug {
  flex: 1;
  height: 28px;
  border: 1px dashed var(--ink-3);
  background: transparent;
  border-radius: 4px;
  font-size: 10px;
  color: var(--ink-2);
  cursor: pointer;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--ink-3);
  font-size: 14px;
}