/* 森麒機電｜故障查詢中心 加強層樣式（2026-10-15） */
:root{--ffx-navy:#0b2d62;--ffx-blue:#1458a6;--ffx-orange:#f58220;--ffx-bg:#f3f7fb;--ffx-card:#fff;--ffx-ink:#122033;--ffx-muted:#5b6778;--ffx-line:#dce5f0;--ffx-red:#c62828;--ffx-red-bg:#fff1f0;--ffx-soft:#e8f1fb}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--ffx-bg:#0d1624;--ffx-card:#152236;--ffx-ink:#e6edf7;--ffx-muted:#a9b7cb;--ffx-line:#2a3b55;--ffx-red:#ff8a80;--ffx-red-bg:#3a1714;--ffx-soft:#1a2c45;--ffx-blue:#5aa6f0}
  :root:not([data-theme="light"]) body{background:#0d1624;color:#e6edf7}
  :root:not([data-theme="light"]) .ff-guide,:root:not([data-theme="light"]) .ff-note,:root:not([data-theme="light"]) .ff-shell,:root:not([data-theme="light"]) .ff-hero{background:#0d1624;color:#e6edf7}
  :root:not([data-theme="light"]) .ff-guide h2,:root:not([data-theme="light"]) .ff-guide h3,:root:not([data-theme="light"]) .ff-hero h1,:root:not([data-theme="light"]) .ff-note h2{color:#e6edf7}
  :root:not([data-theme="light"]) .ff-guide a{color:#7cc0ff}
  :root:not([data-theme="light"]) .ff-coverage th,:root:not([data-theme="light"]) .ff-coverage td{background:#152236;color:#e6edf7;border-color:#2a3b55}
}
*{box-sizing:border-box}
/* 頁首 LOGO（依 BRAND_RULE） */
.ffx-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px max(4vw,16px);background:#fff;border-bottom:1px solid #dbe7ed;position:sticky;top:0;z-index:50}
.ffx-brand a.ffx-logo{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ffx-navy);min-width:0}
.ffx-brand img{width:44px;height:44px;flex:none;display:block}
.ffx-brand b{font-size:1.1rem;font-weight:900;white-space:nowrap}
.ffx-brand small{display:block;font-size:.78rem;color:#5b6778;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ffx-brand .ffx-line{flex:none;background:#06c755;color:#fff;text-decoration:none;font-weight:800;padding:8px 14px;border-radius:999px;font-size:.9rem}
/* 工具外框 */
.ffx{background:var(--ffx-bg);color:var(--ffx-ink);padding:18px max(3vw,16px) 28px}
.ffx-hidden{display:none!important}
.ffx .ff-flowbar{display:none!important}
/* 危險紅框 */
.ffx .ff-danger.ffx-danger{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;border:3px solid var(--ffx-red);background:var(--ffx-red-bg);border-radius:16px;padding:14px 16px;margin:0 0 16px;color:var(--ffx-ink)}
.ffx-danger strong{color:var(--ffx-red);font-size:1.05rem;display:block}
.ffx-danger p{margin:4px 0 0;color:var(--ffx-ink)}
.ffx-danger label{display:inline-flex;align-items:center;gap:10px;font-weight:800;background:var(--ffx-card);border:2px solid var(--ffx-red);color:var(--ffx-red);border-radius:12px;padding:10px 14px;cursor:pointer;min-height:46px}
.ffx-danger input{width:22px;height:22px;accent-color:var(--ffx-red)}
.ffx-stop{border:4px solid var(--ffx-red);background:var(--ffx-red-bg);border-radius:18px;padding:20px;margin:0 0 16px;color:var(--ffx-ink)}
.ffx-stop h2{color:var(--ffx-red);margin:0 0 8px;font-size:1.4rem}
.ffx-stop ol{margin:8px 0 14px;padding-left:1.3em;line-height:1.75}
.ffx-stop a{color:var(--ffx-red);font-weight:800}
body.ffx-stopped .ffx-steps,body.ffx-stopped [data-ffx-step]{display:none!important}
/* 步驟列 */
.ffx-steps{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0;margin:0 0 14px}
.ffx-steps li{background:var(--ffx-card);border:1px solid var(--ffx-line);border-radius:10px;padding:8px 6px;text-align:center;font-size:.86rem;color:var(--ffx-muted);min-width:0}
.ffx-steps li[aria-current="step"]{background:var(--ffx-navy);color:#fff;border-color:var(--ffx-navy);font-weight:800}
.ffx-steps li.is-done{border-color:#13795b;color:#13795b}
/* 版面：一次一步，單欄 */
.ffx .ff-layout{display:block!important}
.ffx .ff-devices,.ffx .ff-main{width:auto!important;max-width:1100px;margin:0 auto;position:static!important}
.ffx [data-ffx-step]{background:var(--ffx-card);border:1px solid var(--ffx-line);border-radius:18px;padding:18px;margin:0 auto 16px;max-width:1100px;color:var(--ffx-ink)}
.ffx [data-ffx-step] h2{color:var(--ffx-ink);margin:0 0 6px;font-size:1.25rem}
.ffx [data-ffx-step] p{color:var(--ffx-muted)}
/* 設備卡與症狀卡 */
.ffx #ff-device-list{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;overflow:visible!important}
.ffx #ff-device-list [data-device]{display:flex!important;flex-direction:column;align-items:stretch;gap:6px;padding:8px!important;border-radius:14px;border:1px solid var(--ffx-line);background:var(--ffx-card);color:var(--ffx-ink);min-width:0;width:auto!important;cursor:pointer;text-align:center}
.ffx #ff-device-list [data-device] b{font-size:.95rem;color:var(--ffx-ink)}
.ffx #ff-device-list [data-device].is-active{border-color:var(--ffx-orange);box-shadow:inset 0 0 0 2px var(--ffx-orange)}
.ffx .ffx-art{display:block;border-radius:10px;overflow:hidden;background:#e9edf0;line-height:0}
.ffx .ffx-art svg,.ffx .real-art{width:100%;height:auto;display:block;aspect-ratio:240/150}
.ffx #ff-symptoms{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ffx #ff-symptoms [data-symptom]{display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:14px;border:1px solid var(--ffx-line);background:var(--ffx-card);color:var(--ffx-ink);text-align:left;cursor:pointer;min-width:0}
.ffx #ff-symptoms [data-symptom] b{color:var(--ffx-ink)}
.ffx #ff-symptoms [data-symptom] small{color:var(--ffx-muted)}
.ffx #ff-symptoms [data-symptom].is-active{border-color:var(--ffx-orange);box-shadow:inset 0 0 0 2px var(--ffx-orange)}
.ffx .ff-select-head{display:block!important}
.ffx-model{margin:14px 0 0;border:1px dashed var(--ffx-line);border-radius:12px;padding:10px 14px;background:var(--ffx-bg)}
.ffx-model summary{font-weight:800;cursor:pointer;color:var(--ffx-ink)}
.ffx-model label{display:flex;flex-direction:column;gap:4px;margin:10px 0;font-weight:700;color:var(--ffx-ink)}
.ffx-model select,.ffx-model input{font:inherit;padding:9px 10px;border-radius:10px;border:1px solid var(--ffx-line);min-height:44px;max-width:100%}
.ffx .ff-code-lookup{margin-top:10px}
/* 動作列：一顆主要按鈕 */
.ffx-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.ffx-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--ffx-orange);color:#fff!important;font:inherit;font-weight:900;font-size:1.05rem;border:0;border-radius:999px;padding:14px 26px;min-height:50px;text-decoration:none;cursor:pointer;box-shadow:0 8px 20px rgba(245,130,32,.28)}
.ffx-primary[disabled]{background:#9aa6b2;box-shadow:none;cursor:not-allowed}
.ffx-text{background:none;border:0;font:inherit;color:var(--ffx-muted);text-decoration:underline;cursor:pointer;padding:8px 4px}
/* 第 3 步 */
.ffx .ff-workspace{display:block!important}
.ffx .ff-result{position:static!important;max-width:none!important;margin:14px 0 0}
.ffx .ff-result .ff-actions a{display:none}
.ffx-sheet{border:2px solid var(--ffx-navy);border-radius:16px;padding:16px;background:var(--ffx-card);color:var(--ffx-ink)}
.ffx-sheet-head{display:flex;justify-content:space-between;gap:10px;border-bottom:2px solid var(--ffx-navy);padding-bottom:8px;margin-bottom:10px;flex-wrap:wrap}
.ffx-sheet-head h3{margin:0;color:var(--ffx-ink)}
.ffx-sheet-head small{color:var(--ffx-muted)}
.ffx-code{font-family:Consolas,monospace;color:var(--ffx-blue)}
.ffx-sheet-top{display:grid;grid-template-columns:200px minmax(0,1fr);gap:14px;align-items:start}
.ffx-sheet dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 10px;margin:0}
.ffx-sheet dt{font-weight:800;color:var(--ffx-muted)}
.ffx-sheet dd{margin:0;overflow-wrap:anywhere}
.ffx-sheet h4{margin:12px 0 4px;color:var(--ffx-ink)}
.ffx-sheet ol,.ffx-sheet ul{margin:0;padding-left:1.3em}
.ffx-sheet .ffx-dont-h{color:var(--ffx-red)}
.ffx-sheet .ffx-dont{border:2px solid var(--ffx-red);background:var(--ffx-red-bg);border-radius:10px;padding:8px 10px 8px 2em}
.ffx-sheet-stop{border:2px solid var(--ffx-red);background:var(--ffx-red-bg);color:var(--ffx-red);font-weight:800;border-radius:10px;padding:8px 10px}
.ffx-sheet-line{margin:12px 0 0;padding:10px;border-radius:10px;background:var(--ffx-soft);color:var(--ffx-ink)!important}
.ffx-tech{margin-top:16px;border:1px solid var(--ffx-line);border-radius:14px;padding:10px 14px;background:var(--ffx-bg)}
.ffx-tech>summary{font-weight:800;cursor:pointer;color:var(--ffx-ink)}
.ffx-tech .ff-diagram{margin-top:10px}
/* 入口卡 */
.ffx-entries{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:1100px;margin:0 auto}
.ffx-entry{display:flex;flex-direction:column;gap:6px;text-decoration:none;color:var(--ffx-ink);background:var(--ffx-card);border:1px solid var(--ffx-line);border-radius:14px;padding:8px}
.ffx-entry b{color:var(--ffx-ink)}.ffx-entry small{color:var(--ffx-muted)}
.ffx-entries-wrap{padding:8px max(3vw,16px) 24px;background:var(--ffx-bg)}
.ffx-entries-wrap h2{max-width:1100px;margin:0 auto 10px;color:var(--ffx-ink);font-size:1.15rem}
.ffx-foot{padding:18px;text-align:center;background:var(--ffx-navy);color:#fff}
.ffx-foot a{color:#fff}
@media (max-width:860px){.ffx #ff-device-list,.ffx #ff-symptoms{grid-template-columns:repeat(2,minmax(0,1fr))}.ffx-entries{grid-template-columns:1fr}.ffx-sheet-top{grid-template-columns:1fr}.ffx-sheet-top .ffx-art{max-width:260px}}
@media (max-width:560px){.ffx-brand small{display:none}.ffx-actions{flex-direction:column-reverse;align-items:stretch}.ffx-primary{width:100%}.ffx [data-ffx-step]{padding:14px}.ffx-steps li{font-size:.76rem}}
@media print{.ffx-brand,.ffx-danger,.ffx-steps,.ffx-actions,.ffx-tech,.ffx-entries-wrap,.ff-hero,.ff-guide,.ff-note,.ffx-foot,.ff-result{display:none!important}.ffx{background:#fff}.ffx [data-ffx-step]{border:0}}
/* 首屏：英雄區精簡、步驟動作列貼底，讓主要按鈕留在首屏 */
.ff-hero{padding-top:22px!important;padding-bottom:18px!important}
.ffx [data-ffx-step] .ffx-actions{position:sticky;bottom:0;z-index:6;background:var(--ffx-card);padding:10px 0 4px;margin-bottom:-4px}
@media (max-width:860px){.ff-hero-stat{display:none!important}.ff-hero h1{font-size:1.6rem!important}.ff-hero p{font-size:.95rem}}
/* 全站 i18n 樣式在手機把 html/body 設 overflow-x:hidden，會讓貼底動作列失效；本頁改用 clip（不建立捲動容器） */
@supports (overflow:clip){@media (max-width:720px){html,body{overflow-x:clip!important}}}
.ffx #ff-device-list button span.ffx-art{display:block;width:100%;height:auto;place-items:initial;background:#e9edf0;border-radius:10px;font-size:inherit}
.ffx #ff-device-list button.is-active{background:var(--ffx-card);color:var(--ffx-ink)}
.ffx #ff-device-list button:hover{transform:none}
.ffx .ff-main{background:transparent!important;box-shadow:none!important;border:0!important;padding:0!important}
/* r2（Codex FF-01／04／05／07）：危險症狀說明、拍照安全範圍、量測摘要清單、現場人員基準入口 */
.ffx-stop-why{font-weight:800;color:var(--ffx-red);margin:0 0 6px}
.ffx-sheet .ffx-photo-rule{font-size:.86rem;color:var(--ffx-muted);margin:0 0 4px}
.ffx-sheet .ffx-vals{margin:0;padding-left:1.3em;overflow-wrap:anywhere}
.ffx-baseline{margin:6px 0 0;text-align:right}
