/* 雷达共用组件 VFRadar（static/js/radar.js，尺寸与动效出处见那边文件头）：报告页第五栏「多维拓扑」、拓卷页六项都用。
   颜色全取 742 选色库：墨色 #1D1B1C（--text）、鸦青 #424B50（--text-soft）、烟青 #708090（--text-muted）、雪白 #FFFEF9、
   珍珠灰 #E4DFD7（网格、提示框边）、银白 #F1F0ED（图例按下底）；两组面积枣红、石青，三才轴标签景泰蓝／琥珀／喜蛋红。
   原件的面积是半透明叠色（两组叠在一起才看得出重合），这里照叠（用户定的「透明度可叠」）。 */
.rd{position:relative;display:grid;gap:16px;margin:0;min-width:0;font-family:var(--sans)}
.rd-stage{position:relative;width:100%;touch-action:pan-y;user-select:none;-webkit-user-select:none;outline:none;-webkit-tap-highlight-color:transparent}
.rd-stage:focus-visible{border-radius:14px;box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--primary)}   /* 原件没有焦点环，这里补站内的 */
.rd-stage svg{position:absolute;top:0;display:block;overflow:visible}
.rd-web{opacity:0;transition:opacity .48s cubic-bezier(.22,1,.36,1)}
.rd-web[data-shown]{opacity:1}
.rd-ring{fill:none;stroke:#E4DFD7;stroke-width:1;stroke-linejoin:miter}
.rd-spoke{stroke:#E4DFD7;stroke-width:1;stroke-opacity:1;transition:stroke .16s cubic-bezier(.22,1,.36,1),stroke-opacity .16s cubic-bezier(.22,1,.36,1)}
.rd-spoke[data-on]{stroke:#1D1B1C;stroke-opacity:.45}           /* 原件：主字色 45% */
.rd-shape{fill:var(--c);stroke:var(--c);stroke-width:2;stroke-linejoin:round;stroke-linecap:butt;   /* 各组颜色由 mount 的 series 传（报告页先天枣红、大运石青；合盘枣红） */
  transition:fill-opacity .16s cubic-bezier(.22,1,.36,1),opacity .16s cubic-bezier(.22,1,.36,1)}
.rd-shape[data-s="0"]{fill-opacity:.12}
.rd-shape[data-s="1"]{fill-opacity:.06}
.rd-stage[data-focus="0"] .rd-shape[data-s="0"],.rd-stage[data-focus="1"] .rd-shape[data-s="1"]{fill-opacity:.2}
.rd-stage[data-focus="0"] .rd-shape[data-s="1"],.rd-stage[data-focus="1"] .rd-shape[data-s="0"]{opacity:.22}
.rd-dot{fill:var(--c);stroke:#FFFEF9;stroke-width:2;opacity:0;pointer-events:none;transition:opacity .16s cubic-bezier(.22,1,.36,1)}
.rd-stage[data-active] .rd-dot{opacity:1}

/* 轴标签：HTML 叠在 svg 上；三才分色，指到一根时本根墨色、别的 .55 */
.rd-lbl{position:absolute;font-size:12px;line-height:15px;letter-spacing:-.01em;pointer-events:none;color:var(--tc,#424B50);
  transition:color .16s cubic-bezier(.22,1,.36,1),opacity .16s cubic-bezier(.22,1,.36,1)}
.rd-stage[data-active] .rd-lbl{opacity:.55}
.rd-stage[data-active] .rd-lbl[data-on]{opacity:1;color:var(--text)}
.rd-lv{margin-left:4px;font-family:var(--serif);font-weight:600;color:var(--c)}   /* axisValue：轴名后面跟第一组的分数（合盘「投缘 40」） */

/* 提示框：白卡，按这一维的分从高到低排，第二行起标出与第一名的差。
   列宽封顶在框内（minmax(0,1fr)）：不封顶时，英文系列名会撑宽 auto 列，行尾差值伸出框 18px。封顶后简体名字走省略号，译文名字折行（见 .rd-tn 下一条）。全名都在图例 */
.rd-tip{position:absolute;left:0;top:0;z-index:2;display:grid;grid-template-columns:minmax(0,1fr);gap:4px;min-width:164px;max-width:min(240px,100%);padding:10px 12px;box-sizing:border-box;
  border-radius:14px;background-color:var(--gc-fill);border:1px solid var(--gc-edge);box-shadow:var(--gc-shadow);
  pointer-events:none;opacity:0;scale:.96;transition:opacity .16s cubic-bezier(.22,1,.36,1),scale .16s cubic-bezier(.22,1,.36,1)}
.rd-stage[data-active] .rd-tip{opacity:1;scale:1;-webkit-backdrop-filter:var(--gc-blur);backdrop-filter:var(--gc-blur)}   /* 磨砂只在露出来时开：收起只是透明、位置还留着，带磨砂的 WebKit 会把它算进页面宽（10-30 雷达在 1280 宽读过一维后缩到 320，页面宽成 871） */
.rd-tt{font-size:12px;line-height:16.8px;color:var(--text-soft);white-space:nowrap;margin-bottom:2px}
.rd-tr{display:flex;align-items:center;gap:8px;font-size:14px;line-height:18.2px}
.rd-sw{flex:none;width:10px;height:2.5px;border-radius:2px;background:var(--c)}
.rd-tn{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-soft)}
/* 译文名字折行，不打省略号。英文「Luck Pillar realization · Ji Chou」14px 全长 160–183px，框封顶 240 时名字格只有 121px，省略号会吃掉大运干支（10 步大运截 39–62px）。
   只撤封顶不够：320 宽舞台只有 266，仍截 22–36px。
   11-20 改后英文大运那组折成两行，框高从 85 变 103；繁体、日文、韩文仍是一行；简体不受影响。11-21 报告页英文提示框改写短名，又回到一行，见下一条 */
:root:not([lang="zh-CN"]) .rd-tn{white-space:normal}
/* 英文框高跟简体一样（用户 11-21「都修」）：折两行时框高 103.4、简体 85.2，多盖住两个面积顶点、两个轴名。
   大运那组在提示框里改写「己丑 Luck Pillar」（drawRadar 传 tip，词表「己丑大运」那条，图例照旧写全名），
   最长的 Geng Chen Luck Pillar 宽 120（14px），分数 6.3 时一行要框宽 239.5，贴着原来的 240；分数 10.0、差值两位数还要再宽 8～16px，
   所以英文放到 264。320 宽舞台 266 也放得下。合盘两个雷达也用这条，11-21 量英文框宽高不变。繁体、日文、韩文本来一行，不放宽 */
:root:lang(en) .rd-tip{max-width:min(264px,100%)}
.rd-tv{margin-left:8px;font-weight:500;color:var(--text);font-variant-numeric:tabular-nums}
.rd-td{min-width:31.2px;font-size:12px;line-height:15.6px;color:var(--text-muted);font-variant-numeric:tabular-nums;text-align:right}

/* 图例：图下居中两颗胶囊键；指到一项本组填充加深、别组压暗 */
.rd-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 4px}
.rd-legend button{display:inline-flex;align-items:center;gap:8px;height:32px;padding:0 10px;border:0;border-radius:999px;background:none;
  font:inherit;font-size:14px;line-height:19.6px;color:var(--text-soft);cursor:pointer;
  transition:color .16s cubic-bezier(.22,1,.36,1),background-color .16s cubic-bezier(.22,1,.36,1),opacity .16s cubic-bezier(.22,1,.36,1),scale .12s cubic-bezier(.22,1,.36,1)}
.rd-legend button[aria-pressed="true"]{color:var(--text);background:#F1F0ED}
.rd-legend[data-focus] button[aria-pressed="false"]{opacity:.5}
.rd-legend button:active{scale:.97}
.rd-legend button:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}   /* 原件同样没有，补上 */
.rd-lsw{flex:none;width:14px;height:2.5px;border-radius:2px;background:var(--c)}

.rd-vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@media (prefers-reduced-motion:reduce){.rd-web,.rd-spoke,.rd-shape,.rd-dot,.rd-lbl,.rd-tip,.rd-legend button{transition:none}}
