/* assets/css/physics/thermodynamics/how-carnot-cycle-works-explained.css — 本页专属样式（en/zh 共用） */
/* 依赖 /assets/css/style.css（设计令牌 + .part/.tag 骨架 + 外壳态）。
   图形/动画样式自 svgs/done/physics-11-how-carnot-cycle-works-explained.html 预览 <style> 并入驻此
   （页面禁止内联 <style>）。零件区分色与动画按 body[data-topic="carnot-cycle"] 作用域限定；
   本页专属类统一 cn-* 前缀，与其它页不冲突。动画由 #stage 的 .is-running 驱动。 */

/* 零件本体/区分色（作用域限定 · 均在中灰蓝值域内） */
body[data-topic="carnot-cycle"] .part .body{fill:#c2d1e4;stroke:#2563eb;stroke-width:1.6}
body[data-topic="carnot-cycle"] .part .body2{fill:#dde7f4;stroke:#60a5fa;stroke-width:1.2}
body[data-topic="carnot-cycle"] .part .body3{fill:#aab9cd;stroke:none}
body[data-topic="carnot-cycle"] .part .accent{fill:none;stroke:#6b7b8c;stroke-width:2;stroke-linecap:round}
body[data-topic="carnot-cycle"] .part.is-active .body{fill:#9dc3f5;stroke:#1d4ed8;stroke-width:2.2}
body[data-topic="carnot-cycle"] .part.is-active .body2{fill:#c4daf8;stroke:#3b82f6;stroke-width:1.4}
body[data-topic="carnot-cycle"] .part.is-active .body3{fill:#1d4ed8}
body[data-topic="carnot-cycle"] .part.is-active{filter:drop-shadow(0 0 12px rgba(29,78,216,.5))}

/* 热源/冷源：材质专用饱和色（§4.9.3 豁免），保留红/蓝专属色 */
body[data-topic="carnot-cycle"] .part[data-id="part-hot-reservoir"] .body{fill:#fecaca;stroke:#dc2626;stroke-width:2}
body[data-topic="carnot-cycle"] .part[data-id="part-hot-reservoir"] .body2{fill:#fca5a5;stroke:#dc2626;stroke-width:1.2}
body[data-topic="carnot-cycle"] .part[data-id="part-cold-reservoir"] .body{fill:#dbeafe;stroke:#2563eb;stroke-width:2}
body[data-topic="carnot-cycle"] .part[data-id="part-cold-reservoir"] .body2{fill:#bfdbfe;stroke:#2563eb;stroke-width:1.2}

/* 三种区分色（微调，保持可辨） */
body[data-topic="carnot-cycle"] .part[data-id="part-working-substance"] .body{fill:#c6d3e5}
body[data-topic="carnot-cycle"] .part[data-id="part-working-substance"] .body2{fill:#dde7f4}
body[data-topic="carnot-cycle"] .part[data-id="part-pv-diagram"] .body2{fill:#dde7f4;stroke:none}
body[data-topic="carnot-cycle"] .part[data-id="part-pv-diagram"] .body3{fill:#aab9cd}

/* 热源/冷源波纹（材质标记） */
.cn-wave{fill:none;stroke:#dc2626;stroke-width:2.4;stroke-linecap:round}
.cn-frost{stroke:#2563eb;stroke-width:2.4;stroke-linecap:round}

/* 能量箭头（吸热/放热/做功）：虚线流动 + 相位点亮 */
.cn-flow{stroke-width:3;fill:none;stroke-linecap:round;stroke-dasharray:9 7;
  animation:cn-flowmove 1.2s linear infinite;animation-play-state:paused}
.is-running .cn-flow{animation-play-state:running}
@keyframes cn-flowmove{to{stroke-dashoffset:-32}}
.cn-flow-hot{stroke:#dc2626}
.cn-flow-cold{stroke:#2563eb}
.cn-flow-work{stroke:#1d4ed8}

/* 相位点亮的透明度层（未激活时保留可见的 0.28） */
.cn-lv-qh{animation:cn-lvqh 8s linear infinite;animation-play-state:paused}
.cn-lv-qc{animation:cn-lvqc 8s linear infinite;animation-play-state:paused}
.cn-lv-w{animation:cn-lvw 8s linear infinite;animation-play-state:paused}
.is-running .cn-lv-qh,.is-running .cn-lv-qc,.is-running .cn-lv-w{animation-play-state:running}
@keyframes cn-lvqh{0%,20%{opacity:1}26%,100%{opacity:.28}}
@keyframes cn-lvqc{0%,43%{opacity:.28}49%,64%{opacity:1}70%,100%{opacity:.28}}
@keyframes cn-lvw{0%,40%{opacity:1}46%,100%{opacity:.28}}

/* 高亮光环（激励时描边加粗发光，靠透明度淡入淡出，不压暗其它零件） */
.cn-aura{fill:none;stroke-width:3;pointer-events:none}
.cn-hi-1{animation:cn-hi1 8s linear infinite;animation-play-state:paused}
.cn-hi-2{animation:cn-hi2 8s linear infinite;animation-play-state:paused}
.cn-hi-3{animation:cn-hi3 8s linear infinite;animation-play-state:paused}
.cn-hi-4{animation:cn-hi4 8s linear infinite;animation-play-state:paused}
.is-running .cn-hi-1,.is-running .cn-hi-2,.is-running .cn-hi-3,.is-running .cn-hi-4{animation-play-state:running}
@keyframes cn-hi1{0%,20%{opacity:1}25%,100%{opacity:0}}
@keyframes cn-hi2{0%,19%{opacity:0}24%,41%{opacity:1}46%,100%{opacity:0}}
@keyframes cn-hi3{0%,43%{opacity:0}48%,64%{opacity:1}69%,100%{opacity:0}}
@keyframes cn-hi4{0%,67%{opacity:0}72%,97%{opacity:1}100%,100%{opacity:1}}

/* 工作物质气体：随相位由热(红)转冷(蓝)再转回 */
.cn-gas-tint{animation:cn-gastint 8s linear infinite;animation-play-state:paused;pointer-events:none}
.is-running .cn-gas-tint{animation-play-state:running}
@keyframes cn-gastint{
  0%{fill:#dc2626;opacity:.30}
  21.9%{fill:#dc2626;opacity:.30}
  42.6%{fill:#2563eb;opacity:.26}
  67.3%{fill:#2563eb;opacity:.26}
  100%{fill:#dc2626;opacity:.30}
}

/* 活塞 + 连杆：膨胀上行、压缩下行 */
.cn-piston{animation:cn-pistonmove 8s ease-in-out infinite;animation-play-state:paused}
.is-running .cn-piston{animation-play-state:running}
@keyframes cn-pistonmove{0%{transform:translateY(20px)}42.6%{transform:translateY(-24px)}100%{transform:translateY(20px)}}

/* P–V 循环曲线：四个过程轮流高亮（未高亮为灰蓝细线） */
.cn-seg-line{fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.cn-s1{stroke:#7d8ea3;animation:cn-seg1 8s linear infinite;animation-play-state:paused}
.cn-s2{stroke:#8a99ac;animation:cn-seg2 8s linear infinite;animation-play-state:paused}
.cn-s3{stroke:#75879d;animation:cn-seg3 8s linear infinite;animation-play-state:paused}
.cn-s4{stroke:#93a2b4;animation:cn-seg4 8s linear infinite;animation-play-state:paused}
.is-running .cn-s1,.is-running .cn-s2,.is-running .cn-s3,.is-running .cn-s4{animation-play-state:running}
@keyframes cn-seg1{0%,20%{stroke:#1d4ed8;stroke-width:4.6;filter:drop-shadow(0 0 6px rgba(29,78,216,.6))}25%,100%{stroke:#7d8ea3;stroke-width:2.4;filter:none}}
@keyframes cn-seg2{0%,19%{stroke:#8a99ac;stroke-width:2.4;filter:none}24%,41%{stroke:#1d4ed8;stroke-width:4.6;filter:drop-shadow(0 0 6px rgba(29,78,216,.6))}46%,100%{stroke:#8a99ac;stroke-width:2.4;filter:none}}
@keyframes cn-seg3{0%,43%{stroke:#75879d;stroke-width:2.4;filter:none}48%,64%{stroke:#1d4ed8;stroke-width:4.6;filter:drop-shadow(0 0 6px rgba(29,78,216,.6))}69%,100%{stroke:#75879d;stroke-width:2.4;filter:none}}
@keyframes cn-seg4{0%,67%{stroke:#93a2b4;stroke-width:2.4;filter:none}72%,97%{stroke:#1d4ed8;stroke-width:4.6;filter:drop-shadow(0 0 6px rgba(29,78,216,.6))}100%{stroke:#93a2b4;stroke-width:2.4;filter:none}}

/* 循环运动点：沿闭环路径顺时针运行 */
.cn-dot{
  offset-path:path("M795 205 C845 215 915 240 960 285 C1000 320 1055 365 1080 420 C1030 465 925 462 875 475 C830 400 795 270 795 205");
  offset-rotate:0deg;
  animation:cn-run 8s linear infinite;animation-play-state:paused;
}
.is-running .cn-dot{animation-play-state:running}
@keyframes cn-run{from{offset-distance:0%}to{offset-distance:100%}}