/* ============================================================
   Windows 11 任务栏像素层 —— 参考窗口模式（?frame=ref）下的 48px OS 区。

   真机几何：docs/reference/surfaces/main-home-1920x1080.png 底部
   y=1032..1079（y=1032 是任务栏顶边 1px 暗线，y=1033..1079 是表面，共 47px）。
   Windows 11 口径（**不是** Win10）：图标区左对齐；图标槽 24x24；运行指示条
   6x3 灰色圆角小横条（y=40..42）；活动窗口是 126x40 的白色半透明圆角按钮
   （x=1534..1659 / y=1036..1075）+ 16x3 蓝色下划线；时钟两行右对齐到 x=1901。

   分层：
     #tb-bg        任务栏底色：模糊壁纸的横向渐变（CSS 程序化重建，非参考图条带）
     #tb-topline   任务栏顶边 1px 暗线（同样按逐列实测重建）
     .tb-app       每个任务栏按钮（图标=逐个裁剪的官方位图，标题=真实 DOM 文本）
     .tb-active    活动窗口（MATLAB R2025b）的白色圆角按钮 + 蓝色下划线
     .tb-tray      托盘控件位图 + 输入法「中」（DOM 文本）
     .tb-clock     时钟两行真实 DOM 文本
   官方字体：Segoe UI（拉丁）→ Microsoft YaHei UI（中文回退），与真机 Windows 一致。
   位图登记：docs/reference/taskbar-ref-assets.json（sha256 可复核）。
   渐变 stop 由 tools/extract-taskbar-assets.py --css 从参考图逐列中位拟合生成（16px 步长，
   底色插值误差 <=6.5/通道、顶边 <=8.8/通道，远小于像素门 tolerance 24）。
   ============================================================ */

/* app.css 里 #os-strip 只是占位底块；这里换成任务栏图层（不改 app.css，挂载点保持一行 link）。 */
#os-strip {
  background: transparent;
  border-top: 0;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: none;
}

#taskbar {
  position: relative;
  width: 100%;
  height: 48px;
  overflow: hidden;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: auto;
  text-rendering: auto;
  user-select: none;
  pointer-events: none;
}

/* 底色：模糊壁纸的横向渐变（程序化重建，不是参考图条带）。0 行为顶边暗线，1..47 为表面。 */
#tb-bg {
  position: absolute;
  left: 0;
  top: 1px;
  width: 100%;
  height: 47px;
  background-image: linear-gradient(90deg,
    rgb(208, 228, 238) 0px, rgb(206, 227, 238) 16px, rgb(207, 228, 239) 32px, rgb(208, 228, 237) 48px,
    rgb(208, 224, 240) 64px, rgb(208, 224, 240) 80px, rgb(208, 224, 240) 96px, rgb(209, 225, 241) 112px,
    rgb(209, 225, 241) 128px, rgb(208, 224, 240) 144px, rgb(209, 225, 241) 160px, rgb(208, 224, 240) 176px,
    rgb(206, 228, 238) 192px, rgb(206, 228, 237) 208px, rgb(208, 228, 237) 224px, rgb(208, 228, 238) 240px,
    rgb(209, 225, 241) 256px, rgb(208, 224, 240) 272px, rgb(209, 225, 241) 288px, rgb(209, 225, 241) 304px,
    rgb(208, 224, 240) 320px, rgb(208, 224, 240) 336px, rgb(208, 224, 240) 352px, rgb(209, 225, 241) 368px,
    rgb(209, 225, 241) 384px, rgb(208, 224, 240) 400px, rgb(209, 225, 241) 416px, rgb(208, 224, 240) 432px,
    rgb(209, 225, 241) 448px, rgb(208, 224, 240) 464px, rgb(210, 226, 242) 480px, rgb(209, 225, 241) 496px,
    rgb(210, 226, 242) 512px, rgb(210, 226, 242) 528px, rgb(211, 227, 243) 544px, rgb(211, 227, 243) 560px,
    rgb(210, 226, 242) 576px, rgb(210, 226, 242) 592px, rgb(210, 226, 242) 608px, rgb(211, 227, 243) 624px,
    rgb(211, 227, 243) 640px, rgb(210, 226, 242) 656px, rgb(211, 227, 243) 672px, rgb(210, 226, 242) 688px,
    rgb(210, 226, 242) 704px, rgb(208, 224, 240) 720px, rgb(210, 226, 242) 736px, rgb(208, 224, 240) 752px,
    rgb(211, 223, 235) 768px, rgb(210, 222, 234) 784px, rgb(212, 219, 236) 800px, rgb(216, 216, 232) 816px,
    rgb(216, 216, 224) 832px, rgb(216, 213, 224) 848px, rgb(217, 214, 225) 864px, rgb(215, 219, 223) 880px,
    rgb(219, 215, 227) 896px, rgb(215, 215, 231) 912px, rgb(213, 221, 229) 928px, rgb(216, 216, 232) 944px,
    rgb(212, 221, 232) 960px, rgb(215, 218, 231) 976px, rgb(214, 220, 230) 992px, rgb(212, 220, 228) 1008px,
    rgb(216, 216, 232) 1024px, rgb(212, 220, 228) 1040px, rgb(215, 219, 223) 1056px, rgb(215, 219, 223) 1072px,
    rgb(215, 219, 223) 1088px, rgb(214, 218, 225) 1104px, rgb(216, 216, 232) 1120px, rgb(218, 218, 234) 1136px,
    rgb(215, 219, 239) 1152px, rgb(211, 223, 235) 1168px, rgb(212, 224, 236) 1184px, rgb(211, 223, 235) 1200px,
    rgb(207, 223, 239) 1216px, rgb(206, 222, 238) 1232px, rgb(208, 224, 240) 1248px, rgb(206, 222, 238) 1264px,
    rgb(207, 223, 239) 1280px, rgb(206, 222, 238) 1296px, rgb(207, 223, 239) 1312px, rgb(207, 223, 239) 1328px,
    rgb(206, 222, 238) 1344px, rgb(206, 222, 238) 1360px, rgb(206, 222, 238) 1376px, rgb(207, 223, 239) 1392px,
    rgb(207, 223, 239) 1408px, rgb(206, 222, 238) 1424px, rgb(207, 223, 239) 1440px, rgb(206, 222, 238) 1456px,
    rgb(206, 222, 238) 1472px, rgb(205, 221, 237) 1488px, rgb(207, 223, 239) 1504px, rgb(206, 222, 238) 1520px,
    rgb(207, 223, 239) 1536px, rgb(206, 222, 238) 1552px, rgb(206, 222, 238) 1568px, rgb(206, 222, 238) 1584px,
    rgb(206, 222, 238) 1600px, rgb(206, 222, 238) 1616px, rgb(206, 222, 238) 1632px, rgb(206, 222, 238) 1648px,
    rgb(207, 223, 239) 1664px, rgb(206, 222, 238) 1680px, rgb(207, 223, 239) 1696px, rgb(206, 222, 238) 1712px,
    rgb(206, 222, 238) 1728px, rgb(205, 221, 237) 1744px, rgb(207, 223, 239) 1760px, rgb(206, 222, 238) 1776px,
    rgb(207, 223, 239) 1792px, rgb(206, 222, 238) 1808px, rgb(207, 223, 239) 1824px, rgb(206, 222, 238) 1840px,
    rgb(208, 222, 236) 1856px, rgb(207, 222, 236) 1872px, rgb(208, 222, 236) 1888px, rgb(208, 222, 236) 1904px,
    rgb(207, 222, 236) 1919px
  );
}

