/* =========================================================================
   项目计划图 —— 前端样式
   设计原则：极简 / 商务 / 浅色 / 低饱和 / 层次分明
   ========================================================================= */

:root {
  /* 主题色（浅色，低饱和） */
  --bg: #f5f6f8;            /* 页面背景 */
  --panel: #ffffff;         /* 卡片/面板背景 */
  --panel-2: #fafbfc;       /* 次级面板 */
  --border: #e8eaed;        /* 边框 */
  --border-strong: #d9dce1;
  --app-text: #1f2329;      /* 全局文字主色（设置可改） */
  --text: var(--app-text); /* 主文字（随字体颜色设置变化） */
  --text-2: color-mix(in srgb, var(--app-text) 62%, white);  /* 次级文字 */
  --text-3: color-mix(in srgb, var(--app-text) 40%, white);  /* 弱化文字 */
  --accent: #5b8ff9;        /* 主题蓝 */
  --accent-weak: #eaf1fe;
  --danger: #e8684a;
  --shadow: 0 2px 10px rgba(31, 35, 41, 0.06);
  --shadow-lg: 0 8px 30px rgba(31, 35, 41, 0.12);
  --radius: 10px;
  --radius-sm: 8px;

  /* 全局字体缩放比例（设置可改，0.7–1.8） */
  --fs-scale: 1;

  /* 布局尺寸（与 JS 中常量保持一致） */
  --row-h: 46px;
  --header-h: 66px;
  --left-name-w: 220px;
  --left-owner-w: 160px;
  --left-w: 380px;
}

/* 根字体大小随缩放比例变化；其余文字均用 calc(Npx * var(--fs-scale)) 跟随缩放 */
html { font-size: calc(14px * var(--fs-scale)); }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3d6db; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #bcc0c7; }
::-webkit-scrollbar-track { background: transparent; }

/* ----------------------------- 顶部栏 ----------------------------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand {
  font-size: calc(16px * var(--fs-scale));
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand .dot {
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, #5b8ff9, #61ddaa);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ----------------------------- 项目切换菜单 ----------------------------- */
.proj-menu-wrap { position: relative; display: inline-flex; }
.proj-btn {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, #5b8ff9, #4a7ce6);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(91, 143, 249, 0.35);
  transition: transform .12s ease, box-shadow .15s ease;
}
.proj-btn:hover { transform: scale(1.06); box-shadow: 0 3px 10px rgba(91,143,249,0.45); }
.proj-btn .proj-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9);
}
.proj-dropdown {
  position: absolute; top: 40px; left: 0;
  min-width: 200px; max-width: 260px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 90; padding: 6px;
  display: none;
}
.proj-dropdown.show { display: block; }
.proj-dd-title {
  font-size: calc(11px * var(--fs-scale)); color: var(--text-3); padding: 6px 10px 4px;
}
.proj-dd-list { max-height: 260px; overflow: auto; }
.proj-item {
  padding: 8px 10px; font-size: calc(13px * var(--fs-scale)); color: var(--text);
  border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proj-item:hover { background: var(--panel-2); color: var(--accent); }
.proj-item.active { color: var(--accent); font-weight: 600; }
.proj-item .check { color: var(--accent); font-weight: 700; }
.proj-sep { height: 1px; background: var(--border); margin: 5px 8px; }
.proj-item.proj-new { color: var(--accent); font-weight: 600; }
.proj-new-row { display: flex; gap: 6px; padding: 4px 6px 6px; }
.proj-new-input {
  flex: 1; min-width: 0; height: 30px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: calc(12px * var(--fs-scale));
}
.proj-new-input:focus { outline: none; border-color: var(--accent); }
.btn-sm { height: 30px; padding: 0 10px; font-size: calc(12px * var(--fs-scale)); }

/* 统一按钮样式 */
.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: calc(13px * var(--fs-scale));
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #4a7ce6; border-color: #4a7ce6; color:#fff; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--border); color: var(--text); }
.btn-danger { color: var(--danger); border-color: #f0c4ba; }
.btn-danger:hover { background: #fdeee9; border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: calc(16px * var(--fs-scale));
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); }

/* 同步状态小标 */
.sync-badge {
  font-size: calc(12px * var(--fs-scale)); color: var(--text-3);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 4px;
}
.sync-badge .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: #61ddaa;
}
.sync-badge.offline .pulse { background: #e8a33d; }

/* ----------------------------- 主区域布局 ----------------------------- */
.board {
  display: flex;
  height: calc(100vh - 56px);
  background: var(--panel);
  overflow: hidden;
}

/* 左侧固定栏（任务名 + 负责人/部门） */
.left-col {
  width: var(--left-w);
  min-width: var(--left-w);
  border-right: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  z-index: 20;
}
.left-head {
  height: var(--header-h);
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  flex-shrink: 0;
  position: relative;
}
.lh-name {
  width: var(--left-name-w);
  padding: 0 14px;
  display: flex; align-items: center;
  font-weight: 600; font-size: calc(13px * var(--fs-scale)); color: var(--text-2);
  border-right: 1px solid var(--border);
  position: relative;
}
.lh-owner {
  width: var(--left-owner-w);
  padding: 0 14px;
  display: flex; align-items: center;
  font-weight: 600; font-size: calc(13px * var(--fs-scale)); color: var(--text-2);
  position: relative;
}

/* 列宽拖拽手柄 */
.col-resizer {
  position: absolute; top: 0; right: -4px;
  width: 8px; height: 100%; cursor: col-resize; z-index: 6;
}
.col-resizer:before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 3px;
  width: 2px; background: transparent; transition: background .15s ease;
}
.lh-name:hover .col-resizer:before,
.lh-owner:hover .col-resizer:before { background: var(--accent); }

