/* 周报页专属样式（v1.9 M2）。颜色一律走 app.css 的 CSS 变量，
   仅规则芯片按设计稿使用固定明暗双色（不随主题变量）。 */

.weekly-page { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
:root { --wk-up: #16a34a; --wk-panel-w: 280px; }
:root[data-theme="dark"] { --wk-up: #4ade80; }

/* ---------- 顶栏 ---------- */
/* padding-right 给右上角那**两颗**固定浮标让位 —— 帮助按钮（.hlp-fab，help.js 注入）与
   主题切换按钮（.thm-fab，theme.js 注入），否则它们会压住本页顶栏右侧的 `.wk-user`。
   ⚠️ 2026-08-31 由 58 加宽到 100（主题按钮从顶栏搬出去做成第二颗浮标）；
   算法见 app.css 的 `.top-bar, .reader-bar` 上方注释。 */
.wk-header { display: flex; align-items: center; justify-content: space-between;
             padding: 10px 100px 10px 18px; border-bottom: 1px solid var(--border);
             background: var(--panel); flex-shrink: 0; }
.wk-logo { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.wk-logo img { width: 22px; height: 22px; }
.wk-logo span { color: var(--accent); }
.wk-header-right { display: flex; align-items: center; gap: 10px; }
.wk-user { font-size: 13px; color: var(--muted); }

.wk-hint { padding: 40px; text-align: center; color: var(--muted); }
.wk-hint a { color: var(--accent); margin-left: 8px; }

/* ---------- 布局：主内容 + 右侧批注栏 ---------- */
.weekly-layout { flex: 1; display: flex; min-height: 0; position: relative; }
.weekly-main { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 22px 60px; }

/* ---------- 周次选择器 ---------- */
.week-selector { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.week-selector select { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px;
                        background: var(--panel); max-width: 240px; }
.week-prev, .week-next { padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px;
                         background: var(--panel); font-size: 16px; line-height: 1.2; }
.week-prev:disabled, .week-next:disabled { opacity: .35; cursor: default; }
.week-prev:not(:disabled):hover, .week-next:not(:disabled):hover { background: var(--hover); }
.week-range { font-size: 13px; color: var(--muted); }
.push-time { font-size: 12px; color: var(--muted); }
/* A4：周级批注入口挪到选择器行右端，窄屏 flex-wrap 时自然换行 */
.week-note-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ---------- KPI 总览行 ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
           gap: 12px; margin-bottom: 18px; }
.kpi-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
            padding: 13px 16px 10px; box-shadow: 0 2px 8px var(--shadow); }
.kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.kpi-value-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kpi-value { font-size: 21px; font-weight: 700; }
.kpi-wow { font-size: 12px; font-weight: 600; }
.kpi-wow.up { color: var(--wk-up); }
.kpi-wow.down { color: var(--danger); }
.kpi-wow.flat { color: var(--muted); }
.kpi-spark { margin-top: 6px; }
.kpi-spark svg { display: block; width: 100%; height: 28px; }

/* ---------- 趋势模块 ---------- */
.trend-module { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
                padding: 14px 16px; margin-bottom: 20px; }
.trend-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.seg-tabs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-tabs button { padding: 5px 13px; font-size: 13px; color: var(--muted);
                   border-right: 1px solid var(--border); }
.seg-tabs button:last-child { border-right: none; }
.seg-tabs button:hover { background: var(--hover); }
.seg-tabs button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg-tabs button:disabled { opacity: .4; cursor: default; }
.seg-tabs button:disabled:hover { background: transparent; }
/* 批 D：多指标模式下 metric-tabs 变多选。勾选位常驻（仅隐藏可见性），
   否则每次勾/取消按钮宽度都会跳一下，整条切换条跟着抖 */
.metric-tabs.multi button::before { content: "✓"; margin-right: 4px; visibility: hidden; }
.metric-tabs.multi button.on::before { visibility: visible; }
.multi-hint { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: -2px 0 8px; }
#single-group-select { padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
                       background: var(--panel); font-size: 13px; }
.trend-views { display: block; }
.trend-views.both { display: flex; gap: 14px; }
.trend-views.both > * { flex: 1; min-width: 0; }
#trend-chart { width: 100%; height: 330px; }
#trend-small { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
#trend-small .small-cell { height: 200px; }

/* 表格视图：斑马纹 + 表头吸顶 + 横滚渐变遮罩 */
.table-scroll { position: relative; overflow-x: auto; max-height: 420px; overflow-y: auto; }
.table-scroll.fade-right::after { content: ""; position: sticky; left: 100%; top: 0;
    display: block; width: 0; }
.table-scroll { background:
    linear-gradient(to left, var(--table-scroll-fade), transparent 26px) right / 26px 100% no-repeat local; }
.wk-table { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
.wk-table th, .wk-table td { border: 1px solid var(--table-border); padding: 7px 11px; text-align: right; }
.wk-table th:first-child, .wk-table td:first-child { text-align: left; }
.wk-table thead th { position: sticky; top: 0; background: var(--table-head-bg); z-index: 2; }
/* A1：表格列序为新→旧，而图表仍为旧→新；「并列」模式同屏时靠此标注消歧 */
.th-note { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.wk-table tbody tr:nth-child(even) { background: var(--table-stripe); }
.wk-table tbody tr:hover { background: var(--table-hover-bg); }

/* ---------- 预警产品表 ---------- */
.alerts-section { margin-bottom: 20px; }
.alerts-section h2 { font-size: 16px; margin-bottom: 10px; }
.alerts-stat { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.alerts-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#group-filter { padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
                background: var(--panel); font-size: 13px; }
.rule-chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* 规则芯片：8 条固定明暗双色（设计稿指定，不随主题变量） */
.rule-chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
             border: 1px solid transparent; color: #1f2937; user-select: none; }
:root[data-theme="dark"] .rule-chip { color: #e5e7eb; }
.rule-chip.on { border-color: var(--accent); font-weight: 600; }
.rule-chip .chip-n { opacity: .75; margin-left: 3px; }
.chip-r1 { background: #FFE0E0; } :root[data-theme="dark"] .chip-r1 { background: #5A1E1E; }
.chip-r2 { background: #FFF0CC; } :root[data-theme="dark"] .chip-r2 { background: #5A4A00; }
.chip-r3 { background: #E8F4FD; } :root[data-theme="dark"] .chip-r3 { background: #1A3A5C; }
.chip-r4 { background: #FFF3E0; } :root[data-theme="dark"] .chip-r4 { background: #5C3800; }
.chip-r5 { background: #F3E5F5; } :root[data-theme="dark"] .chip-r5 { background: #3A0060; }
.chip-r6 { background: #E8F5E9; } :root[data-theme="dark"] .chip-r6 { background: #1B4A1E; }
.chip-r7 { background: #FFFDE7; } :root[data-theme="dark"] .chip-r7 { background: #5C5000; }
.chip-r8 { background: #FCE4EC; } :root[data-theme="dark"] .chip-r8 { background: #5A1A28; }
/* 超龄库存（M4 需求 13）：id=90，不是上游预警规则而是前端合成的筛选维度 ——
   「命中规则 · N」的 N 不含它。
   注意 .rule-chip 的底色是 `1px solid transparent`，只写 border-style 边框是隐形的，
   必须一并给 border-color；而 .on 的高亮定义在本条之前，需再补一条更高特异性的
   选中态，否则点亮后边框颜色被这里盖掉、看不出选中。
   2026-08-17（Aaron）：原本是**透明底**，靠"没有底色"与那 8 枚实心色块区分。改成
   与它们一样有底色，取上面 8 色都没用到的青色系；**虚线边框保留**（Aaron 明确要留）
   —— 底色负责"看得见"，虚线继续负责"它不是上游规则"这层信息，两者不冲突。
   ⚠️ 取值先写的 `#E0F7FA`，**十六进制确实不与任何一枚重复，但浏览器实走一看就露馅**：
   它与 .chip-r3 滞销的 `#E8F4FD` 只差 (-8,+3,-3)，肉眼根本分不出两枚芯片。
   改用饱和度更高的 `#B2EBF2`（与 r3 差 -54,-9,-11）才真正拉开。
   ⇒ 「不重复」要按**看得出区别**判，不是按值不相等判；这种事只有截图能发现。 */
.chip-r90 { background: #B2EBF2; border-color: var(--border);
            border-style: dashed; opacity: .85; }
:root[data-theme="dark"] .chip-r90 { background: #0E4A50; }
.rule-chip.chip-r90.on { border-color: var(--accent); opacity: 1; }

/* M4 需求 5（批 B）：列宽要能拖，就必须 fixed 布局 —— auto 布局下浏览器按内容重算
   列宽，拖窄的列会被内容顶回原样，表现为"拖了没反应"。fixed 的代价是每列都得有明确
   宽度，已在 ALERT_COLUMNS 的 `w` 里给全，经 <colgroup> 注入。
   `width: auto + min-width: 100%` 而不是 .wk-table 的 `width: 100%`：后者会让 fixed
   按容器宽度**等比缩放**各列，拖出来的绝对 px 就对不上了；前者让表格总宽 = 各列之和，
   超出容器时由 .table-scroll 横滚（下面这三条旧的 min-width 因此都不再需要 ——
   fixed 布局下 td 上的 min-width 根本不参与列宽计算，留着只会误导后人）。 */
/* 总宽由 JS 写成 inline style（= 各列之和），这里不写 width：
   `width:auto` 下 fixed 表格的宽度仍受容器约束，实测 1798px 的列定义被压成 1474px；
   也刻意不写 `min-width:100%` —— 藏掉多列使总宽小于容器时，多出来的宽度会被 fixed
   按比例摊回各列，拖拽的像素差就不跟手了。宁可右侧留白。 */
.alerts-table { table-layout: fixed; }
/* ⑮ 纵向居中：拖窄某列 → 内容换行 → 单元格变高，vertical-align:top 会让同一行里
   短内容全贴顶、看着像掉了半格。横向对齐见下面 al-* 那一节。 */
.alerts-table td { vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.alerts-table .prod-name { font-weight: 600; white-space: normal; }
/* 产品名最多两行（需求 6「行高自适应」的另一半）：这一列是全表最高的单元格，
   一个 80 字的标题能把整行顶到 5 行高。裁行必须裹在内层 div 上 ——
   line-clamp 加在 td 会把下面的 ASIN 链接和复制按钮一起裁掉。全名进 title 不丢信息。 */
.alerts-table .pname { display: -webkit-box; -webkit-line-clamp: 2;
                       -webkit-box-orient: vertical; overflow: hidden; }
.alerts-table .asin-links { font-size: 12px; }
.alerts-table .asin-links a { color: var(--accent); text-decoration: none; }
.alerts-table .asin-links a:hover { text-decoration: underline; }
.alerts-table .asin-alt { color: var(--muted); margin-left: 5px; }
/* 复制 ASIN（v1.8.57 起取代原「搜索」链接）：与 .asin-alt 同一视觉重量，
   但是按钮不是链接——点了不跳走，只把 ASIN 送进剪贴板 */
.btn-copy-asin { margin-left: 6px; font-size: 11px; color: var(--muted);
                 border: 1px solid var(--border); border-radius: 6px;
                 padding: 0 6px; line-height: 17px; white-space: nowrap; }
.btn-copy-asin:hover { color: var(--accent); border-color: var(--accent); }
/* 状态 8 项已各有独立列（2026-08-03），产品名下的括号串与 .alert-status 随之取消 */
/* 宽度改由 colgroup 决定（见上），这里只管内部排布 */
.alerts-table .cell-chips { display: flex; gap: 4px; flex-wrap: wrap; white-space: normal; }
.trend-spark { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.trend-spark svg { display: block; }

/* ---------- ⑮ 单元格对齐：预警表 + ASIN 历史表（13 周趋势表不在内）----------

   ⚠️ **不要改 .wk-table 那两条基础规则**（本文件 86-87 行：其余右、首列左）——
   三张表共用它，动了 13 周趋势表会跟着变。这里全部写在两张表各自的作用域里。

   ⚠️ **也不能再依赖 :first-child**：⑭① 之后列可以拖走，「首列」不再恒等于产品列。
   改为每个 td/th 都由 JS 显式挂一个 al-* 类（weekly.js alignCls / weekly-history.js
   hsAlignCls），漏挂只会落到默认右对齐，不会因为恰好排在首位就变左。

   选择器带 `.wk-table` 前缀是为了**稳赢基础规则而不靠源码先后**：
   `.wk-table td:first-child` 是 (0,2,1)，`.wk-table.alerts-table td.al-c` 是 (0,3,1)。

   口径（Aaron 2026-08-12 裁决）：数字列右对齐 —— $747 与 $9,219 的个位成列才能一眼
   比量级，居中就得逐个读数；产品名与命中规则左对齐 —— 多行 ragged 文本居中后两边
   都不齐，最伤可读性；短字段与表头居中。 */
.wk-table.alerts-table th.al-l, .wk-table.alerts-table td.al-l,
.wk-table.hs-table th.al-l,     .wk-table.hs-table td.al-l     { text-align: left; }
.wk-table.alerts-table th.al-c, .wk-table.alerts-table td.al-c,
.wk-table.hs-table th.al-c,     .wk-table.hs-table td.al-c     { text-align: center; }
.wk-table.alerts-table th.al-r, .wk-table.alerts-table td.al-r,
.wk-table.hs-table th.al-r,     .wk-table.hs-table td.al-r     { text-align: right; }

/* 四处吃不到 text-align 的地方 —— 「看着是一行 CSS」的真实成本都在这儿：
   ① .cell-chips 是 flex 容器，flex 容器不理 text-align，得显式 justify-content
      （现值恰好等于默认的 flex-start，写出来是为了日后有人改了对齐能一眼看到这条）*/
.alerts-table td.al-l .cell-chips { justify-content: flex-start; }
.alerts-table td.al-c .cell-chips { justify-content: center; }
/*  ② .trend-spark 是 flex-direction:column，横向要靠 align-items。
      作用域限死在预警表内 —— 详情页也用 .trend-spark，那里是左排的一列，不能跟着居中 */
.alerts-table td.al-c .trend-spark { align-items: center; }
/*  ③ 评分列的副行 .asin-alt 带 margin-left:5px（右对齐时无所谓），居中列必须清掉，
      否则整行恒偏右 2.5px，且随字号变化飘 */
.alerts-table td.al-c .asin-alt { margin-left: 0; }
/*  ④ <th> 跟着各列类型走已由上面三条 al-* 覆盖（th 里的 .col-resizer 是 absolute，不受影响）。
   自动排除、无需处理：.group-section-row / .group-note-area 的 text-align:left !important
   会挡住居中 —— 那两处是段落文本，本来就不该居中。 */

/* ---------- 列交互：排序 / 拖宽 / 显隐菜单（M4 需求 5、6，批 B） ---------- */

/* th 本就是 position: sticky，可直接作为 resizer 的定位上下文。
   td 有 overflow:hidden 而 th 没有：把手要露在列边界上，裁了就抓不住。 */
.alerts-table th { position: relative; }
.alerts-table th.sortable { cursor: pointer; user-select: none; }
.alerts-table th.sortable:hover { color: var(--accent); }
.th-sort { font-size: 9px; margin-left: 3px; opacity: .4; }
.alerts-table th.sorted { color: var(--accent); }
.alerts-table th.sorted .th-sort { opacity: 1; }
/* 把手完全落在本列内（不是骑在列边界上）：thead th 都是 position:sticky + z-index:2，
   同层级下 DOM 靠后的 th 会盖住前一列溢出的部分 —— 溢出 4px 的把手右半边点不到，
   点上去反而触发了相邻列的排序。 */
.col-resizer { position: absolute; top: 0; right: 0; width: 8px; height: 100%;
               cursor: col-resize; z-index: 3; }
.col-resizer:hover { background: var(--accent); opacity: .3; }
/* 拖动中锁住整页的光标与选中：否则划过表格会把单元格文字一路选蓝 */
body.col-resizing, body.col-resizing * { cursor: col-resize !important; user-select: none !important; }

.wk-menu-wrap { position: relative; }
.wk-btn-menu { padding: 5px 9px; border: 1px solid var(--border); border-radius: 8px;
            background: var(--panel); font-size: 13px; cursor: pointer; white-space: nowrap; }
.wk-btn-menu:hover { border-color: var(--accent); color: var(--accent); }
/* ⚠️ z-index 必须高于批注栏的 40 与它的把手 41（低于 .modal-mask 50 / 浮窗 60）。
   原值 30 时历史页的「⚙ 列」菜单**整块压在 #annotation-panel 底下、右半边点不动**
   —— 浏览器实走里 elementsFromPoint 才看得出来（顶上那层是 .panel-timeline），
   逻辑断言与截图都发现不了。与批 B「热区被相邻元素遮挡」是同一类。 */
.wk-drop-menu { position: absolute; top: calc(100% + 5px); left: 0; z-index: 42;
             min-width: 200px; max-height: 340px; overflow-y: auto;
             background: var(--panel); border: 1px solid var(--border);
             border-radius: 10px; padding: 7px; box-shadow: 0 6px 20px rgba(0, 0, 0, .16); }
.col-menu-head { font-size: 12px; color: var(--muted); padding: 2px 6px 6px; }
.col-menu-item { display: flex; align-items: center; gap: 7px; padding: 4px 6px;
                 border-radius: 7px; font-size: 13px; cursor: pointer; }
.col-menu-item:hover { background: var(--hover); }
.col-menu-item.fixed { opacity: .55; cursor: default; }
.col-menu-item .asin-alt { margin-left: auto; font-size: 11px; }

/* 菜单内列表拖拽排序（⑭①③）。列排序刻意不做在表头上 —— 那儿已经有「点=排序」和
   「拖 resizer=调宽」两种手势，第三种必然打架（批 B 的把手遮挡事故就是这么来的）。

   ⚠️ 行是 <div> 不是 <label>：把手若落在 <label> 内，抓它等于点了标签，
   每拖一次都会顺手把这列的显隐勾选切一下。勾选区单独裹 .col-menu-lab。
   .fixed 行（必留列）照样能拖 —— required 只管「不许藏」，不管排哪儿，
   故把手的 cursor 要盖掉 .fixed 的 cursor:default。 */
.col-menu-lab { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0;
                cursor: inherit; }
/* padding 撑热区：⠿ 本身只有 8.5px 宽，实走时量出来抓着费劲；连同上下 padding
   把可抓区域做到约 15×19，与 .col-resizer 的 8px 是同一个量级考量 */
.col-drag { color: var(--muted); font-size: 13px; line-height: 1; cursor: grab;
            padding: 3px 3px; user-select: none; flex: none; }
.col-drag:active { cursor: grabbing; }
.col-menu-item.dragging { opacity: .4; }
/* 插入位置用一条实线提示：拖进菜单中段时光靠高亮整行分不清是插它前面还是后面 */
.col-menu-item.drop-before { box-shadow: inset 0 2px 0 0 var(--accent); }
.col-menu-item.drop-after  { box-shadow: inset 0 -2px 0 0 var(--accent); }
.series-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.col-menu-note { font-size: 11px; color: var(--muted); padding: 6px 6px 2px;
                 margin-top: 5px; border-top: 1px solid var(--border); line-height: 1.5; }
.col-menu-reset { width: 100%; margin-top: 6px; padding: 5px; font-size: 12px;
                  border: 1px solid var(--border); border-radius: 7px;
                  background: transparent; color: inherit; cursor: pointer; }
.col-menu-reset:hover { border-color: var(--accent); color: var(--accent); }
.btn-note { font-size: 15px; padding: 3px 7px; border-radius: 7px; }
.btn-note:hover { background: var(--hover); }
.group-section-row td { background: var(--table-head-bg) !important; font-weight: 700;
                        text-align: left !important; }
.group-section-row .group-note-toggle { font-size: 12px; color: var(--accent);
                                        margin-left: 10px; font-weight: 400; }
.group-note-area td { background: var(--bg) !important; white-space: normal; text-align: left !important; }
.group-note-list { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.group-note-list .empty { color: var(--muted); }
.alerts-empty { color: var(--muted); padding: 22px; text-align: center; }

/* ---------- 预警文本形态（v1.8.38：可复制外发） ---------- */
/* 并列 = 上下堆叠（预警表 9-10 列，左右各半会严重挤压） */
.alert-views { display: block; }
.alert-views.both > * { margin-bottom: 14px; }

/* 0-B：预警区限高**集中在这一处**，表格与文本共用一个变量。
   ⛔ 别改 .table-scroll 的 max-height —— 那个类同时挂在趋势表 #trend-table-wrap
   和 ASIN 历史页 #hs-scroll 上，历史页已经被迫写 .hs-scroll{max-height:none}
   覆盖过它一次（见本文件下方那段注释），这里是第二次踩同一块砖，别再踩第三次。
   ⚠️ 以前表格 420px、文本 620px，**两个数本来就不一样**，并列模式下高度对不齐 ——
   收敛成同一个变量顺手把这条也修了。

   ⭐ **真正的高度由 weekly.js 的 syncAlertsHeight() 实测量出来写进 --alerts-h**，
   这里这两行只是 **JS 还没跑时的兜底**，刻意取保守值、不追求精确 ——
   ⛔ 别把它改成「精确公式」跟 JS 比着写，那就成了两份真相。
   为什么必须由 JS 量：表格上方的顶栏、下方 .weekly-main 的 padding-bottom 与
   .alerts-section 的 margin-bottom 都是**固定像素**（不随视口缩放），
   用 vh 比例扣减在大屏上浪费最多（实测视口 1440 时白白少 2.7 行）；
   而写死 calc(100vh - Npx) 里的 N 又依赖没有常量可循的顶栏高度，改了就悄悄过时。
   ⚠️ 并列是**上下叠**（不是左右分栏），所以 .both 的兜底要减半，
   两块都吃满会把并列模式撑成一条长廊。 */
.alert-views { --alerts-h: calc(100vh - 200px); }
.alert-views.both { --alerts-h: calc((100vh - 214px) / 2); }
#alerts-table-wrap, #alerts-text-wrap { max-height: var(--alerts-h); }
.btn-copy-all { margin-left: auto; font-size: 12.5px; padding: 4px 11px; border-radius: 8px;
                border: 1px solid var(--border); color: var(--accent); background: var(--panel);
                white-space: nowrap; }
.btn-copy-all:hover { background: var(--accent-soft); }

#alerts-text-wrap { overflow-y: auto; }   /* 限高见上方 --alerts-h */
.alert-text-group-head { font-size: 13px; font-weight: 700; color: var(--muted);
                         padding: 10px 2px 4px; }
.alert-text-item { position: relative; padding: 10px 40px 10px 12px; margin-bottom: 6px;
                   border: 1px solid var(--border); border-radius: 10px; background: var(--panel);
                   font-size: 13px; line-height: 1.75; white-space: normal;
                   word-break: break-word; }
/* 💬 独立浮于右上角，不进正文文字流 —— 与 user-select:none 一起保证框选复制不带 UI */
.alert-text-item .btn-note { position: absolute; top: 6px; right: 6px;
                             user-select: none; -webkit-user-select: none; }
.alert-text-item .atx-head { font-weight: 600; }
.alert-text-item .atx-rules { color: var(--accent); }
.alert-text-item .atx-line { color: var(--muted); }

/* ---------- 周级批注入口（位于 .week-selector 内，见 A4） ---------- */
.btn-week-note { border: 1px dashed var(--border); border-radius: 9px; padding: 6px 12px;
                 font-size: 12px; color: var(--muted); }
.btn-week-note:hover { color: var(--accent); border-color: var(--accent); }

/* T4'-a 主页级 AI 入口：与批注入口同一行右端，用实线+强调色与"备注"类虚线按钮区分 */
.btn-ai-week { border: 1px solid var(--accent); border-radius: 9px; padding: 6px 12px;
               font-size: 12px; color: var(--accent); background: var(--accent-soft); }
.btn-ai-week:hover { filter: brightness(1.08); }
.btn-ai-week:disabled { opacity: .5; cursor: default; filter: none; }

/* ---------- 右侧批注栏 ---------- */
.annotation-panel { width: var(--wk-panel-w); flex-shrink: 0; background: var(--panel);
                    border-left: 1px solid var(--border); display: flex; position: relative; z-index: 40; }
.annotation-panel.collapsed { display: none; }
.panel-resizer { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px;
                 cursor: col-resize; z-index: 41; touch-action: none; }
.panel-resizer:hover { background: var(--accent-soft); }
.panel-inner { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-header { display: flex; align-items: center; justify-content: space-between;
                padding: 11px 14px; border-bottom: 1px solid var(--border); }
.panel-title { font-weight: 700; font-size: 14px; }
.panel-close-btn { display: none; }
.panel-context { padding: 10px 14px; border-bottom: 1px solid var(--border);
                 font-size: 13px; line-height: 1.55; }
.panel-context .ctx-title { font-weight: 600; }
.panel-context .ctx-sub { color: var(--muted); font-size: 12px; }
.panel-context .cell-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.panel-timeline { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex;
                  flex-direction: column; gap: 10px; }
.panel-timeline .empty { color: var(--muted); font-size: 13px; text-align: center; margin-top: 18px; }
.note-item { border: 1px solid var(--border); border-radius: 10px; padding: 8px 11px; font-size: 13px; }
.note-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
             font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.note-week { font-weight: 700; color: var(--accent); }
/* 停用作者的署名后缀（v1.8.84 §16⑪）。三处署名共用 weekly.js::authorLabelHtml，
   所以这一条样式同时作用于面板时间线、汇总页组备注、看板卡片 */
.author-off { color: var(--muted); font-weight: 400; }
.note-vis { border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
.note-vis.vis-group { color: var(--wk-up); border-color: var(--wk-up); }
.note-content { white-space: pre-wrap; word-break: break-word; }
.note-acts { margin-top: 5px; display: flex; gap: 4px; }
.note-acts button { font-size: 11px; color: var(--muted); padding: 1px 6px; border-radius: 5px; }
.note-acts button:hover { background: var(--hover); color: var(--text); }
.note-edit-area textarea { width: 100%; border: 1px solid var(--border); border-radius: 7px;
                           padding: 6px 8px; background: var(--bg); resize: vertical; }

/* ── 回复链（15a 批二）：一条链 = 根 + 折叠起来的回复区 ──────────────
   ⚠️ 只做进 #annotation-panel 这一个面板 —— 周报表格 / 预警详情页 / ASIN 历史页
   三个入口共用它（搬 DOM 不复制），所以这一处样式三处同时生效。 */
.note-chain { display: flex; flex-direction: column; }
.note-chain-foot { margin-top: 4px; }
.note-reply-toggle { font-size: 11.5px; color: var(--muted); padding: 2px 7px;
                     border-radius: 6px; }
.note-reply-toggle:hover { background: var(--hover); color: var(--accent); }
/* 回复缩进一级 + 左边一道竖线：一眼看出它挂在上面那条批注下，而不是另一条批注 */
.note-reply-area { margin: 4px 0 0 12px; padding-left: 10px;
                   border-left: 2px solid var(--border);
                   display: flex; flex-direction: column; gap: 7px; }
.note-reply-area.hidden { display: none; }
.note-reply { background: var(--bg); }
.note-reply-input textarea { width: 100%; border: 1px solid var(--border);
                             border-radius: 7px; padding: 6px 8px; background: var(--bg);
                             resize: vertical; font-size: 13px; }
.note-reply-btns { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.note-reply-notify { font-size: 11px; color: var(--muted); display: flex;
                     align-items: center; gap: 3px; }
.note-reply-btns button { margin-left: auto; font-size: 12px; padding: 4px 10px;
                          border: 1px solid var(--accent); border-radius: 7px;
                          color: var(--accent); background: var(--accent-soft); }
.note-reply-btns button:disabled { opacity: .5; cursor: default; }
.panel-input { border-top: 1px solid var(--border); padding: 10px 14px; }
.panel-input textarea { width: 100%; border: 1px solid var(--border); border-radius: 8px;
                        padding: 8px 10px; background: var(--bg); resize: vertical; }
.panel-input-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.visibility-select { flex: 1; padding: 5px 8px; border: 1px solid var(--border);
                     border-radius: 7px; background: var(--panel); font-size: 12px; }
/* A6：替代原 group→private 切换弹窗的常驻提示 */
.vis-hint { margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--muted); }
/* M4 需求 15b：飞书推送勾选框（默认不勾，仅「组内可见」下可用） */
.notify-feishu { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
                 color: var(--muted); white-space: nowrap; cursor: pointer; }
.notify-feishu input[disabled] { cursor: not-allowed; }
.notify-feishu:has(input[disabled]) { opacity: .45; cursor: not-allowed; }
.submit-note { margin-left: auto; background: var(--accent); color: #fff; border-radius: 8px;
               padding: 6px 14px; font-size: 13px; font-weight: 600; }
.submit-note:disabled { opacity: .5; cursor: default; }
.ask-ai-btn { margin: 0 14px 12px; border: 1px dashed var(--border); border-radius: 10px;
              padding: 8px; font-size: 13px; color: var(--muted); }
.ask-ai-btn:hover { color: var(--accent); border-color: var(--accent); }

/* 侧栏收起后的浮动展开按钮（桌面）/抽屉唤起按钮（窄屏） */
.panel-fab { position: fixed; right: 18px; bottom: 22px; width: 46px; height: 46px;
             border-radius: 50%; background: var(--accent); color: #fff; font-size: 20px;
             box-shadow: 0 4px 14px var(--shadow); z-index: 60; }

.panel-mask { display: none; }

/* ---------- ≤1080px：批注栏转抽屉 ---------- */
@media (max-width: 1080px) {
  .annotation-panel { position: fixed; right: 0; top: 0; height: 100dvh;
                      width: min(86vw, 360px); transform: translateX(100%);
                      transition: transform .3s; box-shadow: -6px 0 24px var(--shadow); }
  .annotation-panel.collapsed { display: flex; }
  .annotation-panel.open { transform: translateX(0); }
  .panel-resizer { display: none; }
  .panel-close-btn { display: inline-block; }
  #panel-collapse { display: none; }
  .panel-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 39; }
  .panel-mask.show { display: block; }
  .trend-views.both { flex-direction: column; }
  /* ⚠️ 这里**刻意不再给预警区单独定一档窄屏高度**（上一版给过 56vh/34vh）：
     syncAlertsHeight() 量的是 main 的实际可用空间，本来就随窗口自适应，
     再按屏宽分一档就是同一件事的第二个出口，还会和 JS 打架。 */
}

/* ---------- 预警详情页（批 C）：三栏 = 清单 / 内容 / 批注与 AI ---------- */
:root { --wk-dt-list-w: 300px; }

.wk-detail { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wk-detail.hidden { display: none; }

.dt-bar { display: flex; align-items: center; gap: 12px; padding: 9px 18px;
          border-bottom: 1px solid var(--border); background: var(--panel); flex-shrink: 0; }
.dt-back { padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px;
           background: var(--panel); font-size: 13px; }
.dt-back:hover { background: var(--hover); }
.dt-head { font-weight: 700; font-size: 15px; }
.dt-sub { font-size: 12px; color: var(--muted); margin-left: auto; }
/* M4 需求 12：详情页顶栏的部门/周次下拉，跟在右侧副标题之后 */
.dt-picks { display: flex; align-items: center; gap: 8px; }
.dt-picks select { font-size: 12px; padding: 4px 8px; border-radius: 8px;
                   border: 1px solid var(--border); background: var(--panel); color: inherit;
                   max-width: 220px; }

.dt-body { flex: 1; display: flex; min-height: 0; position: relative; }

/* 左栏：预警清单 */
.dt-list { width: var(--wk-dt-list-w); flex-shrink: 0; display: flex; flex-direction: column;
           border-right: 1px solid var(--border); background: var(--panel); min-width: 0; }
.dt-list-head { padding: 9px 14px; font-size: 12px; color: var(--muted);
                border-bottom: 1px solid var(--border); }
.dt-list-body { flex: 1; overflow-y: auto; padding: 8px; display: flex;
                flex-direction: column; gap: 6px; }
.dt-item { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px;
           cursor: pointer; }
.dt-item:hover { background: var(--hover); }
.dt-item.on { border-color: var(--accent); background: var(--accent-soft); }
.dt-item-name { font-size: 13px; font-weight: 600; line-height: 1.4;
                display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
                overflow: hidden; }
.dt-item-sub { font-size: 11px; color: var(--muted); margin: 3px 0 5px; }
.dt-item .cell-chips { display: flex; gap: 4px; flex-wrap: wrap; }

/* 分隔条：与 .panel-resizer 同一套指针拖拽语言 */
.dt-resizer { width: 6px; flex-shrink: 0; cursor: col-resize; touch-action: none; z-index: 41; }
.dt-resizer:hover { background: var(--accent-soft); }

/* 中栏：预警内容 */
.dt-main { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 20px 50px; }
.dt-main-head h2 { font-size: 17px; line-height: 1.45; margin-bottom: 5px; }
.dt-block { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
            padding: 12px 15px; margin-top: 14px; }
.dt-block h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 9px;
               display: flex; align-items: center; gap: 10px; }
.dt-block .cell-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.dt-rule-details { margin: 9px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.dt-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.dt-metric { display: flex; flex-direction: column; gap: 2px; }
.dt-metric-label { font-size: 11px; color: var(--muted); }
.dt-metric-value { font-size: 15px; font-weight: 600; }
.dt-spark { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            font-size: 12px; margin-top: 6px; }
.dt-copy { margin-left: auto; font-size: 12px; color: var(--muted);
           border: 1px solid var(--border); border-radius: 7px; padding: 2px 8px; }
.dt-copy:hover { color: var(--accent); border-color: var(--accent); }
.dt-text { font-size: 13px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }

/* 右栏：tab（A 方案统一栏）。批注 pane 的内容是搬进来的 #annotation-panel */
.dt-side { width: var(--wk-panel-w); flex-shrink: 0; display: flex; flex-direction: column;
           border-left: 1px solid var(--border); background: var(--panel); min-width: 0; }
.dt-tabs { margin: 9px 12px; align-self: stretch; }
.dt-tabs button { flex: 1; }
.dt-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dt-pane.hidden { display: none; }

/* 搬进详情页后的批注栏：宽度/边框/收起态都归外层 .dt-side 管 */
body.detail-open .annotation-panel { width: auto; flex: 1; border-left: none; min-height: 0; }
body.detail-open .panel-resizer { display: none; }
body.detail-open .panel-header { display: none; }   /* 标题与关闭由 tab 条代替 */
body.detail-open .ask-ai-btn { display: none; }     /* 「问 AI」就在隔壁 tab，不再自指 */

/* AI 问答 pane */
.dt-ai-ctx { padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 12px;
             line-height: 1.6; display: flex; flex-direction: column; gap: 2px; }
.dt-ai-ctx-t { font-weight: 600; font-size: 13px; }
.dt-ai-msgs { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex;
              flex-direction: column; gap: 12px; }
.dt-ai-msgs .empty { color: var(--muted); font-size: 13px; text-align: center;
                     margin-top: 20px; line-height: 1.7; }
.dt-ai-msgs .bubble { max-width: 100%; font-size: 13px; }
.dt-ai-msgs .trace { max-width: 100%; }
.dt-ai-input { border-top: 1px solid var(--border); padding: 10px 14px;
               display: flex; align-items: flex-end; gap: 8px; }
.dt-ai-input textarea { flex: 1; border: 1px solid var(--border); border-radius: 8px;
                        padding: 8px 10px; background: var(--bg); resize: vertical;
                        font-size: 13px; }
.dt-ai-send { background: var(--accent); color: #fff; border-radius: 8px; padding: 7px 14px;
              font-size: 13px; font-weight: 600; flex-shrink: 0; }
.dt-ai-send:disabled { opacity: .5; cursor: default; }

/* ≤1080px：三栏改单列纵向堆叠。
   这里**不**复用批注栏的抽屉机制：抽屉那套（fixed + panel-fab + mask）是给周报页
   「主内容全宽 + 批注临时唤起」设计的；详情页右栏是主角之一，藏起来等于砍掉半个页面。
   堆叠后清单限高、内容与右栏各自纵向滚动，横向零溢出。 */
@media (max-width: 1080px) {
  .dt-body { flex-direction: column; }
  .dt-list { width: auto; max-height: 34vh; border-right: none;
             border-bottom: 1px solid var(--border); }
  .dt-resizer { display: none; }
  .dt-main { flex: none; max-height: 46vh; }
  .dt-side { width: auto; flex: 1; min-height: 320px; border-left: none;
             border-top: 1px solid var(--border); }
  /* 详情页里批注栏是内嵌的，@media 那条 fixed 抽屉规则必须让位 */
  body.detail-open .annotation-panel { position: static; width: auto; height: auto;
                                       transform: none; box-shadow: none; display: flex; }
  body.detail-open .panel-mask { display: none; }
}

/* ---------- 周报页内嵌 AI 浮层（M4 需求 2，批 B） ---------- */

/* 窗体只管外壳，内部消息流是搬进来的 #dt-pane-ai（.dt-pane 自带 flex:1 + 纵向 flex），
   所以这里给 host 一个能撑开的 flex 容器就够，不重复定义任何消息流样式。 */
.wk-ai-float { position: fixed; right: 18px; bottom: 18px; z-index: 60;
               width: 420px; max-width: calc(100vw - 36px);
               height: min(70vh, 620px);
               display: flex; flex-direction: column;
               background: var(--panel); border: 1px solid var(--border);
               border-radius: 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, .22);
               overflow: hidden; }
/* ⚠️ 这条不能省：上面的 display:flex 会盖掉 UA 对 [hidden] 的 display:none，
   没有它浮层从一开始就常驻在屏幕右下角，且 JS 把 hidden 设成 true 也关不掉。 */
.wk-ai-float[hidden] { display: none; }
.wk-ai-float-bar { display: flex; align-items: center; gap: 8px; padding: 9px 12px;
                   border-bottom: 1px solid var(--border); background: var(--table-head-bg); }
.wk-ai-float-title { flex: 1; font-size: 13px; font-weight: 600;
                     white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-ai-float-host { flex: 1; min-height: 0; display: flex; }

/* 窄屏铺满：420px 的浮层在手机上会把整页盖住一半还带圆角悬空，不如贴边全宽 */
@media (max-width: 700px) {
  .wk-ai-float { right: 8px; left: 8px; bottom: 8px; width: auto;
                 max-width: none; height: min(78vh, 560px); }
}

/* ── 单 ASIN 历史明细页（M4 批 C 需求 7）────────────────────────────────
   与详情页同为本页内的全屏视图，两者互斥。结构比详情页简单：左表 + 右批注栏。 */

.wk-history { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wk-history.hidden { display: none; }

.hs-body-wrap { flex: 1; display: flex; min-height: 0; position: relative; }

/* 表区。**必须覆盖 .table-scroll 的 max-height:420px** —— 那个高度是给周报页
   嵌在长页面里的表设的，历史页整屏就这一张表，限高会让 26 周只露出一半。 */
.hs-scroll { flex: 1; min-width: 0; max-height: none; overflow: auto; padding: 14px 18px 40px; }

/* table-layout:fixed 是列宽可拖的前提：auto 布局下拖窄会被内容顶回去。
   总宽由 JS inline 写死（width:auto 会被容器压窄，批 B 实测 1798px→1474px）。 */
.hs-table { table-layout: fixed; }
/* 纵向居中同预警表（⑮）：拖窄某列后内容换行会把行撑高，贴顶看着像掉了半格 */
.hs-table td { vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.hs-table th { position: relative; }
.hs-table th.sortable { cursor: pointer; user-select: none; }
.hs-table th.sortable:hover { color: var(--accent); }
/* 周次列贴左：横向滚到第 20 列时还得知道这行是哪一周 */
.hs-table th:first-child, .hs-table td:first-child { position: sticky; left: 0; z-index: 1; }
.hs-table thead th:first-child { z-index: 3; }
.hs-table td:first-child { background: var(--panel); }
.hs-table tbody tr:nth-child(even) td:first-child { background: var(--table-stripe); }
.hs-week { font-weight: 600; white-space: nowrap; }
.hs-week .asin-alt { display: block; font-weight: 400; font-size: 11px;
                     color: var(--muted); margin: 2px 0 0; }

/* 批注 / 预警单元格按钮：无内容时是个安静的 —，有内容才着色 */
.hs-cell-btn { font-size: 12px; color: var(--muted); border: 1px solid transparent;
               border-radius: 7px; padding: 2px 8px; background: none; }
.hs-cell-btn.has { color: var(--accent); border-color: var(--border); font-weight: 600; }
.hs-cell-btn:hover { background: var(--hover); border-color: var(--accent); }

/* 顶栏右侧工具区（⑭③）：「⚙ 列」+「💬 批注」。.dt-sub 带 margin-left:auto，
   排在它之后自然贴到最右。 */
.hs-bar-tools { display: flex; align-items: center; gap: 8px; }
/* 工具区贴在顶栏最右，菜单再按默认的 left:0 往右展开就顶出视口了（实测右侧被切 59px）
   ⇒ 这一处改成右对齐。预警表那两个菜单在页面左半边，不受影响。 */
.hs-bar-tools .wk-drop-menu { left: auto; right: 0; }

/* 右栏：搬进来的 #annotation-panel。宽度/边框归外层管，同详情页范式 */
.hs-side { width: var(--wk-panel-w); flex-shrink: 0; display: flex; flex-direction: column;
           border-left: 1px solid var(--border); background: var(--panel); min-width: 0; }
.hs-side-head { padding: 11px 14px; font-size: 13px; font-weight: 600;
                border-bottom: 1px solid var(--border);
                display: flex; align-items: center; justify-content: space-between; }
/* 关掉右栏 = 整栏连同把手一起收（不是给 .annotation-panel 加 collapsed —— 那样
   面板消失了但外层 .hs-side 还占着一栏宽度的空白）。重开走顶栏的「💬 批注」：
   #panel-fab 在 #weekly-layout 里，历史页把它整个藏了，指望它就再也点不开。
   关闭态刻意不持久化：这是「我现在想看宽表」，不是「我永远不要批注栏」。 */
body.history-side-closed .hs-side,
body.history-side-closed #hs-side-resizer { display: none; }

body.history-open .annotation-panel { width: auto; flex: 1; border-left: none; min-height: 0; }
body.history-open .panel-resizer { display: none; }
body.history-open .panel-header { display: none; }   /* 标题由 .hs-side-head 代替 */
body.history-open .ask-ai-btn { display: none; }     /* AI 问答在详情页，这里不设二入口 */

/* 预警浮窗：Aaron 定「预警走浮窗、批注走侧栏」—— 预警是扫一眼就关的只读短内容，
   进侧栏要多一层 tab 切换。定位由 JS 算（贴单元格 + 碰视口边缘翻转）。 */
.hs-pop { position: fixed; z-index: 60; max-width: 420px; min-width: 240px;
          background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
          box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 10px 13px;
          font-size: 13px; line-height: 1.6; }
.hs-pop-head { font-weight: 600; margin-bottom: 7px; padding-bottom: 6px;
               border-bottom: 1px solid var(--border); }
.hs-pop-item + .hs-pop-item { margin-top: 9px; padding-top: 9px;
                              border-top: 1px dashed var(--border); }
.hs-pop-rule { font-weight: 600; }
.hs-pop-detail { color: var(--muted); margin-top: 2px; }
.hs-pop-th { color: var(--muted); font-size: 12px; margin-top: 3px; opacity: .8; }

/* ＋ 入口：预警表（weekly.js）与详情页 head（weekly-detail.js）共用同一份样式，
   不带 .alerts-table 作用域前缀，加前缀会让详情页那颗掉样式 */
.btn-hist { font-size: 12px; color: var(--muted); border: 1px solid var(--border);
            border-radius: 6px; padding: 0 6px; margin-left: 5px; background: none;
            line-height: 1.6; }
.btn-hist:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 1080px) {
  .hs-body-wrap { flex-direction: column; }
  .hs-scroll { flex: none; max-height: 52vh; }
  .hs-side { width: auto; flex: 1; min-height: 300px; border-left: none;
             border-top: 1px solid var(--border); }
  /* 同详情页：批注栏在这里是内嵌的，@media 那条 fixed 抽屉规则必须让位 */
  body.history-open .annotation-panel { position: static; width: auto; height: auto;
                                        transform: none; box-shadow: none; display: flex; }
  body.history-open .panel-mask { display: none; }
}

/* 行级可见范围提示（M4 批 C 需求 14-B）：跟在预警计数后面，
   用 accent 色而不是警告色 —— 这是正常的范围说明，不是出错。 */
.scope-note { font-size: 12px; font-weight: 400; color: var(--accent); margin-left: 4px; }
.scope-note.hidden { display: none; }

/* ---------- 批注看板（15a 批一）：本页第 4 个全屏视图，hash `#notes` ----------
   顶栏复用 .dt-bar（与详情页/历史页同一条），下面是工具行 + 卡片区。
   卡片形态是裁决 11 —— 批二要在卡片里加回复区 + 折叠，先做成表格等于白干一轮。 */

.wk-notes { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.wk-notes.hidden { display: none; }

/* 顶部工具条上的入口按钮：实线 + 强调色边框，比虚线的"＋ 备注"重、比实心的
   「🤖 AI分析本周」轻 —— Aaron 要「清晰、大小适中便于分辨」。
   ⚠️ 类名带 wk- 前缀是本页硬规矩：app.css 里有一堆通用 .btn-* ，撞上就是
   computed display:none + 0×0 热区（批 B 实际踩过）。 */
.wk-btn-notes { border: 1px solid var(--accent); border-radius: 9px; padding: 6px 12px;
                font-size: 12px; color: var(--accent); background: var(--panel); }
.wk-btn-notes:hover { background: var(--accent-soft); }

/* ⚠️ .nb-* 卡片/工具条/回复区样式 Phase 5 批四起在 notes-board.css（周报与月报共挂），⛔ 别在这里再写一份。 */
/* 浮窗底部的二级入口（只有看板会传）：默认路径不跳转，想深看再点这一行 */
.hs-pop-foot { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border);
.hs-pop-foot a { color: var(--accent); text-decoration: none; }
.hs-pop-foot a:hover { text-decoration: underline; }

