/* 總部頁 → 公司卡「編輯」→「顧客頁配色」(#th-root)。畫面與儲存在 public/theme-ui.js,伺服器 server/routes/company-home-settings.js。
 * 只用 .th- 開頭的 class,不動 app.css。色塊、預覽裡的顏色都是伺服器給的(server/lib/themes.js),這裡不寫主題顏色。
 * 商米舊 WebView 守則同 app.css:橫排用 margin 隔開、不靠 flex gap;不用 grid、:has()、:is()、min()、clamp()。觸控區一律 >= 44px。 */
#hq-theme-card { padding: 14px; }
#th-root { min-width: 0; }
.th-load { padding: 12px 4px; color: var(--muted); font-size: 14.5px; }
.th-lead { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.th-note { display: block; margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.th-presets { margin: 0 0 6px; }
.th-p { display: block; width: 100%; box-sizing: border-box; min-height: 64px; margin: 0 0 8px; padding: 10px 12px 10px 104px; position: relative;
  text-align: left; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.th-p.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.th-p:disabled { opacity: .6; cursor: default; }
.th-sw { position: absolute; left: 10px; top: 50%; width: 84px; height: 46px; margin-top: -23px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12) inset; }
.th-sw i { position: absolute; display: block; font-style: normal; }
.th-sw i:first-child { left: 6px; top: 6px; right: 6px; bottom: 6px; border-radius: 6px; }
.th-sw .th-sw-a { left: 10px; bottom: 9px; padding: 1px 6px; border-radius: 5px; font-size: 10px; font-weight: 800; line-height: 14px; }
.th-sw b { position: absolute; top: 8px; font-size: 12px; font-weight: 900; line-height: 14px; }
.th-sw b:first-of-type { left: 12px; }
.th-sw b:last-of-type { right: 11px; }
.th-pn { display: block; font-size: 15px; font-weight: 800; line-height: 1.4; }
.th-pn small { margin-left: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.th-pd { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }
.th-pc { display: block; min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.4; cursor: pointer; }
.th-pc input { display: inline-block; width: auto; min-height: 0; margin: 0 6px 0 0; vertical-align: middle; }
.th-pcrow { margin: 0 0 6px; }
.th-pcrow[hidden] { display: none; }
.th-pcrow input[type="color"] { width: 56px; height: 44px; padding: 2px; margin: 0 8px 0 0; vertical-align: middle; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.th-pcrow input[type="text"] { width: 120px; min-height: 44px; vertical-align: middle; font-family: ui-monospace, Menlo, Consolas, monospace; }
.th-msg { margin: 4px 0; font-size: 13.5px; line-height: 1.6; }
.th-msg.ok { color: #067647; }
.th-msg.err { color: #b42318; }
.th-sug { display: block; margin: 4px 0 0; color: var(--muted); }
.th-chip { margin: 4px 6px 0 0; min-height: 36px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13.5px; cursor: pointer; }
.th-chip i { display: inline-block; width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -3px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15) inset; }
.th-btns { margin: 8px 0 0; }
.th-btns button { margin: 0 8px 8px 0; min-height: 44px; }
.th-state { display: inline-block; font-size: 13px; color: var(--muted); }
.th-prev { margin: 12px 0 0; }
.th-tabs { margin: 0 0 8px; }
.th-tab { min-height: 44px; margin: 0 6px 6px 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.th-tab.on { border-color: var(--primary); color: var(--primary-text); }
/* 預覽框:手機尺寸(390 × 760)的頁面縮小 0.6 倍放進來 */
.th-frame { position: relative; width: 234px; height: 456px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #f3f3f3; }
.th-frame iframe { position: absolute; left: 0; top: 0; width: 390px; height: 760px; border: 0; transform: scale(.6); -webkit-transform: scale(.6); transform-origin: 0 0; -webkit-transform-origin: 0 0; background: #fff; }
.th-empty { padding: 20px 16px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
