:root{--navy:#10335e;--ink:#183047;--orange:#e67525;--soft:#f1f5f9;--line:#d5dee8;--muted:#53687c;--good:#16734d;--bad:#ad2525;--red:#d0281f;--bg:#f4f1ea;font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0;line-height:1.65;background:var(--bg)}button,input,select{font:inherit}button,select{cursor:pointer}button,a,select,input{touch-action:manipulation}
:focus-visible{outline:3px solid var(--orange);outline-offset:3px}a{color:var(--navy)}
.skip{position:absolute;top:-100px}.skip:focus{top:4px;z-index:20;background:#fff}
.site-head{max-width:1440px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:14px 32px;background:#fff;border-bottom:1px solid var(--line)}
.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font-size:22px;font-weight:800}.brand small{display:block;font-size:11px;font-weight:500;letter-spacing:.12em;color:var(--muted)}.brand-logo{width:42px;height:auto}.quiet-link{font-size:14px;text-decoration:none}
main{max-width:1360px;margin:auto;padding:0 24px}
.intro{padding:26px 0 8px}.eyebrow{font-size:12px;letter-spacing:.12em;color:var(--orange);font-weight:800;margin:0 0 6px}h1{font-size:34px;line-height:1.25;margin:0 0 8px}.intro p:last-child{color:var(--muted);margin:0;max-width:820px}
h2{font-size:22px;margin:0 0 14px}
/* 情境快選 */
.pick{padding:18px 0 30px}.cards{display:grid;gap:16px}.main-cards{grid-template-columns:repeat(3,1fr)}.fix-cards{grid-template-columns:repeat(4,1fr)}
.sub{font-size:16px;margin:26px 0 10px;color:var(--muted)}
.scard{display:flex;flex-direction:column;text-align:left;padding:0;border:1px solid #d9d3c6;border-radius:16px;background:#fff;overflow:hidden;color:var(--ink);box-shadow:0 10px 30px #3a2a1012;transition:transform .15s,box-shadow .15s}
.scard:hover{transform:translateY(-2px);box-shadow:0 16px 40px #3a2a1022}
.scard .thumb{display:block;background:#ddd}.scard .thumb svg{display:block;width:100%;height:auto}
.scard .txt{display:flex;flex-direction:column;gap:4px;padding:12px 14px 14px}.scard strong{font-size:17px;line-height:1.35}.scard small{color:var(--muted)}
.scard .story{font-size:14px;color:#3d4c5c;margin-top:4px}.scard .go{margin-top:8px;font-weight:800;color:var(--orange)}
.scard:not(.big){flex-direction:row;align-items:center}.scard:not(.big) .thumb{flex:0 0 96px}.scard:not(.big) strong{font-size:14.5px}
.tag{align-self:flex-start;display:inline-block;font-size:12px;font-weight:800;padding:2px 9px;border-radius:999px;background:#fde7d6;color:#9a4a10}.tag.fix{background:#e3ecf6;color:var(--navy)}
.free-card{display:flex;flex-direction:column;align-items:flex-start;margin-top:18px;width:100%;text-align:left;padding:14px 18px;border:1px dashed #b9c4d0;border-radius:14px;background:#fbfcfd;color:var(--ink)}.free-card span{color:var(--muted);font-size:14px}
/* 執行畫面 */
.run{padding:12px 0 30px;scroll-margin-top:6px}
.runbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.runtitle{display:flex;align-items:center;gap:10px;font-size:18px}
.dots{display:flex;gap:6px;list-style:none;margin:0 0 0 auto;padding:0}.dots li{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:800;background:#e3e0d8;color:#7d7668}.dots li.done{background:var(--good);color:#fff}.dots li.now{background:var(--orange);color:#fff;box-shadow:0 0 0 4px #e6752533}
.run-grid{display:grid;grid-template-columns:360px 1fr;gap:18px;align-items:start}
.stage{background:#fff;border:1px solid #ddd6c8;border-radius:16px;padding:18px 18px 16px;box-shadow:0 12px 34px #3a2a1012;position:sticky;top:10px}
.stepno{margin:0;font-size:13px;font-weight:800;color:var(--orange)}.stage h2{font-size:21px;margin:2px 0 6px}.do{margin:0 0 10px;font-size:15px}
.warn{border:3px solid var(--red);border-radius:10px;background:#fff4f2;padding:9px 12px;margin:10px 0;font-size:14px;color:#5b1410}.warn strong{display:inline-block;background:var(--red);color:#fff;font-size:12px;padding:1px 8px;border-radius:4px;margin-right:8px}
.feedback{min-height:0;margin:8px 0;font-size:14.5px;font-weight:700;border-radius:8px}.feedback:empty{display:none}.feedback.ok{color:var(--good);background:#e9f6ef;padding:8px 10px}.feedback.warn{color:#8a4b00;background:#fff4dd;padding:8px 10px}.feedback.stop{color:#fff;background:var(--red);padding:9px 11px}
.live-warning{border:2px solid var(--red);border-radius:8px;padding:8px 10px;color:var(--bad);font-weight:700;font-size:14px;margin:8px 0}
.meter{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0;padding:8px;border-radius:10px;background:linear-gradient(#2a2f35,#1b1f24);box-shadow:inset 0 2px 6px #000a}
.meter div{background:linear-gradient(#b9cdb4,#9fb59a);border-radius:5px;padding:3px 6px;box-shadow:inset 0 1px 3px #0005}.meter dt{font-size:11px;color:#2b3a2a;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.meter dd{margin:0;font:700 20px/1.1 "Consolas","Courier New",monospace;color:#16241a}.meter small{font-size:11px;margin-left:2px}
.minor{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;margin:4px 0 8px}.minor[hidden]{display:none}.hint{font-size:13px;color:var(--muted)}
.link{border:0;background:none;padding:6px 0;color:var(--navy);font-weight:700;text-decoration:underline;text-underline-offset:3px;min-height:36px}.link:disabled{opacity:.4;text-decoration:none;cursor:default}.link.danger{color:var(--bad)}
.primary{width:100%;min-height:52px;border:0;border-radius:12px;background:var(--orange);color:#fff;font-size:17px;font-weight:800;box-shadow:0 6px 0 #b8561491,0 10px 20px #e6752540}.primary:hover{background:#d4681d}.primary:active{transform:translateY(2px);box-shadow:0 3px 0 #b8561491}.primary:disabled{background:#b9b2a6;box-shadow:none;cursor:default}
.stage-input{display:flex;flex-direction:column;gap:8px}.stage-input:empty{display:none}
.field{display:flex;flex-direction:column;gap:3px;font-size:13px;font-weight:700;color:var(--muted)}.field select{border:1px solid var(--line);border-radius:8px;padding:8px;min-height:42px;background:#fff;color:var(--ink)}.field.row{flex-direction:row;gap:16px}.field input[type=range]{width:100%;accent-color:var(--orange);min-height:32px}
.chips{display:flex;gap:8px}.chip{flex:1;min-height:48px;border:2px solid var(--line);border-radius:10px;background:#fff;font-weight:800;color:var(--navy)}.chip[aria-checked=true]{border-color:var(--orange);background:#fff1e6;color:#9a4a10}
.choices{display:flex;flex-direction:column;gap:8px}.choice{text-align:left;min-height:48px;border:2px solid var(--line);border-radius:10px;background:#fff;padding:9px 12px;color:var(--ink);font-weight:600}.choice[aria-checked=true]{border-color:var(--orange);background:#fff1e6}
.calc{margin:0;font-size:14px;font-weight:700;color:var(--muted)}.calc.good{color:var(--good)}.calc.bad{color:var(--bad)}
.stage.fault{border-color:#e8b4ae}
.scene-wrap{background:#fff;border:1px solid #ddd6c8;border-radius:16px;padding:10px;box-shadow:0 12px 34px #3a2a1012}
.scene-help{margin:0 4px 8px;font-size:14px;color:var(--muted)}
.scene svg{display:block;width:100%;height:auto;border-radius:10px;user-select:none;-webkit-user-select:none}
.scene .port{cursor:pointer}.scene .port .ring{opacity:0}.scene .port:hover .ring{opacity:.55}.scene .port.selected .ring{opacity:1;animation:pulse 1s ease-in-out infinite}
.scene .port:focus{outline:none}.scene .port:focus-visible .ring{opacity:1;stroke:#2f7fff}
.scene .act{cursor:pointer}.scene .act:focus{outline:none}.scene .act:focus-visible{outline:3px solid var(--orange)}
.scene .wire{cursor:pointer}.scene .wire .flow{opacity:0}.scene .wire.running .flow{opacity:.85;animation:flow 1.1s linear infinite}.scene .wire.picked .wcore{stroke:#ffb020}
.scene .hazard .hz{animation:blink 1s steps(2) infinite}.scene .air{animation:air 1.6s ease-in-out infinite}
@keyframes pulse{50%{stroke-width:6}}@keyframes flow{to{stroke-dashoffset:-34}}@keyframes blink{50%{opacity:.25}}@keyframes air{50%{opacity:.15;transform:translateY(6px)}}
@media (prefers-reduced-motion:reduce){.scene *{animation:none!important}}
.connections{margin:8px 4px 0;font-size:14px}.connections summary{cursor:pointer;font-weight:700}.connections ol{margin:6px 0;padding-left:22px}.connections li{display:flex;justify-content:space-between;gap:10px;align-items:center}
/* 現場清單 */
.sheet{border:1px solid #cfc6b4;border-radius:12px;background:#fffdf8;padding:14px 14px 10px;font-size:13.5px;box-shadow:0 6px 18px #3a2a1014}
.sheet header{display:flex;gap:8px;align-items:center;font-weight:800;border-bottom:2px solid var(--navy);padding-bottom:6px}.sheet .logo{background:var(--navy);color:#fff;padding:1px 8px;border-radius:4px}.sheet time{margin-left:auto;font-weight:600;color:var(--muted);font-size:12px}
.sheet h3{margin:8px 0 0;font-size:17px}.sheet .where{margin:0;color:var(--muted)}.sheet h4{margin:10px 0 4px;font-size:13px;color:var(--navy)}
.sheet .steps{list-style:none;margin:0;padding:0}.sheet .steps li{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}.sheet .steps li span{font-weight:900;color:var(--good)}.sheet .steps li.no span{color:var(--bad)}.sheet em{font-style:normal;font-size:12px;color:#8a4b00;background:#fff4dd;border-radius:4px;padding:0 5px}.sheet em.red{color:#fff;background:var(--red)}
.sheet table{width:100%;border-collapse:collapse}.sheet th,.sheet td{border:1px solid #e3dccd;padding:3px 6px;text-align:left}.sheet th{background:#f3efe6;font-weight:700;width:18%}
.sheet .wl{margin:0;display:flex;flex-wrap:wrap;gap:4px}.sheet .wl span{font-size:12px;background:#f3efe6;border-radius:4px;padding:1px 6px}body.running .intro{display:none}
.sheet .redbox,.sheet .stopbox{border:3px solid var(--red);border-radius:8px;padding:6px 9px;margin:10px 0;background:#fff4f2;color:#5b1410}.sheet .redbox p,.sheet .stopbox p{margin:3px 0}.sheet .stopbox{background:var(--red);color:#fff}
.sheet .need{font-weight:700;margin:6px 0}.sheet footer{font-size:11.5px;color:var(--muted);border-top:1px dashed #cfc6b4;padding-top:6px}
/* 下方說明 */
.product-sources,.sources{margin:18px 0;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 16px;font-size:14px}.product-sources summary,.sources summary{cursor:pointer;font-weight:800}
.product-sources ul{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.product-sources li{display:flex;gap:10px}.product-sources img{width:120px;height:90px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:8px;flex:0 0 120px}.product-sources li div{display:flex;flex-direction:column;gap:2px}.product-sources small{color:var(--muted)}
footer{max-width:1360px;margin:auto;padding:20px 24px 90px;font-size:14px;color:var(--muted)}footer a{margin-left:8px}
@media (max-width:1100px){.run-grid{grid-template-columns:320px 1fr}.fix-cards{grid-template-columns:repeat(2,1fr)}}
@media (max-width:760px){
  .site-head{padding:10px 16px}.brand{font-size:19px}main{padding:0 12px}h1{font-size:26px}.intro{padding:16px 4px 4px}.pick h2{font-size:19px}
  .main-cards,.fix-cards{grid-template-columns:1fr}.scard.big{flex-direction:row;align-items:stretch}.scard.big .thumb{flex:0 0 128px;display:flex;align-items:stretch;background:#e6dfd2}.scard.big .thumb svg{height:100%}.scard.big .story{display:none}.scard.big strong{font-size:16px}
  .run-grid{grid-template-columns:1fr}.stage{position:static;padding:14px}.runbar{gap:8px}.runtitle{font-size:15px;flex:1 1 100%;order:2}.dots{order:3;margin:0}.dots li{width:24px;height:24px;font-size:12px}
  .primary-bar{position:fixed;left:0;right:0;bottom:0;z-index:30;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#fffffff2;border-top:1px solid #ddd6c8;box-shadow:0 -6px 18px #3a2a1018}
  .run{padding-bottom:10px}.meter dd{font-size:17px}.scene-wrap{padding:6px}
}
