/* ══ 工作台右侧「记事本」栏（主上 2026-11-10）══
   金黄色基调 · 从右侧滑出 · 覆盖在主内容之上
   err-ok: truth_brief.py 所在 AI视频工厂 目录本机已不存在，无法执行真源重建；
           已用 read 源码 + 部署后 _sync_ver ALL_ALIGNED 作为核实证据。
*/

/* ── 遮罩（点它收起）── */
.wb-note-scrim{
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(6, 4, 16, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease;
}
.wb-note-scrim.on{
  opacity: 1;
  pointer-events: auto;
}

/* ── 面板主体：金黄基调 ── */
.wb-notebar{
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 92vw;
  z-index: 1210;
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform .30s cubic-bezier(.22,.9,.28,1);
  overflow: hidden;

  /* 金黄基调：深底 + 金色暖光（不是纯色块，有材质层次） */
  background:
    radial-gradient(120% 70% at 88% 0%, rgba(255,214,120,.20) 0%, rgba(220,160,60,.08) 38%, transparent 68%),
    radial-gradient(90% 60% at 10% 100%, rgba(255,190,80,.14) 0%, transparent 62%),
    linear-gradient(168deg, rgba(46,32,16,.98) 0%, rgba(30,20,10,.985) 52%, rgba(22,15,8,.99) 100%);
  border-left: 1px solid rgba(255,205,110,.42);
  box-shadow:
    -18px 0 60px rgba(0,0,0,.55),
    -1px 0 0 rgba(255,220,150,.18) inset;
}
.wb-notebar.on{
  transform: translateX(0);
}

/* 面板打开时锁页面滚动（主上 2026-11-16 截图：面板底部漏出底层紫红+半截白字）
   ─────────────────────────────────────────────────────────────
   实测根因：JS 一直在加 body.wb-note-open（wb-notes.js:1812），
   但**四个 CSS 文件里都没有这条规则** —— 等于空操作。
   于是面板（position:fixed 贴视口底）打开后页面仍可滚动，
   实测 scrollY=2、body.scrollHeight=1346（视口仅 844），
   一滑动底层正文就从面板底下露出来。
   ⇒ 补上真正的锁滚动。用 overflow:hidden 而不是 position:fixed，
     避免 fixed 方案在 iOS 上把页面顶回顶部、关面板后位置丢失。 */
body.wb-note-open{
  overflow: hidden;
}

/* 面板内的星尘层 */
.wb-note-stars{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 14%, rgba(255,240,200,.9), transparent 100%),
    radial-gradient(1px 1px at 28% 38%, rgba(255,255,255,.6), transparent 100%),
    radial-gradient(1.4px 1.4px at 46% 8%, rgba(255,225,160,.85), transparent 100%),
    radial-gradient(1px 1px at 64% 52%, rgba(255,255,255,.5), transparent 100%),
    radial-gradient(1.2px 1.2px at 82% 22%, rgba(255,240,190,.75), transparent 100%),
    radial-gradient(1px 1px at 90% 66%, rgba(255,255,255,.45), transparent 100%),
    radial-gradient(1px 1px at 36% 76%, rgba(255,235,180,.6), transparent 100%),
    radial-gradient(1px 1px at 72% 88%, rgba(255,255,255,.4), transparent 100%);
  animation: wbNoteTwinkle 8s ease-in-out infinite alternate;
}
@keyframes wbNoteTwinkle{
  0%   { opacity: .38; }
  55%  { opacity: .68; }
  100% { opacity: .46; }
}

/* ── 顶部（主上 2026-11-14 重做）
   「重新设计，面积要最小，最合理，不是把元素随意摆放。」
   旧版：head-l 是 column + wrap，宠物 44px 独占一行、标题一行、「N 条待办」另起一行并且
         margin-left:53px 缩进 ⇒ 头部实测高 76px，右侧大片空白，元素像散放。
   新版：严格单行 —— 宠物 30 · 标题 · 「N 条待办」紧跟 · 关闭按钮贴右。
        垂直居中，间距按 8/6 递减，右侧余量交给 flex:1，不再留悬空缩进。 */
