/* 紫微运限表（大限/流年/流月/流日/流时）统一边框：
 * 原先格子的边线颜色随主题变，但容器（表格底）和顶边线仍是写死的浅灰蓝/奶油色；格子宽度是小数像素（如 38.45px），
 * 格与格之间会露出容器底色，在暗色羊皮纸等深色主题里就成了"莫名其妙的亮线"。
 * 做法：容器底色与顶边线 = 格子边线色，缝隙露出来的就是边线色，整张表的线条一致；自定义配色（羊皮纸/大师风格）的格子边线统一取 --color-line。 */

/* 默认配色：暗色（含系统暗色）——格子边线 #8b95a7 */
#tt-panel .ziwei-time-table { background:#8b95a7; border-top-color:#8b95a7; }
/* 默认配色：亮色——格子边线 #d1d5db */
html[data-color-scheme=light] #tt-panel .ziwei-time-table { background:#d1d5db; border-top-color:#d1d5db; }
@media (prefers-color-scheme: light) {
  html[data-color-scheme=system] #tt-panel .ziwei-time-table { background:#d1d5db; border-top-color:#d1d5db; }
}

/* 自定义配色（羊皮纸 / 大师风格，亮暗都覆盖）：边线与容器底统一取主题线条色 */
html[data-tt-palette=custom] #tt-panel .ziwei-time-table { background:var(--color-line); border-top:1px solid var(--color-line); }
html[data-tt-palette=custom] #tt-panel .ziwei-time-cell,
html[data-tt-palette=custom] #tt-panel .ziwei-time-strip .ziwei-time-cell:first-child,
html[data-tt-palette=custom] #tt-panel .ziwei-time-day-strip > .ziwei-time-label,
html[data-tt-palette=custom] #tt-panel .ziwei-time-days .ziwei-time-day:nth-child(10n + 1) { border-color:var(--color-line); }

/* 时间表格：已选中的格子鼠标还停在上面时，:hover 的底色会盖掉选中色（同样的优先级、hover 写在后面），
   点完看起来“没变色”，鼠标移开才变。这里让选中色在悬停时保持不变。 */
.ziwei-time-cell.active:hover { background:#b8c0cf; }
html[data-color-scheme=light] .ziwei-time-cell.active:hover { background:#93aaea; }
@media (prefers-color-scheme: light) {
  html[data-color-scheme=system] .ziwei-time-cell.active:hover { background:#93aaea; }
}
