/* ==========================================================================
   tools100 批次共享底座
   作用域统一限定在 .t100 之下，避免污染线上任何页面
   配色通过每个页面内联的 --a / --a2 / --a3 注入，本文件只消费变量
   深色模式走导航栏控制器：:root[data-theme="dark"]
   ========================================================================== */

.t100 {
  --a: #2563eb;
  --a2: #0f172a;
  --a3: #38bdf8;
  --soft: rgba(37, 99, 235, .08);
  --soft2: rgba(37, 99, 235, .16);
  --line: rgba(100, 116, 139, .28);
  --ink: #0f172a;
  --ink2: #475569;
  --muted: #94a3b8;
  --card: #ffffff;
  --bg: #f6f8fb;
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --sh: 0 10px 30px rgba(15, 23, 42, .08);
  --sh-s: 0 4px 14px rgba(15, 23, 42, .06);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
}

:root[data-theme="dark"] .t100 {
  --ink: #e8eef8;
  --ink2: #c3cede;
  --muted: #8fa0b6;
  --card: #0f1727;
  --bg: #080e1b;
  --line: rgba(148, 163, 184, .26);
  --soft: rgba(56, 189, 248, .12);
  --soft2: rgba(56, 189, 248, .22);
  --sh: 0 14px 38px rgba(0, 0, 0, .45);
  --sh-s: 0 6px 18px rgba(0, 0, 0, .35);
}

.t100 *,
.t100 *::before,
.t100 *::after { box-sizing: border-box; }

.t100-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 18px 64px; }

/* 步骤编号与本机记录（参考 masmo.cn 工具页结构） */
.t100-step-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 12px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: .05em;
}
.t100-step-label b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--a);
  font-size: 12px;
}
.t100-step-label span { font-weight: 500; }
.t100-history {
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
  font-size: 13px;
}
.t100-history > b { display: block; margin-bottom: 8px; color: var(--ink); }
.t100-history-item {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink2);
  word-break: break-all;
}
.t100-history-item span { flex: 0 0 auto; color: var(--muted); }
.t100-history .t100-btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.t100-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-l);
  background:
    radial-gradient(120% 130% at 88% 8%, rgba(255, 255, 255, .18) 0%, transparent 58%),
    linear-gradient(135deg, var(--a2) 0%, var(--a) 100%);
  color: #fff;
  padding: 30px 30px 28px;
  box-shadow: var(--sh);
}

.t100-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .5;
  pointer-events: none;
}

.t100-hero-in { position: relative; z-index: 2; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.t100-hero-main { flex: 1 1 420px; min-width: 0; }

.t100-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
}

.t100-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.28;
  font-weight: 800;
}

.t100-hero h1 em {
  font-style: normal;
  display: block;
  font-size: .62em;
  font-weight: 700;
  margin-top: 6px;
  opacity: .93;
}

.t100-lede { margin: 0 0 14px; font-size: 15px; line-height: 1.8; opacity: .95; max-width: 62ch; }
.t100-lede strong { font-weight: 700; }

.t100-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.t100-tag {
  font-size: 12.5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .2);
}

.t100-art { flex: 0 0 auto; display: grid; place-items: center; min-width: 180px; }
.t100-art svg { display: block; max-width: 100%; height: auto; }

/* ---------- Shell ---------- */
.t100-shell { margin-top: 18px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.t100-shell.is-2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; }
.t100-shell.is-side { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; }

@media (max-width: 900px) {
  .t100-shell.is-2,
  .t100-shell.is-side { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Card ---------- */
.t100-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 18px 18px 20px;
  box-shadow: var(--sh-s);
}

.t100-card-h {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.t100-card-h small { font-weight: 500; font-size: 12.5px; color: var(--muted); }

.t100-card-h::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--a), var(--a3, var(--a)));
}

/* ---------- 表单 ---------- */
.t100-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 12px; }
.t100-row.is-1 { grid-template-columns: minmax(0, 1fr); }
.t100-field { min-width: 0; }

.t100-lab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 6px;
}

.t100-lab .t100-req { color: var(--err); font-weight: 800; }
.t100-lab i { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }

.t100-input,
.t100-select,
.t100-textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-s);
  padding: 9px 11px;
  line-height: 1.6;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

.t100-input:focus,
.t100-select:focus,
.t100-textarea:focus {
  outline: none;
  border-color: var(--a);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--soft2);
}

.t100-textarea {
  min-height: 150px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.t100-textarea.is-sm { min-height: 96px; }

.t100-err { margin: 5px 0 0; font-size: 12.5px; color: var(--err); }
.t100-hint { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }

.t100-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink2);
  cursor: pointer;
  user-select: none;
}

.t100-check input { width: 15px; height: 15px; accent-color: var(--a); }

.t100-opts { display: flex; flex-wrap: wrap; gap: 8px; }

.t100-opt {
  font: inherit;
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--ink2);
  cursor: pointer;
  transition: all .15s;
}

.t100-opt:hover { border-color: var(--a); color: var(--a); }

.t100-opt.is-on { background: var(--a); border-color: var(--a); color: #fff; font-weight: 700; }

/* ---------- 按钮 ---------- */
.t100-btns { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }

.t100-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--a), var(--a3, var(--a)));
  color: #fff;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s, opacity .14s;
  box-shadow: 0 6px 18px var(--soft2);
}

.t100-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px var(--soft2); }
.t100-btn:active { transform: translateY(0); }
.t100-btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.t100-btn--ghost { background: transparent; color: var(--a); border-color: var(--line); box-shadow: none; }
.t100-btn--ghost:hover { background: var(--soft); border-color: var(--a); }
.t100-btn--sm { font-size: 12.5px; padding: 6px 13px; }
.t100-btn--block { width: 100%; }

