/* 斑马文盾网页版主题：白灰底 + 悬浮胶囊按钮。只在网页版加载（build.sh 把它接在电脑版 style.css 后面），不影响电脑版。 */
:root {
  --bg: #f3f3f5;
  --panel: #ffffff;
  --soft: #f4f4f6;        /* 分段胶囊的底、输入框底 */
  --soft-2: #ebebef;      /* 悬停 */
  --ink: #17171a;
  --ink-2: #55555e;
  --ink-3: #a3a3ad;
  --line: #ececf0;
  --accent: #17171a;
  --radius: 18px;
  --shadow-1: 0 1px 2px rgba(17, 17, 26, .04), 0 2px 10px rgba(17, 17, 26, .035);
  --shadow-2: 0 2px 6px rgba(17, 17, 26, .05), 0 10px 30px rgba(17, 17, 26, .07);
  --shadow-3: 0 24px 70px rgba(17, 17, 26, .18), 0 2px 8px rgba(17, 17, 26, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
body { background: var(--bg); font-size: 14px; letter-spacing: .005em; }
button, select, input, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid rgba(23, 23, 26, .25); outline-offset: 2px; }

/* ---------- 顶栏：左品牌、中间悬浮胶囊导航、右状态胶囊 ---------- */
.top { position: relative; gap: 16px; min-height: 68px; padding: 10px 20px 4px; border-bottom: 0; background: transparent; }
.brand { font-size: 16px; font-weight: 700; letter-spacing: .03em; }
.tabs { position: absolute; left: 50%; transform: translateX(-50%); gap: 4px; padding: 5px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow-2); }
.tab { padding: 7px 18px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: none; }
.tab:hover { color: var(--ink); background: var(--soft); }
.tab.active { background: var(--ink); color: #fff; box-shadow: 0 4px 12px rgba(23, 23, 26, .22); }
.tab.active .count { background: rgba(255, 255, 255, .18); color: #fff; }
.count { background: var(--soft); border-radius: 999px; }
.status { gap: 8px; }
.pill { height: 32px; padding: 0 14px; gap: 7px; border: 0; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow-1); font-size: 12.5px; color: var(--ink-2); }
.pill i { width: 7px; height: 7px; }
a.pill.edition { text-decoration: none; color: #fff; background: var(--ink); font-weight: 600; box-shadow: 0 4px 14px rgba(23, 23, 26, .2); }
a.pill.edition:hover { background: #2c2c33; color: #fff; }
button.pill:hover, .pill.edition:hover { box-shadow: var(--shadow-2); color: var(--ink); }

/* ---------- 主区：大圆角白卡片，靠阴影分层，不用硬边框 ---------- */
.view { padding: 12px 20px 20px; gap: 14px; }
.pane { border: 0; border-radius: var(--radius); box-shadow: var(--shadow-1); }
.pane-head { padding: 14px 18px 10px; border-bottom: 0; }
.pane-head h2 { flex-shrink: 0; white-space: nowrap; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.pane-foot { padding: 12px 18px 14px; border-top: 1px solid var(--line); }
textarea { padding: 6px 18px 16px; font-size: 15px; line-height: 1.85; }
.out { padding: 6px 18px 16px; }
.note { padding: 4px 18px 0; color: var(--ink-3); }

/* 行业方案：一条悬浮胶囊工具条 */
.industry-bar { padding: 12px 16px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-1); gap: 6px; }
.ib-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.industry-list { gap: 4px; padding: 4px; border-radius: 20px; background: var(--soft); }
.ind-btn { border: 0; background: transparent; padding: 6px 13px 6px 11px; border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.ind-btn:hover { background: var(--soft-2); color: var(--ink); }
.ind-btn.active { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(17, 17, 26, .06), 0 3px 10px rgba(17, 17, 26, .08); }
.ind-btn.mine { border: 0; }
.ib-meta { padding-left: 86px; }
.ib-strict { padding: 4px 12px; border-radius: 999px; background: var(--soft); }

/* 按钮：全部胶囊 */
.ghost { height: 30px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12.5px; font-weight: 500; transition: background .15s, color .15s; }
.ghost:hover { background: var(--soft-2); color: var(--ink); }
.ghost.icon { width: 30px; padding: 0; }
.primary { height: 36px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(23, 23, 26, .18); transition: transform .15s var(--ease), box-shadow .15s, background .15s; }
.primary:hover:not(:disabled) { background: #2c2c33; box-shadow: 0 6px 18px rgba(23, 23, 26, .24); transform: translateY(-1px); }
.primary:active:not(:disabled) { transform: translateY(0); }
.link, .linkish { color: var(--ink-2); }
select { height: 30px; padding: 0 28px 0 12px; border: 0; border-radius: 999px; background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2355555e' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") right 10px center/12px no-repeat; -webkit-appearance: none; appearance: none; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.tools { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tools label { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--soft); font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--ink); }

/* 分段胶囊（核对 / 清单 / 发送给 AI 的文本） */
.seg { padding: 4px; gap: 2px; border-radius: 999px; background: var(--soft); }
.seg-btn { padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.seg-btn.active { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(17, 17, 26, .06), 0 3px 10px rgba(17, 17, 26, .08); }

/* 空状态：居中的浅灰提示块 */
.out > p.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; margin: 8px 0; padding: 24px; border-radius: 16px; background: var(--soft); color: var(--ink-3); font-size: 13px; text-align: center; white-space: normal; line-height: 1.7; }
.out > p.empty::before { content: ""; width: 44px; height: 44px; border-radius: 14px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a3ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 4.5-3 8.3-7 10-4-1.7-7-5.5-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center/22px no-repeat; box-shadow: var(--shadow-1); }

.out > p.empty .web-try { margin-top: 4px; }

/* 识别结果 */
.ent { border-radius: 6px; padding: 1px 4px; }
.chip { padding: 3px 10px; font-weight: 500; }
.summary { gap: 6px; }

/* 设置页 */
.view.settings.active { padding: 12px 20px 28px; }
.settings-col { max-width: 980px; gap: 14px; }
.scheme-list { gap: 4px; padding: 4px; border-radius: 22px; background: var(--soft); width: fit-content; max-width: 100%; }
.scheme-btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 500; }
.scheme-btn:hover { background: var(--soft-2); color: var(--ink); }
.scheme-btn.active { background: var(--panel); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(17, 17, 26, .06), 0 3px 10px rgba(17, 17, 26, .08); }
.scheme-btn.mine { border: 0; }
.scope { padding: 6px 18px 16px; gap: 12px; }
.scope-group label { padding: 3px 10px; border-radius: 999px; background: var(--soft); }
.scope-group label:has(input:checked) { background: #ececf0; color: var(--ink); }
.lists .pane { height: 300px; }
table th { color: var(--ink-3); font-weight: 500; }
table td, table th { border-color: var(--line) !important; }

/* 提示条、拖放 */
.toast { padding: 10px 20px; border-radius: 999px; background: rgba(23, 23, 26, .92); box-shadow: 0 10px 30px rgba(17, 17, 26, .25); backdrop-filter: blur(8px); }
.drop-hint { border: 2px dashed var(--ink-3); border-radius: 26px; margin: 14px; background: rgba(243, 243, 245, .88); backdrop-filter: blur(6px); }

/* ---------- 弹窗：白卡片、柔和投影、背景虚化、圆形关闭按钮 ---------- */
.modal { background: rgba(23, 23, 26, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: web-fade .18s ease-out; }
.modal-card { padding: 28px 28px 22px; border: 0; border-radius: 24px; box-shadow: var(--shadow-3); animation: web-pop .22s var(--ease); }
.modal-card h3 { margin: 0 0 14px; font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.modal-x { top: 14px; right: 14px; width: 32px; height: 32px; padding: 0; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 18px; line-height: 32px; text-align: center; transition: background .15s, color .15s; }
.modal-x:hover { background: var(--soft-2); color: var(--ink); }
@keyframes web-fade { from { opacity: 0; } }
@keyframes web-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.lic-feats { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 10px; }
#aboutModal .lic-feats li { position: relative; padding: 12px 14px 12px 40px; border-radius: 14px; background: var(--soft); font-size: 13px; line-height: 1.6; color: var(--ink-2); }
#aboutModal .lic-feats li::before { content: ""; position: absolute; left: 14px; top: 15px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; }
#aboutModal .lic-feats b { color: var(--ink); }
.ver { margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 500; vertical-align: 2px; }
.lic-actions { margin-top: 16px; gap: 8px; }
.lic-small, .lic-note { color: var(--ink-3); }

/* 电脑版功能（专业版）弹窗：左侧浅灰功能栏，右侧下载电脑版 */
.modal-card.lic-card { padding: 0; border-radius: 26px; }
.lic-side { background: var(--soft); border-right: 0; }
.lic-logo { border-radius: 16px; box-shadow: 0 8px 20px rgba(17, 17, 26, .1); }
.lic-side .lic-feats li { padding: 0; background: none; }
.lic-side .lic-feats svg { background: var(--panel); stroke: var(--ink); box-shadow: 0 1px 3px rgba(17, 17, 26, .08); }
.web-desk { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 100%; padding: 6px 0; }
.web-desk h4 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.web-desk p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }
.web-desk .web-points { display: grid; gap: 8px; margin: 18px 0 22px; }
.web-desk .web-points span { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: var(--soft); font-size: 13px; color: var(--ink); }
.web-desk .web-points em { font-style: normal; color: var(--ink-3); font-size: 12px; margin-left: auto; }
.web-desk .row { display: flex; gap: 10px; }
.web-desk .btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s, background .15s; }
.web-desk .btn.dark { flex: 1; background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(23, 23, 26, .22); }
.web-desk .btn.dark:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(23, 23, 26, .28); }
.web-desk .btn.soft { background: var(--soft); color: var(--ink); }
.web-desk .btn.soft:hover { background: var(--soft-2); }
.web-desk small { margin-top: 12px; color: var(--ink-3); font-size: 12px; text-align: center; }

/* 新版本 / 报错弹窗 */
.upd-card .upd-notes-box, .err-text, .update-notes { border: 0 !important; border-radius: 14px !important; background: var(--soft) !important; }

/* 窄屏：导航回到顶栏里正常排列 */
@media (max-width: 1080px) {
  .tabs { position: static; transform: none; }
  .top { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  html, body { height: auto; min-height: 100%; }
  body { overflow: auto; }
  .top { flex-wrap: wrap; gap: 10px; min-height: 0; padding: 12px 12px 4px; }
  .top .brand { flex: 1; }
  .tabs { order: 3; width: 100%; flex-wrap: nowrap; }
  .tab { flex: 1; padding: 8px 0; white-space: nowrap; font-size: 13.5px; }
  .status .pill:not(.edition):not(.web-edition) { display: none; }
  .view, .view.active { display: none; }
  .view.active { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; padding: 8px 12px 20px; gap: 12px; }
  .view > * { min-width: 0; }
  .pane { min-height: 44vh; }
  .industry-bar { padding: 12px; }
  .ib-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .industry-list { flex-wrap: nowrap; overflow-x: auto; border-radius: 999px; scrollbar-width: none; }
  .industry-list::-webkit-scrollbar { display: none; }
  .ind-btn { flex: none; white-space: nowrap; }
  .ib-meta { padding-left: 0; flex-wrap: wrap; }
  .ib-desc { white-space: normal; }
  .pane-head { flex-wrap: wrap; padding: 12px 14px 8px; }
  .tools { justify-content: flex-start; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg-btn { flex: none; white-space: nowrap; }
  textarea, .out { padding-left: 14px; padding-right: 14px; }
  textarea { min-height: 38vh; }
  .pane-foot { flex-wrap: wrap; }
  .settings-col, .lists { grid-template-columns: 1fr; }
  .modal-card { width: calc(100vw - 24px); padding: 24px 18px 18px; border-radius: 22px; }
  .modal-card.lic-card { grid-template-columns: 1fr; }
  .lic-side { display: none; }
  .lic-main { padding: 26px 20px 20px; }
}

/* ---------- 版本标识：网页版 · 免费 ---------- */
.pill.web-edition { gap: 6px; padding: 0 14px 0 4px; color: var(--gold-ink, #7a5410); background: #fbf1dc; box-shadow: 0 0 0 1px #ecd9b0 inset; font-weight: 500; cursor: pointer; }
.pill.web-edition b { padding: 2px 9px; border-radius: 999px; background: #a86f10; color: #fff; font-size: 11.5px; font-weight: 600; }
.pill.web-edition:hover { background: #f8e8c6; color: #5c3f0a; box-shadow: 0 0 0 1px #e2c78d inset; }

/* ---------- 模型下载进度条（第一次打开） ---------- */
.web-model { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-1); transition: opacity .35s, transform .35s; }
.web-model[hidden] { display: none; }
.web-model.bye { opacity: 0; transform: translateY(-6px); }
.web-model .wm-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #eef4ff; color: #2563eb; }
.web-model .wm-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; animation: wm-bob 1.4s ease-in-out infinite; }
@keyframes wm-bob { 50% { transform: translateY(2px); } }
.web-model .wm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.web-model .wm-title { font-size: 14px; }
.web-model .wm-sub { color: var(--ink-3); font-size: 12px; line-height: 1.6; }
.web-model .wm-sub a { color: var(--ink); }
.web-model .wm-track { height: 6px; margin-top: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.web-model .wm-track i { display: block; width: 3%; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #6366f1); transition: width .3s; }
.web-model.done .wm-ico { background: #dcfce7; color: var(--ok); }
.web-model.done .wm-ico svg { animation: none; }
.web-model.done .wm-track i { background: var(--ok); }
.web-model.err .wm-ico { background: #fee2e2; color: var(--danger); }
.web-model.err .wm-ico svg { animation: none; }
.web-model.err .wm-track { display: none; }

/* ---------- 本地处理标识（原文框底部） ---------- */
.pane-foot .web-trust { display: inline-flex; align-items: center; gap: 7px; height: 28px; margin-left: auto; padding: 0 12px 0 8px; border: 0; border-radius: 999px; background: #ecfdf3; color: #166534; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .15s; }
.web-trust svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.web-trust u { color: #15803d; opacity: .75; text-underline-offset: 2px; }
.web-trust:hover { background: #dcfce7; }
.web-trust.off { background: #eef4ff; color: #1d4ed8; }
.web-trust.off u { color: #1d4ed8; }
.web-trust.warn { background: #fef3c7; color: #92400e; }
.web-trust.warn u { color: #92400e; }

/* 「怎么验证」弹窗 */
.trust-card { width: min(520px, calc(100vw - 32px)); }
.trust-badge { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 16px; background: #ecfdf3; color: var(--ok); }
.trust-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.trust-live { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.trust-live .tl-num { min-width: 44px; font-size: 40px; line-height: 1; font-weight: 700; color: var(--ok); text-align: center; font-variant-numeric: tabular-nums; }
.trust-live div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trust-live strong { font-size: 14px; }
.trust-live span { color: var(--ink-3); font-size: 12px; line-height: 1.5; }
.trust-live em { margin-left: auto; flex: none; padding: 3px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; font-style: normal; font-weight: 500; }
.trust-live em.off { background: #dbeafe; color: #1d4ed8; }
.tl-list { margin: 10px 0 0; font-size: 12px; color: var(--ink-2); }
.tl-list pre { max-height: 120px; overflow: auto; margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--soft); font-size: 11.5px; white-space: pre-wrap; word-break: break-all; }
.trust-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.trust-steps li { position: relative; padding-left: 34px; color: var(--ink-2); font-size: 13px; line-height: 1.7; counter-increment: s; }
.trust-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.trust-steps b { display: block; color: var(--ink); font-size: 13.5px; }

@media (max-width: 760px) {
  .pane-foot .web-trust u { display: none; }
  .web-model { padding: 12px 14px; }
}

/* 有下载进度条时，脱敏页多一行 */
#view-mask:has(> .web-model:not([hidden])) { grid-template-rows: auto auto minmax(0, 1fr); }
/* 模型状态由进度条和「本地处理」标识显示，右上角不再重复 */
#modelPill { display: none !important; }
