
.szw-ziwei{
  --red:#c92d2d;
  --blue:#146ba5;
  --cyan:#2b9d8e;
  --green:#2ea45d;
  --purple:#902b83;
  --ink:#222;
  --muted:#757575;
  --line:#8b8b8b;
  width:min(810px,calc(100vw - 8px));
  margin:6px auto 28px;
  color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;
  line-height:1.08;
}
.szw-ziwei *{box-sizing:border-box}
.szw-ziwei button,.szw-ziwei input{font:inherit}

/* 输入区 */
.szw-form{
  display:grid;
  grid-template-columns:.7fr 1.1fr .9fr .65fr .85fr;
  gap:4px;
  align-items:end;
  padding:5px;
  border:1px solid #d6d6d6;
  background:#fafafa;
}
.szw-field{display:flex;flex-direction:column;gap:2px}
.szw-field>span{font-size:9px;font-weight:700}
.szw-field input{
  width:100%;
  height:27px;
  padding:0 6px;
  border:1px solid #aaa;
  background:#fff;
}
.szw-time-tip{font-size:7px;color:#777}
.szw-gender{display:grid;grid-template-columns:1fr 1fr;gap:2px}
.szw-gender label{position:relative}
.szw-gender input{position:absolute;opacity:0}
.szw-gender b{
  height:27px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #aaa;
  background:#fff;
  cursor:pointer;
}
.szw-gender input:checked+b{
  border-color:var(--red);
  color:var(--red);
  box-shadow:inset 0 0 0 1px var(--red);
}
.szw-submit{
  height:27px;
  border:0;
  background:#cd3030;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.szw-note,.szw-error{
  grid-column:1/-1;
  padding:4px 5px;
  font-size:7px;
  border:1px solid #e3e3e3;
  background:#fff;
  color:#777;
}
.szw-error{background:#fff0f0;color:#a00;font-weight:700}

/* 整体 */
.szw-result{margin-top:5px}
.szw-board-scroll{overflow-x:auto}
.szw-board{
  position:relative;
  width:800px;
  min-width:800px;
  margin:0 auto;
  padding-top:17px;
  border:1px solid #777;
  background:#fff;
}
.szw-grid{
  margin:0 26px;
  display:grid;
  grid-template-columns:repeat(4,186px);
  grid-template-rows:repeat(4,244px);
  border-top:1px solid var(--line);
  border-left:1px solid var(--line);
}
.szw-palace,.szw-center{
  position:relative;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fff;
}
.szw-palace{
  overflow:hidden;
  padding:6px 5px 5px;
}
.szw-center{
  grid-column:2/4;
  grid-row:2/4;
  width:372px;
  height:488px;
  padding:12px 14px 9px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

/* 方位 */
.szw-dir{
  position:absolute;
  z-index:6;
  color:#777;
  font-size:9px;
  pointer-events:none;
}
.szw-dir.top{top:2px;left:50%;transform:translateX(-50%)}
.szw-dir.bottom{top:992px;left:50%;transform:translateX(-50%)}
.szw-dir.left{left:3px;top:480px;writing-mode:vertical-rl}
.szw-dir.right{right:3px;top:480px;writing-mode:vertical-rl}

/* 星曜区：贴参考图 */
.szw-stars{
  position:absolute;
  left:6px;
  top:7px;
  right:42px;
  height:112px;
  overflow:hidden;
}
.szw-major-row,.szw-minor-row,.szw-adj-row{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:1px 3px;
}
.szw-major-row{min-height:37px}
.szw-major{
  color:var(--red);
  font-size:16px;
  font-weight:900;
  line-height:1.02;
  white-space:nowrap;
}
.szw-major:nth-child(even){color:var(--blue)}
.szw-minor{
  color:var(--blue);
  font-size:10px;
  font-weight:800;
  line-height:1.06;
  white-space:nowrap;
}
.szw-minor:nth-child(3n){color:var(--cyan)}
.szw-adj{
  color:#333;
  font-size:9px;
  line-height:1.06;
  white-space:nowrap;
}
.szw-bright{
  font-style:normal;
  font-size:6px;
  margin-left:1px;
  color:#555;
  font-weight:500;
}
.szw-badges{
  display:flex;
  flex-wrap:wrap;
  gap:2px;
  min-height:14px;
  margin:1px 0 2px;
}
.szw-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:14px;
  height:14px;
  padding:0 2px;
  background:var(--red);
  color:#fff;
  font-size:8px;
  font-weight:900;
}
.szw-badge.lu{background:var(--green)}
.szw-badge.quan{background:var(--purple)}
.szw-badge.ke{background:#2e79b1}
.szw-badge.ji{background:#d94a42}

/* 三组神煞：参考图里宫位中部那些绿色/黑色字 */
.szw-gods{
  position:absolute;
  left:6px;
  top:118px;
  right:43px;
  height:40px;
  font-size:10px;
  line-height:1.15;
}
.szw-god-line{
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}
.szw-god-line .boshi{color:var(--cyan);font-weight:800}
.szw-god-line .jiang{color:#333}
.szw-god-line .sui{color:#333}

/* 流年、小限 */
.szw-ages{
  position:absolute;
  left:6px;
  right:44px;
  top:162px;
  color:#666;
  font-size:8px;
  line-height:1.32;
}
.szw-ages div{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 右侧竖排长生 + 干支 */
.szw-right{
  position:absolute;
  right:4px;
  bottom:39px;
  width:38px;
  height:81px;
}
.szw-right .stage{
  position:absolute;
  left:0;
  bottom:0;
  writing-mode:vertical-rl;
  color:#666;
  font-size:9px;
}
.szw-right .stem{
  position:absolute;
  right:17px;
  bottom:0;
  font-size:12px;
  font-weight:700;
}
.szw-right .branch{
  position:absolute;
  right:0;
  bottom:0;
  font-size:24px;
  line-height:1;
  font-weight:900;
}

/* 大限年龄 */
.szw-decade{
  position:absolute;
  left:50%;
  bottom:40px;
  transform:translateX(-50%);
  font-size:17px;
  font-weight:800;
  white-space:nowrap;
}
.szw-decade small{
  font-size:7px;
  font-weight:500;
  color:#666;
}

/* 宫名 */
.szw-palace-name{
  position:absolute;
  right:6px;
  bottom:7px;
  color:var(--red);
  font-size:15px;
  font-weight:900;
  white-space:nowrap;
}

/* 中宫 */
.szw-center-brand{
  text-align:center;
  font-family:"STKaiti","KaiTi","Kaiti SC",serif;
  font-size:31px;
  font-weight:900;
  letter-spacing:.08em;
  margin-bottom:8px;
}
.szw-center-profile{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1px 10px;
  font-size:10px;
}
.szw-profile-item{
  display:flex;
  justify-content:space-between;
  gap:5px;
  padding:2px 0;
  border-bottom:1px solid #eee;
}
.szw-profile-item small{color:#777}
.szw-profile-item b{text-align:right}
.szw-center-meta{
  margin:6px 0 4px;
  text-align:center;
  font-size:12px;
  font-weight:800;
}
.szw-center-pillars{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  margin:5px 0 4px;
}
.szw-pillar{
  text-align:center;
  border-right:1px solid #eee;
}
.szw-pillar:last-child{border-right:0}
.szw-pillar b{
  display:block;
  font-size:22px;
  line-height:1.05;
  color:var(--red);
}
.szw-pillar:nth-child(even) b{color:var(--blue)}
.szw-pillar span{font-size:7px;color:#666}
.szw-center-start{
  text-align:center;
  font-size:10px;
  margin:3px 0 5px;
}
.szw-center-decades{
  display:grid;
  grid-template-columns:repeat(8,1fr);
  margin:3px 0 6px;
}
.szw-center-decade{
  text-align:center;
  border-right:1px solid #eee;
  font-size:7px;
  line-height:1.2;
}
.szw-center-decade:last-child{border-right:0}
.szw-center-decade b{
  display:block;
  font-size:9px;
}
.szw-center-controls{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  border:1px solid #999;
}
.szw-center-controls span{
  padding:4px 1px;
  text-align:center;
  border-right:1px solid #999;
  font-size:10px;
  font-weight:800;
}
.szw-center-controls span:last-child{border-right:0}
.szw-center-controls .active{background:#f2f2f2}
.szw-transform-legend{
  margin-top:4px;
  text-align:center;
  font-size:8px;
  color:#555;
}
.szw-transform-legend b{margin-left:2px}
.szw-transform-legend .lu{color:var(--green)}
.szw-transform-legend .quan{color:var(--purple)}
.szw-transform-legend .ke{color:var(--blue)}
.szw-transform-legend .ji{color:var(--red)}

/* 底部流运表 */
.szw-flow{
  margin-top:0;
  border-top:1px solid #aaa;
  border-left:1px solid #aaa;
}
.szw-flow-row{
  display:grid;
  grid-template-columns:58px 1fr;
  border-bottom:1px solid #aaa;
}
.szw-flow-label{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  border-right:1px solid #aaa;
  background:#fafafa;
  font-size:13px;
  font-weight:800;
}
.szw-flow-label small{font-size:8px;color:#666}
.szw-flow-cells{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:minmax(74px,1fr);
  overflow:hidden;
}
.szw-flow-cell{
  min-height:49px;
  padding:5px 3px;
  border-right:1px solid #aaa;
  background:#fafafa;
  text-align:center;
  font-size:9px;
  white-space:nowrap;
}
.szw-flow-cell b{display:block;font-size:10px}
.szw-flow-cell span{display:block;color:#666;margin-top:2px}

.szw-modes{
  display:flex;
  justify-content:center;
  gap:3px;
  padding:8px;
  border-top:1px solid #aaa;
  background:#ededed;
}
.szw-modes button{
  min-width:62px;
  padding:4px 9px;
  border:1px solid #777;
  background:#fff;
  font-weight:800;
}
.szw-modes button.active{
  background:#625b9e;
  color:#fff;
}

.szw-actions{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top:6px;
}
.szw-actions button{
  padding:5px 10px;
  border:1px solid #999;
  background:#fff;
  cursor:pointer;
  font-size:10px;
}

.szw-seo{
  width:min(800px,calc(100vw - 8px));
  margin:12px auto 0;
  padding:10px 12px;
  border:1px solid #e5e5e5;
  background:#fff;
}
.szw-seo h2{font-size:16px;margin:0 0 4px}
.szw-seo p{font-size:11px;color:#666;margin:0}

/* 去侧栏 */
.szw-ziwei-page #secondary,
.szw-ziwei-page .secondary,
.szw-ziwei-page aside.sidebar,
.szw-ziwei-page .sidebar,
.szw-ziwei-page #sidebar,
.szw-ziwei-page .widget-area,
.szw-ziwei-page .right-sidebar,
.szw-ziwei-page .sidebar-right{display:none!important}
.szw-ziwei-page #primary,
.szw-ziwei-page .primary,
.szw-ziwei-page .content-area,
.szw-ziwei-page .main-content,
.szw-ziwei-page .site-main,
.szw-ziwei-page main.site-main,
.szw-ziwei-page article,
.szw-ziwei-page .entry-content{
  width:100%!important;
  max-width:none!important;
  float:none!important;
  grid-column:1/-1!important;
}
.szw-ziwei-page .entry-header,
.szw-ziwei-page header.entry-header,
.szw-ziwei-page .page-header,
.szw-ziwei-page h1.entry-title,
.szw-ziwei-page .page-title{display:none!important}

/* 手机横向滚动，保持同构 */
@media(max-width:700px){
  .szw-ziwei{width:100%;max-width:100%;margin:2px auto 20px}
  .szw-form{grid-template-columns:1fr 1fr}
  .szw-submit{grid-column:1/-1}
  .szw-board-scroll{-webkit-overflow-scrolling:touch}
  .szw-board{margin-left:0}
  .szw-seo{width:100%}
}

@media print{
  body *{visibility:hidden!important}
  .szw-result,.szw-result *{visibility:visible!important}
  .szw-result{position:absolute;left:0;top:0;width:100%}
  .szw-form,.szw-seo,.szw-actions{display:none!important}
}


/* =========================================================
   v8.1 修正版：单宫按参考图分区
   ========================================================= */

.szw-grid{
  grid-template-rows:repeat(4,230px)!important;
}
.szw-center{
  height:460px!important;
}

.szw-palace{
  position:relative!important;
  height:230px!important;
  padding:0!important;
  overflow:hidden!important;
  background:#fff!important;
}

/* 1. 顶部星曜 */
.szw-ref-stars{
  position:absolute!important;
  left:8px!important;
  top:7px!important;
  right:38px!important;
  height:72px!important;
  overflow:hidden!important;
}

.szw-ref-major,
.szw-ref-minor,
.szw-ref-adj,
.szw-ref-bright{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:baseline!important;
  gap:0 4px!important;
}

.szw-ref-major{
  min-height:23px!important;
}
.szw-ref-major .szw-major{
  font-size:17px!important;
  line-height:1.04!important;
  font-weight:900!important;
  white-space:nowrap!important;
}
.szw-ref-major .szw-major.red{color:#c93232!important}
.szw-ref-major .szw-major.blue{color:#176aa5!important}

.szw-ref-minor{
  min-height:17px!important;
}
.szw-ref-minor .szw-minor{
  font-size:11px!important;
  line-height:1.05!important;
  font-weight:800!important;
  color:#176aa5!important;
  white-space:nowrap!important;
}
.szw-ref-minor .szw-minor.cyan{color:#2b9d8e!important}

.szw-ref-adj{
  min-height:14px!important;
}
.szw-ref-adj .szw-adj{
  font-size:9px!important;
  line-height:1.05!important;
  color:#333!important;
  white-space:nowrap!important;
}

/* 庙旺平陷独立一行 */
.szw-ref-bright{
  margin-top:1px!important;
  gap:0 7px!important;
  color:#444!important;
  font-size:9px!important;
  line-height:1!important;
}

/* 2. 中部流年 / 小限 */
.szw-ref-ages{
  position:absolute!important;
  left:8px!important;
  top:92px!important;
  right:40px!important;
  color:#666!important;
  font-size:9px!important;
  line-height:1.4!important;
}
.szw-ref-ages div{
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* 3. 左下博士/将前/岁前 */
.szw-ref-gods{
  position:absolute!important;
  left:8px!important;
  bottom:9px!important;
  width:65px!important;
  line-height:1.15!important;
}
.szw-ref-gods > div{
  font-size:11px!important;
  white-space:nowrap!important;
}
.szw-ref-gods .boshi{
  color:#2b9d8e!important;
  font-weight:800!important;
}
.szw-ref-gods .jiang,
.szw-ref-gods .sui{
  color:#333!important;
}

/* 4. 中下大限年龄 */
.szw-ref-decade{
  position:absolute!important;
  left:50%!important;
  bottom:36px!important;
  transform:translateX(-50%)!important;
  color:#222!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:500!important;
  white-space:nowrap!important;
}

/* 5. 右侧：长生十二神 + 天干地支 */
.szw-ref-right{
  position:absolute!important;
  right:5px!important;
  bottom:8px!important;
  width:34px!important;
  height:96px!important;
}

.szw-ref-stage{
  position:absolute!important;
  right:23px!important;
  top:2px!important;
  writing-mode:vertical-rl!important;
  text-orientation:upright!important;
  color:#555!important;
  font-size:10px!important;
  line-height:1!important;
}

.szw-ref-ganzhi{
  position:absolute!important;
  right:0!important;
  bottom:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
}

.szw-ref-stem{
  font-size:18px!important;
  line-height:1!important;
  font-weight:700!important;
  color:#222!important;
}

.szw-ref-branch{
  font-size:28px!important;
  line-height:.92!important;
  font-weight:900!important;
  color:#222!important;
}

/* 6. 右下宫名 */
.szw-palace-name{
  position:absolute!important;
  right:41px!important;
  bottom:9px!important;
  color:#c93232!important;
  font-size:16px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

/* 中宫高度同步 */
.szw-center-brand{
  font-size:29px!important;
}
.szw-center-profile{
  font-size:9px!important;
}
.szw-center-meta{
  font-size:11px!important;
}
.szw-pillar b{
  font-size:20px!important;
}

/* v8.1 不隐藏任何实际输出结构 */
.szw-ref-stars,
.szw-ref-ages,
.szw-ref-gods,
.szw-ref-right,
.szw-ref-decade{
  display:block!important;
}

@media(max-width:700px){
  .szw-board-scroll{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
}


/* =========================================================
   v9.0：日/时按钮直接修改出生资料并完整重新排本命盘
   ========================================================= */
.szw-center-controls{
  display:grid!important;
  grid-template-columns:repeat(5,1fr)!important;
  border:1px solid #999!important;
  overflow:visible!important;
}
.szw-center-controls > button{
  appearance:none!important;
  -webkit-appearance:none!important;
  width:100%!important;
  min-width:0!important;
  height:27px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-right:1px solid #999!important;
  border-radius:0!important;
  background:#fff!important;
  color:#222!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:27px!important;
  text-align:center!important;
}
.szw-center-controls > button:last-child{
  border-right:0!important;
}
.szw-rechart-control{
  cursor:pointer!important;
}
.szw-rechart-control:hover{
  background:#f0f0f0!important;
}
.szw-rechart-control:active{
  background:#dfefff!important;
}
.szw-tianpan-static{
  opacity:1!important;
  background:#f3f3f3!important;
  cursor:default!important;
}
.szw-rechart-control.szw-working{
  background:#dfefff!important;
}

/* 完整重排时短暂闪一下，方便确认按钮确实生效 */
.szw-grid.szw-rechart-flash{
  animation:szwRechartFlash .22s ease-out;
}
@keyframes szwRechartFlash{
  from{opacity:.72}
  to{opacity:1}
}


/* =========================================================
   v9.1：顶部排盘表单统一对齐
   ========================================================= */

/* 五列顶部对齐，而不是按各自内容高度底部对齐 */
.szw-form{
  grid-template-columns:.78fr 1.18fr 1fr .72fr .98fr!important;
  align-items:start!important;
  column-gap:5px!important;
  row-gap:4px!important;
  padding:7px 7px 6px!important;
}

/* 每列统一：标题 16px + 主控件 34px */
.szw-field{
  display:grid!important;
  grid-template-rows:16px 34px!important;
  align-content:start!important;
  gap:0!important;
  min-width:0!important;
}

.szw-field > span{
  display:flex!important;
  align-items:flex-end!important;
  height:16px!important;
  margin:0!important;
  padding:0 0 3px 0!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:700!important;
}

/* 所有输入框统一高度 */
.szw-field input[type="text"],
.szw-field input[type="date"],
.szw-field input[type="time"]{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 9px!important;
  border:1px solid #aaa!important;
  border-radius:4px!important;
  line-height:32px!important;
  background:#fff!important;
}

/* 性别按钮和输入框同高 */
.szw-gender{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:4px!important;
  height:34px!important;
}
.szw-gender label{
  height:34px!important;
}
.szw-gender b{
  height:34px!important;
  min-height:34px!important;
  border-radius:0!important;
  line-height:32px!important;
}

/* 开始排盘按钮：人为补一个“标题行”，确保按钮和输入框同一水平线 */
.szw-submit{
  align-self:start!important;
  height:34px!important;
  min-height:34px!important;
  margin-top:16px!important;
  border-radius:6px!important;
  line-height:34px!important;
}

/* 出生时间提示不再占据该列网格高度，改为绝对定位在输入框下方 */
.szw-field:has(.szw-time){
  position:relative!important;
}
.szw-time-tip{
  position:absolute!important;
  left:0!important;
  top:52px!important;
  z-index:2!important;
  margin:0!important;
  padding:0!important;
  font-size:9px!important;
  line-height:1!important;
  color:#777!important;
  white-space:nowrap!important;
}

/* 给时辰提示预留空间，同时不影响其他控件对齐 */
.szw-note{
  margin-top:13px!important;
}

/* 兼容不支持 :has() 的浏览器：直接给时间提示自己的定位 */
.szw-time-tip{
  transform:none!important;
}

/* 移动端依然两列，但每列内部保持同一套对齐规则 */
@media(max-width:700px){
  .szw-form{
    grid-template-columns:1fr 1fr!important;
    align-items:start!important;
  }
  .szw-submit{
    grid-column:1/-1!important;
    margin-top:0!important;
    height:36px!important;
  }
  .szw-note,
  .szw-error{
    grid-column:1/-1!important;
  }
}


/* =========================================================
   v9.2：流年 / 小限两组独立数据
   ========================================================= */
.szw-ref-ages{
  line-height:1.35!important;
}
.szw-ref-ages > div:first-child{
  color:#666!important;
}
.szw-ref-ages > div:last-child{
  color:#666!important;
}


/* =========================================================
   v9.3：四化跟随对应星曜显示
   参考样式：星曜 -> 庙旺平陷 -> 禄/权/科/忌小方块
   ========================================================= */

/* 顶部星曜区加高，为四化标签留出位置 */
.szw-ref-stars{
  height:92px!important;
  right:38px!important;
  overflow:hidden!important;
}

/* 取消旧的分离式星曜/亮度排版 */
.szw-ref-major,
.szw-ref-minor,
.szw-ref-adj,
.szw-ref-bright{
  display:none!important;
}

/* 每一组星曜横排 */
.szw-star-units{
  display:flex!important;
  align-items:flex-start!important;
  flex-wrap:nowrap!important;
  gap:3px!important;
  width:100%!important;
  overflow:hidden!important;
}

.szw-star-units-major{
  min-height:37px!important;
}
.szw-star-units-minor{
  min-height:31px!important;
  margin-top:0!important;
}
.szw-star-units-adj{
  min-height:20px!important;
  margin-top:0!important;
}

/* 每颗星独立一列：名称 / 旺陷 / 四化 */
.szw-star-unit{
  display:inline-flex!important;
  flex:0 0 auto!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:22px!important;
  max-width:34px!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
  vertical-align:top!important;
}

/* 星名 */
.szw-star-name{
  display:block!important;
  white-space:nowrap!important;
  text-align:center!important;
  font-weight:800!important;
  line-height:1.02!important;
}

.szw-star-name-major{
  font-size:16px!important;
  font-weight:900!important;
}
.szw-star-name-major.red{
  color:#c93232!important;
}
.szw-star-name-major.blue{
  color:#176aa5!important;
}

.szw-star-name-minor{
  font-size:10px!important;
  color:#176aa5!important;
}
.szw-star-name-minor.cyan{
  color:#2b9d8e!important;
}

.szw-star-name-adj{
  font-size:8px!important;
  color:#333!important;
}

/* 庙旺平陷紧贴星曜下面 */
.szw-star-brightness{
  display:block!important;
  height:10px!important;
  margin-top:1px!important;
  color:#444!important;
  font-size:8px!important;
  line-height:10px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 四化：像参考图一样使用红色小方块白字 */
.szw-star-mutagen{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:15px!important;
  height:15px!important;
  margin-top:1px!important;
  padding:0 2px!important;
  border-radius:1px!important;
  background:#d84a4a!important;
  color:#fff!important;
  font-size:9px!important;
  line-height:15px!important;
  font-weight:900!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 四化都保持参考图的红底白字，仅类名保留以便后续扩展 */
.szw-mutagen-禄,
.szw-mutagen-权,
.szw-mutagen-科,
.szw-mutagen-忌{
  background:#d84a4a!important;
  color:#fff!important;
}

/* 没有四化也保留高度，保证各星位置整齐 */
.szw-star-mutagen-placeholder{
  display:block!important;
  width:15px!important;
  height:15px!important;
  margin-top:1px!important;
}

/* 四化加入后，流年/小限向下移，避免重叠 */
.szw-ref-ages{
  top:111px!important;
}

/* 给下半宫位稍微腾空间 */
.szw-ref-gods{
  bottom:8px!important;
}
.szw-ref-decade{
  bottom:36px!important;
}

/* 如果宫里星曜较多，优先保证主星和四化可见 */
.szw-star-units-major .szw-star-unit{
  min-width:29px!important;
}


/* =========================================================
   v10.0：宫位严格按参考图重排
   ========================================================= */

/* 宫位高度/比例：接近参考图的窄高矩形 */
.szw-grid{
  grid-template-rows:repeat(4,230px)!important;
}
.szw-center{
  height:460px!important;
}
.szw-palace-ref{
  position:relative!important;
  height:230px!important;
  padding:0!important;
  overflow:hidden!important;
  background:#fff!important;
}

/* 彻底关闭旧版宫内布局，避免重叠 */
.szw-ref-stars,
.szw-ref-ages,
.szw-ref-gods,
.szw-ref-right,
.szw-ref-decade,
.szw-stars,
.szw-gods,
.szw-ages,
.szw-right,
.szw-decade,
.szw-badges,
.szw-star-units{
  display:none!important;
}

/* ========== 顶部星曜：一颗星一列，星名竖着排 ========== */
.szw-ref-star-columns{
  position:absolute!important;
  left:7px!important;
  top:7px!important;
  right:34px!important;
  height:80px!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:4px!important;
  overflow:hidden!important;
}

.szw-vstar{
  display:flex!important;
  flex:0 0 auto!important;
  width:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  margin:0!important;
  padding:0!important;
  line-height:1!important;
}

.szw-vstar-name{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-height:35px!important;
  font-weight:900!important;
  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
}

.szw-star-char{
  display:block!important;
  width:20px!important;
  height:18px!important;
  font-size:17px!important;
  line-height:18px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 参考图颜色层级 */
.szw-vstar.tone-red .szw-vstar-name{color:#c52e2e!important}
.szw-vstar.tone-blue .szw-vstar-name{color:#176aa5!important}
.szw-vstar.tone-purple .szw-vstar-name{color:#8c3186!important}
.szw-vstar.tone-cyan .szw-vstar-name{color:#2a9a8b!important}
.szw-vstar.tone-black .szw-vstar-name{color:#222!important}

/* 庙旺平陷：一一对应在星曜下面 */
.szw-vstar-bright{
  display:block!important;
  height:12px!important;
  margin-top:0!important;
  color:#444!important;
  font-size:9px!important;
  line-height:12px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 四化：像参考图一样小红方块 */
.szw-vstar-mutagen{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:17px!important;
  min-width:17px!important;
  height:17px!important;
  margin-top:2px!important;
  padding:0!important;
  border-radius:1px!important;
  background:#d84b4b!important;
  color:#fff!important;
  font-size:10px!important;
  line-height:17px!important;
  font-weight:900!important;
  text-align:center!important;
}
.szw-vstar-mutagen-placeholder{
  display:block!important;
  width:17px!important;
  height:17px!important;
  margin-top:2px!important;
}

/* ========== 中间：流年、小限 ========== */
.szw-ref-age-lines{
  position:absolute!important;
  left:9px!important;
  top:94px!important;
  right:35px!important;
  color:#666!important;
  font-size:9px!important;
  line-height:1.45!important;
  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
}
.szw-ref-age-lines div{
  display:block!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.szw-ref-age-lines span{
  color:#666!important;
}

/* ========== 左下：三行神煞 ========== */
.szw-ref-bottom-left{
  position:absolute!important;
  left:8px!important;
  bottom:7px!important;
  width:56px!important;
  line-height:1.14!important;
}
.szw-ref-bottom-left > div{
  display:block!important;
  white-space:nowrap!important;
  font-size:11px!important;
}
.szw-ref-boshi{
  color:#2a9a8b!important;
  font-weight:800!important;
}
.szw-ref-jiang,
.szw-ref-sui{
  color:#333!important;
  font-weight:500!important;
}

/* ========== 中下：103~112 这种大限年龄 ========== */
.szw-ref-decade-age{
  position:absolute!important;
  left:50%!important;
  bottom:36px!important;
  transform:translateX(-50%)!important;
  color:#222!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:500!important;
  white-space:nowrap!important;
}

/* ========== 右下：绝 + 丙申 竖排 ========== */
.szw-ref-right-stack{
  position:absolute!important;
  right:5px!important;
  bottom:6px!important;
  width:31px!important;
  height:88px!important;
}

.szw-ref-stage-name{
  position:absolute!important;
  right:21px!important;
  top:2px!important;
  writing-mode:vertical-rl!important;
  text-orientation:upright!important;
  color:#555!important;
  font-size:10px!important;
  line-height:1!important;
  letter-spacing:0!important;
}

.szw-ref-ganzhi-stack{
  position:absolute!important;
  right:0!important;
  bottom:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:0!important;
}
.szw-ref-ganzhi-stack span:first-child{
  display:block!important;
  color:#222!important;
  font-size:18px!important;
  line-height:19px!important;
  font-weight:700!important;
}
.szw-ref-ganzhi-stack span:last-child{
  display:block!important;
  color:#222!important;
  font-size:28px!important;
  line-height:27px!important;
  font-weight:900!important;
}

/* ========== 宫名：和参考图一样放在大限年龄右下区域 ========== */
.szw-palace-ref .szw-palace-name{
  position:absolute!important;
  right:38px!important;
  bottom:8px!important;
  color:#c52e2e!important;
  font-size:16px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
}

/* 防止参考图式排版被旧样式覆盖 */
.szw-palace-ref .szw-star-unit,
.szw-palace-ref .szw-star-name,
.szw-palace-ref .szw-star-brightness,
.szw-palace-ref .szw-star-mutagen,
.szw-palace-ref .szw-star-mutagen-placeholder{
  display:none!important;
}

/* 手机上保持原宫位结构，横向滚动查看，绝不打乱 */
@media(max-width:700px){
  .szw-board-scroll{
    overflow-x:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .szw-board{
    margin-left:0!important;
  }
}


/* =========================================================
   v10.1：所有星曜最上一排横向排列 + 自动缩放
   ========================================================= */

/* 关闭v10竖排星曜 */
.szw-ref-star-columns,
.szw-vstar,
.szw-vstar-name,
.szw-vstar-bright,
.szw-vstar-mutagen,
.szw-vstar-mutagen-placeholder{
  display:none!important;
}

/* 顶部所有星曜一排 */
.szw-top-star-row{
  --szw-star-scale:1;
  position:absolute!important;
  left:7px!important;
  top:7px!important;
  right:34px!important;
  height:66px!important;

  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;

  gap:calc(4px * var(--szw-star-scale))!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}

/* 星曜很多时进一步缩小间距 */
.szw-top-star-row.is-tight{
  gap:1px!important;
}

/* 每颗星是一列，但星名本身横排；
   第一层星名，第二层旺陷，第三层四化 */
.szw-hstar{
  display:inline-flex!important;
  flex:0 0 auto!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-width:0!important;
  padding:0!important;
  margin:0!important;
  line-height:1!important;
}

/* 名称：颜色/大小区分主星、辅星、杂曜 */
.szw-hstar-name{
  display:block!important;
  white-space:nowrap!important;
  text-align:center!important;
  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-weight:800!important;
  line-height:1.05!important;
}

/* 主星最大 */
.szw-hstar-major .szw-hstar-name{
  font-size:calc(17px * var(--szw-star-scale))!important;
  font-weight:900!important;
}

/* 辅星稍小 */
.szw-hstar-minor .szw-hstar-name{
  font-size:calc(14px * var(--szw-star-scale))!important;
  font-weight:800!important;
}

/* 杂曜更小 */
.szw-hstar-adj .szw-hstar-name{
  font-size:calc(12px * var(--szw-star-scale))!important;
  font-weight:700!important;
}

/* 颜色层级 */
.szw-hstar.tone-red .szw-hstar-name{color:#c52e2e!important}
.szw-hstar.tone-blue .szw-hstar-name{color:#176aa5!important}
.szw-hstar.tone-purple .szw-hstar-name{color:#8c3186!important}
.szw-hstar.tone-cyan .szw-hstar-name{color:#2a9a8b!important}
.szw-hstar.tone-black .szw-hstar-name{color:#222!important}
.szw-hstar.tone-gray .szw-hstar-name{color:#555!important}

/* 庙旺平陷严格对应在各自星曜下面 */
.szw-hstar-bright{
  display:block!important;
  height:calc(12px * var(--szw-star-scale))!important;
  margin-top:1px!important;
  color:#444!important;
  font-size:calc(9px * var(--szw-star-scale))!important;
  line-height:calc(12px * var(--szw-star-scale))!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 四化再放在下面 */
.szw-hstar-mutagen{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:calc(17px * var(--szw-star-scale))!important;
  min-width:calc(17px * var(--szw-star-scale))!important;
  height:calc(17px * var(--szw-star-scale))!important;
  margin-top:1px!important;
  padding:0!important;
  border-radius:1px!important;
  background:#d84b4b!important;
  color:#fff!important;
  font-size:calc(10px * var(--szw-star-scale))!important;
  line-height:calc(17px * var(--szw-star-scale))!important;
  font-weight:900!important;
  text-align:center!important;
}

.szw-hstar-mutagen-placeholder{
  display:block!important;
  width:calc(17px * var(--szw-star-scale))!important;
  height:calc(17px * var(--szw-star-scale))!important;
  margin-top:1px!important;
}

/* 顶部一排占用变小后，流年/小限恢复到较靠上位置 */
.szw-ref-age-lines{
  top:84px!important;
}

/* 宫位仍按参考图保持固定 */
.szw-palace-ref{
  position:relative!important;
  overflow:hidden!important;
}


/* =========================================================
   v10.2：顶部一排星曜，单颗星曜文字竖排
   ========================================================= */

/* 顶部区域稍加高，给竖排星名留空间 */
.szw-top-star-row{
  height:78px!important;
  align-items:flex-start!important;
}

/* 每颗星仍然是一列，所有星列横向排成一排 */
.szw-hstar{
  width:calc(24px * var(--szw-star-scale))!important;
  min-width:calc(24px * var(--szw-star-scale))!important;
  max-width:calc(24px * var(--szw-star-scale))!important;
  align-items:center!important;
}

/* 星名内部改成真正的上下竖排 */
.szw-hstar-name{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  width:100%!important;
  min-height:calc(38px * var(--szw-star-scale))!important;
  white-space:normal!important;
  line-height:1!important;
}

.szw-hstar-char{
  display:block!important;
  width:100%!important;
  height:calc(18px * var(--szw-star-scale))!important;
  line-height:calc(18px * var(--szw-star-scale))!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 主星竖排字最大 */
.szw-hstar-major .szw-hstar-char{
  font-size:calc(17px * var(--szw-star-scale))!important;
  font-weight:900!important;
}

/* 辅星稍小 */
.szw-hstar-minor .szw-hstar-char{
  font-size:calc(14px * var(--szw-star-scale))!important;
  font-weight:800!important;
}

/* 杂曜最小 */
.szw-hstar-adj .szw-hstar-char{
  font-size:calc(12px * var(--szw-star-scale))!important;
  font-weight:700!important;
}

/* 庙旺平陷、四化继续紧跟该星下面 */
.szw-hstar-bright{
  margin-top:1px!important;
}

.szw-hstar-mutagen,
.szw-hstar-mutagen-placeholder{
  margin-top:1px!important;
}

/* 星名变竖排后，流年/小限稍下移，避免重叠 */
.szw-ref-age-lines{
  top:96px!important;
}

/* 星曜特别多时再进一步压紧列宽 */
.szw-top-star-row.is-tight .szw-hstar{
  width:calc(21px * var(--szw-star-scale))!important;
  min-width:calc(21px * var(--szw-star-scale))!important;
  max-width:calc(21px * var(--szw-star-scale))!important;
}



/* =========================================================
   v10.3：红色主星固定字号，不参与自动缩小
   ========================================================= */

/* 红色主星本身保持固定列宽，避免字体被压缩后挤变形 */
.szw-hstar-major.tone-red{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;
}

/* 红色主星文字始终固定为17px，不受自适应缩放变量影响 */
.szw-hstar-major.tone-red .szw-hstar-name{
  min-height:38px!important;
}

.szw-hstar-major.tone-red .szw-hstar-char{
  height:18px!important;
  line-height:18px!important;
  font-size:17px!important;
  font-weight:900!important;
}

/* 即使进入 tight 模式，红色主星仍然保持固定尺寸 */
.szw-top-star-row.is-tight .szw-hstar-major.tone-red{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex-basis:24px!important;
}

.szw-top-star-row.is-tight .szw-hstar-major.tone-red .szw-hstar-char{
  font-size:17px!important;
  height:18px!important;
  line-height:18px!important;
}

/* 星曜过多时，由其它主星、辅星、杂曜承担缩小 */
.szw-hstar-major:not(.tone-red) .szw-hstar-char{
  font-size:calc(17px * var(--szw-star-scale))!important;
}
.szw-hstar-minor .szw-hstar-char{
  font-size:calc(14px * var(--szw-star-scale))!important;
}
.szw-hstar-adj .szw-hstar-char{
  font-size:calc(12px * var(--szw-star-scale))!important;
}


/* =========================================================
   v10.4：十四主星严格识别
   ========================================================= */

/* 十四主星全部统一红色、固定字号，不参与自动缩小 */
.szw-hstar-major{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;
}

.szw-hstar-major .szw-hstar-name{
  min-height:38px!important;
  color:#c52e2e!important;
}

.szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
  height:18px!important;
  line-height:18px!important;
  font-weight:900!important;
  color:#c52e2e!important;
}

/* 紧凑模式也绝不压缩十四主星 */
.szw-top-star-row.is-tight .szw-hstar-major{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;
}
.szw-top-star-row.is-tight .szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
  height:18px!important;
  line-height:18px!important;
}

/* 非十四主星即便数据来源是 majorStars，也由JS降级成 minor，
   所以会继续参与自适应缩小。 */


/* =========================================================
   v10.5：庙 / 旺 / 得 / 利 / 平 / 陷 状态字放大
   ========================================================= */

/* 所有星曜的庙旺平陷整体加大 */
.szw-hstar-bright{
  height:14px!important;
  min-height:14px!important;
  margin-top:2px!important;
  font-size:11px!important;
  line-height:14px!important;
  font-weight:700!important;
  color:#444!important;
}

/* 十四主星下面的庙旺平陷再醒目一点 */
.szw-hstar-major .szw-hstar-bright{
  font-size:12px!important;
  line-height:15px!important;
  height:15px!important;
  min-height:15px!important;
  font-weight:800!important;
}

/* 紧凑模式也不把状态字压得过小 */
.szw-top-star-row.is-tight .szw-hstar-bright{
  font-size:10px!important;
  line-height:13px!important;
  height:13px!important;
  min-height:13px!important;
}

.szw-top-star-row.is-tight .szw-hstar-major .szw-hstar-bright{
  font-size:12px!important;
  line-height:15px!important;
  height:15px!important;
  min-height:15px!important;
}

/* 状态字变大后给顶部星曜区稍微多留一点高度 */
.szw-top-star-row{
  height:84px!important;
}

/* 流年 / 小限下移一点，避免与状态字、四化重叠 */
.szw-ref-age-lines{
  top:102px!important;
}


/* =========================================================
   v10.6：两字星曜上下边缘统一对齐
   ========================================================= */

/*
 * 所有星名区域使用同一个固定高度。
 * 两字星曜固定分成上下两格：
 * 第1个字统一贴齐顶部，第2个字统一贴齐底部。
 * 字号可以不同，但上下位置绝不再跟着字号变化。
 */
.szw-hstar-name{
  display:grid!important;
  grid-template-rows:18px 18px!important;
  align-items:center!important;
  justify-items:center!important;
  align-content:space-between!important;

  width:100%!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;

  margin:0!important;
  padding:0!important;
  line-height:1!important;
  overflow:visible!important;
}

/* 每一个字都占固定18px高的一格 */
.szw-hstar-char{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:100%!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;

  margin:0!important;
  padding:0!important;
  line-height:18px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

/* 第一个字固定在顶部格 */
.szw-hstar-char:first-child{
  align-self:start!important;
}

/* 第二个字固定在底部格 */
.szw-hstar-char:nth-child(2){
  align-self:end!important;
}

/* 十四主星仍保持17px固定字号，但不再改变两格高度 */
.szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  line-height:18px!important;
}

/* 辅星只改变字号，不改变上下两格的位置 */
.szw-hstar-minor .szw-hstar-char{
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  line-height:18px!important;
}

/* 杂曜同样只改变字号 */
.szw-hstar-adj .szw-hstar-char{
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  line-height:18px!important;
}

/* tight 模式只允许字号变小，绝不改变两字的上下位置 */
.szw-top-star-row.is-tight .szw-hstar-name{
  grid-template-rows:18px 18px!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
}

.szw-top-star-row.is-tight .szw-hstar-char{
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  line-height:18px!important;
}

/* 庙旺平陷从统一的星名底边开始，所有列保持同一水平线 */
.szw-hstar-bright{
  margin-top:2px!important;
}

/* 避免旧版红色主星 min-height 覆盖统一高度 */
.szw-hstar-major.tone-red .szw-hstar-name,
.szw-hstar-major .szw-hstar-name{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
}

/* 三字及以上星曜：继续留在同一列，额外字符缩小并紧凑显示 */
.szw-hstar-name .szw-hstar-char:nth-child(n+3){
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}


/* =========================================================
   v10.7：星曜按参考图使用统一三条基线
   第一行：星名第1字
   第二行：星名第2字
   第三行：庙旺平陷
   ========================================================= */

/* 整个星曜区像一个横向小表格 */
.szw-top-star-row{
  --szw-star-scale:1;
  position:absolute!important;
  left:7px!important;
  top:6px!important;
  right:34px!important;
  height:82px!important;

  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;

  gap:2px!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}

/* 每颗星都是同样结构的一列 */
.szw-hstar{
  display:grid!important;
  grid-template-rows:38px 15px 18px!important;
  align-items:start!important;
  justify-items:center!important;

  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;

  margin:0!important;
  padding:0!important;
  line-height:1!important;
  box-sizing:border-box!important;
}

/* 两字星名固定成上下两格，所有列共用相同高度 */
.szw-hstar-name{
  grid-row:1!important;

  display:grid!important;
  grid-template-rows:18px 18px!important;
  align-items:center!important;
  justify-items:center!important;

  width:24px!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;

  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}

/* 第一个字、第二个字都使用固定格子 */
.szw-hstar-char{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:24px!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;

  margin:0!important;
  padding:0!important;
  line-height:18px!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

/* 第一字统一顶边 */
.szw-hstar-char:first-child{
  grid-row:1!important;
}

/* 第二字统一底边 */
.szw-hstar-char:nth-child(2){
  grid-row:2!important;
}

/* 超过2字的星曜不挤乱这一排，额外字符隐藏 */
.szw-hstar-char:nth-child(n+3){
  display:none!important;
}

/* 庙旺平陷统一在第三条基线上 */
.szw-hstar-bright{
  grid-row:2!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:24px!important;
  height:15px!important;
  min-height:15px!important;
  max-height:15px!important;

  margin:0!important;
  padding:0!important;

  color:#444!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:15px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 十四主星仍保持17px固定字号 */
.szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
  font-weight:900!important;
  height:18px!important;
  line-height:18px!important;
}

/* 辅星字号稍小，但位置完全一样 */
.szw-hstar-minor .szw-hstar-char{
  font-size:14px!important;
  font-weight:800!important;
  height:18px!important;
  line-height:18px!important;
}

/* 杂曜更小，但仍在相同两条基线上 */
.szw-hstar-adj .szw-hstar-char{
  font-size:12px!important;
  font-weight:700!important;
  height:18px!important;
  line-height:18px!important;
}

/* 主星状态字略大 */
.szw-hstar-major .szw-hstar-bright{
  font-size:12px!important;
  font-weight:800!important;
}

/* 四化统一在第四条位置，不影响前三条基线 */
.szw-hstar-mutagen,
.szw-hstar-mutagen-placeholder{
  grid-row:3!important;
  align-self:start!important;
  margin-top:1px!important;
}

.szw-hstar-mutagen{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:17px!important;
  min-width:17px!important;
  height:17px!important;
  padding:0!important;
  border-radius:1px!important;
  background:#d84b4b!important;
  color:#fff!important;
  font-size:10px!important;
  line-height:17px!important;
  font-weight:900!important;
}

.szw-hstar-mutagen-placeholder{
  display:block!important;
  width:17px!important;
  min-width:17px!important;
  height:17px!important;
}

/* 紧凑模式仅减少列宽和字号，三条基线绝不改变 */
.szw-top-star-row.is-tight{
  gap:1px!important;
}

.szw-top-star-row.is-tight .szw-hstar{
  width:21px!important;
  min-width:21px!important;
  max-width:21px!important;
  flex-basis:21px!important;
}

.szw-top-star-row.is-tight .szw-hstar-name,
.szw-top-star-row.is-tight .szw-hstar-char,
.szw-top-star-row.is-tight .szw-hstar-bright{
  width:21px!important;
}

/* 红色十四主星在紧凑模式下仍保持17px */
.szw-top-star-row.is-tight .szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
}

/* 流年小限从统一星曜区域下方开始 */
.szw-ref-age-lines{
  top:98px!important;
}


/* =========================================================
   v10.8：星曜数量自适应列宽/间距，避免后排星曜被裁掉
   ========================================================= */

/* 顶部星曜区域尽量吃满整个宫位宽度。
   右侧干支在下半区，不需要顶部预留34px。 */
.szw-top-star-row{
  --szw-auto-gap:3px;
  --szw-auto-other-col:24px;
  --szw-auto-minor-font:14px;
  --szw-auto-adj-font:12px;

  left:6px!important;
  right:6px!important;
  gap:var(--szw-auto-gap)!important;

  /* 保留真实宽度用于JS判断，但不再无脑裁掉最后几颗星 */
  overflow:visible!important;
}

/* 十四主星固定，不参与自适应缩小 */
.szw-hstar-major{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;
}

/* 非主星列宽由JS根据每宫星曜数量自动计算 */
.szw-hstar-minor,
.szw-hstar-adj{
  width:var(--szw-auto-other-col)!important;
  min-width:var(--szw-auto-other-col)!important;
  max-width:var(--szw-auto-other-col)!important;
  flex:0 0 var(--szw-auto-other-col)!important;
}

/* 星名、字格、庙旺状态跟随列宽居中 */
.szw-hstar-minor .szw-hstar-name,
.szw-hstar-minor .szw-hstar-char,
.szw-hstar-minor .szw-hstar-bright,
.szw-hstar-adj .szw-hstar-name,
.szw-hstar-adj .szw-hstar-char,
.szw-hstar-adj .szw-hstar-bright{
  width:var(--szw-auto-other-col)!important;
}

/* 辅星/杂曜字号联动列宽自动调整 */
.szw-hstar-minor .szw-hstar-char{
  font-size:var(--szw-auto-minor-font)!important;
}
.szw-hstar-adj .szw-hstar-char{
  font-size:var(--szw-auto-adj-font)!important;
}

/* 状态字也随极端紧凑情况略缩小，保持整齐 */
.szw-top-star-row.is-tight .szw-hstar-minor .szw-hstar-bright,
.szw-top-star-row.is-tight .szw-hstar-adj .szw-hstar-bright{
  font-size:10px!important;
}

.szw-top-star-row.is-ultra-tight .szw-hstar-minor .szw-hstar-bright,
.szw-top-star-row.is-ultra-tight .szw-hstar-adj .szw-hstar-bright{
  font-size:9px!important;
}

/* 覆盖v10.7里tight模式固定21px的旧规则 */
.szw-top-star-row.is-tight .szw-hstar-minor,
.szw-top-star-row.is-tight .szw-hstar-adj,
.szw-top-star-row.is-ultra-tight .szw-hstar-minor,
.szw-top-star-row.is-ultra-tight .szw-hstar-adj{
  width:var(--szw-auto-other-col)!important;
  min-width:var(--szw-auto-other-col)!important;
  max-width:var(--szw-auto-other-col)!important;
  flex-basis:var(--szw-auto-other-col)!important;
}

.szw-top-star-row.is-tight .szw-hstar-minor .szw-hstar-name,
.szw-top-star-row.is-tight .szw-hstar-minor .szw-hstar-char,
.szw-top-star-row.is-tight .szw-hstar-minor .szw-hstar-bright,
.szw-top-star-row.is-tight .szw-hstar-adj .szw-hstar-name,
.szw-top-star-row.is-tight .szw-hstar-adj .szw-hstar-char,
.szw-top-star-row.is-tight .szw-hstar-adj .szw-hstar-bright,
.szw-top-star-row.is-ultra-tight .szw-hstar-minor .szw-hstar-name,
.szw-top-star-row.is-ultra-tight .szw-hstar-minor .szw-hstar-char,
.szw-top-star-row.is-ultra-tight .szw-hstar-minor .szw-hstar-bright,
.szw-top-star-row.is-ultra-tight .szw-hstar-adj .szw-hstar-name,
.szw-top-star-row.is-ultra-tight .szw-hstar-adj .szw-hstar-char,
.szw-top-star-row.is-ultra-tight .szw-hstar-adj .szw-hstar-bright{
  width:var(--szw-auto-other-col)!important;
}

/* 防止顶部星曜溢出到相邻宫位：宫位自身仍裁切，
   但JS会先把内部所有星曜压进可用宽度。 */
.szw-palace-ref{
  overflow:hidden!important;
}


/* =========================================================
   v10.9：更多辅星/乙级星的庙旺状态
   ========================================================= */

/* 有亮度的辅星状态字保持清楚，不因自适应缩得过小 */
.szw-hstar-minor .szw-hstar-bright:not(:empty),
.szw-hstar-adj .szw-hstar-bright:not(:empty){
  font-weight:700!important;
  color:#444!important;
}

/* 即使最紧凑模式，有实际庙旺值时也至少保持9px */
.szw-top-star-row.is-ultra-tight .szw-hstar-bright:not(:empty){
  font-size:9px!important;
  line-height:15px!important;
}


/* =========================================================
   v10.11：真太阳时校准
   ========================================================= */
.szw-solar-panel{
  grid-column:1/-1!important;
  display:grid!important;
  grid-template-columns:auto 1.35fr .8fr auto minmax(210px,1.5fr)!important;
  align-items:end!important;
  gap:7px!important;
  padding:6px 7px!important;
  border:1px solid #d7d7d7!important;
  background:#fff!important;
}

.szw-solar-enable-wrap,
.szw-dst-wrap{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  min-height:28px!important;
  white-space:nowrap!important;
  cursor:pointer!important;
}

.szw-solar-enable-wrap input,
.szw-dst-wrap input{
  width:14px!important;
  height:14px!important;
  margin:0!important;
  accent-color:#c92d2d!important;
}

.szw-solar-enable-wrap b{
  font-size:10px!important;
  color:#222!important;
}

.szw-dst-wrap span{
  font-size:9px!important;
  color:#555!important;
}

.szw-solar-mini-field{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  min-width:0!important;
}

.szw-solar-mini-field > span:first-child{
  font-size:8px!important;
  font-weight:700!important;
  color:#555!important;
}

.szw-solar-input-wrap{
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  height:28px!important;
}

.szw-solar-input-wrap input{
  width:100%!important;
  min-width:0!important;
  height:28px!important;
  padding:0 6px!important;
  border:1px solid #aaa!important;
  background:#fff!important;
}

.szw-solar-input-wrap em{
  font-style:normal!important;
  font-size:9px!important;
  color:#666!important;
  white-space:nowrap!important;
}

.szw-solar-preview{
  min-height:28px!important;
  display:flex!important;
  align-items:center!important;
  padding:0 7px!important;
  border:1px solid #ddd!important;
  background:#f7f7f7!important;
  color:#777!important;
  font-size:9px!important;
  font-weight:600!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.szw-solar-preview.is-active{
  border-color:#d7b1b1!important;
  background:#fff8f8!important;
  color:#b32626!important;
}

.szw-solar-preview.is-error{
  border-color:#e7b6b6!important;
  background:#fff0f0!important;
  color:#a00!important;
}

.szw-solar-panel:not(.is-enabled) .szw-longitude,
.szw-solar-panel:not(.is-enabled) .szw-timezone,
.szw-solar-panel:not(.is-enabled) .szw-dst{
  opacity:.58!important;
}

@media(max-width:700px){
  .szw-solar-panel{
    grid-template-columns:1fr 1fr!important;
  }
  .szw-solar-preview{
    grid-column:1/-1!important;
  }
}


/* =========================================================
   v10.12：中国地址查询替代手工经纬度
   ========================================================= */

.szw-solar-panel{
  grid-template-columns:auto minmax(360px,1.9fr) auto minmax(250px,1.35fr)!important;
  align-items:end!important;
}

/* 隐藏经纬度/时区由程序自动写入 */
.szw-solar-panel > input[type="hidden"]{
  display:none!important;
}

.szw-address-field{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  min-width:0!important;
}

.szw-address-field > span:first-child{
  color:#555!important;
  font-size:8px!important;
  font-weight:700!important;
}

.szw-address-input-wrap{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 54px!important;
  gap:4px!important;
  height:30px!important;
}

.szw-birth-address{
  width:100%!important;
  min-width:0!important;
  height:30px!important;
  padding:0 8px!important;
  margin:0!important;
  border:1px solid #aaa!important;
  border-radius:3px!important;
  background:#fff!important;
  color:#222!important;
  font-size:11px!important;
  line-height:28px!important;
}

.szw-address-search{
  height:30px!important;
  min-height:30px!important;
  margin:0!important;
  padding:0 7px!important;
  border:1px solid #c92d2d!important;
  border-radius:3px!important;
  background:#cf3030!important;
  color:#fff!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:28px!important;
  cursor:pointer!important;
}

.szw-address-search:hover{
  background:#b92727!important;
}

.szw-address-search:disabled{
  opacity:.6!important;
  cursor:wait!important;
}

.szw-address-status{
  min-height:30px!important;
  display:flex!important;
  align-items:center!important;
  min-width:0!important;
  padding:0 8px!important;
  border:1px solid #ddd!important;
  background:#f7f7f7!important;
  color:#777!important;
  font-size:9px!important;
  font-weight:600!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.szw-address-status.is-success{
  border-color:#b8d7c4!important;
  background:#f2fbf5!important;
  color:#267444!important;
}
.szw-address-status.is-loading{
  border-color:#b9cce5!important;
  background:#f4f8fd!important;
  color:#376a9b!important;
}
.szw-address-status.is-warning{
  border-color:#ead7a8!important;
  background:#fffaf0!important;
  color:#8a6715!important;
}
.szw-address-status.is-error{
  border-color:#e7b6b6!important;
  background:#fff0f0!important;
  color:#a00!important;
}

/* 真太阳时结果占整行，显示地址 + 校准后时间 */
.szw-solar-preview{
  grid-column:1/-1!important;
  min-height:28px!important;
}

/* 原v10.11经纬度输入样式不再参与布局 */
.szw-solar-mini-field,
.szw-solar-input-wrap{
  display:none!important;
}

@media(max-width:700px){
  .szw-solar-panel{
    grid-template-columns:1fr!important;
  }
  .szw-address-field,
  .szw-address-status,
  .szw-solar-preview{
    grid-column:1/-1!important;
  }
}


/* =========================================================
   v10.13：省 / 市 / 县区 三级联动出生地点
   ========================================================= */

.szw-solar-cascade-panel{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:6px!important;
  align-items:center!important;
}

.szw-solar-mode-field{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:30px!important;
}

.szw-solar-mode-field > span{
  width:68px!important;
  flex:0 0 68px!important;
  color:#222!important;
  font-size:11px!important;
  font-weight:600!important;
}

.szw-solar-mode{
  width:92px!important;
  height:30px!important;
  padding:0 7px!important;
  border:1px solid #888!important;
  border-radius:2px!important;
  background:#fff!important;
  color:#111!important;
  font-size:11px!important;
}

.szw-solar-mode-tip{
  color:#777!important;
  font-size:10px!important;
  line-height:1.4!important;
  white-space:nowrap!important;
}

.szw-birthplace-row{
  display:grid!important;
  grid-template-columns:68px 138px 138px 138px auto!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
}

.szw-birthplace-label{
  width:68px!important;
  color:#222!important;
  font-size:11px!important;
  font-weight:600!important;
  white-space:nowrap!important;
}

.szw-province,
.szw-city,
.szw-district{
  width:100%!important;
  height:30px!important;
  min-width:0!important;
  margin:0!important;
  padding:0 7px!important;
  border:1px solid #888!important;
  border-radius:2px!important;
  background:#fff!important;
  color:#111!important;
  font-size:11px!important;
  line-height:28px!important;
}

.szw-province:disabled,
.szw-city:disabled,
.szw-district:disabled{
  background:#f5f5f5!important;
  color:#999!important;
  cursor:not-allowed!important;
}

.szw-solar-cascade-panel .szw-dst-wrap{
  min-height:30px!important;
  margin:0!important;
  padding-left:2px!important;
}

.szw-solar-cascade-panel .szw-address-status,
.szw-solar-cascade-panel .szw-solar-preview{
  grid-column:1/-1!important;
}

/* 旧文本地址控件彻底隐藏 */
.szw-address-field,
.szw-address-input-wrap,
.szw-birth-address,
.szw-address-search{
  display:none!important;
}

@media(max-width:700px){
  .szw-birthplace-row{
    grid-template-columns:1fr!important;
    gap:5px!important;
  }

  .szw-birthplace-label{
    width:auto!important;
  }

  .szw-solar-mode-field{
    flex-wrap:wrap!important;
    gap:5px 7px!important;
  }

  .szw-solar-mode-field > span{
    width:auto!important;
    flex:0 0 auto!important;
  }

  .szw-solar-mode-tip{
    width:100%!important;
    margin-left:0!important;
    white-space:normal!important;
  }

  .szw-province,
  .szw-city,
  .szw-district{
    width:100%!important;
  }
}


/* =========================================================
   v10.14：中国大陆历史夏令时自动判断
   ========================================================= */
.szw-dst-auto{
  display:flex!important;
  align-items:center!important;
  min-height:30px!important;
  gap:3px!important;
  color:#555!important;
  font-size:9px!important;
  white-space:nowrap!important;
}

.szw-dst-status{
  color:#555!important;
  font-weight:700!important;
}

.szw-dst-status.is-active{
  color:#c42c2c!important;
}


/* =========================================================
   v10.15：开始排盘按钮文字真正水平/垂直居中
   ========================================================= */

.szw-submit{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;

  margin-top:16px!important;
  padding:0!important;

  border:0!important;
  border-radius:6px!important;
  background:#cd3030!important;
  color:#fff!important;

  font-size:16px!important;
  font-weight:500!important;
  line-height:1!important;
  text-align:center!important;

  box-sizing:border-box!important;
  cursor:pointer!important;
}

/* 和性别按钮保持完全同一水平基线 */
.szw-gender,
.szw-gender label,
.szw-gender b{
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  box-sizing:border-box!important;
}

.szw-gender b{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}

/* 移动端按钮同样使用真正居中，而不是line-height模拟 */
@media(max-width:700px){
  .szw-submit{
    margin-top:0!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    line-height:1!important;
  }
}


/* =========================================================
   v10.16：三方四正虚线
   ========================================================= */

.szw-grid{
  position:relative!important;
}

/* SVG覆盖整张十二宫区域，但绝不拦截点击 */
.szw-sanfang-overlay{
  position:absolute!important;
  left:0!important;
  top:0!important;
  width:100%!important;
  height:100%!important;
  z-index:20!important;
  pointer-events:none!important;
  overflow:visible!important;
}

/* 三方四正统一使用参考图式紫红虚线 */
.szw-sanfang-line{
  fill:none!important;
  stroke:#b04b9f!important;
  stroke-width:1.35!important;
  stroke-dasharray:6 5!important;
  stroke-linecap:round!important;
  opacity:.72!important;
  vector-effect:non-scaling-stroke!important;
}

/* 对宫线稍微更明显一点 */
.szw-sanfang-line.is-opposite{
  stroke-width:1.5!important;
  opacity:.78!important;
}

/* 宫位仍然可以正常点击 */
.szw-palace-ref{
  cursor:pointer!important;
}

/* 只做非常轻的提示，不改变原本排版/文字颜色 */
.szw-palace-ref.is-sanfang-origin{
  box-shadow:inset 0 0 0 1px rgba(176,75,159,.42)!important;
}

.szw-palace-ref.is-sanfang-related{
  box-shadow:inset 0 0 0 1px rgba(176,75,159,.18)!important;
}


/* =========================================================
   v10.17：三方四正虚线参考图样式
   ========================================================= */

/* 参考图是极淡的灰色细虚线，而不是紫色粗线 */
.szw-sanfang-line{
  fill:none!important;
  stroke:#b9b9b9!important;
  stroke-width:.85!important;
  stroke-dasharray:5 4!important;
  stroke-linecap:butt!important;
  opacity:.62!important;
  vector-effect:non-scaling-stroke!important;
}

/* 对宫也保持同样轻，不额外加粗太多 */
.szw-sanfang-line.is-opposite{
  stroke:#b5b5b5!important;
  stroke-width:.95!important;
  stroke-dasharray:5 4!important;
  opacity:.68!important;
}

/* 取消上一版宫位紫色描边，参考图本身没有这种高亮框 */
.szw-palace-ref.is-sanfang-origin,
.szw-palace-ref.is-sanfang-related{
  box-shadow:none!important;
}

/* 虚线覆盖层保持轻量，不影响任何操作 */
.szw-sanfang-overlay{
  pointer-events:none!important;
}


/* =========================================================
   v10.18：三方四正虚线颜色加深
   ========================================================= */
.szw-sanfang-line{
  stroke:#8f8f8f!important;
  stroke-width:.95!important;
  stroke-dasharray:5 4!important;
  stroke-linecap:butt!important;
  opacity:.82!important;
}

.szw-sanfang-line.is-opposite{
  stroke:#858585!important;
  stroke-width:1.05!important;
  stroke-dasharray:5 4!important;
  opacity:.88!important;
}


/* =========================================================
   v10.19：中宫资料居中 + 字体放大
   ========================================================= */

/* 中宫资料整体收窄并居中 */
.szw-center-profile{
  width:86%!important;
  max-width:520px!important;
  margin:0 auto!important;
  padding:0!important;
  box-sizing:border-box!important;
}

/* 每一行保持左右两组，但整体向中间收拢 */
.szw-profile-row{
  display:grid!important;
  grid-template-columns:58px minmax(110px,1fr) 72px minmax(110px,1fr)!important;
  align-items:center!important;

  width:100%!important;
  min-height:34px!important;
  margin:0 auto!important;
  padding:0 8px!important;

  border-bottom:1px solid #ececec!important;
  box-sizing:border-box!important;
}

/* 标签：姓名、公历、农历、钟表时间等 */
.szw-profile-row > span:nth-child(1),
.szw-profile-row > span:nth-child(3){
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  color:#555!important;
  font-size:11px!important;
  line-height:1.2!important;
  font-weight:500!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 数值：匿名、日期、17:00、男、文曲、火星等 */
.szw-profile-row > b:nth-child(2),
.szw-profile-row > b:nth-child(4),
.szw-profile-row > strong:nth-child(2),
.szw-profile-row > strong:nth-child(4),
.szw-profile-row > span:nth-child(2),
.szw-profile-row > span:nth-child(4){
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  color:#111!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:700!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 如果profile实际结构是div键值对，也一起兼容 */
.szw-center-profile .szw-profile-label{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#555!important;
  font-size:11px!important;
  font-weight:500!important;
  text-align:center!important;
}

.szw-center-profile .szw-profile-value{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:#111!important;
  font-size:13px!important;
  font-weight:700!important;
  text-align:center!important;
}

/* 中宫所有直接键值文本略放大，避免旧样式覆盖 */
.szw-center-profile{
  font-size:12px!important;
  line-height:1.35!important;
}

/* 资料中的强调值统一居中 */
.szw-center-profile b,
.szw-center-profile strong{
  text-align:center!important;
}

/* 四柱区域保持原布局，不受资料行居中影响 */
.szw-four-pillars,
.szw-pillars{
  width:100%!important;
}

/* 小屏幕下适当压缩，但仍保持居中 */
@media(max-width:700px){
  .szw-center-profile{
    width:94%!important;
  }

  .szw-profile-row{
    grid-template-columns:48px minmax(82px,1fr) 58px minmax(82px,1fr)!important;
    min-height:30px!important;
    padding:0 4px!important;
  }

  .szw-profile-row > span:nth-child(1),
  .szw-profile-row > span:nth-child(3){
    font-size:10px!important;
  }

  .szw-profile-row > b:nth-child(2),
  .szw-profile-row > b:nth-child(4),
  .szw-profile-row > strong:nth-child(2),
  .szw-profile-row > strong:nth-child(4),
  .szw-profile-row > span:nth-child(2),
  .szw-profile-row > span:nth-child(4){
    font-size:12px!important;
  }
}


/* =========================================================
   v10.21：阳历 / 阴历日期类型
   ========================================================= */

.szw-date-type-row{
  grid-column:1/-1!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;

  min-height:31px!important;
  padding:3px 7px!important;
  border:1px solid #ddd!important;
  background:#fff!important;
  box-sizing:border-box!important;
}

.szw-date-type-title{
  color:#222!important;
  font-size:10px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}

.szw-date-type-option{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  margin:0!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}

.szw-date-type-option input{
  width:14px!important;
  height:14px!important;
  margin:0!important;
  accent-color:#cf3030!important;
}

.szw-date-type-option b{
  color:#222!important;
  font-size:11px!important;
  font-weight:700!important;
}

.szw-date-type-option input:checked + b{
  color:#cf3030!important;
}

.szw-leap-month-wrap{
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  margin:0!important;
  padding-left:6px!important;
  border-left:1px solid #ddd!important;
  white-space:nowrap!important;
}

.szw-leap-month-wrap[hidden]{
  display:none!important;
}

.szw-leap-month-wrap input{
  width:14px!important;
  height:14px!important;
  margin:0!important;
  accent-color:#cf3030!important;
}

.szw-leap-month-wrap span{
  color:#b32828!important;
  font-size:10px!important;
  font-weight:700!important;
}

.szw-date-type-tip{
  color:#777!important;
  font-size:9px!important;
  white-space:nowrap!important;
}

/* 阴历模式使用文本框，但尺寸继续和原日期框一致 */
.szw-date-field .szw-date[type="text"]{
  width:100%!important;
  height:34px!important;
  min-height:34px!important;
  padding:0 9px!important;
  border:1px solid #aaa!important;
  border-radius:4px!important;
  background:#fff!important;
  color:#222!important;
  font-size:15px!important;
  line-height:32px!important;
  box-sizing:border-box!important;
}

@media(max-width:700px){
  .szw-date-type-row{
    flex-wrap:wrap!important;
    gap:7px 10px!important;
  }

  .szw-date-type-tip{
    width:100%!important;
  }
}


/* =========================================================
   v10.22：阴历年月日下拉选择器
   ========================================================= */

.szw-lunar-picker{
  display:grid!important;
  grid-template-columns:1.15fr .9fr .9fr!important;
  gap:4px!important;
  width:100%!important;
  height:34px!important;
}

.szw-lunar-picker[hidden]{
  display:none!important;
}

.szw-lunar-year,
.szw-lunar-month,
.szw-lunar-day{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  margin:0!important;
  padding:0 6px!important;

  border:1px solid #aaa!important;
  border-radius:4px!important;
  background:#fff!important;
  color:#222!important;

  font-size:12px!important;
  line-height:32px!important;
  box-sizing:border-box!important;
}

/* 阴历模式的隐藏原始字段不参与布局 */
.szw-date-field .szw-date[type="hidden"]{
  display:none!important;
}

/* 阴历年月日三框整体和原阳历日期框保持同样高度 */
.szw-date-field{
  min-width:0!important;
}

@media(max-width:700px){
  .szw-lunar-picker{
    grid-template-columns:1.2fr .9fr .9fr!important;
    gap:3px!important;
  }

  .szw-lunar-year,
  .szw-lunar-month,
  .szw-lunar-day{
    font-size:11px!important;
    padding:0 4px!important;
  }
}


/* =========================================================
   v10.23：阳历也使用 年 / 月 / 日 下拉框
   ========================================================= */

.szw-solar-picker{
  display:grid!important;
  grid-template-columns:1.15fr .9fr .9fr!important;
  gap:4px!important;
  width:100%!important;
  height:34px!important;
}

.szw-solar-picker[hidden]{
  display:none!important;
}

.szw-solar-year,
.szw-solar-month,
.szw-solar-day{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  margin:0!important;
  padding:0 6px!important;

  border:1px solid #aaa!important;
  border-radius:4px!important;
  background:#fff!important;
  color:#222!important;

  font-size:12px!important;
  line-height:32px!important;
  box-sizing:border-box!important;
}

/* 阳历/阴历下拉框使用完全一致的尺寸 */
.szw-solar-picker,
.szw-lunar-picker{
  grid-template-columns:1.15fr .9fr .9fr!important;
}

/* 原始日期值只供程序使用 */
.szw-date-field .szw-date[type="hidden"]{
  display:none!important;
}

@media(max-width:700px){
  .szw-solar-picker{
    grid-template-columns:1.2fr .9fr .9fr!important;
    gap:3px!important;
  }

  .szw-solar-year,
  .szw-solar-month,
  .szw-solar-day{
    font-size:11px!important;
    padding:0 4px!important;
  }
}


/* =========================================================
   v10.25：飞星 / 三合 / 四化 三模式
   ========================================================= */

/* 参考图式三段按钮 */
.szw-modes{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:0!important;
  padding:8px 8px 3px!important;
  border-top:1px solid #aaa!important;
  background:#ededed!important;
}

.szw-modes button{
  min-width:64px!important;
  height:31px!important;
  margin:0!important;
  padding:0 12px!important;

  border:1px solid #777!important;
  border-right:0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#444!important;

  font-size:15px!important;
  line-height:29px!important;
  font-weight:800!important;
  text-align:center!important;
  cursor:pointer!important;
}

.szw-modes button:first-child{
  border-radius:6px 0 0 6px!important;
}

.szw-modes button:last-child{
  border-right:1px solid #777!important;
  border-radius:0 6px 6px 0!important;
}

.szw-modes button.active{
  background:#655da2!important;
  border-color:#655da2!important;
  color:#fff!important;
}

.szw-mode-status{
  min-height:25px!important;
  padding:3px 8px 7px!important;
  background:#ededed!important;
  color:#666!important;
  font-size:9px!important;
  line-height:1.35!important;
  text-align:center!important;
}

/* ---------- 四化模式 ---------- */

.szw-hstar.is-fourhua-target{
  position:relative!important;
  z-index:24!important;
  border-radius:3px!important;
  background:rgba(255,244,222,.76)!important;
  box-shadow:0 0 0 1px rgba(205,48,48,.22)!important;
}

.szw-hstar.is-fourhua-target .szw-hstar-mutagen{
  transform:scale(1.12)!important;
  transform-origin:center!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.9)!important;
}

.szw-palace.is-fourhua-palace{
  background-image:linear-gradient(
    rgba(255,249,239,.34),
    rgba(255,249,239,.34)
  )!important;
}

/* ---------- 飞星模式 ---------- */

.szw-palace.is-fly-origin{
  box-shadow:inset 0 0 0 1.4px rgba(101,93,162,.64)!important;
}

.szw-palace.is-fly-target-palace{
  background-image:linear-gradient(
    rgba(248,247,255,.38),
    rgba(248,247,255,.38)
  )!important;
}

.szw-hstar.is-fly-target{
  position:relative!important;
  z-index:25!important;
  border-radius:3px!important;
  box-shadow:0 0 0 1px rgba(100,92,162,.28)!important;
}

/* 飞化小标签直接贴在对应星曜上 */
.szw-hstar.is-fly-target::after{
  content:attr(data-fly-mutagen);
  position:absolute!important;
  right:-3px!important;
  top:-5px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:14px!important;
  height:14px!important;
  border-radius:50%!important;

  color:#fff!important;
  font-size:9px!important;
  line-height:14px!important;
  font-weight:900!important;

  background:#655da2!important;
  box-shadow:0 0 0 1px #fff!important;
}

/* 飞星连线 */
.szw-fly-line{
  fill:none!important;
  stroke-width:1.15!important;
  stroke-dasharray:5 4!important;
  stroke-linecap:round!important;
  opacity:.84!important;
  pointer-events:none!important;
  vector-effect:non-scaling-stroke!important;
}

.szw-fly-line.szw-fly-lu{
  stroke:#23966b!important;
}

.szw-fly-line.szw-fly-quan{
  stroke:#3475bf!important;
}

.szw-fly-line.szw-fly-ke{
  stroke:#7656aa!important;
}

.szw-fly-line.szw-fly-ji{
  stroke:#cc3d3d!important;
}

/* 四化不同属性的飞星标签 */
.szw-hstar.is-fly-target[data-fly-mutagen="禄"]::after{
  background:#23966b!important;
}
.szw-hstar.is-fly-target[data-fly-mutagen="权"]::after{
  background:#3475bf!important;
}
.szw-hstar.is-fly-target[data-fly-mutagen="科"]::after{
  background:#7656aa!important;
}
.szw-hstar.is-fly-target[data-fly-mutagen="忌"]::after{
  background:#cc3d3d!important;
}

@media(max-width:700px){
  .szw-modes button{
    min-width:58px!important;
    height:30px!important;
    padding:0 9px!important;
    font-size:14px!important;
  }
}


/* =========================================================
   v10.26：飞星模式去掉小星/杂曜
   参考文墨天机飞星界面：只保留主星 + 主要辅星
   ========================================================= */

/* 飞星模式隐藏 adjectiveStars 杂曜/小星 */
.szw-mode-fly .szw-hstar-adj{
  display:none!important;
}

/* 小星隐藏后，主星和辅星重新自然排开 */
.szw-mode-fly .szw-top-star-row{
  justify-content:flex-start!important;
  gap:4px!important;
}

/* 飞星模式主星保持醒目，不缩小 */
.szw-mode-fly .szw-hstar-major{
  width:24px!important;
  min-width:24px!important;
  max-width:24px!important;
  flex:0 0 24px!important;
}

.szw-mode-fly .szw-hstar-major .szw-hstar-char{
  font-size:17px!important;
  font-weight:900!important;
}

/* 主要辅星在飞星模式稍微放大，接近参考图 */
.szw-mode-fly .szw-hstar-minor{
  width:22px!important;
  min-width:22px!important;
  max-width:22px!important;
  flex:0 0 22px!important;
}

.szw-mode-fly .szw-hstar-minor .szw-hstar-char{
  font-size:14px!important;
  font-weight:800!important;
}

/* 庙旺平陷继续保留 */
.szw-mode-fly .szw-hstar-bright{
  display:flex!important;
}

/* 本命四化 / 飞化标记继续保留 */
.szw-mode-fly .szw-hstar-mutagen,
.szw-mode-fly .szw-hstar-mutagen-placeholder{
  display:flex!important;
}

/* 离开飞星模式后恢复原来的小星显示 */
.szw-mode-sanfang .szw-hstar-adj,
.szw-mode-sihua .szw-hstar-adj{
  display:grid!important;
}

/* 三合 / 四化仍使用原自适应列宽 */
.szw-mode-sanfang .szw-top-star-row,
.szw-mode-sihua .szw-top-star-row{
  gap:var(--szw-auto-gap)!important;
}


/* =========================================================
   v10.27：底部“复制命盘摘要 / 打印命盘”文字恢复
   防止主题全局 button 样式把文字变成白色/透明/0字号
   ========================================================= */

.szw-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  margin:9px 0 2px!important;
  padding:0!important;
}

.szw-actions .szw-copy,
.szw-actions .szw-print{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:auto!important;
  min-width:112px!important;
  height:32px!important;
  min-height:32px!important;

  margin:0!important;
  padding:0 14px!important;

  border:1px solid #888!important;
  border-radius:5px!important;
  background:#fff!important;

  color:#333!important;
  -webkit-text-fill-color:#333!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:1!important;
  letter-spacing:0!important;

  text-align:center!important;
  text-indent:0!important;
  text-transform:none!important;
  text-decoration:none!important;
  white-space:nowrap!important;

  opacity:1!important;
  visibility:visible!important;
  overflow:visible!important;

  cursor:pointer!important;
  box-sizing:border-box!important;
}

.szw-actions .szw-copy:hover,
.szw-actions .szw-print:hover{
  border-color:#655da2!important;
  color:#655da2!important;
  -webkit-text-fill-color:#655da2!important;
  background:#faf9ff!important;
}

.szw-actions .szw-copy:active,
.szw-actions .szw-print:active{
  transform:translateY(1px)!important;
}

/* 确保主题若给button伪元素加遮罩，不会盖住按钮文字 */
.szw-actions .szw-copy::before,
.szw-actions .szw-copy::after,
.szw-actions .szw-print::before,
.szw-actions .szw-print::after{
  display:none!important;
  content:none!important;
}

@media(max-width:700px){
  .szw-actions{
    gap:7px!important;
  }

  .szw-actions .szw-copy,
  .szw-actions .szw-print{
    min-width:105px!important;
    height:31px!important;
    min-height:31px!important;
    padding:0 10px!important;
    font-size:11px!important;
  }
}


/* =========================================================
   v10.28：天盘 / 地盘 / 人盘
   ========================================================= */

/* 中宫三盘下拉，尺寸与原“天盘▽”按钮一致 */
.szw-plate-select{
  height:34px!important;
  min-height:34px!important;
  width:86px!important;
  min-width:86px!important;

  margin:0!important;
  padding:0 24px 0 8px!important;

  border:1px solid #888!important;
  border-radius:0!important;
  background:#fff!important;
  color:#222!important;

  font-size:11px!important;
  font-weight:700!important;
  line-height:32px!important;
  text-align:center!important;

  box-sizing:border-box!important;
  cursor:pointer!important;
}

.szw-plate-status{
  min-height:18px!important;
  margin:3px auto 1px!important;
  padding:0 5px!important;

  color:#666!important;
  font-size:8px!important;
  line-height:18px!important;
  text-align:center!important;
  white-space:nowrap!important;
}

/* 地盘、 人盘宫名轻微区分，但不破坏原排版 */
.szw-palace.is-plate-decadal .szw-palace-name{
  color:#75539c!important;
}

.szw-palace.is-plate-yearly .szw-palace-name{
  color:#176aa5!important;
}

/* 当前地盘/人盘命宫的小标记 */
.szw-plate-life-badge{
  position:absolute!important;
  right:4px!important;
  top:88px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:17px!important;
  height:17px!important;
  border-radius:2px!important;

  background:#655da2!important;
  color:#fff!important;

  font-size:10px!important;
  line-height:17px!important;
  font-weight:900!important;
  z-index:28!important;
}

/* 运星 / 流星沿用顶部星曜列，使用不同色调 */
.szw-hstar.is-horoscope-star{
  position:relative!important;
}

.szw-hstar.is-horoscope-star.is-decadal-star
.szw-hstar-name{
  color:#7c48a0!important;
}

.szw-hstar.is-horoscope-star.is-yearly-star
.szw-hstar-name{
  color:#1973a8!important;
}

.szw-hstar.is-horoscope-star
.szw-hstar-char{
  font-size:11px!important;
  font-weight:800!important;
}

/* 地盘/人盘四化额外贴在对应星曜右上角 */
.szw-plate-mutagen{
  position:absolute!important;
  right:-5px!important;
  top:-6px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  min-width:20px!important;
  height:13px!important;
  padding:0 2px!important;

  border-radius:2px!important;
  color:#fff!important;

  font-size:8px!important;
  line-height:13px!important;
  font-weight:900!important;
  white-space:nowrap!important;

  z-index:31!important;
  box-shadow:0 0 0 1px #fff!important;
}

.szw-plate-mutagen-lu{
  background:#23966b!important;
}
.szw-plate-mutagen-quan{
  background:#3475bf!important;
}
.szw-plate-mutagen-ke{
  background:#7656aa!important;
}
.szw-plate-mutagen-ji{
  background:#cc3d3d!important;
}

/* 运限命宫略作提示 */
.szw-palace.is-plate-life{
  box-shadow:
    inset 0 0 0 1px rgba(101,93,162,.4)!important;
}

@media(max-width:700px){
  .szw-plate-select{
    width:78px!important;
    min-width:78px!important;
    padding-left:5px!important;
    font-size:10px!important;
  }
}


/* =========================================================
   v10.29：天盘 / 地盘 / 人盘增加倒三角 ▼
   ========================================================= */

.szw-plate-select-wrap{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:86px!important;
  height:34px!important;
  min-width:86px!important;
  min-height:34px!important;

  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}

/* 隐藏浏览器默认下拉箭头，统一使用自定义倒三角 */
.szw-plate-select{
  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  appearance:none!important;

  width:86px!important;
  min-width:86px!important;
  height:34px!important;
  min-height:34px!important;

  margin:0!important;
  padding:0 25px 0 8px!important;

  text-align:center!important;
  text-align-last:center!important;
  cursor:pointer!important;
}

/* 右侧固定倒三角 */
.szw-plate-arrow{
  position:absolute!important;
  right:8px!important;
  top:50%!important;
  transform:translateY(-50%)!important;

  display:block!important;
  width:10px!important;
  height:12px!important;

  color:#444!important;
  -webkit-text-fill-color:#444!important;

  font-size:10px!important;
  line-height:12px!important;
  font-weight:700!important;
  text-align:center!important;

  pointer-events:none!important;
  z-index:3!important;
}

/* 点击时三角稍微加深，视觉上更像参考图 */
.szw-plate-select-wrap:focus-within .szw-plate-arrow{
  color:#111!important;
  -webkit-text-fill-color:#111!important;
}

@media(max-width:700px){
  .szw-plate-select-wrap{
    width:78px!important;
    min-width:78px!important;
  }

  .szw-plate-select{
    width:78px!important;
    min-width:78px!important;
    padding-right:21px!important;
  }

  .szw-plate-arrow{
    right:6px!important;
    font-size:9px!important;
  }
}


/* =========================================================
   v10.30：天地人三盘文字 + ▼ 整体居中
   ========================================================= */

.szw-plate-select-wrap{
  position:relative!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:86px!important;
  min-width:86px!important;
  height:34px!important;
  min-height:34px!important;

  margin:0!important;
  padding:0!important;

  border:1px solid #888!important;
  background:#fff!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

/*
 * 真正的 select 覆盖整个按钮，只负责点击和弹出菜单。
 * 本身完全透明，避免浏览器原生文字/箭头影响居中。
 */
.szw-plate-select{
  position:absolute!important;
  inset:0!important;
  z-index:5!important;

  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;

  margin:0!important;
  padding:0!important;
  border:0!important;

  opacity:0!important;
  cursor:pointer!important;

  -webkit-appearance:none!important;
  -moz-appearance:none!important;
  appearance:none!important;
}

/* “天盘 ▼”作为一个整体严格居中 */
.szw-plate-display{
  position:absolute!important;
  inset:0!important;
  z-index:2!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  gap:4px!important;
  margin:0!important;
  padding:0!important;

  color:#222!important;
  pointer-events:none!important;
  box-sizing:border-box!important;
}

/* 文字本身不再单独占满整个按钮 */
.szw-plate-display-text{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  height:20px!important;
  margin:0!important;
  padding:0!important;

  color:#222!important;
  -webkit-text-fill-color:#222!important;

  font-size:11px!important;
  line-height:20px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}

/* 倒三角紧跟文字后面，并与文字垂直中心严格对齐 */
.szw-plate-arrow{
  position:static!important;
  right:auto!important;
  top:auto!important;
  transform:none!important;

  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:auto!important;
  height:20px!important;
  min-width:8px!important;

  margin:0!important;
  padding:0!important;

  color:#444!important;
  -webkit-text-fill-color:#444!important;

  font-size:9px!important;
  line-height:20px!important;
  font-weight:700!important;

  pointer-events:none!important;
}

/* 聚焦时整体颜色稍深 */
.szw-plate-select-wrap:focus-within .szw-plate-display-text,
.szw-plate-select-wrap:focus-within .szw-plate-arrow{
  color:#111!important;
  -webkit-text-fill-color:#111!important;
}

@media(max-width:700px){
  .szw-plate-select-wrap{
    width:78px!important;
    min-width:78px!important;
  }

  .szw-plate-display{
    gap:3px!important;
  }

  .szw-plate-display-text{
    font-size:10px!important;
  }

  .szw-plate-arrow{
    font-size:8px!important;
  }
}


/* =========================================================
   v10.31：大限 / 流年 / 流月 / 流日 / 流时可点击联动
   ========================================================= */

/* 流运区域允许完整月份、日期、时辰横向滚动 */
.szw-flow-cells{
  display:flex!important;
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
  -webkit-overflow-scrolling:touch!important;
}

/* 现在每一格是真正button，清除主题button样式干扰 */
.szw-flow-cell{
  appearance:none!important;
  -webkit-appearance:none!important;

  flex:1 0 74px!important;
  min-width:74px!important;
  min-height:49px!important;

  margin:0!important;
  padding:5px 3px!important;

  border:0!important;
  border-right:1px solid #aaa!important;
  border-radius:0!important;

  background:#fafafa!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;

  text-align:center!important;
  font-family:inherit!important;
  font-size:9px!important;
  line-height:1.25!important;

  white-space:nowrap!important;
  cursor:pointer!important;
  box-sizing:border-box!important;

  transition:
    background .12s ease,
    color .12s ease,
    box-shadow .12s ease!important;
}

.szw-flow-cell b{
  display:block!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  font-size:10px!important;
  font-weight:800!important;
  line-height:1.25!important;
}

.szw-flow-cell span{
  display:block!important;
  margin-top:2px!important;
  color:#666!important;
  -webkit-text-fill-color:#666!important;
  font-size:8px!important;
  line-height:1.2!important;
}

.szw-flow-cell:hover{
  background:#f3f1fb!important;
}

/* 当前选中的大限/流年/月/日/时明显高亮 */
.szw-flow-cell.is-selected{
  position:relative!important;
  z-index:2!important;

  background:#eeeaf9!important;
  box-shadow:
    inset 0 0 0 1.5px #655da2!important;
}

.szw-flow-cell.is-selected b{
  color:#51498f!important;
  -webkit-text-fill-color:#51498f!important;
}

.szw-flow-cell.is-selected span{
  color:#655da2!important;
  -webkit-text-fill-color:#655da2!important;
}

/* 去掉WordPress主题可能给按钮加的伪元素 */
.szw-flow-cell::before,
.szw-flow-cell::after{
  display:none!important;
  content:none!important;
}

/* 流月/流日完整内容较多，滚动条尽量轻 */
.szw-month-cells::-webkit-scrollbar,
.szw-day-cells::-webkit-scrollbar,
.szw-hour-cells::-webkit-scrollbar,
.szw-year-cells::-webkit-scrollbar,
.szw-daxian-cells::-webkit-scrollbar{
  height:5px!important;
}

.szw-month-cells::-webkit-scrollbar-thumb,
.szw-day-cells::-webkit-scrollbar-thumb,
.szw-hour-cells::-webkit-scrollbar-thumb,
.szw-year-cells::-webkit-scrollbar-thumb,
.szw-daxian-cells::-webkit-scrollbar-thumb{
  background:#c7c7c7!important;
  border-radius:5px!important;
}

/* 月/日/时临时层仍归入“人盘”视觉体系 */
.szw-plate-status{
  font-weight:600!important;
}

@media(max-width:700px){
  .szw-flow-cell{
    flex-basis:68px!important;
    min-width:68px!important;
  }
}


/* =========================================================
   v10.32：地盘 / 人盘随流运时间同步联动
   ========================================================= */

.szw-plate-context-status{
  min-height:17px!important;
  margin:0 auto 2px!important;
  padding:0 6px!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  color:#555!important;
  -webkit-text-fill-color:#555!important;

  font-size:8px!important;
  line-height:17px!important;
  font-weight:600!important;
  text-align:center!important;
  white-space:nowrap!important;

  overflow:hidden!important;
  text-overflow:ellipsis!important;
  box-sizing:border-box!important;
}

/* 地盘/人盘状态更新时保持中宫紧凑 */
.szw-plate-status + .szw-plate-context-status{
  border-top:1px dotted #ddd!important;
}

/* 选中流运后让时间状态稍醒目 */
.szw-root:has(.szw-flow-cell.is-selected)
.szw-plate-context-status{
  color:#51498f!important;
  -webkit-text-fill-color:#51498f!important;
}

@media(max-width:700px){
  .szw-plate-context-status{
    font-size:7px!important;
    padding:0 3px!important;
  }
}


/* =========================================================
   v10.33：真正的天盘 / 地盘 / 人盘
   ========================================================= */

/* 三张基础盘的状态稍作区分 */
.szw-base-origin .szw-plate-status{
  color:#555!important;
  -webkit-text-fill-color:#555!important;
}

.szw-base-earth .szw-plate-status{
  color:#704899!important;
  -webkit-text-fill-color:#704899!important;
  font-weight:700!important;
}

.szw-base-human .szw-plate-status{
  color:#176a9f!important;
  -webkit-text-fill-color:#176a9f!important;
  font-weight:700!important;
}

/* 当前运限状态不再错误显示“地盘=大限、人盘=流年” */
.szw-plate-context-status{
  color:#666!important;
  -webkit-text-fill-color:#666!important;
}

/* 有运限选择时再强调 */
.szw-root:has(.szw-flow-cell.is-selected)
.szw-plate-context-status{
  color:#51498f!important;
  -webkit-text-fill-color:#51498f!important;
}


/* =========================================================
   v10.35：调用 B2 原生“给TA打赏”
   ========================================================= */

.szw-b2-reward{
  width:100%!important;
  margin:9px auto 2px!important;
  padding:0!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

.szw-b2-reward-btn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;

  min-width:128px!important;
  height:34px!important;
  min-height:34px!important;

  margin:0 auto!important;
  padding:0 17px!important;

  border:1px solid #ff6c72!important;
  border-radius:6px!important;
  background:#fff!important;

  color:#ff5d65!important;
  -webkit-text-fill-color:#ff5d65!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:12px!important;
  font-weight:700!important;
  line-height:1!important;

  text-align:center!important;
  text-indent:0!important;
  text-decoration:none!important;
  white-space:nowrap!important;

  cursor:pointer!important;
  opacity:1!important;
  visibility:visible!important;
  box-sizing:border-box!important;
}

.szw-b2-reward-btn:hover{
  background:#fff6f6!important;
}

.szw-b2-reward-btn:disabled{
  cursor:wait!important;
  opacity:.72!important;
}

.szw-b2-reward-icon{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:16px!important;
  height:16px!important;
  margin:0!important;
  padding:0!important;

  color:#ff5d65!important;
  -webkit-text-fill-color:#ff5d65!important;

  font-size:16px!important;
  line-height:16px!important;
  font-weight:700!important;
}

.szw-b2-reward-tip{
  max-width:560px!important;
  margin:7px auto 0!important;
  padding:7px 10px!important;

  border:1px solid #f0d5d5!important;
  border-radius:5px!important;
  background:#fff9f9!important;

  color:#8b5555!important;
  -webkit-text-fill-color:#8b5555!important;

  font-size:10px!important;
  line-height:1.55!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

.szw-b2-reward-tip[hidden]{
  display:none!important;
}

.szw-b2-reward-btn::before,
.szw-b2-reward-btn::after{
  display:none!important;
  content:none!important;
}

@media(max-width:700px){
  .szw-b2-reward-btn{
    min-width:120px!important;
    height:33px!important;
    min-height:33px!important;
    padding:0 14px!important;
    font-size:11px!important;
  }

  .szw-b2-reward-tip{
    margin-left:5px!important;
    margin-right:5px!important;
  }
}

@media print{
  .szw-b2-reward{
    display:none!important;
  }
}


/* =========================================================
   v10.36：B2 原生赞赏 iframe 桥接
   用于独立 Page 没有文章赞赏组件的情况
   ========================================================= */

.szw-b2-frame-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;

  width:100vw!important;
  height:100vh!important;

  margin:0!important;
  padding:0!important;

  background:rgba(0,0,0,.45)!important;
  box-sizing:border-box!important;
}

.szw-b2-frame{
  position:absolute!important;
  inset:0!important;

  display:block!important;
  width:100%!important;
  height:100%!important;

  margin:0!important;
  padding:0!important;
  border:0!important;

  background:#fff!important;
  opacity:0!important;

  transition:opacity .12s ease!important;
}

.szw-b2-frame.is-ready{
  opacity:1!important;
}

.szw-b2-frame-loading{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  z-index:4!important;

  transform:translate(-50%,-50%)!important;

  min-width:190px!important;
  padding:14px 18px!important;

  border-radius:8px!important;
  background:#fff!important;
  color:#333!important;
  -webkit-text-fill-color:#333!important;

  box-shadow:0 6px 30px rgba(0,0,0,.2)!important;

  font-size:13px!important;
  line-height:1.5!important;
  text-align:center!important;
}

.szw-b2-frame-loading[hidden]{
  display:none!important;
}

.szw-b2-frame-close{
  position:absolute!important;
  right:14px!important;
  top:14px!important;
  z-index:8!important;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;

  margin:0!important;
  padding:0!important;

  border:0!important;
  border-radius:50%!important;
  background:rgba(0,0,0,.72)!important;

  color:#fff!important;
  -webkit-text-fill-color:#fff!important;

  font-size:24px!important;
  line-height:34px!important;
  font-weight:400!important;

  cursor:pointer!important;
}

.szw-b2-frame-close:hover{
  background:rgba(0,0,0,.88)!important;
}

@media(max-width:700px){
  .szw-b2-frame-close{
    right:8px!important;
    top:8px!important;
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    min-height:32px!important;
    font-size:22px!important;
  }
}

@media print{
  .szw-b2-frame-overlay{
    display:none!important;
  }
}


/* =========================================================
   v10.37：B2赞赏改为真实文章弹窗，不再使用 iframe
   ========================================================= */

.szw-b2-reward-tip{
  max-width:620px!important;
}

/* v10.36 iframe 桥接已停用 */
.szw-b2-frame-overlay{
  display:none!important;
}


/* =========================================================
   v10.42：B2 原生组件直接挂载到当前页面
   不用 iframe，不打开文章，不打开新窗口
   ========================================================= */

/*
 * 载体必须真实参与DOM/Vue初始化，不能 display:none。
 * 放到屏幕外，不占布局、不让用户看到，也不让搜索摘要抓取。
 */
.szw-b2-native-carrier{
  position:fixed!important;
  left:-12000px!important;
  top:0!important;

  display:block!important;

  width:1200px!important;
  min-width:1200px!important;
  max-width:1200px!important;

  height:auto!important;
  max-height:1400px!important;

  margin:0!important;
  padding:0!important;

  opacity:0!important;
  visibility:visible!important;
  pointer-events:none!important;

  overflow:hidden!important;
  z-index:-2147480000!important;
}

/*
 * 如果B2的弹窗最初生成在屏幕外载体里，
 * JS会将弹窗根节点移动到body并打此标记。
 */
[data-szw-promoted-b2-modal]{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;

  z-index:2147483600!important;
}

/* 若拿到的是B2的整屏mask，强制铺满当前窗口 */
[data-szw-promoted-b2-modal][style*="fixed"],
[data-szw-promoted-b2-modal].dialog-mask,
[data-szw-promoted-b2-modal].modal,
[data-szw-promoted-b2-modal][class*="mask"]{
  position:fixed!important;
  inset:0!important;
}

/* v10.36~10.41 的旧 iframe/overlay 路径全部停用 */
.szw-b2-frame-overlay,
.szw-direct-reward-overlay{
  display:none!important;
}

/* 仍保持 v10.37 的小型赞赏按钮 */
.szw-b2-reward{
  width:100%!important;
  margin:9px auto 2px!important;
  padding:0!important;
  text-align:center!important;
  box-sizing:border-box!important;
}

@media print{
  .szw-b2-native-carrier,
  [data-szw-promoted-b2-modal]{
    display:none!important;
  }
}


/* =========================================================
   v10.43：来自正常文章HTML的B2原生赞赏模板载体
   ========================================================= */

.szw-b2-native-carrier{
  contain:layout style!important;
}

.szw-b2-native-carrier img,
.szw-b2-native-carrier video,
.szw-b2-native-carrier iframe{
  max-width:100%!important;
}

/* 原生赞赏弹窗被B2生成后不受屏幕外载体透明度影响 */
body > [data-szw-promoted-b2-modal]{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  contain:none!important;
}


/* =========================================================
   v10.44：加载B2文章 single.js + 真实Vue挂载点
   ========================================================= */

.szw-b2-single-vue-mount{
  display:block!important;
  width:1000px!important;
  min-width:1000px!important;
  max-width:1000px!important;
  min-height:120px!important;

  margin:0!important;
  padding:0!important;

  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/*
 * 外层 carrier 仍在屏幕外；
 * 内部必须保持 visible/opacity:1，
 * 让 B2 single.js / Vue 正常读取和编译真实模板。
 */
.szw-b2-native-carrier{
  width:1100px!important;
  min-width:1100px!important;
  max-width:1100px!important;

  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
}

/* 被B2生成并提升到body后的弹窗恢复所有交互 */
body > [data-szw-promoted-b2-modal],
body > [data-szw-promoted-b2-modal] *{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}


/* =========================================================
   v10.45：真实B2 single.js Vue根节点
   ========================================================= */

.szw-b2-native-carrier[data-exact-mount="1"]{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:none!important;
}

/* 不改真实Vue根节点自己的display/position，只把外层搬到屏幕外 */
.szw-b2-native-carrier[data-exact-mount="1"]
[data-szw-b2-single-vue-mount]{
  opacity:1!important;
  visibility:visible!important;
}

/* B2弹窗移动到body后完全恢复交互 */
body > [data-szw-promoted-b2-modal],
body > [data-szw-promoted-b2-modal] *{
  pointer-events:auto!important;
}


/* =========================================================
   v10.46：single.js ID + class 真实祖先关联
   ========================================================= */

.szw-b2-native-carrier[data-exact-mount="1"] .single-article{
  visibility:visible!important;
  opacity:1!important;
}

body > .szw-b2-native-carrier{
  position:fixed!important;
  left:-12000px!important;
  top:0!important;
  z-index:-2147480000!important;
}


/* =========================================================
   v10.47：class挂载点确认 + 原生点击兼容
   ========================================================= */

/* 保持v10.37赞赏按钮外观，不新增加载层 */
.szw-b2-reward-btn{
  touch-action:manipulation!important;
}


/* =========================================================
   v10.48：真实@click / Vue方法直调
   ========================================================= */

[data-szw-b2-reward-native-click="1"]{
  /* 屏幕外原生节点不改变外观，只作为精确事件目标 */
}


/* =========================================================
   v10.49：原始HTML @click恢复
   ========================================================= */

/* v10.37按钮样式保持不变 */
.szw-b2-reward-btn{
  -webkit-tap-highlight-color:transparent!important;
}


/* =========================================================
   v10.50：B2赞赏关闭修复
   ========================================================= */

html.szw-b2-reward-open,
body.szw-b2-reward-open{
  overflow:hidden!important;
}

/* 提升后的赞赏层所有原生按钮/关闭图标恢复点击 */
[data-szw-promoted-b2-modal],
[data-szw-promoted-b2-modal] *{
  pointer-events:auto!important;
}

/*
 * B2右上角X如果被主题层级盖住，
 * 常见 close 元素强制提高层级。
 */
[data-szw-promoted-b2-modal]
[class*="close"],
[data-szw-promoted-b2-modal]
[aria-label*="关闭"],
[data-szw-promoted-b2-modal]
[title*="关闭"]{
  position:relative!important;
  z-index:2147483646!important;
  pointer-events:auto!important;
  cursor:pointer!important;
}

@media print{
  [data-szw-promoted-b2-modal]{
    display:none!important;
  }
}


/* =========================================================
   v10.51：关闭后保留B2/Vue原生弹窗，支持重复打开
   ========================================================= */

.szw-b2-modal-parked{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

body > [data-szw-promoted-b2-modal]{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}


/* =========================================================
   v10.52：顶部紫微斗数资料分类入口
   ========================================================= */

.szw-category-bar{
  width:100%!important;
  max-width:100%!important;

  margin:0 0 10px!important;
  padding:0!important;

  box-sizing:border-box!important;
}

.szw-category-link{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;

  width:100%!important;
  min-height:62px!important;

  margin:0!important;
  padding:12px 18px!important;

  border:1px solid #dedede!important;
  border-radius:4px!important;

  background:#fff!important;

  color:#222!important;
  -webkit-text-fill-color:#222!important;

  text-decoration:none!important;
  box-shadow:none!important;
  box-sizing:border-box!important;

  transition:
    border-color .12s ease,
    background .12s ease!important;
}

.szw-category-link:hover{
  border-color:#bdbdbd!important;
  background:#fafafa!important;
  text-decoration:none!important;
}

.szw-category-copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:3px!important;

  min-width:0!important;
}

.szw-category-title{
  color:#222!important;
  -webkit-text-fill-color:#222!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.35!important;
}

.szw-category-desc{
  color:#777!important;
  -webkit-text-fill-color:#777!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:11px!important;
  font-weight:400!important;
  line-height:1.45!important;
}

.szw-category-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;

  flex:0 0 auto!important;

  min-height:32px!important;
  padding:0 12px!important;

  border:1px solid #777!important;
  border-radius:4px!important;

  background:#fff!important;

  color:#333!important;
  -webkit-text-fill-color:#333!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:11px!important;
  font-weight:600!important;
  line-height:30px!important;
  white-space:nowrap!important;
}

.szw-category-link:hover
.szw-category-action{
  border-color:#555!important;
}

@media(max-width:640px){
  .szw-category-link{
    min-height:58px!important;
    padding:10px 12px!important;
    gap:10px!important;
  }

  .szw-category-title{
    font-size:14px!important;
  }

  .szw-category-desc{
    font-size:10px!important;
  }

  .szw-category-action{
    min-height:30px!important;
    padding:0 9px!important;
    font-size:10px!important;
    line-height:28px!important;
  }
}

@media(max-width:420px){
  .szw-category-link{
    align-items:flex-start!important;
    flex-direction:column!important;
  }

  .szw-category-action{
    align-self:flex-start!important;
  }
}

@media print{
  .szw-category-bar{
    display:none!important;
  }
}


/* =========================================================
   v10.54：紫微斗数资料库入口增强醒目版
   ========================================================= */

.szw-category-bar{
  margin:0 0 14px!important;
}

.szw-category-link{
  position:relative!important;

  min-height:82px!important;
  padding:14px 20px 14px 24px!important;

  border:1px solid #e7b7b7!important;
  border-radius:7px!important;

  background:
    linear-gradient(
      90deg,
      #fff7f7 0%,
      #fffdfb 55%,
      #ffffff 100%
    )!important;

  box-shadow:
    0 3px 12px rgba(160,35,35,.08)!important;

  overflow:hidden!important;
}

.szw-category-link::before{
  content:""!important;

  position:absolute!important;
  left:0!important;
  top:0!important;
  bottom:0!important;

  width:5px!important;

  background:#d62f2f!important;
}

.szw-category-link:hover{
  border-color:#d98f8f!important;
  background:
    linear-gradient(
      90deg,
      #fff2f2 0%,
      #fffaf7 55%,
      #ffffff 100%
    )!important;

  box-shadow:
    0 5px 16px rgba(160,35,35,.12)!important;
}

.szw-category-copy{
  gap:2px!important;
}

.szw-category-badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;

  width:max-content!important;
  min-height:20px!important;

  margin:0 0 3px!important;
  padding:1px 7px!important;

  border:1px solid #edb7b7!important;
  border-radius:999px!important;

  background:#fff!important;

  color:#c62828!important;
  -webkit-text-fill-color:#c62828!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:10px!important;
  font-weight:700!important;
  line-height:18px!important;

  letter-spacing:.5px!important;
}

.szw-category-title{
  color:#1f1f1f!important;
  -webkit-text-fill-color:#1f1f1f!important;

  font-size:19px!important;
  font-weight:800!important;
  line-height:1.35!important;
}

.szw-category-desc{
  margin-top:2px!important;

  color:#666!important;
  -webkit-text-fill-color:#666!important;

  font-size:12px!important;
  line-height:1.45!important;
}

.szw-category-action{
  min-width:160px!important;
  min-height:40px!important;
  padding:0 16px!important;

  border:1px solid #d62f2f!important;
  border-radius:5px!important;

  background:#d62f2f!important;

  color:#fff!important;
  -webkit-text-fill-color:#fff!important;

  font-size:12px!important;
  font-weight:700!important;
  line-height:38px!important;

  box-shadow:
    0 2px 7px rgba(214,47,47,.16)!important;
}

.szw-category-link:hover
.szw-category-action{
  border-color:#bd2424!important;
  background:#bd2424!important;
}

@media(max-width:640px){
  .szw-category-link{
    min-height:72px!important;
    padding:12px 14px 12px 18px!important;
  }

  .szw-category-title{
    font-size:16px!important;
  }

  .szw-category-desc{
    font-size:11px!important;
  }

  .szw-category-action{
    min-width:132px!important;
    min-height:36px!important;
    padding:0 11px!important;
    font-size:11px!important;
    line-height:34px!important;
  }
}

@media(max-width:420px){
  .szw-category-link{
    gap:12px!important;
  }

  .szw-category-action{
    width:100%!important;
    min-width:0!important;
  }
}


/* =========================================================
   v10.55：SEO标题与页面开头简介
   ========================================================= */

.szw-seo-intro{
  width:100%!important;
  max-width:100%!important;

  margin:0 0 12px!important;
  padding:0 2px!important;

  box-sizing:border-box!important;
}

.szw-seo-title{
  margin:0!important;
  padding:0!important;

  color:#1d1d1f!important;
  -webkit-text-fill-color:#1d1d1f!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:24px!important;
  font-weight:800!important;
  line-height:1.35!important;

  letter-spacing:.2px!important;
}

.szw-seo-desc{
  max-width:980px!important;

  margin:7px 0 0!important;
  padding:0!important;

  color:#666!important;
  -webkit-text-fill-color:#666!important;

  font-family:"Microsoft YaHei","PingFang SC",sans-serif!important;
  font-size:13px!important;
  font-weight:400!important;
  line-height:1.75!important;
}

@media(max-width:700px){
  .szw-seo-intro{
    margin-bottom:10px!important;
  }

  .szw-seo-title{
    font-size:20px!important;
  }

  .szw-seo-desc{
    margin-top:5px!important;
    font-size:12px!important;
    line-height:1.7!important;
  }
}

@media print{
  .szw-seo-intro{
    display:none!important;
  }
}
