/* ============================================================
   Photoshop 2026 复刻 —— 字体度量 + 窗口 chrome 像素对齐
   量测来源：docs/reference/surfaces/main-1920x1080.png（真机 1:1 截图）
   本文件只做「几何/字体/颜色」拟合，不改变任何 DOM 语义与交互。

   量测结论（逐像素扫描得出，非估算）：
   - 菜单栏 y=0..27：文字墨迹 y=6..17（12px，行高 24，项内边距 6px）
   - 选项栏 y=29..63：y=28 整宽 1px 分隔线 #383838；文字墨迹 y=40..51
   - 窗口左右边框：x=0 / x=1919，从 y=28 到窗口底，1px #383838
   - 窗口控制按钮墨迹：最小化 x1799..1808 y10；最大化 x1844..1853 y5..14；
     关闭 x1890..1899 y5..14
   ============================================================ */

/* ---------------- 窗口边框（y>=28 的 1px 立边） ---------------- */
#app::before,
#app::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: #383838;
  z-index: 40;
  pointer-events: none;
}
#app::before { left: 0; }
#app::after { right: 0; }

/* ---------------- 菜单栏：12px / 行高 24 / 内边距 6 ---------------- */
#menu-items {
  left: 29px;
  height: 24px;
  align-items: flex-start;
}
.menu-item {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 24px;
  letter-spacing: -0.2px;
  text-shadow: 0 0 0.3px currentColor;
  font-family: var(--font);
  box-sizing: border-box;
}
/* 项宽按真机量测逐项定死（12px 字形步进的整数取整差异，见文件头注释） */
.menu-item:nth-child(1) { width: 49px; }
.menu-item:nth-child(2) { width: 49px; }
.menu-item:nth-child(3) { width: 46px; }
.menu-item:nth-child(4) { width: 49px; }
.menu-item:nth-child(5) { width: 50px; }
.menu-item:nth-child(6) { width: 50px; }
.menu-item:nth-child(7) { width: 50px; }
.menu-item:nth-child(8) { width: 51px; }
.menu-item:nth-child(9) { width: 60px; }
.menu-item:nth-child(10) { width: 54px; }

