/* 人格四轴（docs/PERSONA_AXES.md）：识人卡人格栏、名册人格签、召对小图、动因小印、后宫牌、朝局人格谱。
   左极一律朱、右极一律金；颜色之外都有字或数。服务器不开 ES_AXES=1 时这些类名一个都不会出现。 */

/* ——识人卡头部的「人格」按钮：印章样式，切的是总开关—— */
.ds-id h3:has(.ax-btn) { display: flex; align-items: center; gap: 8px; }
.ax-btn { margin-left: auto; flex: none; padding: 4px 9px 4px 11px; border: 1px solid var(--zhu-bright); border-radius: 2px; background: transparent; color: var(--zhu-bright); font: 600 12px/1 var(--f-serif); letter-spacing: 0.2em; cursor: pointer; }
.ax-btn:hover { background: rgba(215, 57, 47, 0.12); }
.ax-btn.on { background: var(--zhu-bright); color: #fff; box-shadow: 0 0 0 2px rgba(215, 57, 47, 0.25); }

/* ——人格栏—— */
.ax-panel { margin: 12px 0; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 3px; background: rgba(0, 0, 0, 0.2); }
.ax-panel.est { opacity: 0.75; }
.ax-panel.dim { opacity: 0.6; }
.ax-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.modal-box .ax-head h4 { margin: 0; font: 600 15px/1.2 var(--f-serif); color: var(--gold-bright); letter-spacing: 0.3em; }
.ax-head small { margin-left: auto; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.ax-est { padding: 0 6px; border: 1px dashed var(--dim); border-radius: 2px; color: var(--dim); font-size: 11px; line-height: 1.6; cursor: pointer; }
.ax-rows { display: flex; flex-direction: column; }
.ax-row { display: grid; grid-template-columns: 2.3em 2.6em 55% 2.6em 1fr; align-items: center; gap: 6px; width: 100%; height: 28px; padding: 0 4px; border: 0; border-radius: 2px; background: none; color: var(--text); font: 13px/1 var(--f-serif); text-align: left; cursor: pointer; }
.ax-row:hover, .ax-row:focus-visible { background: rgba(242, 207, 122, 0.07); }
.ax-name { color: var(--dim); }
.ax-pole { font-style: normal; white-space: nowrap; }
.ax-pole i { font-style: normal; }
.ax-pole.l { color: var(--zhu-bright); text-align: right; }
.ax-pole.r { color: var(--gold-bright); }
.ax-pole .one { display: none; }
.ax-bar { position: relative; height: 12px; }
.ax-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line); }
.ax-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(236, 224, 198, 0.45); }
.ax-fill { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 1px; }
.ax-fill.l { background: var(--zhu-bright); }
.ax-fill.r { background: var(--gold-bright); }
.ax-dot { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; transform: rotate(45deg); border: 1px solid #120c08; background: var(--dim); }
.ax-dot.l { background: var(--zhu-bright); box-shadow: 0 0 0 1px rgba(255, 220, 200, 0.6); }
.ax-dot.r { background: var(--gold-bright); box-shadow: 0 0 0 1px rgba(255, 240, 200, 0.6); }
/* 世界呼唤：空心小三角 */
.ax-wc { position: absolute; top: -9px; width: 10px; margin-left: -5px; color: var(--dim); font-style: normal; font-size: 9px; line-height: 1; text-align: center; }
.ax-wc::before { content: "▽"; }
.ax-val { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ax-val b { min-width: 2.1em; font-weight: 600; text-align: right; }
.ax-val em { font-style: normal; font-size: 12px; }
.ax-val.l { color: var(--zhu-bright); }
.ax-val.r { color: var(--gold-bright); }
.ax-val.mid { color: var(--dim); }
.ax-gist, .ax-mis { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 0; font: 14px/1.5 var(--f-serif); color: var(--text); }
.ax-gist em, .ax-mis em { flex: none; padding: 0 5px; border: 1px solid var(--line); border-radius: 2px; color: var(--dim); font-style: normal; font-size: 11.5px; }
.ax-mis { margin-top: 4px; }
.ax-mis b { font-weight: 600; }
.ax-mis .m-重 { color: var(--zhu-bright); }
.ax-mis .m-中 { color: var(--text); }
.ax-mis .m-轻 { color: var(--gold-bright); }
.ax-mis small { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.ax-cmp { display: block; margin: 4px 0 0 auto; padding: 2px 0; border: 0; background: none; color: var(--gold-bright); font: 13px var(--f-serif); cursor: pointer; }
.ax-cmp:hover { text-decoration: underline; }
.ax-lean { color: var(--gold-bright); }

/* 后宫牌：紧凑版，行高 22px，不写底色 */
.ax-panel.compact { margin: 6px 0; padding: 4px 6px; }
.ax-panel.compact .ax-row { height: 22px; font-size: 12px; grid-template-columns: 2.2em 2.4em minmax(0, 1fr) 2.4em 2.2em; }
.ax-panel.compact .ax-val em { display: none; } /* 后宫牌窄：读数只留数字，档位词点开小注看 */

/* ——人格签：名册、后宫牌—— */
.ax-tags { display: inline-flex; gap: 2px; margin-right: 3px; vertical-align: middle; cursor: help; }
.ax-tag { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid; border-radius: 2px; font: 600 11px/1 var(--f-serif); font-style: normal; }
.ax-tag.l { border-color: var(--zhu-bright); color: var(--zhu-bright); }
.ax-tag.r { border-color: var(--gold-bright); color: var(--gold-bright); }
.ax-tag.l.solid { background: var(--zhu-bright); color: #fff; }
.ax-tag.r.solid { background: var(--gold-bright); color: #2a1a0a; }
.ax-tag.mid { border-color: var(--dim); color: var(--dim); }
/* 名册：人格签放最前，状态签照旧跟着；行太长就换行，不截断 */
.tok .tags.ax-wrap { position: static; grid-column: 2; margin-top: 3px; flex-wrap: wrap; align-items: center; }
.hc-name .ax-tags { margin-left: 6px; }

/* ——动因小印：奏本署名旁、动静簿、报事台—— */
.ax-stamp { display: inline-block; margin-left: 6px; padding: 1px 5px; border: 1px solid; border-radius: 2px; font: 600 11px/1.4 var(--f-serif); letter-spacing: 0.05em; white-space: nowrap; vertical-align: 1px; cursor: pointer; }
.ax-stamp.l { border-color: var(--zhu-bright); background: var(--zhu-bright); color: #fff; }
.ax-stamp.r { border-color: #b98d34; background: var(--gold-bright); color: #2a1a0a; }
.ax-stamp:hover { filter: brightness(1.1); }

/* ——召对：名牌旁的人格小图—— */
.ax-mini { position: absolute; left: calc(100% + 10px); top: -42px; z-index: 5; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle, rgba(14, 9, 6, 0.82) 55%, rgba(14, 9, 6, 0) 72%); line-height: 0; cursor: pointer; }
.nameplate:has(.ax-mini) ~ .aud-hj { bottom: calc(100% + 80px); }
.ax-mini:hover { filter: brightness(1.15); }
.ax-words { display: none; }
.ax-star .ax-oct { fill: none; stroke: rgba(201, 161, 74, 0.45); stroke-width: 1; }
.ax-star .ax-oct.in { stroke-dasharray: 2 3; stroke: rgba(201, 161, 74, 0.25); }
.ax-star .ax-axis line { stroke: rgba(236, 224, 198, 0.18); stroke-width: 1; }
.ax-star .ax-poly { fill-opacity: 0.35; stroke: var(--gold-bright); stroke-width: 1.2; stroke-linejoin: round; }
.ax-star .ax-poly.a { fill: var(--zhu-bright); fill-opacity: 0.3; stroke: var(--zhu-bright); stroke-width: 2; }
.ax-star .ax-poly.b { fill: var(--gold-bright); fill-opacity: 0.3; stroke: var(--gold-bright); stroke-width: 2; }
.ax-star .ax-poly.b.world { fill-opacity: 0.12; stroke-dasharray: 6 4; }
.ax-star text { fill: var(--dim); font: 12px var(--f-serif); text-anchor: middle; }
.ax-star text.l { fill: var(--zhu-bright); }
.ax-star text.r { fill: var(--gold-bright); }

/* ——朝局：「关系 | 人格」页签—— */
.ax-ctabs { display: flex; width: max-content; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.ax-ctabs button { padding: 5px 20px; border: 0; background: none; color: var(--dim); font: 14px var(--f-serif); letter-spacing: 0.3em; cursor: pointer; }
.ax-ctabs button.on { background: var(--zhu-bright); color: #fff; }
.ax-cpane[hidden], .cm-rel[hidden] { display: none; }

/* 人格谱：一行一人，四格；第一列（人名）横滑时固定 */
.axs-hint { margin: 0 0 6px; color: var(--dim); font-size: 12px; text-align: center; }
.axs-scroll { max-height: min(60vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: 3px; }
.axs-grid { min-width: 660px; }
.axs-row { display: grid; grid-template-columns: 150px repeat(4, minmax(110px, 1fr)); align-items: center; gap: 10px; height: 36px; padding-right: 10px; border-bottom: 1px solid rgba(201, 161, 74, 0.12); background: #18100b; }
.axs-row.est .axs-cell { opacity: 0.75; }
.axs-heads { position: sticky; top: 0; z-index: 3; height: 40px; background: #24180f; }
.axs-heads .axs-who { color: var(--dim); font-size: 12px; padding-left: 10px; background: #24180f; }
.axs-who { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 6px; height: 100%; padding-left: 4px; background: inherit; }
.axs-pick { display: grid; place-items: center; width: 22px; flex: none; }
.axs-pick input { accent-color: var(--zhu-bright); width: 15px; height: 15px; cursor: pointer; }
.axs-av { width: 26px; height: 26px; flex: none; overflow: hidden; border-radius: 50%; border: 1px solid var(--line); }
.axs-av img { width: 100%; height: 100%; object-fit: cover; }
.axs-av.wc { display: grid; place-items: center; border-style: dashed; color: var(--dim); font: 13px var(--f-serif); }
.axs-name { min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: 14px var(--f-serif); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
button.axs-name:hover { color: var(--gold-bright); }
.axs-name small { margin-left: 4px; color: var(--dim); font-size: 11px; }
.axs-col { padding: 0; border: 0; background: none; color: var(--gold-bright); font: 600 14px var(--f-serif); letter-spacing: 0.15em; text-align: left; cursor: pointer; }
.axs-col small { margin-left: 6px; color: var(--dim); font-weight: 400; font-size: 11px; letter-spacing: 0; }
.axs-col.asc::after { content: " ▲"; font-size: 10px; }
.axs-col.desc::after { content: " ▼"; font-size: 10px; }
.axs-cell { display: grid; grid-template-columns: 1.2em 1fr 2.2em; align-items: center; gap: 5px; font-size: 12px; font-variant-numeric: tabular-nums; }
.axs-cell em { font-style: normal; font-weight: 600; text-align: center; }
.axs-cell em.l { color: var(--zhu-bright); }
.axs-cell em.r { color: var(--gold-bright); }
.axs-cell em.mid, .axs-cell small { color: var(--dim); }
.axs-cell small { text-align: right; font-size: 11.5px; }
.axs-bar { position: relative; height: 8px; background: rgba(201, 161, 74, 0.1); }
.axs-bar b { position: absolute; top: 0; bottom: 0; }
.axs-bar b.l { background: var(--zhu-bright); }
.axs-bar b.r { background: var(--gold-bright); }
.axs-row.world { border-top: 1px dashed var(--dim); border-bottom: 1px dashed var(--dim); background: #1d150f; }
.axs-row.world .axs-name { cursor: default; }
.axs-go { display: block; position: sticky; bottom: 0; margin: 10px auto 0; }
.axs-go[hidden] { display: none; }

/* 两人对照：左大星图，右逐轴对照表 */
.axc-back { margin-bottom: 6px; }
.axc-pick { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 8px; font-size: 13px; color: var(--dim); }
.axc-pick label { display: inline-flex; align-items: center; gap: 6px; }
.axc-pick select { padding: 3px 6px; border: 1px solid var(--line); border-radius: 2px; background: #120c08; color: var(--text); font: 14px var(--f-serif); }
.axc-pick .sw { width: 12px; height: 12px; border-radius: 2px; }
.axc-pick .sw.l { background: var(--zhu-bright); }
.axc-pick .sw.r { background: var(--gold-bright); }
.axc-body { display: flex; gap: 18px; align-items: center; }
.axc-star { flex: none; }
.axc-star svg { display: block; max-width: 100%; height: auto; }
.axc-side { flex: 1; min-width: 0; }
.axc-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.axc-table th, .axc-table td { padding: 6px 6px; border-bottom: 1px solid rgba(201, 161, 74, 0.15); text-align: left; white-space: nowrap; }
.axc-table thead th { color: var(--gold-bright); font-weight: 600; }
.axc-table tbody th { color: var(--dim); font-weight: 400; }
.axc-table td.l { color: var(--zhu-bright); }
.axc-table td.r { color: var(--gold-bright); }
.axc-table td.mid { color: var(--dim); }
.axc-table .rel { color: var(--text); }
.axc-table .rel.l { color: var(--zhu-bright); font-weight: 600; }
.axc-table .rel.r { color: var(--gold-bright); }
.axc-table .rel small { margin-left: 4px; color: var(--dim); font-size: 11px; font-weight: 400; }
.axc-sum { margin: 10px 0 0; font: 15px/1.7 var(--f-serif); color: var(--text); }

/* ——手机（≤860px）：行高 26px、字 12px，极词缩成单字，读数只留数字；小图换成名牌下一行字—— */
@media (max-width: 860px) {
  .ax-row { height: 26px; font-size: 12px; grid-template-columns: 2.2em 1.2em 1fr 1.2em 2.4em; gap: 5px; }
  .ax-pole .full { display: none; }
  .ax-pole .one { display: inline; }
  .ax-val em { display: none; }
  .ax-panel.compact .ax-row { height: 22px; }
  .ax-mini { left: -2px; top: auto; bottom: calc(100% + 8px); display: flex; width: max-content; padding: 3px 8px; border-radius: 2px; background: rgba(14, 9, 6, 0.82); line-height: 1.4; }
  .nameplate:has(.ax-mini) ~ .aud-hj { bottom: calc(100% + 64px); }
  .ax-mini svg { display: none; }
  .ax-words { display: flex; flex-wrap: wrap; gap: 3px; font-size: 12px; }
  .ax-words em { font-style: normal; }
  .ax-words em.l { color: var(--zhu-bright); }
  .ax-words em.r { color: var(--gold-bright); }
  .ax-words em.mid, .ax-words i { color: var(--dim); font-style: normal; }
  .axs-row { grid-template-columns: 116px repeat(4, 104px); gap: 6px; }
  .axs-grid { min-width: 0; width: max-content; }
  .axs-name { font-size: 13px; }
  .axc-body { flex-direction: column; align-items: stretch; }
  .axc-star { align-self: center; width: min(320px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .ax-row, .ax-stamp, .ax-mini { transition: none; }
}
