:root { color-scheme: light dark; --bg: #f5f5f7; --card: #fff; --border: #e3e3e8; --text: #1d1d1f; --muted: #6e6e73;
  --accent: #007aff; --danger: #d70015; --ok: #248a3d; --warn-bg: #fff4d6; --warn: #8a5a00; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #1c1c1e; --card: #2c2c2e; --border: #3a3a3c; --text: #f5f5f7; --muted: #a1a1a6; --accent: #0a84ff;
    --danger: #ff453a; --ok: #30d158; --warn-bg: #3a2f12; --warn: #ffd60a; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
main { max-width: 820px; margin: 0 auto; padding: 40px 28px; }
h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 16px; margin: 0 0 6px; }
h2.section { margin: 30px 0 12px; }
h3 { font-size: 15px; margin: 0 0 2px; }
.lead { color: var(--muted); margin: 0 0 22px; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 13px; margin: 2px 0 12px; }
.row { display: flex; gap: 8px; }
input { flex: 1; height: 36px; border: 1px solid var(--border); border-radius: 9px; padding: 0 12px; font: inherit;
  background: var(--bg); color: var(--text); outline: none; }
input:focus { border-color: var(--accent); }
button { font: inherit; cursor: pointer; border-radius: 9px; height: 34px; padding: 0 16px; white-space: nowrap; }
.primary { border: none; background: var(--accent); color: #fff; font-weight: 600; }
.primary:disabled { opacity: .5; cursor: default; }
.plain { border: 1px solid var(--border); background: var(--card); color: var(--text); }
.danger { border: 1px solid var(--border); background: var(--card); color: var(--danger); }
.status { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; margin-bottom: 16px;
  border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.recommended, .ext { display: flex; align-items: center; gap: 16px; }
.ext-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--bg); }
.ext-icon img { width: 40px; height: 40px; object-fit: contain; }
.ext-icon.line { background: #06c755; color: #fff; font: 800 13px/1 -apple-system, sans-serif; }
.ext-body { flex: 1; min-width: 0; }
.ext-body p { margin: 2px 0 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 8px; margin-left: 6px; vertical-align: 1px; }
.badge.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.badge.off { background: var(--bg); color: var(--muted); }
.badge.pending { background: var(--warn-bg); color: var(--warn); }
.actions { display: flex; gap: 8px; align-items: center; flex: none; }
/* 開關 */
.switch { position: relative; width: 40px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: #c7c7cc; transition: .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: .15s; }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(16px); }
.empty { color: var(--muted); }