/* 窗口控制按钮：图标墨迹按真机量测逐像素摆放（SVG 由 menubar.js 注入） */
#window-controls {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  display: block;
  pointer-events: none;
}
.wc {
  position: absolute;
  top: 0;
  width: 46px;
  height: 28px;
  padding: 0;
  pointer-events: auto;
}
.wc[data-test="win-min"] { left: 1781px; }
.wc[data-test="win-max"] { left: 1826px; }
.wc[data-test="win-close"] { left: 1872px; }
.wc svg { position: absolute; left: 18px; top: 5px; display: block; }
.wc[data-test="win-min"] svg { top: 10px; }
.wc:hover { background: #4a4a4a; }
.wc-close:hover { background: #c42b1c; }

/* ---------------- 选项栏：1px 顶部分隔线 + 逐元素量测坐标 ---------------- */
#optionsbar {
  box-shadow: inset 0 1px 0 #383838;
}
#options-content {
  left: 0;
  top: 0;
  right: 0;
  height: 36px;
}
#options-content > *,
#options-right > * {
  position: absolute;
}
.opt-grip {
  left: 5px; top: 9px; width: 2px; height: 19px;
  background: #454545;
}
.opt-sep {
  position: absolute;
  width: 1px;
  height: 25px;
  top: 6px;
  background: #3e3e3e;
}
.opt-home    { left: 20px;  top: 11px; width: 16px; height: 15px; }
.opt-marquee { left: 61px;  top: 11px; width: 16px; height: 13px; }
.opt-marquee-caret { left: 87px; top: 17px; width: 7px; height: 5px; }
.opt-home svg, .opt-marquee svg, .opt-marquee-caret svg, .opt-swap svg { display: block; }
.opt-home:hover, .opt-marquee:hover, .opt-marquee-caret:hover { background: #4a4a4a; }

.opt-modes { left: 110px; top: 5px; height: 27px; display: flex; }
.opt-mode {
  position: relative;
  width: 26px;
  height: 27px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}
.opt-mode.active { background: #383838; box-shadow: inset 0 0 0 1px #636363; }
.opt-mode:hover { background: #4a4a4a; }
/* 图标墨迹位置逐一量测：button1(118,42) button2(142,40) button3(169,41) button4(194,40) */
.opt-mode svg { position: absolute; display: block; }
.mode-new   svg { left: 8px; top: 9px; }
.mode-add   svg { left: 6px; top: 7px; }
.mode-sub   svg { left: 7px; top: 8px; }
.mode-inter svg { left: 6px; top: 7px; }

.opt-label {
  position: absolute;
  font-size: 12px;
  line-height: normal;
  color: #d6d6d6;
  white-space: nowrap;
}
.opt-label.dim { color: #878787; }
.lbl-feather   { left: 234px; top: 10px; }
.lbl-antialias { left: 358px; top: 11px; }
.lbl-style     { left: 435px; top: 10px; }
.lbl-width     { left: 558px; top: 10px; color: #878787; }
.lbl-height    { left: 681px; top: 10px; color: #878787; }

.opt-field {
  position: absolute;
  height: 22px;
  background: #454545;
  border: 1px solid #666666;
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 12px;
  color: #f0f0f0;
  box-sizing: border-box;
}
.opt-field .unit { color: #f0f0f0; padding-left: 3px; }
.opt-field.fld-feather { left: 269px; top: 7px; width: 64px; }
/* 宽度/高度：真机是「空且禁用」态：边框 #5e5e5e + 内嵌 #4d4d4d 环（上/下 3px，左 1px，右 3px） */
.opt-field.is-empty {
  left: 0; top: 0;
  border-color: #5e5e5e;
  background: #454545;
  box-shadow: inset 0 3px 0 #4d4d4d, inset 0 -3px 0 #4d4d4d,
              inset 1px 0 0 #4d4d4d, inset -3px 0 0 #4d4d4d;
}
.opt-field.fld-width  { left: 591px; top: 7px; width: 42px; }
.opt-field.fld-height { left: 714px; top: 7px; width: 42px; }

.opt-checkbox {
  position: absolute;
  left: 341px; top: 13px;
  width: 12px; height: 12px;
  background: #4d4d4d;
  border: 1px solid #5e5e5e;
  border-radius: 2px;
  box-sizing: border-box;
}

.opt-combo {
  position: absolute;
  height: 23px;
  background: #454545;
  border: 1px solid #666666;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 0 8px;
  font-size: 12px;
  color: #f0f0f0;
  box-sizing: border-box;
}
.opt-combo.cmb-style { left: 468px; top: 8px; width: 78px; }
/* 组合框下拉箭头：真机墨迹 x535..541 y47..49（7x5 折线），绝对定位避免亚像素 */
.opt-combo .combo-caret {
  position: absolute;
  left: 67px; top: 10px;
  width: 7px; height: 5px;
  display: block;
  flex: 0 0 7px;
}
.opt-combo .combo-caret svg { display: block; }
.opt-combo { justify-content: flex-start; }

.opt-swap { left: 648px; top: 12px; width: 15px; height: 13px; }

.opt-btn {
  position: absolute;
  left: 777px; top: 5px; width: 96px; height: 25px;
  display: flex; align-items: center; justify-content: center;
  background: #454545;
  border: 1px solid #5d5d5d;
  border-radius: 13px;
  font-size: 12px;
  letter-spacing: 0.35px;
  color: #f0f0f0;
  box-sizing: border-box;
}
.opt-btn:hover { background: #4d4d4d; }

/* 选项栏右端四个图标：位置按真机墨迹摆放（SVG 由 optionsbar.js 注入） */
#options-right { left: 0; top: 0; right: 0; height: 36px; display: block; }
.opt-icon { position: absolute; padding: 0; }
.opt-icon svg { display: block; }
.icon-search { left: 1820px; top: 12px; width: 14px; height: 14px; }
.icon-tips   { left: 1851px; top: 10px; width: 17px; height: 17px; }
.icon-panels { left: 1881px; top: 13px; width: 16px; height: 13px; }
.icon-caret  { left: 1907px; top: 16px; width: 7px;  height: 5px; }
.opt-icon:hover { background: #4a4a4a; }