/* 顶边 1px 暗线：真机是 1px 半透明黑线压在底色上，这里按逐列实测 RGB 还原。 */
#tb-topline {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background-image: linear-gradient(90deg,
    rgb(171, 183, 190) 0px, rgb(170, 182, 189) 16px, rgb(170, 181, 188) 32px, rgb(171, 182, 189) 48px,
    rgb(169, 181, 193) 64px, rgb(170, 182, 194) 80px, rgb(169, 181, 193) 96px, rgb(170, 182, 194) 112px,
    rgb(169, 181, 193) 128px, rgb(170, 182, 194) 144px, rgb(169, 181, 193) 160px, rgb(169, 181, 193) 176px,
    rgb(168, 183, 189) 192px, rgb(171, 181, 189) 208px, rgb(171, 182, 187) 224px, rgb(171, 181, 189) 240px,
    rgb(170, 182, 194) 256px, rgb(170, 182, 194) 272px, rgb(169, 181, 193) 288px, rgb(169, 181, 193) 304px,
    rgb(169, 181, 193) 320px, rgb(170, 182, 194) 336px, rgb(169, 181, 193) 352px, rgb(170, 182, 194) 368px,
    rgb(169, 181, 193) 384px, rgb(170, 182, 194) 400px, rgb(169, 181, 193) 416px, rgb(169, 181, 193) 432px,
    rgb(170, 182, 194) 448px, rgb(170, 182, 194) 464px, rgb(170, 182, 194) 480px, rgb(169, 181, 193) 496px,
    rgb(175, 183, 191) 512px, rgb(175, 183, 191) 528px, rgb(174, 182, 190) 544px, rgb(174, 182, 190) 560px,
    rgb(174, 182, 190) 576px, rgb(175, 183, 191) 592px, rgb(174, 182, 190) 608px, rgb(175, 183, 191) 624px,
    rgb(174, 182, 190) 640px, rgb(175, 183, 191) 656px, rgb(174, 182, 190) 672px, rgb(174, 182, 190) 688px,
    rgb(175, 183, 191) 704px, rgb(174, 182, 190) 720px, rgb(174, 182, 190) 736px, rgb(172, 180, 188) 752px,
    rgb(173, 181, 189) 768px, rgb(172, 180, 188) 784px, rgb(171, 179, 187) 800px, rgb(178, 174, 186) 816px,
    rgb(174, 178, 182) 832px, rgb(178, 174, 186) 848px, rgb(177, 173, 185) 864px, rgb(174, 178, 182) 880px,
    rgb(173, 177, 181) 896px, rgb(179, 175, 187) 912px, rgb(175, 179, 183) 928px, rgb(171, 179, 187) 944px,
    rgb(172, 180, 188) 960px, rgb(171, 179, 187) 976px, rgb(176, 180, 184) 992px, rgb(178, 174, 186) 1008px,
    rgb(179, 175, 187) 1024px, rgb(175, 179, 183) 1040px, rgb(174, 178, 182) 1056px, rgb(174, 178, 182) 1072px,
    rgb(174, 178, 182) 1088px, rgb(175, 179, 183) 1104px, rgb(179, 175, 187) 1120px, rgb(180, 176, 188) 1136px,
    rgb(172, 180, 188) 1152px, rgb(173, 181, 189) 1168px, rgb(173, 181, 189) 1184px, rgb(173, 181, 189) 1200px,
    rgb(173, 181, 189) 1216px, rgb(172, 180, 188) 1232px, rgb(173, 181, 189) 1248px, rgb(172, 180, 188) 1264px,
    rgb(169, 181, 193) 1280px, rgb(169, 181, 193) 1296px, rgb(172, 180, 188) 1312px, rgb(172, 180, 188) 1328px,
    rgb(172, 180, 188) 1344px, rgb(169, 181, 193) 1360px, rgb(172, 180, 188) 1376px, rgb(169, 181, 193) 1392px,
    rgb(172, 180, 188) 1408px, rgb(169, 181, 193) 1424px, rgb(172, 180, 188) 1440px, rgb(172, 180, 188) 1456px,
    rgb(173, 181, 189) 1472px, rgb(172, 180, 188) 1488px, rgb(169, 181, 193) 1504px, rgb(171, 179, 187) 1520px,
    rgb(173, 181, 189) 1536px, rgb(168, 180, 192) 1552px, rgb(172, 180, 188) 1568px, rgb(172, 180, 188) 1584px,
    rgb(172, 180, 188) 1600px, rgb(173, 181, 189) 1616px, rgb(172, 180, 188) 1632px, rgb(173, 181, 189) 1648px,
    rgb(171, 179, 187) 1664px, rgb(173, 181, 189) 1680px, rgb(172, 180, 188) 1696px, rgb(172, 180, 188) 1712px,
    rgb(172, 180, 188) 1728px, rgb(172, 180, 188) 1744px, rgb(172, 180, 188) 1760px, rgb(171, 179, 187) 1776px,
    rgb(172, 180, 188) 1792px, rgb(172, 180, 188) 1808px, rgb(172, 180, 188) 1824px, rgb(172, 180, 188) 1840px,
    rgb(171, 179, 187) 1856px, rgb(172, 180, 188) 1872px, rgb(171, 179, 187) 1888px, rgb(172, 180, 188) 1904px,
    rgb(171, 179, 187) 1919px
  );
}