/* 行高拖拽手柄（表头下方分隔线，上下拖动调节任务行高） */
.row-resizer {
  position: absolute; left: 0; right: 0; bottom: -3px;
  height: 7px; cursor: row-resize; z-index: 7;
}
.row-resizer:before {
  content: ""; position: absolute; left: 0; right: 0; top: 3px;
  height: 2px; background: transparent; transition: background .15s ease;
}
.left-head:hover .row-resizer:before { background: var(--accent); }

/* 颜色输入框禁用态（互斥开关触发置灰） */
input[type="color"]:disabled { opacity: .38; cursor: not-allowed; }

.left-viewport { flex: 1; overflow: hidden; position: relative; }
.left-body { will-change: transform; }

/* 右侧计划图区（横向+纵向滚动） */
.right-col {
  flex: 1;
  overflow: auto;
  position: relative;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box;
}

/* 时间轴表头（吸顶） */
.timeline-head {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.tl-row { display: flex; height: calc(var(--header-h) / 3); }
.tl-cell {
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: calc(12px * var(--fs-scale)); color: var(--text-2);
  overflow: hidden; white-space: nowrap;
}
.tl-year { font-weight: 600; color: var(--text); }
.tl-month { color: var(--text-2); }
.tl-day { color: var(--text-3); font-size: calc(11px * var(--fs-scale)); }
.tl-day.weekend { color: #c98a8a; background: #fbf3f3; }
.tl-day.today-cell { color: var(--accent); font-weight: 700; }
/* 年月模式（仅年/月两层）时，行高重新分配 */
.timeline-head.two-row .tl-row { height: calc(var(--header-h) / 2); }

/* 月份单元格：内嵌拖拽手柄的定位基准 */
.tl-month { position: relative; }

/* 时间轴月份分隔线拖拽手柄（每个月份右缘一个，拖动统一缩放所有月/日单元格） */
.tl-resizer {
  position: absolute; top: 0; right: 0;
  width: 8px; height: 100%; cursor: col-resize; z-index: 18;
}
.tl-resizer:before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 3px;
  width: 2px; background: transparent; transition: background .15s ease;
}
.tl-month:hover .tl-resizer:before { background: var(--accent); }
.tl-resizer.dragging:before { background: var(--accent); }

/* 任务条悬浮提示（总计划图显示所属子项目） */
.bar-tooltip {
  position: fixed; z-index: 300; pointer-events: none;
  background: rgba(31, 35, 41, 0.92); color: #fff;
  font-size: calc(12px * var(--fs-scale)); line-height: 1.5;
  padding: 7px 12px; border-radius: 8px;
  box-shadow: var(--shadow-lg); max-width: 260px;
  white-space: nowrap;
}
.bar-tooltip .tt-label { color: #aeb6c0; margin-right: 6px; }

/* 计划图主体 */
.gantt-body { position: relative; }
.grow {
  height: var(--row-h);
  position: relative;
  border-bottom: 1px solid var(--border);
}
.grow:hover { background: #fafbfc; }

/* 进度条 */
.bar {
  position: absolute;
  top: 9px;
  height: calc(var(--row-h) - 18px);
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center;
  padding: 0 10px;
  color: #fff;
  font-size: calc(12px * var(--fs-scale));
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: filter .15s ease, box-shadow .15s ease, transform .1s ease;
  user-select: none;
}
.bar:hover { filter: brightness(1.04); box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.bar:active { transform: scale(0.995); }
.bar .bar-label { overflow: hidden; text-overflow: ellipsis; }

/* 状态着色（进度条颜色由设置中的状态色控制；此处为附加效果） */
.bar.status-completed { opacity: .55; filter: grayscale(22%); }
.bar.status-inprogress {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.7), 0 2px 10px rgba(91,143,249,0.35);
}

/* 今日纵向虚线 */
.today-line {
  position: absolute;
  top: 0;
  width: 0;
  border-left: 1.5px dashed #b8bdc6;
  z-index: 12;
  pointer-events: none;
}
.today-flag {
  position: absolute;
  top: 2px;
  transform: translateX(-50%);
  background: #fff;
  color: var(--text-2);
  font-size: calc(11px * var(--fs-scale));
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  z-index: 13;
}

/* 空状态 */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-3);
  gap: 12px;
  text-align: center;
}
.empty-state .big { font-size: calc(15px * var(--fs-scale)); color: var(--text-2); }

/* 左侧任务行 */
.lrow {
  height: var(--row-h);
  display: flex;
  border-bottom: 1px solid var(--border);
  align-items: stretch;
}
.lrow:hover { background: #fafbfc; }
.lr-name {
  width: var(--left-name-w);
  padding: 0 14px;
  display: flex; flex-direction: column; justify-content: center;
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.lr-name .t {
  font-size: calc(13px * var(--fs-scale)); color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.3;
  word-break: break-word;
}
.lr-name .note {
  font-size: calc(11px * var(--fs-scale)); color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lr-owner {
  width: var(--left-owner-w);
  padding: 0 14px;
  display: flex; align-items: center;
  font-size: calc(12px * var(--fs-scale)); color: var(--text-2);
  white-space: nowrap; overflow: hidden;
}
.lr-owner .o { color: var(--text); }
.lr-owner .d { color: var(--text-3); }
.lr-owner .sep { color: #cdd1d7; margin: 0 6px; font-weight: 400; }

/* ----------------------------- 弹窗 / 面板 ----------------------------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(31,35,41,0.28);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.modal {
  width: 480px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateY(8px) scale(0.98);
  transition: transform .18s ease;
  overflow: hidden;
}
.overlay.show .modal { transform: translateY(0) scale(1); }
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h3 { margin: 0; font-size: calc(15px * var(--fs-scale)); font-weight: 600; }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.x-btn {
  border: none; background: transparent; cursor: pointer;
  font-size: calc(18px * var(--fs-scale)); color: var(--text-3); line-height: 1;
}
.x-btn:hover { color: var(--text); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label {
  display: block; font-size: calc(13px * var(--fs-scale)); color: var(--text-2); margin-bottom: 6px;
}
.field label .req { color: var(--danger); margin-left: 2px; }
.field input[type=text],
.field input[type=date],
.field textarea {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: calc(13px * var(--fs-scale)); color: var(--text);
  background: var(--panel);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { height: 72px; padding: 8px 10px; resize: vertical; font-family: inherit; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
.field .row2 { display: flex; gap: 12px; }
.field .row2 > div { flex: 1; }
.field-error { color: var(--danger); font-size: calc(12px * var(--fs-scale)); margin-top: 4px; min-height: 14px; }

/* 颜色选择 */
.color-block { margin-top: 4px; }
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.swatch {
  width: 26px; height: 26px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease;
}
.swatch:hover { transform: scale(1.08); }
.swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px #fff inset; }
.color-custom { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.color-custom input[type=color] { width: 34px; height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px; background: #fff; cursor: pointer; }
.color-custom input[type=text] { flex: 1; height: 32px; }
.color-default-toggle {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: calc(13px * var(--fs-scale)); color: var(--text-2); cursor: pointer;
}
.color-default-toggle input { width: 15px; height: 15px; }

/* 详情展示 */
.detail-grid { display: grid; grid-template-columns: 84px 1fr; gap: 10px 12px; }
.detail-grid .k { color: var(--text-3); font-size: calc(13px * var(--fs-scale)); }
.detail-grid .v { color: var(--text); font-size: calc(13px * var(--fs-scale)); word-break: break-word; }
.detail-color-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.status-pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: calc(12px * var(--fs-scale)); }
.status-pill.not_started { background: #eef0f2; color: #646a73; }
.status-pill.in_progress { background: #eaf1fe; color: #3a6fd0; }
.status-pill.completed { background: #e6f7f0; color: #2f9e76; }

/* 详情弹窗中的状态切换控件（未开始 / 进行中 / 已完成） */
.status-edit { display: inline-flex; gap: 6px; }
.status-edit button {
  border: 1px solid var(--border-strong);
  background: var(--panel-2);
  color: var(--text-2);
  border-radius: 16px;
  padding: 3px 12px;
  font-size: calc(12px * var(--fs-scale));
  cursor: pointer;
  transition: all .15s ease;
}
.status-edit button:hover { border-color: var(--accent); color: var(--accent); }
.status-edit button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.status-edit button.overdue { color: #e8684a; }
.status-edit button.overdue:hover { border-color: #e8684a; color: #e8684a; }
.status-edit button.overdue.active {
  background: #e8684a;
  border-color: #e8684a;
  color: #fff;
}

/* ----------------------------- 设置面板 ----------------------------- */
.settings-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 92vw;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  transform: translateX(100%);
  transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.settings-panel.show { transform: translateX(0); }
.settings-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.settings-head h3 { margin: 0; font-size: calc(15px * var(--fs-scale)); }
.settings-tabs { display: flex; border-bottom: 1px solid var(--border); }
.settings-tabs .tab {
  flex: 1; text-align: center; padding: 11px 0;
  font-size: calc(13px * var(--fs-scale)); color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .15s ease;
}
.settings-tabs .tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.settings-body { padding: 16px 20px; overflow: auto; flex: 1; }
.settings-section { display: none; }
.settings-section.active { display: block; }

.opt-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.opt-row:last-child { border-bottom: none; }
.opt-row .label { font-size: calc(13px * var(--fs-scale)); color: var(--text); }
.opt-row .desc { font-size: calc(11px * var(--fs-scale)); color: var(--text-3); margin-top: 3px; max-width: 220px; }
.opt-row .ctrl { flex-shrink: 0; }

/* 开关 */
.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #d3d6db; border-radius: 22px; transition: .2s;
}
.switch .slider:before {
  content: ""; position: absolute; height: 16px; width: 16px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider:before { transform: translateX(18px); }

/* 选择 / 输入控件（设置面板内） */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button {
  border: none; background: var(--panel); padding: 6px 12px;
  font-size: calc(12px * var(--fs-scale)); color: var(--text-2); cursor: pointer; transition: .15s;
}
.seg button.active { background: var(--accent); color: #fff; }
.settings-input {
  height: 32px; padding: 0 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: calc(13px * var(--fs-scale)); width: 120px;
}
.settings-color-row { display: flex; align-items: center; gap: 10px; }
.settings-color-row input[type=color] { width: 34px; height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px; background: #fff; cursor: pointer; }

.placeholder-note {
  font-size: calc(12px * var(--fs-scale)); color: var(--text-3); text-align: center;
  padding: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  margin-top: 8px; line-height: 1.6;
}

/* 缩放控制条 */
.zoom-bar {
  position: absolute; bottom: 14px; right: 14px;
  display: flex; align-items: center; gap: 2px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 6px; box-shadow: var(--shadow);
  z-index: 18;
}
.zoom-bar button {
  width: 28px; height: 28px; border: none; background: transparent;
  cursor: pointer; font-size: calc(15px * var(--fs-scale)); color: var(--text-2); border-radius: 14px;
}
.zoom-bar button:hover { background: var(--panel-2); color: var(--accent); }
.zoom-bar .lvl { font-size: calc(12px * var(--fs-scale)); color: var(--text-3); min-width: 34px; text-align: center; }

/* 轻提示 */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1f2329; color: #fff; padding: 10px 18px; border-radius: 22px;
  font-size: calc(13px * var(--fs-scale)); z-index: 200; opacity: 0; transition: all .2s ease;
  pointer-events: none; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  :root { --left-name-w: 150px; --left-owner-w: 110px; --left-w: 260px; }
  .brand { font-size: calc(14px * var(--fs-scale)); }
}

/* ===================== 内嵌模式（工作台卡片 ?embed=1，2026-08-24 恢复） =====================
   仅当 URL 带 embed=1 时由 JS 给 html 挂 embed-mode 类生效；
   直接访问 8778 的原始页面完全不受影响。 */
html.embed-mode body { overflow: hidden; }
html.embed-mode .topbar { display: none !important; }
html.embed-mode .board { height: 100vh !important; }

/* [PATCH 20260824] 统一页脚；内嵌模式隐藏 */
.site-footer{font-family:inherit}
html.embed-mode .site-footer{display:none!important}