/* ---------- 结果区 ---------- */
.t100-empty {
  border: 1.5px dashed var(--line);
  border-radius: var(--r-m);
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  background: var(--bg);
}

.t100-empty b { display: block; font-size: 30px; margin-bottom: 8px; }

.t100-out { display: grid; gap: 12px; }

.t100-out-code {
  margin: 0;
  padding: 13px 14px;
  border-radius: var(--r-s);
  background: #0f172a;
  color: #e6edf6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 460px;
  overflow: auto;
}

:root[data-theme="dark"] .t100-out-code { background: #060b14; }

.t100-kv {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
}

.t100-kv > div {
  display: grid;
  grid-template-columns: minmax(110px, 38%) minmax(0, 1fr);
  gap: 10px;
  background: var(--card);
  padding: 9px 12px;
  font-size: 13.5px;
}

.t100-kv .k { color: var(--muted); font-weight: 600; }
.t100-kv .v { margin: 0; word-break: break-word; font-weight: 600; }

.t100-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.t100-table th,
.t100-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.t100-table th { background: var(--soft); font-weight: 700; }
.t100-table tr:last-child td { border-bottom: none; }
.t100-table td.num { font-variant-numeric: tabular-nums; }

.t100-scroll { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: var(--r-s); }

/* ---------- 徽标 / 提示 ---------- */
.t100-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--a);
  border: 1px solid var(--soft2);
}

.t100-pill--ok { color: var(--ok); background: rgba(22, 163, 74, .12); border-color: rgba(22, 163, 74, .28); }
.t100-pill--warn { color: var(--warn); background: rgba(217, 119, 6, .12); border-color: rgba(217, 119, 6, .28); }
.t100-pill--err { color: var(--err); background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .28); }

.t100-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: var(--r-m);
  background: var(--soft);
  border: 1px solid var(--soft2);
  font-size: 13.5px;
  line-height: 1.8;
}

.t100-note .ic { font-size: 17px; line-height: 1.5; }
.t100-note b { font-weight: 800; }
.t100-note--warn { background: rgba(217, 119, 6, .1); border-color: rgba(217, 119, 6, .26); }

.t100-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.95; color: var(--ink2); }
.t100-list li::marker { color: var(--a); font-weight: 700; }

.t100-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.t100-chip {
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: var(--r-s);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink2);
}

/* ---------- 底部说明 / tabs / FAQ ---------- */
.t100-sech { margin: 26px 0 12px; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 9px; }

.t100-sech::before {
  content: "";
  width: 5px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--a), var(--a3, var(--a)));
}

.t100-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.t100-tab {
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink2);
  cursor: pointer;
}

.t100-tab.is-on { background: var(--a); border-color: var(--a); color: #fff; }

.t100-panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 16px 18px;
}

.t100-panel.is-on { display: block; }

.t100-prose { font-size: 14px; line-height: 1.95; color: var(--ink2); }
.t100-prose h3 { margin: 16px 0 7px; font-size: 15.5px; color: var(--ink); }
.t100-prose h3:first-child { margin-top: 0; }
.t100-prose p { margin: 0 0 9px; }
.t100-prose strong { color: var(--ink); font-weight: 700; }
.t100-prose code { background: var(--soft); color: var(--a); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

.t100-faq details { border-bottom: 1px dashed var(--line); padding: 11px 0; }
.t100-faq details:last-child { border-bottom: none; }

.t100-faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.t100-faq summary::before { content: "Q"; color: var(--a); font-weight: 800; }
.t100-faq summary::-webkit-details-marker { display: none; }
.t100-faq details > div { margin: 7px 0 0 22px; font-size: 13.5px; color: var(--ink2); line-height: 1.9; }

/* ---------- Toast ---------- */
.t100-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(14px);
  background: rgba(15, 23, 42, .93);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  max-width: 86vw;
  text-align: center;
}

.t100-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
:root[data-theme="dark"] .t100-toast { background: #e8edf5; color: #0d1117; }

/* ---------- 统计小格 ---------- */
.t100-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

.t100-stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; }
.t100-stat b { display: block; font-size: 19px; font-weight: 800; color: var(--a); font-variant-numeric: tabular-nums; }
.t100-stat span { font-size: 12px; color: var(--muted); }

/* ---------- 画布 / 预览 ---------- */
.t100-canvas-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 10px;
}

.t100-canvas-wrap canvas { max-width: 100%; display: block; border-radius: 4px; }

.t100-preview {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  padding: 12px;
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 340px;
  overflow: auto;
}

/* ---------- 拖拽上传 ---------- */
.t100-drop {
  border: 2px dashed var(--line);
  border-radius: var(--r-m);
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .16s, background .16s;
}

.t100-drop:hover, .t100-drop.is-on { border-color: var(--a); background: var(--soft); color: var(--a); }
.t100-drop b { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.t100-drop input { display: none; }

.t100-file-list { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }

.t100-file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: var(--r-s);
  background: var(--bg);
  border: 1px solid var(--line);
}

.t100-file-list li span { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 分步流 ---------- */
.t100-steps { display: grid; gap: 12px; counter-reset: t100s; }

.t100-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 14px 15px;
}

.t100-step::before {
  counter-increment: t100s;
  content: counter(t100s);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--a), var(--a3, var(--a)));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.t100-step h3 { margin: 3px 0 6px; font-size: 15px; }
.t100-step p { margin: 0; font-size: 13.5px; color: var(--ink2); }

/* ---------- 工具条（结果区操作） ---------- */
.t100-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

.t100-bar .t100-btns { margin-top: 0; }