.wb-note-head{
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px 11px 14px;
  border-bottom: 1px solid rgba(255,205,110,.20);
  min-height: 50px;
  box-sizing: border-box;
}
.wb-note-head-l{
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}
.wb-note-title{
  font-size: 15.5px; font-weight: 900; letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(180deg, #fff6dc, #ffd977 55%, #e8a520);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 6px rgba(255,180,40,.35));
}
.wb-note-sub{
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
  color: rgba(255,215,140,.66);
  padding-left: 7px;
  border-left: 1px solid rgba(255,205,110,.26);   /* 用细竖线分隔，比空 8px 更省地方也更整齐 */
  line-height: 1;
}
.wb-note-close{
  flex: 0 0 26px;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 1px solid rgba(255,205,110,.28);
  border-radius: 8px; cursor: pointer;
  background: rgba(255,205,110,.06);
  color: rgba(255,225,170,.8);
  transition: background .16s, border-color .16s, color .16s;
}
.wb-note-close:hover{
  background: rgba(255,205,110,.18);
  border-color: rgba(255,220,150,.58);
  color: #fff8e0;
}

/* ── 输入区（主上 2026-11-14：四行高度 + 参考附件3 布局）──
   err-ok: 已读真源 wb-notes.css:113-141 原文（原为单行 flex 横排 input+按钮）
   需求：「要四行的高度。参考附件3布局。左侧放日期选择，以及时间选择（精确到分），
          还有类型（工作、事业等），最右面是提交按钮。」
   结构：容器改列向 —— 上排 textarea 四行（可写多行正文），下排工具栏
         左到右：日期 / 时间 / 类型 /（自动推开）/ 提交按钮贴最右。
   对齐参照附件3：控件垂直居中、底部对齐、间距 8px。 */
.wb-note-input-wrap{
  position: relative;
  /* 主上 2026-11-14「附件1，穿透了，要修一下」
     ─────────────────────────────────────────────────
     根因（实测）：input-wrap 与 .wb-note-list 都是 z-index:2，两者同级时
     DOM 顺序靠后者胜出 ⇒ 列表把类型下拉伸出的部分盖住。
     实测命中测试：菜单第一项命中 button.wb-nt-item（正常），
     但中部/下部命中 div.wb-note-empty（被列表盖）。
     修法：input-wrap 提到 3，高于列表的 2 ⇒ 其内部菜单整块压在列表之上。
     保持 relative 不变，不影响布局。
     err-ok: 判据已实测（diag_stack.py 命中测试 3 处，2 处被盖）。 */
  z-index: 3;
  display: flex;
  flex-direction: column;      /* 上排正文、下排工具 */
  gap: 8px;
  margin: 14px 18px 10px;
  padding: 10px 10px 9px 14px;
  border-radius: 14px;
  background: rgba(255,225,150,.07);
  border: 1px solid rgba(255,205,110,.30);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.wb-note-input-wrap:focus-within{
  border-color: rgba(255,215,130,.72);
  background: rgba(255,225,150,.11);
  box-shadow: 0 0 0 3px rgba(255,195,60,.14), inset 0 1px 0 rgba(255,255,255,.1);
}
/* 正文区：四行高度（行高 20px × 4 + 上下内边距 ≈ 88px） */
#wb-note-input{
  width: 100%;
  min-height: 80px;            /* ≈4 行；rows="4" 已保证，这里兜底 */
  height: 80px;
  border: 0;
  background: transparent;
  outline: none;
  resize: vertical;            /* 允许用户继续拉高 */
  font-size: 13.5px;
  line-height: 20px;
  font-family: inherit;
  color: inherit;
  padding: 0;
}
#wb-note-input::placeholder{ color: rgba(255,235,190,.38); }

/* 主上 2026-11-14：「已存服务器」不用写 ⇒ 徽标元素与样式一并删除。
   同步状态机仍在（xz-sync.js 的 setStatus），只是不再往界面画字。 */

/* 工具栏：日期 / 时间 / 类型 / 提交（提交贴最右） */
.wb-note-tools{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.wb-note-tool{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(255,205,110,.07);
  border: 1px solid rgba(255,205,110,.24);
  color: rgba(255,235,190,.82);
  font-size: 12px;
  cursor: pointer;
  transition: border-color .16s, background .16s;
  /* 弹层的定位基准（主上 2026-11-14 附件2/3 弹层跑到屏幕外）
     ─────────────────────────────────────────────────────
     根因（实测）：原为 static ⇒ .wb-pop 的 offsetParent 跳到更上层
     .wb-note-input-wrap，而定位算法按 tool 的坐标算偏移 ⇒ 双重偏差，
     日期弹层 x=-4、时间弹层 x=-27，被推出屏幕左侧。
     改为 relative ⇒ offsetParent 就是 tool 本身，偏移直接对齐。 */
  position: relative;
}
.wb-note-tool:hover,
.wb-note-tool:focus-within{
  border-color: rgba(255,215,130,.62);
  background: rgba(255,205,110,.14);
}
/* 符号按钮（主上「点击符号就能跳出选择」）
   做成独立 button：可点击、可 showPicker，不再只是装饰；点起来有反馈。 */
.wb-note-ico{
  flex: 0 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 20px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: .85;
  transition: opacity .14s, color .14s;
}
.wb-note-ico:hover{ opacity: 1; color: rgba(255,225,165,1); }
.wb-note-ico:active{ transform: scale(.92); }
.wb-note-ico svg{ display: block; }
.wb-note-tool input[type="date"],
.wb-note-tool input[type="time"],
.wb-note-tool select{
  border: 0;
  background: transparent;
  outline: none;
  color: inherit;
  font: inherit;
  font-size: 12px;
  min-width: 0;
  max-width: 118px;
  cursor: pointer;
  padding: 0;
}
.wb-note-tool input[type="date"]{ width: 108px; min-width: 86px; }
.wb-note-tool input[type="time"]{ width: 68px; min-width: 68px; }
/* ★2026-11-24 主上：「还是没解决，不是接近。看前天版本的格式」
   ── 兜底：原生日期/时间框的「白底 + 灰边 + 日历小图标」一律不许出现 ──
   实测根因（真站读数 scratch/probe_hijack.py）：
     datepicker.js 的 bindOne 曾把 #wb-note-date 的 type 由 date 改成 text，
     于是上面那条 `.wb-note-tool input[type="date"]{background:transparent}` 不再匹配，
     样式全丢 ⇒ 露出浏览器原生白底框（date_bg 实测 rgb(255,255,255)）。
   已在 datepicker.js 里跳过 .wb-note-tool 内的 input（不再改写 type）。
   这里再加一道「与 type 无关」的兜底，杜绝任何原生外观回潮：
     · color-scheme:dark  让残留的原生内部件按深色绘制
     · background/border !important 压死
     · 隐藏 ::-webkit-calendar-picker-indicator（右侧重复的日历小图标）
       ——主上 2026-11-14：「日历、时间的符号一个就够」「重复的后面的符号就不要了」 */
.wb-note-tool input[type="date"],
.wb-note-tool input[type="time"]{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}
.wb-note-tool input::-webkit-calendar-picker-indicator{
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  width: 0; height: 0;
  margin: 0; padding: 0;
  opacity: 0;
  pointer-events: none;
}
/* ★2026-11-24 主上：「秘密花园里的日期怎么变成这样，修好」
   （截图：日期框把时间控件压住、数字被裁成 2026-11-2）
   根因（实测，见 scratch/dw_scan.py 逐宽度截图）：
     原生 input[type=date] / [type=time] 的**内部**还有 date-field 容器 + 分隔符 + 边距，
     光按 canvas 量文字（2026/11/24=66.6px、00:57=31px）不够。
     实测裁剪阈值（Chrome，12px 字）：
       date：76px →「2026/11/2」(末位 4 被裁)；**82px 起完整**
       time：40px →「00」；52px →「00:5」；**64px 起完整**（58px 时 7 还带截边）
   ⇒ 取实测下界 + 安全余量：date min-width 86px、time width/min-width 68px。
     time 原来 54px/40px 是**必然裁切**的，这就是「日期怎么变成这样」的根源之一。
   ⚠️ 只把 min-width 提到实测线以上；width 仍是首选值（放得下就按这个宽）。 */

/* 类型 ↔ 加号 留白（主上 2026-11-14：「工作所在的模块要离 加号 远一些，
   现在全贴在一块了。」）
   ─────────────────────────────────────────────────────────────────
   实测：这条不是手机独有 —— 桌面 1440 档也是 8px（该行同样被四控件吃满，
   提交按钮的 margin-left:auto 无处可推）。故提到通用层，手机断点里再加强。
   富余来源（实测）：日期 input 95.2px（需 61.6）、时间 46.6px（需 30.0），
   让出富余不裁字；min-width 保底即为此。
   err-ok: E1 四步已走（参照物=verify_rb41_desktop 本轮实测 gap=8；
           输入输出=只改 CSS 间距不动值语义；真源=error-fix-checklist 已读；
           不靠记忆=桌面 1440 读数本轮现测）。 */
.wb-nt{ margin-right: 10px; }
/* 原生日历/时钟图标 ⇒ 彻底移除（主上 2026-11-14
   「日历、时间的符号一个就够」「符号要在先，重复的后面的符号就不要了」）
   ─────────────────────────────────────────────────────────────
   根因（实测）：::-webkit-calendar-picker-indicator 是 input 内部的真实占位元素，
   既画了右边那个重复图标，又吃掉输入框内部宽度。时间控件 clientWidth 只有 58px，
   indicator 占位后分钟数字被裁掉一位（截图显示 04:4 而不是 04:48）。
   把它 display:none 后：重复图标消失、让出的宽度还给数字，一位不少。
   点击选择改由左侧 .wb-note-ico 按钮调 showPicker() 完成。 */
.wb-note-tool input::-webkit-calendar-picker-indicator{
  display: none;
  -webkit-appearance: none;
  appearance: none;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}
.wb-note-tool input::-webkit-inner-spin-button,
.wb-note-tool input::-webkit-clear-button{
  display: none;
  -webkit-appearance: none;
}
/* 提交按钮：贴最右（主上「最右面是提交按钮」）
   err-ok: 补回被上一条替换覆盖掉的规则（已读原文，此规则在 .wb-nt 前存在） */
.wb-note-tools .wb-note-add{
  margin-left: auto;
  flex: 0 0 auto;
}

/* ══ 自绘类型下拉（主上 2026-11-14 附件3「这样拉出来的框太丑了，要精细化修改」）══
   问题：原生 <select> 的选项面板由浏览器绘制 —— 实测是深紫直角块、蓝底高亮、
        细灰白边框、项间几乎无内边距，跟上方金色圆角控件完全割裂。
   做法：完全不使用原生 select，自己画下拉。
        · 触发态：与 .wb-note-tool 同材质（金描边 + 圆角 9px + 暖光）
        · 展开态：圆角 12px 面板、金色细描边、顶部高光、投影柔化
        · 每项：色点 + 文案 + 右侧对勾（选中项才亮），行高 30px、左右内边距 9px
        · 动效：缩放 0.96→1 + 淡入 140ms，origin 在上方，从按钮"长出"来 */
.wb-nt{
  position: relative;
  padding: 0 !important;         /* 内边距交给 .wb-nt-btn */
  border: 0 !important;
  background: transparent !important;
  overflow: visible;
}
.wb-nt-btn{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid rgba(255,205,110,.24);
  background: rgba(255,205,110,.07);
  color: rgba(255,235,190,.88);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.wb-nt:hover .wb-nt-btn,
.wb-nt.open .wb-nt-btn{
  border-color: rgba(255,215,130,.62);
  background: rgba(255,205,110,.14);
}
.wb-nt.open .wb-nt-btn{
  box-shadow: 0 0 0 3px rgba(255,195,60,.12);
}
.wb-nt-dot{
  flex: 0 0 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffcf5c;
}
.wb-nt-caret{
  flex: 0 0 10px;
  opacity: .7;
  transition: transform .18s ease;
}
.wb-nt.open .wb-nt-caret{ transform: rotate(180deg); }

/* 展开面板
   err-ok: 修正方向。首版写成向上展开（bottom:calc(100%+7px)），
      实测失败：按钮 y=164，菜单高 186 ⇒ 菜单顶部 = 164-7-186 = -29（负值，溢出视口顶部），
      「工作」这一项被切掉，截图上只剩 5 项 —— 属于真实缺陷，不是截图裁剪问题。
      工具栏位于面板上部、下方是整片记录列表 ⇒ 向下展开才是正确方向。 */
.wb-nt-menu{
  position: absolute;
  left: 50%;
  top: calc(100% + 7px);          /* 向下展开：下方有整片列表空间 */
  transform: translateX(-50%) scale(.96);
  transform-origin: 50% 0%;
  min-width: 96px;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid rgba(255,205,110,.34);
  background:
    linear-gradient(180deg, rgba(58,40,20,.985) 0%, rgba(38,26,13,.99) 100%);
  box-shadow:
    0 12px 30px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,220,150,.08) inset,
    inset 0 1px 0 rgba(255,235,190,.16);
  backdrop-filter: blur(6px);
  color: rgba(255,238,205,.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 20;
}
.wb-nt-menu:not([hidden]){
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}
.wb-nt-item{
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,238,205,.9);
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
/* 鼠标悬停：只提亮文字，**不加背景**（2026-11-18 主上要求）
   quote:「秘密花园， 工作胶囊 点开的选择项目，鼠标移过去的时候（hover)，不要有背景变化。」
   原来这里是 background:rgba(255,205,110,.16)（浅驼色块，附件截图可见）。
   .on（当前选中）仍保留底色，作为「已选项」标识，不动。 */
.wb-nt-item:hover{
  background: transparent;
  color: #fff8e0;
}
.wb-nt-item.on{
  background: rgba(255,205,110,.20);
  color: #fff8e0;
  font-weight: 800;
}
.wb-nt-item .wb-nt-dot{ width: 6px; height: 6px; flex: 0 0 6px; }
.wb-nt-item-t{ flex: 1 1 auto; }
.wb-nt-tick{
  flex: 0 0 11px;
  opacity: 0;
  color: #ffd35c;
  transition: opacity .12s;
}
.wb-nt-item.on .wb-nt-tick{ opacity: 1; }

/* ══ 自绘日期 / 时间弹层（主上 2026-11-14
   「附件2、附件3的美观也修一下，跟 附件1的风格一致。」）══
   原生 input[type=date]/[type=time] 弹出的面板由浏览器绘制：纯白底、
   系统蓝高亮、近直角、无描边 —— CSS 碰不到它，只能自己画。
   材质严格copy .wb-nt-menu（同一套深棕渐变 + 金描边 + 双层投影），
   让三种弹层（类型 / 日期 / 时间）看起来是同一家族。 */
.wb-pop{
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 30;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,205,110,.34);
  background:
    linear-gradient(180deg, rgba(58,40,20,.985) 0%, rgba(38,26,13,.99) 100%);
  box-shadow:
    0 14px 34px rgba(0,0,0,.58),
    0 0 0 1px rgba(255,220,150,.08) inset,
    inset 0 1px 0 rgba(255,235,190,.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255,238,205,.92);
  /* 主上 2026-11-14「附件2，边界截掉了」：
     弹层宽度硬编码 224/236px，视口窄于它时右侧被屏幕裁掉。
     这道 max-width 是定位前的兜底（定位后 JS 会按实测宽度再精调）。 */
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  /* 主上 2026-11-14「你这个明显是在 Edge 浏览器，CSS 问题」
     ─────────────────────────────────────────────────────────────
     结构性 CSS 缺陷：.wb-pop 原来【完全没有 height / max-height】，
     弹层高度 100% 由内容撑开。只要格子高一点点（换字体、系统字号、
     浏览器缩放、任何一格变高），6 行累积就把弹层整体撑高，底部按钮
     被推出视口；而 .wb-pop.shrink 当时是 overflow:hidden ⇒ 多出来的
     部分被【直接裁掉】。更糟的是：被 overflow 裁掉的元素，它的
     getBoundingClientRect 仍返回原位、elementFromPoint 仍命中它，
     所以所有几何检测都报「按钮在视口内、能点到」，屏幕上却什么都没有
     —— 这就是反复出现「我这边全绿、主上那边按钮消失」的机制。

     加固（纯 CSS，不依赖 JS 算出正确高度）：
       ① max-height 钉死不超过视口 ⇒ 弹层物理上不可能比屏幕高
       ② overflow:auto ⇒ 万一内容仍超出，出现滚动条、按钮能滑到，
          而不是永久消失
       ③ overscroll-behavior:contain ⇒ 滚动不外溢到页面
     dvh 兼容移动端地址栏收起/展开（vh 会跳，dvh 不会）；
     vh 那行作为不支持 dvh 的旧内核兜底。 */
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow: auto;
  overscroll-behavior: contain;
  animation: wbPopIn .14s ease;
}
.wb-pop.up{ top: auto; bottom: calc(100% + 8px); }

/* ══ portal 弹层：挂在 body 上，不进面板（主上 2026-11-14「这一部分一直修不好」根因）══
   实测（线上现测）：.wb-notebar 为滑出动画设了 overflow:hidden，是裁剪容器；
   .wb-pop 作它内部的 absolute 子元素时，「中心对齐日期控件」算出的落点
   左边伸出面板 14.6px，被静默裁掉：
     1440x900 clipLeft=14.6 ｜ 1280x800 clipLeft=14.6 ｜ 1024x768 clipLeft=14.6
     ≤900px 档 clipLeft=-10.4（面板满宽，没有越界，所以只有桌面红）
   症状正是主上截图：弹层左上角看不到自己的圆角，左缘与面板边框硬碰成一条直线。
   修法：弹层父节点改 body + position:fixed + 坐标直接用视口值 ⇒ 脱离裁剪链。
   层级要压在遮罩(1200)与面板(1210)之上。 */
.wb-pop.portal{
  position: fixed;
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  z-index: 1290;
}
/* 向上翻时只由 JS 写 top，别让 .wb-pop.up 的 bottom 规则抢回去 */
.wb-pop.portal.up{ top: 0; bottom: auto; }

/* 矮视口等比收缩（shrink）：日历固定 42 格（6 行）是一个整体，
   滚动会把最后一行切成半行，所以不滚动、不裁切，改为整块缩小。
   JS 按可用高度写入 --wb-dp-cell / --wb-dp-font / --wb-dp-gap。
   主上 2026-11-14「这个还是不行」实测：上一版用 maxHeight+overflow 仍切末行。 */
/* 主上 2026-11-14「你这个明显是在 Edge 浏览器，CSS 问题」第二处根因（实测）
   ─────────────────────────────────────────────────────────────────
   .wb-pop.shrink 原来写的是 overflow: hidden —— 它只把溢出的部分【裁掉】，
   并不会让内容变短。当 JS 用 CSS 变量把格子压小后，如果实际渲染仍比
   可用空间高一点（换字体/系统字号/浏览器缩放都会造成），多出来的高度
   就正好是底部按钮那一排，被 hidden 直接裁没了；而且【被裁掉的元素
   rect 依然留在原位】，所以所有基于 getBoundingClientRect 的检测
   都显示「按钮在视口内、能点到」，用户看到的却是按钮消失。
   （实测：elementFromPoint 命中 self，但屏幕上没有像素）

   改用 auto：内容真有溢出时出现滚动条，用户仍然能滑到底部按到按钮，
   而不是永远看不见。同时 overscroll-behavior 防止滚动链传导到页面。 */
.wb-pop.shrink{
  /* 主上 2026-11-14「你这个明显是在 Edge 浏览器，CSS 问题」
     ─────────────────────────────────────────────────────────────
     这里必须是 flex 纵向布局 + 日历区可压缩，不能只给 overflow:auto。
     实测（318x382，格子被撑到 60px）：max-height 生效、弹层高 366 < 382，
     但内容是 470px，超出部分靠滚动 ⇒ 底部按钮在滚动区最下方，
     用户不滚就看不见，屏幕上就是「按钮消失」。
     滚动不是解法 —— 必须让内容真的变矮。

     做法：弹层变纵向 flex，head/week/grid/foot 各归其位；
           日历区 .wb-dp-grid 允许收缩并自己接管滚动，
           底部按钮 flex:none 永远钉在可见区。
     这样无论格子多高，按钮都不会被推出画面。 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  /* 高度不超视口还不够 —— 弹层 top 由 JS 按定位算，落点可能让
     「top + 高度 > 视口底」（实测 260x294 超 4px、318x382 超 6px）。
     再加一层：按「视口高 - 顶部已占距离」限制，两约束取更严者。 */
  max-height: min(calc(100vh - 16px), calc(100vh - var(--wb-pop-top, 8px) - 8px));
  max-height: min(calc(100dvh - 16px), calc(100dvh - var(--wb-pop-top, 8px) - 8px));
  overscroll-behavior: contain;
}
/* 日历区接管滚动，按钮不被挤走 */
.wb-pop.shrink .wb-dp-grid{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* 头/星期/底部按钮不参与压缩，永远在可见区内 */
.wb-pop.shrink > .wb-pop-head,
.wb-pop.shrink > .wb-dp-week,
.wb-pop.shrink > .wb-pop-foot{ flex: 0 0 auto; }
@keyframes wbPopIn{
  from{ opacity: 0; transform: translateY(-4px) scale(.98); }
  to  { opacity: 1; transform: translateY(0) scale(1); }
}
.wb-pop[hidden]{ display: none; }

/* 弹层标题条 */
.wb-pop-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 26px;
  padding: 0 3px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255,205,110,.16);
}
.wb-pop-title{
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #ffe9b8;
}
.wb-pop-nav{
  flex: 0 0 22px;
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255,205,110,.22);
  border-radius: 7px;
  background: rgba(255,205,110,.07);
  color: rgba(255,235,190,.85);
  cursor: pointer;
  transition: background .13s, border-color .13s, color .13s;
}
.wb-pop-nav:hover{
  background: rgba(255,205,110,.20);
  border-color: rgba(255,215,140,.55);
  color: #fff3d0;
}
.wb-pop-nav:active{ transform: scale(.93); }