.tb-apps,
.tb-tray,
.tb-clock {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 48px;
}

/* ================= 任务栏按钮 ================= */
.tb-app {
  position: absolute;
  top: 0;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  cursor: default;
}

.tb-icon {
  position: absolute;
  display: block;
  border: 0;
}

/* 应用标题：真实 DOM 文本，12px；clip 由图标+标题宽度硬裁剪（Win11 直接裁切，不是省略号）。 */
.tb-label {
  position: absolute;
  display: block;
  height: 16px;
  overflow: hidden;
  white-space: pre;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  color: #13171b;
  letter-spacing: 0;
}

/* 运行指示条：真机是图标下方 6x3 的半透明深灰圆角小横条（约 45% 黑）。 */
.tb-indicator {
  position: absolute;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 1.5px;
}

/* ================= 活动窗口（MATLAB R2025b） ================= */
/* 126x40 半透明白色圆角按钮：真机底色 = 底 + 50% 白；首行/末行各 1px 暗边。 */
.tb-active {
  border-radius: 4px;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.028) 0px, rgba(0, 0, 0, 0.028) 1px,
    rgba(255, 255, 255, 0.5) 1px, rgba(255, 255, 255, 0.5) 39px,
    rgba(0, 0, 0, 0.085) 39px, rgba(0, 0, 0, 0.085) 40px);
}

.tb-active-bar {
  position: absolute;
  background: #0175d9;
  border-radius: 1.5px;
}

/* ================= 托盘与时钟 ================= */
.tb-tray-text,
.tb-clock-time,
.tb-clock-date {
  position: absolute;
  display: block;
  font-family: inherit;
  line-height: 1;
  color: #13171b;
  white-space: pre;
}

/* 输入法指示「中」：真机是 13x15 的 CJK 字形（约 15px）。 */
.tb-tray-text {
  font-size: 15px;
}

/* 时钟：两行右对齐到 x=1901（屏幕右内边距 19px），12px Segoe UI。 */
.tb-clock-time,
.tb-clock-date {
  right: 19px;
  font-size: 12px;
  letter-spacing: 0.3px;
}
