:root{color-scheme:light dark;--bg:#f5f7f8;--surface:#fff;--text:#172c33;--muted:#56696e;--line:#d9e2e4;--accent:#156b5b;--soft:#eef6f3;--danger:#a22836;font-family:system-ui,-apple-system,"Segoe UI","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.55}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit;color:inherit}button,input,select{min-height:44px}button{border:1px solid var(--line);border-radius:8px;background:var(--surface);padding:9px 14px;cursor:pointer}button:hover:not(:disabled){border-color:var(--accent);background:var(--soft)}button.primary{background:var(--accent);color:#fff;border-color:var(--accent)}button.primary:hover:not(:disabled){filter:brightness(.94);background:var(--accent)}button:disabled{opacity:.5;cursor:default}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:7px;padding:10px;background:var(--surface)}input[type=checkbox]{width:18px;min-height:18px;flex:none;accent-color:var(--accent)}textarea{resize:vertical;min-height:70px}input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:var(--accent)}h1{font-size:22px;line-height:1.3;margin:0}h2{font-size:17px;margin:0 0 10px}p{margin:8px 0}small,.muted{color:var(--muted);font-size:12px}.page{max-width:820px;margin:0 auto;padding:30px 24px 60px}.top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:24px}.top small{display:block;margin-top:4px}.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:22px;margin-bottom:18px}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:block;margin:14px 0}.field>span{display:block;font-weight:550;margin-bottom:6px}.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:16px}.check{display:flex;gap:8px;align-items:center;min-height:36px;font-weight:400}.status{margin-top:14px;padding:10px 12px;background:var(--soft);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}.status[data-tone=error]{color:var(--danger);background:transparent;border:1px solid var(--danger)}summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;font-weight:650;list-style:none}summary::after{content:'＋';font-size:18px}details[open]>summary::after{content:'−'}summary::-webkit-details-marker{display:none}details.card{padding:12px 22px}.term{border-top:1px solid var(--line);margin-top:16px;padding-top:14px}.term .row{gap:10px}.term .field{margin:8px 0}.term-controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.term-head{display:flex;align-items:center;justify-content:space-between}.term-head strong{font-size:13px}.term-head button{padding:6px 10px;min-height:36px}.term-meta{font-size:12px;color:var(--muted)}[hidden]{display:none!important}.key-row{display:flex;align-items:center;gap:8px}.key-row input{min-width:0}.key-row button{white-space:nowrap}.danger{color:var(--danger)}.footer{font-size:12px;color:var(--muted);margin-top:22px}.popup{width:100%;max-width:none}.popup .page{padding:18px}.popup h1{font-size:18px}.popup .top{margin-bottom:16px}.popup .card{padding:16px;margin-bottom:12px}.popup .state-title{font-size:16px;font-weight:650}.popup .primary{width:100%}.popup .secondary{display:flex;justify-content:space-between;gap:8px}.popup .secondary button{flex:1}.popup details{padding:8px 14px}.popup .actions button{flex:1}.popup summary{font-size:13px}.popup .footer{margin-top:12px}.docs{max-width:760px;line-height:1.8}.docs h2{margin-top:28px}.docs li{margin:10px 0}
@media(max-width:520px){.page{padding:18px 14px 40px}.card{padding:17px}details.card{padding:10px 17px}.row{grid-template-columns:1fr;gap:0}.term-controls{grid-template-columns:1fr 1fr}.top{align-items:flex-start}.top h1{font-size:20px}.actions button{flex:1}.popup{width:100%}.popup .page{padding:14px}}
@media(prefers-color-scheme:dark){:root{--bg:#101b20;--surface:#19282e;--text:#e6eff0;--muted:#abbfc2;--line:#3a5056;--accent:#287f6c;--soft:#1c3634;--danger:#ff9caa}a{color:#83d2bc}input,select,textarea{background:#122127}}

#description{white-space:pre-line}

#appearance-fields{border:0;padding:0;margin:0;min-width:0}.endpoint-info{white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.65 system-ui,sans-serif;border-left:3px solid #678b82;padding:8px 12px;background:#edf6f3;margin:12px 0}.endpoint-info[data-valid=false]{border-color:#a46b18;background:#fff6e7}.appearance-previews{display:grid;grid-template-columns:1fr 1fr;gap:12px}.appearance-sample{padding:16px;border-radius:10px;overflow-wrap:anywhere;min-width:0;border:1px solid #d3dbdb;background:#fff;color:#24323b}.appearance-sample[data-preview-theme=dark]{background:#202c33;color:#e9edef;border-color:#42515a}.appearance-sample p{font-size:14px;line-height:1.55;margin:12px 0}.appearance-sample small{font-size:12px;line-height:1.5;color:#526773}.appearance-sample[data-preview-theme=dark] small{color:#b6c6ce}.appearance-translation{padding-top:6px;border-top:1px solid #9ca3af66}.appearance-translation>div{line-height:1.55;white-space:pre-wrap;margin-top:3px}#appearance-custom[hidden]{display:none}#appearance-custom input{min-height:44px;width:100%;padding:4px}#appearance-section .actions{flex-wrap:wrap}#appearance-section button{min-height:44px}#appearance-contrast[data-low=true]{color:#a34b20;font-weight:600}@media(max-width:500px){.appearance-previews{grid-template-columns:1fr}}@media(prefers-color-scheme:dark){.endpoint-info{background:#1b3029;color:#d9eee8}.endpoint-info[data-valid=false]{background:#362b20;color:#f9d9b1}}

/* Native popup sizing must not depend on its initial, tiny viewport. */
html.popup-document{width:360px;min-width:360px;max-width:360px;overflow-x:hidden}
html.popup-document body.popup{width:360px;min-width:360px;max-width:360px;max-height:580px;overflow-y:auto}
html.popup-document .page{width:100%;min-width:0;padding:18px}
html.popup-document .top{align-items:center}html.popup-document h1{font-size:18px;white-space:nowrap}
html.popup-document #settings{flex:none;white-space:nowrap}
html.popup-document #diagnostics{margin-top:12px}html.popup-document #diagnostics summary{font-size:13px}
html.popup-document #diagnostic-text{font:12px/1.5 ui-monospace,monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-height:190px;overflow:auto;user-select:text}
html.popup-document .quick-settings button{width:100%;min-height:44px}

/* One-click composer stays ahead of secondary connection tools. */
.oneclick-box h2{font-size:16px;margin-bottom:10px}.oneclick-box>label{font-weight:600;font-size:13px}
#reply-source{display:block;min-height:84px;max-height:180px;margin:6px 0 10px;line-height:1.5;resize:vertical}
.reply-language-row{display:flex;align-items:center;gap:10px;margin-bottom:12px}.reply-language-row label{flex:0 0 46px;font-size:13px}.reply-language-row select{min-width:0;flex:1}
#reply-translate{min-height:46px;font-weight:600;line-height:1.4}#reply-saved{display:block;margin-top:10px;font-size:11px;line-height:1.5}
.oneclick-box .actions{margin-top:8px}.oneclick-box .actions button{font-size:12px;padding:8px;min-height:40px}.oneclick-box details{margin-top:8px;border-top:1px solid var(--line)}
#reply-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:150px;overflow-y:auto;line-height:1.65;font-size:14px}#reply-status{font-size:12px;margin:8px 0;padding:8px 10px}

.native-pair{display:grid;grid-template-columns:minmax(90px,1fr) minmax(120px,1fr);gap:8px;padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.native-pair progress{grid-column:1/-1;width:100%}.native-languages{align-items:flex-start}.native-languages label{flex:1 0 150px}#local-choice{padding:8px 0}#cloud-fields[hidden]{display:none!important}.native-entry{display:block;width:100%;margin:8px 0}

#native-block[data-ready="true"]{padding:12px 16px;margin-bottom:12px}#native-block[data-ready="true"] h2{font-size:14px;margin:0}#native-block[data-ready="true"] p{margin:4px 0}#native-block[data-ready="true"] button{font-size:12px;padding:6px 12px;min-height:36px}

/* 0.5.11: popup with the language in plain sight and one obvious button. */
.popup .top{margin-bottom:12px}.popup .top button{min-height:34px;padding:4px 12px}
.popup .card{border-radius:14px}
.popup .lang-row{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:4px 10px}
.popup .lang-from{flex:1;font-size:15px;font-weight:600;padding-left:6px}
.popup .lang-arrow{color:var(--muted);font-size:16px}
.popup .lang-row select{flex:1;min-width:0;min-height:40px;border:0;background:transparent;font-size:15px;font-weight:600;padding:0 4px}
.popup .opt-row{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:0 6px}
.popup .opt-row[hidden]{display:none}
.popup button.link{min-height:32px;padding:4px 6px;border:0;background:transparent;font-weight:600}
.popup .switch{flex:none;position:relative;width:44px;min-height:24px;height:24px;padding:0;border:0;border-radius:12px;background:#c5cfd2}
.popup .switch:hover:not(:disabled){background:#b4c0c4}
.popup .switch::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:left .15s}
.popup .switch[aria-checked=true],.popup .switch[aria-checked=true]:hover:not(:disabled){background:#2f7bff}
.popup .switch[aria-checked=true]::after{left:23px}
.popup .write-here{padding:0 6px}.popup .write-here summary{min-height:36px;font-weight:500;font-size:13px;color:var(--muted)}
.popup .write-here textarea{margin:4px 0 8px;min-height:64px}
.popup button.big{width:100%;min-height:52px;margin-top:8px;border:0;border-radius:12px;color:#fff;font-size:16px;font-weight:700;background:linear-gradient(90deg,#2a97ff,#2f6bff)}
.popup button.big:hover:not(:disabled){background:linear-gradient(90deg,#2a97ff,#2f6bff);filter:brightness(1.06)}
.popup button.big:disabled{opacity:.55}
.popup .tip{margin:8px 2px 0}
.popup .actions:empty{display:none}
.popup .state-line{margin:0 4px 10px}.popup .state-line .state-title{font-size:12px;font-weight:500;color:var(--muted)}
.popup #more-options>summary{font-weight:500;min-height:36px;color:var(--muted)}
#prepare-native,#local-service-status{display:none!important}
.popup .state-line{display:flex;align-items:center;justify-content:space-between;gap:8px}.popup .state-line button.link{min-height:28px;padding:2px 6px;font-size:12px;color:#2f7bff}

.top h1:has(.brand-logo),.brand{display:flex;align-items:center;gap:10px}.brand-logo{width:36px;height:36px;flex:none}.popup .brand-logo{width:28px;height:28px}

/* 0.5.24 paid license */
.popup .license-line{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}
.popup .license-line button.link{min-height:28px;padding:2px 6px;font-size:12px;color:#2f7bff;flex:none}
.popup .license-card.licensed{padding-top:6px;padding-bottom:6px}.popup .license-card.licensed #license-status{font-size:12px;color:var(--muted)}
.popup .license-pay{text-align:center;margin-top:8px}.popup .license-pay-title{margin:0 0 6px}
.popup #license-qr{display:block;margin:0 auto;background:#fff;border-radius:8px;border:1px solid var(--line)}
.popup #license-pay-status{margin:6px 0 0}
.popup #license-pay-open{margin:6px 0 2px}.popup #license-pay-tip{margin:4px 2px 0}
.popup #license-owned p{margin:8px 0 0}.popup #license-code-value{font-family:ui-monospace,Consolas,monospace;font-size:14px;font-weight:700;letter-spacing:.5px;user-select:all}
.popup #license-enter{margin-top:8px}.popup #license-enter>summary{color:var(--muted);font-size:12px;cursor:pointer}
.popup #license-input-row{margin-top:6px}.popup #license-code{flex:1;min-width:0;font-family:ui-monospace,Consolas,monospace}

/* 0.5.49 built-in trade term packs */
.term-packs{margin:4px 0 14px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.term-packs h3,.my-terms{margin:4px 0 6px;font-size:15px}
.pack{padding:8px 0;border-top:1px dashed var(--line)}.pack:first-of-type{border-top:0}
.pack-head{display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:600}.pack-head input{width:18px;height:18px;min-height:0;margin:0}
.pack-count{font-weight:400;color:var(--muted);font-size:12px}.pack-desc{margin:2px 0 0 26px;font-size:12px;color:var(--muted)}
.pack-list{margin:4px 0 0 26px}.pack-list>summary{min-height:28px;font-size:12px;font-weight:500;color:var(--muted)}
.pack-terms{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:2px 16px;margin:4px 0 0;padding:0;list-style:none;font-size:12px}
.pack-terms li{display:flex;gap:6px;min-width:0}.pack-terms .dir{flex:none;color:var(--muted)}.pack-terms .pair{overflow-wrap:anywhere}
/* 0.5.42 translate the whole page */
.popup #page-translate{margin-top:0}.popup #page-tip{margin:6px 2px 0}.popup #page-tip[data-tone=error]{color:var(--danger)}
/* 0.5.40 new-version card and self-service computer change (0.5.41: one compact row, same blue buttons) */
.popup .update-card{border-color:#f0b429;background:#fffaf0;padding-top:8px;padding-bottom:6px}
.popup .update-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.popup .update-title{margin:0;font-weight:600}.popup .update-title .muted{font-weight:400;font-size:12px;margin-left:4px}
.popup button.update-get{flex:none;min-height:30px;padding:4px 16px;border:0;border-radius:8px;color:#fff;font-weight:700;background:linear-gradient(90deg,#2a97ff,#2f6bff)}
.popup button.update-get:hover:not(:disabled){background:linear-gradient(90deg,#2a97ff,#2f6bff);filter:brightness(1.06)}
.popup #update-notes{margin:2px 0 0}.popup #update-seller{margin:2px 0 0}
.popup #update-how>summary{min-height:26px;font-size:12px;font-weight:500;color:var(--muted)}.popup #update-how>summary::after{font-size:14px}
.popup #update-how ol{margin:2px 0 4px;padding-left:20px}
.popup #license-move{margin-top:8px}.popup #license-move-btn{margin-top:0}.popup #license-move-tip{margin:4px 0 0}
/* 0.5.25 license card: code entry first, buying only while it is open */
.popup .license-title{margin:0 0 2px;font-size:15px;font-weight:700}
.popup .license-card:not(.licensed) .license-line{align-items:flex-start}
.popup .license-card:not(.licensed) #license-status{font-size:13px;color:var(--muted)}
.popup .license-card.licensed #license-status{color:var(--accent);font-weight:600}
.popup #license-status[data-tone=error]{color:var(--danger)!important}
.popup #license-enter.inline{padding:0;margin-top:10px}
.popup #license-enter.inline>summary{display:none}
.popup #license-input-row{flex-wrap:nowrap}
.popup #license-enter.inline #license-input-row{margin-top:0}
.popup #license-input-row #license-activate{flex:none;width:auto;min-width:72px;font-weight:700;border:0;border-radius:8px;color:#fff;background:linear-gradient(90deg,#2a97ff,#2f6bff)}
.popup #license-input-row #license-activate:hover:not(:disabled){background:linear-gradient(90deg,#2a97ff,#2f6bff);filter:brightness(1.06)}
.popup #license-sales-note{margin:10px 2px 0}
.popup #license-buy-row{margin-top:12px;padding-top:10px;border-top:1px dashed var(--line)}
.popup .license-or{margin:0;font-size:12px;color:var(--muted)}
.popup.free-used #reply-composer{opacity:.45}
/* 0.5.87: inside the settings page */
[data-embed] header.top,[data-embed] main.page>section.card:first-of-type{display:none}
[data-embed] body{background:transparent;min-height:0}
/* 0.5.90: terms and packs are set per account in 设置 → 工厂资料; this older list is not used by the page */
[data-embed] #glossary-section{display:none}
[data-embed] main.page{padding:0;margin:0;max-width:none}