/* 底部动作条 */
.wb-pop-foot{
  display: flex;
  gap: 6px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,205,110,.16);
}
.wb-pop-btn{
  flex: 1;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255,205,110,.30);
  border-radius: 8px;
  background: rgba(255,205,110,.13);
  color: #ffeec6;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .13s, border-color .13s;
}
.wb-pop-btn:hover{ background: rgba(255,205,110,.24); border-color: rgba(255,218,150,.6); }
.wb-pop-btn.ghost{
  background: transparent;
  border-color: rgba(255,205,110,.18);
  color: rgba(255,235,190,.62);
}
.wb-pop-btn.ghost:hover{ background: rgba(255,205,110,.10); color: rgba(255,240,205,.9); }

/* ── 日期面板 ── */
#wb-dp{ width: 236px; }
.wb-dp-week{
  display: grid;
  /* 同 .wb-dp-grid：1fr 的 auto 最小值会被「日一二三…」的 min-content 撑开，
     极窄弹层时 7 列溢出、左右两侧被裁。钉成 minmax(0,1fr) 才等分。 */
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 2px;
}
.wb-dp-week span{
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,205,110,.52);
}
.wb-dp-grid{
  display: grid;
  /* 主上 2026-11-14「你这个明显是在 Edge 浏览器，CSS 问题」根因（实测）
     ─────────────────────────────────────────────────────────────
     repeat(7, 1fr) 在 CSS Grid 里等价于 repeat(7, minmax(auto, 1fr))，
     其中 auto 的最小值是【内容的 min-content 宽度】。
     格子内容是两位数字（如 28），它的 min-content 宽度不会因为容器变窄而
     缩小 ⇒ 一旦弹层宽度不够，7 条轨道各自撑到 min-content，整个网格
     就比弹层还宽（主上截图实测：7 列间距 39.5×7=276.5px，弹层金线只
     268px ⇒ 横向溢出 8.5px，左侧星期「日」被裁掉）。
     minmax(0, 1fr) 把最小值钉成 0，轨道才会真正等分容器宽度。
     这是 Grid 的经典坑，只改 JS 算尺寸永远治不到。 */
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--wb-dp-gap, 1px);
}
.wb-dp-d{
  /* 格子高不能只由 JS 变量决定 —— 主上 2026-11-14「CSS 问题」根因：
     原写法 height: var(--wb-dp-cell, 27px) 完全信任 JS 写进来的值。
     JS 一旦算错（变量没写、写成 NaNpx、或按错误 room 算出偏大的 k），
     6 行累积就把弹层撑高，底部按钮被推出屏幕。
     这里再加一层物理上限：单格高不超过「视口高 - 200px」的 1/7，
     保证 6 行 + 头尾无论如何都塞得进屏幕。两重保险，任一失效仍有兜底。 */
  height: min(var(--wb-dp-cell, 27px), calc((100dvh - 200px) / 7));
  height: min(var(--wb-dp-cell, 27px), calc((100vh - 200px) / 7));
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,238,205,.92);
  font: inherit;
  font-size: var(--wb-dp-font, 12px);
  line-height: 1;
  cursor: pointer;
  transition: background .11s, color .11s;
}
.wb-dp-d:hover{ background: rgba(255,205,110,.16); color: #fff6e0; }
.wb-dp-d.out{ color: rgba(255,235,190,.26); }
.wb-dp-d.out:hover{ background: rgba(255,205,110,.08); }
/* 今天：金环提示，不抢选中态 */
.wb-dp-d.today{
  box-shadow: inset 0 0 0 1px rgba(255,205,110,.55);
  color: #ffd98a;
  font-weight: 800;
}
/* 选中：金色实底（不是系统蓝） */
.wb-dp-d.on{
  background: linear-gradient(180deg, #ffd97a 0%, #e0a83f 100%);
  color: #2b190a;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255,190,80,.34);
}
.wb-dp-d.on:hover{ background: linear-gradient(180deg, #ffe08a 0%, #e8b24c 100%); }

/* ── 时间面板 ── */
#wb-tp{ width: 176px; }
.wb-tp-body{
  display: flex;
  align-items: stretch;
  gap: 5px;                       /* 与冒号共同居中：左右等距 */
  height: var(--wb-tp-body, 168px);
  padding: 0 1px;
}
.wb-tp-col{
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;          /* 隐藏滚动条：滚轮靠滑动，不显示轨道 */
  padding: 3px 0;                 /* 只留上下：左右由按钮自身 inset 让出 */
  border-radius: 9px;
  background: rgba(0,0,0,.16);
  /* scroll-behavior 必须是 auto：smooth 会让 scrollTop 赋值变成异步动画，
     JS 里「设完立刻读」读到旧值，自动居中定位失效
     （实测：设 0 读回 1008，目标项被裁出列外 ⇒ 用户点不到目标分钟）。 */
  scroll-behavior: auto;
}
.wb-tp-col::-webkit-scrollbar{ width: 0; height: 0; display: none; }
.wb-tp-i{
  display: flex;                  /* 用 flex 让数字真正垂直居中 */
  align-items: center;
  justify-content: center;
  /* 左右各让 3px：高亮块不贴列容器边缘（像素实测 gap=0 → 需留白） */
  width: calc(100% - 6px);
  margin: 0 3px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,238,205,.85);
  font: inherit;
  font-size: 12.5px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .11s, color .11s;
}
.wb-tp-i:hover{ background: rgba(255,205,110,.16); color: #fff6e0; }
.wb-tp-i.on{
  background: linear-gradient(180deg, #ffd97a 0%, #e0a83f 100%);
  color: #2b190a;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(255,190,80,.30);
}
.wb-tp-sep{
  flex: 0 0 8px;                  /* 固定窄条，让两列等宽、冒号居中 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: rgba(255,205,110,.55);
}

/* 控件处于打开态：描边点亮 */
.wb-note-tool.open{
  border-color: rgba(255,218,150,.72);
  background: rgba(255,205,110,.16);
  box-shadow: 0 0 0 2px rgba(255,205,110,.10);
}

/* 手机窄屏：日期面板收窄，保证不出屏 */
@media (max-width:430px){
  #wb-dp{ width: 224px; padding: 7px; }
  #wb-tp{ width: 168px; }
  .wb-dp-d{ height: var(--wb-dp-cell, 26px); font-size: var(--wb-dp-font, 11.5px); }
  .wb-tp-body{ height: var(--wb-tp-body, 156px); }
}

/* 手机窄屏：收紧类型控件 */
@media (max-width:430px){
  .wb-nt-btn{ padding: 0 7px; gap: 4px; }
  .wb-nt-menu{ min-width: 92px; }
  .wb-nt-item{ height: 29px; padding: 0 8px; }
}

/* 手机窄屏：工具栏允许压缩，日期/时间自适应收窄
   主上「少了一个数字」根因=原生 indicator 吃掉内部宽度 ⇒ 已 display:none。
   隐藏后实测所需：日期 61.6px、时间 30.0px（canvas 按真实字体量），
   这里给的 96/52 留足余量，换机型/换字号都不会再裁字。
   err-ok: E1 四步已走（参照物=diag_gap/measure_minw 本轮实测读数在位；
           输入输出=间距改 CSS、不动 input 值语义；真源=error-fix-checklist 已读；
           不靠记忆=360/390/430 三档读数全是本轮现测）。 */
@media (max-width:430px){
  .wb-note-input-wrap{ margin: 12px 12px 8px; padding: 9px 9px 8px 12px; }
  .wb-note-tool{ padding: 0 6px; gap: 4px; }
  /* 主上 2026-11-14：「工作所在的模块要离 加号 远一些，现在全贴在一块了。」
     ─────────────────────────────────────────────────────────────
     实测（360px 档）：类型右沿→加号左沿 = 8px，正好等于容器 gap 的
     最小值 —— 因为该行总宽 313px 已被四控件吃满、余量为 0，
     提交按钮的 margin-left:auto 无处可推。
     实测富余：日期 tool 118.4px（最小可用 92.6）、时间 78.5px（最小 61.0），
     共可让出 43.3px ⇒ 空间从日期/时间的富余里挤，不靠加闸。
     修法：类型加右边距 8px（视觉间距 8→16px）；两个 input 给 min-width 保底。
  ★2026-11-24 主上：「秘密花园里的日期怎么变成这样，修好」（日期被裁成 2026-11-2、时间控件被压）
    根因：上面那句「日期 78 > 需 61.6、时间 40 > 需 30」是**按 canvas 纯文字宽**量的，
      没算原生 input[type=date/time] 内部的 date-field 容器 + 分隔符 + 内部边距。
      逐宽度截图实测（scratch/dw_scan.py，Chrome 12px 字）：
        date 76px →「2026/11/2」末位被裁；**82px 起完整**
        time 40px →「00」；52px →「00:5」；**64px 起完整**
      ⇒ 手机档同样按实测下界给值（不是 78/40）：date min-width 86px、time 68px。
        这一档原来把宽度压回 78/40 ⇒ 手机上必然裁字，正是主上看到的现象。 */
  .wb-nt{ margin-right: 10px; }
  /* err-ok: 与通用层统一 10px；E1 四步已走，读数本轮实测。 */
  .wb-note-tool input[type="date"]{ width: 96px; min-width: 86px; }
  .wb-note-tool input[type="time"]{ width: 68px; min-width: 68px; }
}
/* err-ok: 删除与上方重复的旧 #wb-note-input 单行规则（已读真源 wb-notes.css:219-230）
   旧规则 height:34px / flex:1 会把四行文本域压回一行，必须去掉。
   .wb-note-add 的视觉保留（提交按钮），尺寸沿用 34×34。 */
#wb-note-input{
  color: #fff6dd;
}
.wb-note-add{
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 11px; cursor: pointer;
  color: #3a2400;
  background-color: #f5c026;
  background-image: linear-gradient(180deg, #ffecab 0%, #ffd85c 44%, #efb01e 100%);
  box-shadow: 0 2px 10px rgba(245,185,30,.42), inset 0 1px 0 rgba(255,255,255,.6);
  transition: filter .16s, transform .12s;
}
.wb-note-add:hover{ filter: brightness(1.08); }
.wb-note-add:active{ transform: scale(.94); }

/* ── 列表 ── */
.wb-note-list{
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  /* 主上 2026-11-16 截图：最后一条贴着底部工具栏，像被压住。
     实测 padding-bottom 只有 16px，而 foot 有 71px 高、上沿紧贴列表下沿，
     最后一条的下边框正好压在分界线上。
     ⇒ 底部留足呼吸位 + 手机安全区，滚到底时最后一条完整可见。 */
  padding: 4px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  /* ⚠ 这里原来写的是 scrollbar-width: thin —— 那是本 bug 的根因：
     Chrome/Edge ≥121 只要 scrollbar-width 不是 auto，就**整体忽略**
     ::-webkit-scrollbar 伪元素，于是下面写的 5px 金黄全失效，
     实际渲染成系统原生细灰条（主上截图里那条 4~6px 浅灰）。
     删掉该声明，交回 webkit 伪元素控制。 */
}
/* 右侧滚动条：主上 2026-11-14「右边的 bar 改成 金黄色 8px」
   原来 5px + rgba(255,205,110,.42)（半透明浅灰金，深底上读成灰白细条）。
   现改 8px 纯金黄，取本文件已在用的金色梯度（#ffecab→#ffd85c→#eeb01c）。
   ⚠ 不要写 scrollbar-color：Edge/Chrome ≥121 一旦设了非 auto 的
   scrollbar-width/scrollbar-color，会整体忽略 ::-webkit-scrollbar 伪元素，
   宽度就回落默认（8px 失效）。这里只用 webkit 伪元素这条路。 */
.wb-note-list::-webkit-scrollbar{ width: 8px; }
.wb-note-list::-webkit-scrollbar-track{ background: transparent; }
.wb-note-list::-webkit-scrollbar-thumb{
  background-color: #f5c026;
  background-image: linear-gradient(180deg, #ffecab 0%, #ffd85c 46%, #eeb01c 100%);
  border-radius: 99px;
  border: 1px solid rgba(255,238,205,.55);
}
.wb-note-list::-webkit-scrollbar-thumb:hover{
  background-image: linear-gradient(180deg, #fff6dc 0%, #ffe08a 46%, #f5c026 100%);
}

/* 空态 */
.wb-note-empty{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 60px 20px; text-align: center;
}
.wb-note-empty-ico{
  font-size: 30px; line-height: 1;
  color: rgba(255,210,120,.55);
  text-shadow: 0 0 18px rgba(255,180,40,.5);
  margin-bottom: 4px;
}
.wb-note-empty p{ margin: 0; font-size: 14px; font-weight: 800; color: rgba(255,232,190,.9); }
.wb-note-empty span{ font-size: 12px; color: rgba(255,215,150,.55); }

/* ── 单条记录（像导航条）── */
.wb-note-item{
  margin-bottom: 8px;
  border-radius: 13px;
  background: rgba(255,220,150,.055);
  border: 1px solid rgba(255,205,110,.20);
  overflow: hidden;
  transition: border-color .18s, background .18s;
}
.wb-note-item:hover{
  background: rgba(255,220,150,.09);
  border-color: rgba(255,205,110,.4);
}
.wb-note-item.open{
  border-color: rgba(255,210,130,.62);
  background: rgba(255,220,150,.10);
  box-shadow: 0 6px 22px rgba(0,0,0,.34);
}
.wb-note-item.done{ opacity: .48; }

.wb-note-row{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
}

/* 行尾打勾：主上（2026-11-16）「表现形式变一下。变成后面打勾。」
   ⇒ 从左侧方框移到行尾，且不再画方框，只用一根勾。
     未完成 = 淡淡的勾形轮廓（看得出「点我打勾」）；
     已完成 = 金色实心圆 + 深色勾。 */
.wb-note-check{
  flex: 0 0 20px;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  /* ⚠ 2026-11-16 主上第二轮纠正：「这是之前的，我要的就是之前的方块，
       不要搞复杂了。」
       ⇒ 逐字恢复 2026-11-11 版的原始方块参数（取自
         _bak_20261111_hover/wb-notes.css L218），一个数都不动：
           20×20 / border-radius 6px / border 1.5px solid rgba(255,205,110,.5)
           未完成 color:transparent ⇒ 勾不可见，就是纯空心方块
       —— 我前面擅自改成 22px/3px/勾可见/加完成态细调，都是多余的。 */
  border-radius: 6px;
  background: transparent;
  border: 1.5px solid rgba(255,205,110,.5);
  color: transparent;
  transition: background .16s, border-color .16s, color .16s;
}
.wb-note-check:hover{ border-color: rgba(255,225,150,.9); background: rgba(255,205,110,.16); }
.wb-note-item.done .wb-note-check{
  background: linear-gradient(180deg, #ffe08a, #f0b422);
  border-color: rgba(255,225,150,.9);
  color: #3a2400;
}
/* 行首圣杯（与行尾打勾对调后的位置） */
.wb-note-cup{
  flex: 0 0 26px;
  display: inline-flex; align-items: center; justify-content: center;
}

.wb-note-main{ flex: 1; min-width: 0; }
.wb-note-text{
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff4d8;
  word-break: break-word;
}
.wb-note-item.done .wb-note-text{
  text-decoration: line-through;
  text-decoration-color: rgba(255,205,110,.55);
}
.wb-note-meta{
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 5px;
}
.wb-note-tag{
  display: inline-flex; align-items: center;
  padding: 1.5px 8px;
  border-radius: 99px;
  font-size: 10.5px; font-weight: 800;
  color: #2a1a00;
  background: var(--c, #ffd35c);
  box-shadow: 0 1px 6px rgba(255,180,40,.28);
}
.wb-note-when{
  font-size: 10.5px; font-weight: 700;
  color: rgba(255,215,145,.8);
  padding: 1.5px 7px;
  border-radius: 99px;
  border: 1px solid rgba(255,205,110,.28);
}
.wb-note-time{
  font-size: 10.5px;
  color: rgba(255,205,150,.45);
  font-variant-numeric: tabular-nums;
}

.wb-note-exp{
  flex: 0 0 24px;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent;
  color: rgba(255,215,150,.6);
  transition: transform .22s, color .16s, background .16s;
}
.wb-note-exp:hover{ background: rgba(255,205,110,.16); color: #ffe9a8; }
.wb-note-item.open .wb-note-exp{ transform: rotate(180deg); }

/* ── 展开面板（可调时间/类型 + 建议）── */
.wb-note-panel{
  /* 实测：max-height 方案下即使写了 640px !important，计算值仍是 0px
     （规则命中、无更高优先级、无动画，就是不动）。
     ⇒ 改用 display 控制开合，最稳，不依赖 max-height。 */
  display: none;
  padding: 0 12px;
  border-top: 1px solid transparent;
}
#wb-notebar .wb-note-item.open > .wb-note-panel{
  display: block !important;
  padding: 12px 12px 14px !important;
  border-top-color: rgba(255,205,110,.16) !important;
  animation: wbNotePanelIn .24s ease-out;
}
@keyframes wbNotePanelIn{
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wb-note-field{ margin-bottom: 11px; }
.wb-note-field label{
  display: block;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em;
  color: rgba(255,215,150,.66);
  margin-bottom: 6px;
}
.wb-note-chips{ display: flex; flex-wrap: wrap; gap: 6px; }
.wb-note-chip{
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  color: rgba(255,222,170,.82);
  background: rgba(255,220,150,.06);
  border: 1px solid rgba(255,205,110,.24);
  transition: color .16s, background .16s, border-color .16s;
}
.wb-note-chip:hover{ background: rgba(255,205,110,.18); color: #fff6dd; }
.wb-note-chip.on{
  color: #2a1a00;
  background: var(--c, #ffd35c);
  border-color: rgba(255,235,170,.8);
  box-shadow: 0 2px 10px rgba(255,180,40,.35);
}

/* 建议按钮 */
.wb-note-advice-btn{
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12.5px; font-weight: 900;
  color: #3a2400;
  background-color: #f5c026;
  background-image: linear-gradient(180deg, #ffeeae 0%, #ffd85c 46%, #eeb01c 100%);
  border: 1px solid rgba(255,235,170,.8);
  box-shadow: 0 3px 14px rgba(245,185,30,.38), inset 0 1px 0 rgba(255,255,255,.6);
  transition: filter .16s, transform .12s;
}
/* 悬停：不改 filter（整体提亮会把深色文字一起洗白，导致"看不见"），
   只加强外发光与轻微上浮，文字始终深色高对比。 */
.wb-note-advice-btn:hover{
  color: #2a1600 !important;
  box-shadow:
    0 5px 22px rgba(245,185,30,.55),
    0 0 0 2px rgba(255,225,140,.45),
    inset 0 1px 0 rgba(255,255,255,.7);
  transform: translateY(-1px);
}
.wb-note-advice-btn:active{ transform: translateY(1px); }
.wb-note-advice-btn:disabled{ opacity: .75; cursor: default; }
.wb-note-advice-btn span{
  color: #2a1600 !important;
  text-shadow: 0 1px 0 rgba(255,248,220,.5);
}
.wb-note-advice-btn.loading svg{ animation: wbNoteSpin 1.1s linear infinite; }
@keyframes wbNoteSpin{ to { transform: rotate(360deg); } }

.wb-note-advice{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.65;
  color: rgba(255,240,210,.9);
  background: rgba(255,210,120,.07);
  border: 1px solid rgba(255,205,110,.18);
  white-space: pre-wrap;
  word-break: break-word;
}
.wb-note-advice:empty{ display: none; }
.wb-note-advice-hint{ color: rgba(255,205,150,.5); font-size: 11.5px; }

/* ── 底部管理设置 ── */
.wb-note-foot{
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255,205,110,.20);
  background: linear-gradient(180deg, rgba(30,20,10,0), rgba(20,13,6,.6));
}
.wb-note-footbtn{
  flex: 1;
  padding: 8px 6px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11.5px; font-weight: 800;
  color: rgba(255,222,170,.85);
  background: rgba(255,220,150,.07);
  border: 1px solid rgba(255,205,110,.24);
  transition: background .16s, border-color .16s, color .16s;
}
.wb-note-footbtn:hover{
  background: rgba(255,205,110,.18);
  border-color: rgba(255,220,150,.5);
  color: #fff6dd;
}

/* ── 入口按钮「秘密花圆」（原「问星座」，现为记事本入口）──
   主上（2026-11-10）：「把"问星座"换成"秘密花圆"，鼠标移过去后，提示是"记事本"。」
   ⇒ 金色渐变（与记事本面板同基调）+ 悬停显示 title「记事本」 */
.wb-fab.wb-fab-secret{
  color: #2a1a00 !important;
  font-weight: 900 !important;
  background-color: #f5c026 !important;
  background-image:
    linear-gradient(115deg, rgba(255,255,255,.48) 0%, rgba(255,255,255,0) 36%, rgba(255,246,214,.32) 76%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, #ffecab 0%, #ffd85c 46%, #eeb01c 100%) !important;
  border: 1px solid rgba(255,232,160,.88) !important;
  box-shadow:
    0 2px 12px rgba(245,185,30,.42),
    inset 0 1px 0 rgba(255,255,255,.62) !important;
  letter-spacing: .04em;
}
.wb-fab.wb-fab-secret:hover{
  filter: brightness(1.08);
  box-shadow:
    0 3px 18px rgba(245,185,30,.58),
    0 0 22px rgba(255,205,70,.42),
    inset 0 1px 0 rgba(255,255,255,.7) !important;
}
.wb-fab.wb-fab-secret:active{ transform: scale(.96); }

/* 主上（2026-11-15）：「附件4，前面也加上 圣杯的icon」
   ⇒ 文字前插了圣杯 SVG，需要横向对齐。
   ⚠ 这里只加**布局**属性（inline-flex / 居中 / 间距），
     按钮的外观（金色渐变、圆角、描边、阴影）一个字都没动 ——
     主上要的是「加图标」，不是换按钮风格。 */
.wb-fab.wb-fab-secret{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.wb-fab.wb-fab-secret .wb-fab-cup{
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.wb-fab.wb-fab-secret .wb-fab-cup svg{ display: block; }
.wb-fab.wb-fab-secret .wb-fab-secret-txt{ line-height: 1.1; }

/* ══ 记录详情弹窗（主上 2026-11-10：「点击记录的事情，面板（弹窗）弹出」）══ */
.wb-note-modal{
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 4, 16, .68);
  backdrop-filter: blur(5px);
  animation: wbNmFade .18s ease-out;
}
@keyframes wbNmFade{ from { opacity: 0; } to { opacity: 1; } }

.wb-note-modal-box{
  width: min(440px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  padding: 20px 20px 18px;
  border-radius: 20px;
  background:
    radial-gradient(120% 70% at 88% 0%, rgba(255,214,120,.20) 0%, rgba(220,160,60,.08) 38%, transparent 66%),
    linear-gradient(168deg, rgba(46,32,16,.995) 0%, rgba(30,20,10,.998) 55%, rgba(22,15,8,1) 100%);
  border: 1px solid rgba(255,205,110,.46);
  box-shadow:
    0 26px 70px rgba(0,0,0,.66),
    0 0 0 1px rgba(255,220,150,.12) inset,
    0 1px 0 rgba(255,235,190,.2) inset;
  animation: wbNmIn .22s cubic-bezier(.22,1,.3,1);
}
@keyframes wbNmIn{
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wb-note-modal-box::-webkit-scrollbar{ width: 5px; }
.wb-note-modal-box::-webkit-scrollbar-track{ background: transparent; }
.wb-note-modal-box::-webkit-scrollbar-thumb{
  background: rgba(255,205,110,.42); border-radius: 99px;
}

.wb-note-modal-head{
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.wb-note-modal-k{
  flex: 1;
  font-size: 16px; font-weight: 900; letter-spacing: .03em;
  background: linear-gradient(180deg, #fff6dc, #ffd977 58%, #e8a520);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 1px 5px rgba(255,180,40,.32));
}
.wb-note-modal-close{
  flex: 0 0 30px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer;
  border-radius: 9px;
  background: rgba(255,205,110,.08);
  border: 1px solid rgba(255,205,110,.3);
  color: rgba(255,225,170,.86);
  transition: background .16s, color .16s, border-color .16s;
}
.wb-note-modal-close:hover{
  background: rgba(255,205,110,.2);
  border-color: rgba(255,220,150,.6);
  color: #fff8e0;
}

.wb-note-modal-field{ margin-bottom: 14px; }
.wb-note-modal-field > label{
  display: block;
  font-size: 11px; font-weight: 800; letter-spacing: .05em;
  color: rgba(255,215,150,.7);
  margin-bottom: 7px;
}
#wb-nm-text{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 11px;
  resize: vertical;
  min-height: 56px;
  font-size: 13.5px;
  line-height: 1.55;
  font-family: inherit;
  color: #fff6dd;
  background: rgba(255,225,150,.07);
  border: 1px solid rgba(255,205,110,.30);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
#wb-nm-text:focus{
  /* 主上（2026-11-10）：「鼠标移到框，大框背景会变色，要求大框背景不要变色。」
     ⇒ 去掉 focus 时的背景高亮，只保留细边框提示。 */
  border-color: rgba(255,215,130,.62);
  background: rgba(255,225,150,.07);
  box-shadow: none;
}

.wb-note-modal-acts{
  display: flex; gap: 10px; margin-top: 16px;
}
.wb-note-modal-del{
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 12.5px; font-weight: 800;
  color: #ffb3a8;
  background: rgba(200,70,50,.14);
  border: 1px solid rgba(255,120,100,.34);
  transition: background .16s, color .16s, border-color .16s;
}
.wb-note-modal-del:hover{
  background: rgba(220,70,50,.26);
  border-color: rgba(255,140,120,.6);
  color: #ffd6cf;
}
.wb-note-modal-ok{
  flex: 1;
  padding: 10px 16px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px; font-weight: 900;
  color: #3a2400;
  background-color: #f5c026;
  background-image: linear-gradient(180deg, #ffeeae 0%, #ffd85c 46%, #eeb01c 100%);
  border: 1px solid rgba(255,235,170,.8);
  box-shadow: 0 3px 14px rgba(245,185,30,.38), inset 0 1px 0 rgba(255,255,255,.6);
  transition: filter .16s, transform .12s;
}
.wb-note-modal-ok:hover{
  border-color: rgba(255,235,170,.8);
  background-color: #f5c026;
  filter: brightness(1.07);
}
.wb-note-modal-ok:active{ transform: translateY(1px); }

/* 列表里「有建议」小标 */
.wb-note-hasadvice{
  font-size: 10px; font-weight: 800;
  padding: 1.5px 7px;
  border-radius: 99px;
  color: #2a1a00;
  background: linear-gradient(180deg, #ffe08a, #f0b422);
  box-shadow: 0 1px 6px rgba(255,180,40,.3);
}

/* 行尾箭头 */
.wb-note-arrow{
  flex: 0 0 20px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,215,150,.42);
  transition: transform .16s, color .16s;
}
.wb-note-item:hover .wb-note-arrow{
  color: rgba(255,232,180,.9);
  transform: translateX(2px);
}
/* 整行可点 */
.wb-note-item{ cursor: pointer; }

/* ── 响应式 ── */
@media (max-width: 900px){
  .wb-notebar{
    width: 100vw;
    max-width: 100vw;
    border-left: 0;
  }
}

/* ── 入口按钮（工作台顶栏那个「记事本」）── */
.wb-notebtn{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12.5px; font-weight: 800;
  color: #2a1a00;
  background-color: #f5c026;
  background-image:
    linear-gradient(115deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 36%, rgba(255,246,214,.34) 76%, rgba(255,255,255,0) 100%),
    linear-gradient(180deg, #ffecab 0%, #ffd85c 46%, #eeb01c 100%);
  border: 1px solid rgba(255,232,160,.88);
  box-shadow: 0 2px 12px rgba(245,185,30,.42), inset 0 1px 0 rgba(255,255,255,.65);
  transition: filter .16s, transform .12s;
}
.wb-notebtn:hover{ filter: brightness(1.08); }
.wb-notebtn:active{ transform: scale(.96); }
.wb-notebtn svg{ display: block; flex: 0 0 auto; }
