/* ════════════════════════════════════════════════════════════════════
   奔驰工具箱 · 前台设计系统 v7「诊断台 · 兼容版」
   黑底 / 墨绿点缀 / 两栏应用式 / 全浏览器一致
   ────────────────────────────────────────────────────────────────────
   本次重做目标：
   1) 跨浏览器一致 —— 去掉 color-mix()/oklch()/@container/100dvh/:is()
      这些 Chromium 111+ 才支持的新写法（老 360/旧 Edge/兼容内核会崩），
      全部改成直接 hex/rgba 色值 + @media 断点，老内核也能渲染一致。
   2) 保留黑底 #080b09（用户指定不变）+ 墨绿点缀（约 10%）。
   3) 视觉换新：更克制的层级、更清晰的检索-结果节奏。
   ──────────────────────────────────────────────────────────────────── */

/* ─── 1. 色板 Tokens（全部 hex，兼容 Chromium 49+）───────────────── */
.ct-shell,
.ct-toolbox {
  /* 黑底（用户指定保留）：带墨绿倾向的近黑 */
  --ct-black: #080b09;
  --ct-surface-1: #0f1512;
  --ct-surface-2: #151d18;
  --ct-surface-3: #1c2620;
  /* 文字：由灰绿派生的 4 级层次 */
  --ct-ink: #e7efe9;
  --ct-strong: #f4faf6;
  --ct-muted: #a0b1a8;
  --ct-faint: #6f8177;
  /* 细线 */
  --ct-hair: #29332d;
  --ct-hair-soft: #1a221d;
  /* 墨绿点缀（60-30-10 里的 10%） */
  --ct-accent: #34c596;
  --ct-accent-strong: #4ad5a6;
  --ct-accent-soft: rgba(52, 197, 150, 0.14);
  --ct-accent-ink: #a6ecd2;
  --ct-on-accent: #04130d;
  --ct-hover: rgba(52, 197, 150, 0.15);
  /* 半径 */
  --ct-r-sm: 6px;
  --ct-r-md: 8px;
  --ct-r-lg: 12px;
  /* 间距（4pt 栅格） */
  --ct-sp-1: 4px;
  --ct-sp-2: 8px;
  --ct-sp-3: 12px;
  --ct-sp-4: 16px;
  --ct-sp-5: 20px;
  --ct-sp-6: 24px;
  /* 动效 */
  --ct-dur: 200ms;
  --ct-ease: cubic-bezier(.2, .8, .2, 1);
  /* 字体 */
  --ct-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --ct-mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
  color: var(--ct-ink);
}

/* ─── 2. Shell 骨架 ──────────────────────────────────────────────── */
.ct-shell {
  display: block;
  padding: clamp(20px, 3vw, 36px);
  margin: 0 0 clamp(24px, 4vw, 40px);
  border: 1px solid var(--ct-hair-soft);
  border-radius: var(--ct-r-lg);
  background: var(--ct-black);
  color: var(--ct-ink);
  font-family: var(--ct-sans);
  font-size: 15px;
  line-height: 1.7;
  color-scheme: dark;
}
.ct-shell [hidden] { display: none !important; }

/* 两栏应用式：面板至少撑满视口剩余高度，左栏静止、右栏内滚 */
.ct-shell--menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--ct-sp-4) clamp(16px, 2vw, 24px) var(--ct-sp-6);
  min-height: calc(100vh - var(--ct-frame-top, 0px));
  min-height: calc(100dvh - var(--ct-frame-top, 0px));
}
.ct-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(184px, 16vw, 228px) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  align-items: stretch;
  padding: 0;
}
.ct-topbar { flex: none; }
.ct-menu, .ct-func { min-width: 0; }
/* 两栏模式下模块容器去掉上边框与顶部留白 */
.ct-shell .ct-func .ct-toolbox { border-top: 0; padding-top: 0; }

/* ─── 3. 左侧：品牌 + 目录 ───────────────────────────────────────── */
.ct-sidebar {
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(12px, 1.4vw, 18px) var(--ct-sp-2) 0;
  border-right: 1px solid var(--ct-hair-soft);
}
.ct-topbar {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 var(--ct-sp-4);
  padding: 0 0 var(--ct-sp-4);
  border-bottom: 1px solid var(--ct-hair);
}
.ct-topbar .ct-top-title {
  position: relative;
  margin: 0;
  padding-left: 15px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
}
.ct-topbar .ct-top-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .14em;
  bottom: .14em;
  width: 3px;
  border-radius: 2px;
  background: var(--ct-accent);
}
.ct-side-group + .ct-side-group {
  margin-top: var(--ct-sp-5);
  padding-top: var(--ct-sp-4);
  border-top: 1px solid var(--ct-hair-soft);
}
.ct-sidebar-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0 12px;
  font-family: var(--ct-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--ct-faint);
}
.ct-sidebar-kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--ct-accent);
}
.ct-sidebar-nav { display: grid; gap: 2px; }
.ct-side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px 8px 14px;
  border: 0;
  border-radius: var(--ct-r-sm);
  color: var(--ct-muted);
  text-decoration: none;
  transition: color var(--ct-dur) var(--ct-ease), background-color var(--ct-dur) var(--ct-ease);
}
.ct-side-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28%;
  bottom: 28%;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--ct-accent);
  opacity: 0;
  transform: scaleY(.4);
  transition: opacity var(--ct-dur) var(--ct-ease), transform var(--ct-dur) var(--ct-ease);
}
.ct-side-label {
  display: block;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
  transition: color var(--ct-dur) var(--ct-ease), font-weight var(--ct-dur) var(--ct-ease);
}
.ct-side-mark { display: none; }
.ct-side-link--out { justify-content: space-between; }
.ct-side-go { justify-self: end; font-size: 12px; color: var(--ct-faint); }

/* 去主题对 a 的默认下划线/背景 */
.ct-shell .ct-side-link,
.ct-shell .ct-side-link:visited,
.ct-shell .ct-side-link:hover,
.ct-shell .ct-side-link:focus,
.ct-shell .ct-link,
.ct-shell .ct-link:hover,
.ct-shell .ct-link:focus {
  color: inherit;
  text-decoration: none;
  background-image: none;
}
.ct-shell .ct-side-link:hover { color: var(--ct-ink); background: var(--ct-surface-1); }
.ct-shell .ct-side-link:hover .ct-side-label { font-weight: 600; }
.ct-shell .ct-side-link:hover::before { opacity: .45; transform: scaleY(1); }
.ct-shell .ct-side-link.is-active {
  color: var(--ct-ink);
  background: var(--ct-accent-soft);
}
.ct-shell .ct-side-link.is-active .ct-side-label { font-weight: 700; color: var(--ct-accent-ink); }
.ct-shell .ct-side-link.is-active::before { opacity: 1; transform: scaleY(1); }

/* ─── 4. 右侧：工作区 ────────────────────────────────────────────── */
.ct-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #232c27 transparent;
}
.ct-main::-webkit-scrollbar { width: 10px; }
.ct-main::-webkit-scrollbar-track { background: transparent; }
.ct-main::-webkit-scrollbar-thumb { background: #1a211d; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
.ct-main::-webkit-scrollbar-thumb:hover { background: #2b342f; background-clip: content-box; }

.ct-shell .ct-page { margin: 0; }
.ct-main > .ct-page + .ct-page { margin-top: clamp(48px, 7vw, 88px); }
.ct-page-title {
  margin: 0 0 clamp(20px, 2.5vw, 32px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ct-hair);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
}
.ct-page-title::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: var(--ct-accent);
}
.ct-page { --ct-cols: 1; }
.ct-layout-grid.ct-cols-2 { --ct-cols: 2; }
.ct-layout-grid.ct-cols-3 { --ct-cols: 3; }
.ct-layout-grid.ct-cols-4 { --ct-cols: 4; }
.ct-page-body {
  display: grid;
  grid-template-columns: repeat(var(--ct-cols), minmax(0, 1fr));
  gap: var(--ct-sp-4);
  align-items: start;
}
.ct-page-body > .ct-module-anchor { grid-column: 1 / -1; min-width: 0; }
.ct-page-body > .ct-login-hint { grid-column: 1 / -1; }

.ct-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--ct-hair);
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: border-color var(--ct-dur) var(--ct-ease), background-color var(--ct-dur) var(--ct-ease);
}
.ct-link-title { grid-column: 1; font-size: 15px; font-weight: 600; color: inherit; }
.ct-link-note { grid-column: 1; font-size: 12px; color: var(--ct-muted); }
.ct-link-arrow { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ct-accent); transition: transform .3s var(--ct-ease); }
.ct-link:hover { border-bottom-color: var(--ct-accent); background: var(--ct-surface-1); }
.ct-link:hover .ct-link-arrow { transform: translateX(4px); }
.ct-login-hint {
  display: block;
  margin: 0;
  padding: 14px 18px;
  border-left: 3px solid var(--ct-accent);
  border-radius: 0 var(--ct-r-sm) var(--ct-r-sm) 0;
  background: var(--ct-surface-1);
  color: var(--ct-muted);
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.ct-login-hint .ct-login-link {
  color: var(--ct-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0 3px;
}
.ct-login-hint:hover { background: var(--ct-surface-2); }
.ct-login-hint:hover .ct-login-link { color: var(--ct-accent-strong, var(--ct-accent)); }

/* ─── 5. 功能模块容器 ───────────────────────────────────────────── */
.ct-toolbox {
  color: var(--ct-ink);
  background: var(--ct-black);
  font-family: var(--ct-sans);
  font-size: 15px;
  line-height: 1.7;
  border: 1px solid var(--ct-hair);
  border-radius: var(--ct-r-lg);
  padding: clamp(16px, 3vw, 28px);
  margin: 0 0 20px;
  color-scheme: dark;
}
.ct-shell .ct-toolbox {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: var(--ct-sp-4) 0 var(--ct-sp-2);
  margin: 0;
  border-top: 1px solid var(--ct-hair-soft);
}
.ct-page-body > .ct-module-anchor:first-child .ct-toolbox { border-top: 0; padding-top: 0; }
.ct-toolbox > header { position: relative; padding-left: 16px; margin: 0 0 var(--ct-sp-4); }
.ct-toolbox > header::before {
  content: "";
  position: absolute;
  left: 0;
  top: .14em;
  bottom: .14em;
  width: 3px;
  border-radius: 2px;
  background: var(--ct-accent);
}
.ct-toolbox header h2 {
  margin: 0 0 4px;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.015em;
}
.ct-shell .ct-toolbox .ct-note { margin: 0; font-size: 13px; color: var(--ct-muted); }
.ct-shell .ct-toolbox .ct-live,
.ct-shell .ct-toolbox .ct-gen { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ct-hair); }

/* ─── 6. 检索区（半宽居中） ─────────────────────────────────────── */
.ct-toolbar-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(52%, 600px);
  margin: 0 auto 10px;
  font-family: var(--ct-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--ct-faint);
}
.ct-toolbar-label::after { content: ""; flex: 1; height: 1px; background: var(--ct-hair-soft); }

.ct-toolbox .ct-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: min(52%, 600px);
  min-width: max-content;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: var(--ct-sp-4);
  background: var(--ct-surface-1);
  border: 1px solid var(--ct-hair-soft);
  border-radius: var(--ct-r-md);
}
.ct-toolbox .ct-search > label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ct-faint);
}
.ct-toolbox .ct-search > label.ct-q { flex: 1 1 120px; }
.ct-toolbox .ct-search > label.ct-q input { width: 100%; }
.ct-toolbox .ct-search > label:not(.ct-q) select { width: 150px; }

.ct-toolbox .ct-gen,
.ct-toolbox .ct-convert,
.ct-toolbox .ct-vrx-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 var(--ct-sp-4);
  padding: var(--ct-sp-4);
  background: var(--ct-surface-1);
  border: 1px solid var(--ct-hair-soft);
  border-radius: var(--ct-r-md);
}
.ct-toolbox .ct-gen > label,
.ct-toolbox .ct-convert > label,
.ct-toolbox .ct-vrx-form > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 180px;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ct-faint);
}
.ct-toolbox .ct-convert > label.ct-q { flex: 1 1 260px; }
.ct-toolbox .ct-gen-result { margin: 0; min-height: 1.6em; color: var(--ct-muted); font-size: 13px; }
.ct-toolbox .ct-gen-result:empty { display: none; }

/* ─── 7. 表单控件 ────────────────────────────────────────────────── */
.ct-toolbox input,
.ct-toolbox select {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  margin: 0;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--ct-hair);
  border-radius: var(--ct-r-sm);
  background: var(--ct-surface-2);
  padding: 6px 12px;
  color: var(--ct-ink);
  font: inherit;
  font-size: 13px;
  caret-color: var(--ct-accent);
  transition: border-color var(--ct-dur) var(--ct-ease), box-shadow var(--ct-dur) var(--ct-ease);
}
.ct-toolbox input:-webkit-autofill,
.ct-toolbox input:-webkit-autofill:hover,
.ct-toolbox input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--ct-surface-2) inset;
  -webkit-text-fill-color: var(--ct-ink);
  caret-color: var(--ct-ink);
}
.ct-toolbox .ct-search > label.ct-q input {
  height: 40px;
  font-size: 13px;
  padding: 6px 12px;
  border-color: var(--ct-hair);
}
.ct-toolbox input::placeholder { color: var(--ct-faint); opacity: 1; }
.ct-toolbox input:hover,
.ct-toolbox select:hover { border-color: var(--ct-accent); }
.ct-toolbox input:focus,
.ct-toolbox select:focus {
  outline: none;
  border-color: var(--ct-accent);
  box-shadow: 0 0 0 3px var(--ct-accent-soft);
}
.ct-toolbox input[type="file"] { padding: 8px 10px; font-size: 12.5px; }
.ct-toolbox input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--ct-hair);
  border-radius: var(--ct-r-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.ct-toolbox select option { background: var(--ct-surface-1); color: var(--ct-ink); }

/* ─── 8. 按钮 ────────────────────────────────────────────────────── */
.ct-toolbox button {
  min-height: 40px;
  padding: 7px 20px;
  border: 1px solid var(--ct-accent);
  border-radius: var(--ct-r-sm);
  background: var(--ct-accent);
  color: var(--ct-on-accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  margin: 0;
  line-height: 1.4;
  transition: background-color var(--ct-dur) var(--ct-ease), border-color var(--ct-dur) var(--ct-ease), transform .12s var(--ct-ease);
}
.ct-toolbox button:hover:not(:disabled) { background: var(--ct-accent-strong); border-color: var(--ct-accent-strong); }
.ct-toolbox button:active:not(:disabled) { transform: translateY(1px); }
.ct-toolbox button:disabled { opacity: .45; cursor: not-allowed; }
.ct-toolbox button.is-loading { opacity: .85; cursor: progress; position: relative; overflow: hidden; }

/* 次要按钮：描边、透明底 */
.ct-toolbox button.ct-live-btn,
.ct-toolbox button.ct-reset,
.ct-toolbox button.ct-clear,
.ct-toolbox button.ct-zip,
.ct-toolbox button.ct-download,
.ct-toolbox .ct-pager button {
  min-height: 40px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--ct-ink);
  border-color: var(--ct-hair);
}
.ct-toolbox button.ct-live-btn:hover:not(:disabled),
.ct-toolbox button.ct-reset:hover:not(:disabled),
.ct-toolbox button.ct-clear:hover:not(:disabled),
.ct-toolbox button.ct-zip:hover:not(:disabled),
.ct-toolbox button.ct-download:hover:not(:disabled),
.ct-toolbox .ct-pager button:hover:not(:disabled) {
  background: var(--ct-hover);
  border-color: var(--ct-accent);
  color: var(--ct-accent-ink);
}
.ct-toolbox .ct-search > button,
.ct-toolbox .ct-gen > button,
.ct-toolbox .ct-convert > button,
.ct-toolbox .ct-vrx-form > button {
  height: 40px;
  margin: 0;
  flex: none;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ct-toolbox button.ct-download,
.ct-toolbox button.ct-zip {
  width: 100%;
  min-width: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-toolbox button.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(52, 197, 150, 0.22), transparent);
  background-size: 220% 100%;
  animation: ct-downloading 1.1s linear infinite;
}
@keyframes ct-downloading {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

/* ─── 9. 状态行 + 结果区 + 表格 ─────────────────────────────────── */
.ct-toolbox .ct-status {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 80%;
  margin: 0 auto;
  padding: 9px 14px;
  font-family: var(--ct-mono);
  border: 1px solid var(--ct-hair-soft);
  border-radius: var(--ct-r-md);
  background: var(--ct-surface-2);
  color: var(--ct-muted);
  font-size: 11.5px;
  letter-spacing: .04em;
}
.ct-toolbox .ct-status::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ct-accent);
}
.ct-toolbox .ct-status:empty { display: none; }
.ct-toolbox .ct-results,
.ct-toolbox .ct-live-results {
  min-width: 0;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.ct-toolbox .ct-results {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--ct-hair-soft);
  border-radius: var(--ct-r-md);
  background: var(--ct-surface-1);
}
.ct-toolbox .ct-results:empty,
.ct-toolbox .ct-live-results:empty { display: none; }
.ct-toolbox table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.ct-toolbox th,
.ct-toolbox td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ct-hair-soft);
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ct-toolbox th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left !important;
  font-family: var(--ct-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.6;
  color: var(--ct-faint);
  background: var(--ct-surface-2);
  border-bottom: 1px solid var(--ct-accent);
}
.ct-toolbox tbody tr {
  transition: background-color var(--ct-dur) var(--ct-ease);
  cursor: pointer;
}
.ct-toolbox tbody tr:nth-child(even) { background: rgba(231, 239, 233, 0.02); }
.ct-toolbox tbody tr:hover,
.ct-toolbox .ct-legacy-table tbody tr:hover { background: rgba(52, 197, 150, 0.22) !important; }
.ct-toolbox tbody tr:last-child td { border-bottom: 1px solid var(--ct-hair-soft); }
.ct-toolbox .ct-mono { font-family: var(--ct-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.ct-toolbox .ct-results a,
.ct-toolbox .ct-live-results a { color: var(--ct-accent); text-decoration: none; }
.ct-toolbox .ct-results a:hover,
.ct-toolbox .ct-live-results a:hover { text-decoration: underline; }
.ct-toolbox .ct-brk { white-space: normal; overflow-wrap: anywhere; word-break: break-all; }
.ct-toolbox .ct-hl {
  padding: 0 2px;
  border-radius: 3px;
  background: var(--ct-accent-soft);
  color: var(--ct-accent-ink);
  font-weight: 700;
}
.ct-toolbox .ct-empty-row {
  color: var(--ct-faint);
  font-size: 13px;
  text-align: center;
  padding: 28px 14px !important;
  white-space: normal;
}
.ct-toolbox .ct-kv-table { table-layout: auto; }
.ct-toolbox .ct-kv-table th { display: none; }
.ct-toolbox .ct-kv-table td:first-child {
  width: 124px;
  min-width: 124px;
  color: var(--ct-faint);
  font-weight: 600;
  white-space: nowrap;
}
.ct-toolbox .ct-kv-table td { white-space: normal; overflow-wrap: anywhere; }
.ct-toolbox .ct-results table,
.ct-toolbox .ct-live-results table { min-width: 560px; }

.ct-toolbox .ct-bulk { display: flex; flex-wrap: wrap; gap: 8px; width: 80%; margin: 12px auto 0; }
.ct-toolbox .ct-bulk button { min-height: 36px; }
.ct-toolbox .ct-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: 80%;
  margin: 12px auto 0;
  font-family: var(--ct-mono);
  font-size: 12px;
  color: var(--ct-muted);
}
.ct-toolbox .ct-pager > span { min-width: 84px; text-align: center; font-variant-numeric: tabular-nums; }
.ct-toolbox .ct-pager a {
  min-height: 40px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ct-surface-1);
  color: var(--ct-ink);
  border: 1px solid var(--ct-hair);
  border-radius: var(--ct-r-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.ct-toolbox .ct-pager a:hover {
  background: var(--ct-hover);
  border-color: var(--ct-accent);
  color: var(--ct-accent-ink);
  text-decoration: none;
}

/* ─── 10. 焦点环 ─────────────────────────────────────────────────── */
.ct-shell a:focus-visible,
.ct-shell button:focus-visible,
.ct-shell input:focus-visible,
.ct-shell select:focus-visible,
.ct-toolbox a:focus-visible,
.ct-toolbox button:focus-visible,
.ct-toolbox input:focus-visible,
.ct-toolbox select:focus-visible {
  outline: 2px solid var(--ct-accent);
  outline-offset: 3px;
}

/* ─── 11. VIN：17 位输入整行 + 等宽大写 ─────────────────────────── */
.ct-toolbox .ct-search-vin { width: min(64%, 720px); }
.ct-toolbox .ct-search-vin .ct-q { flex: 1 1 100%; }
.ct-toolbox .ct-search-vin .ct-vin-input {
  font-family: var(--ct-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 14px;
  height: 44px;
}

/* ─── 12. VRX：拖拽上传 + 文件列表 + 进度条 ─────────────────────── */
.ct-toolbox .ct-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 34px 20px;
  margin: 0 auto 14px;
  width: 50%;
  background: rgba(52, 197, 150, 0.05);
  border: 2px dashed rgba(52, 197, 150, 0.42);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: background .18s, border-color .18s;
}
.ct-toolbox .ct-drop:hover,
.ct-toolbox .ct-drop:focus-visible {
  background: rgba(52, 197, 150, 0.10);
  border-color: var(--ct-accent);
  outline: none;
}
.ct-toolbox .ct-drop.is-over { background: rgba(52, 197, 150, 0.18); border-color: var(--ct-accent); }
.ct-toolbox .ct-drop-icon { color: var(--ct-accent); display: block; line-height: 0; }
.ct-toolbox .ct-drop-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--ct-ink); }
.ct-toolbox .ct-drop-hint { margin: 0; font-size: 12px; color: var(--ct-muted); }

.ct-toolbox .ct-file-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 4px;
  max-height: 190px;
  overflow-y: auto;
}
.ct-toolbox .ct-file-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--ct-surface-1);
  border: 1px solid var(--ct-hair-soft);
  border-radius: 6px;
}
.ct-toolbox .ct-file-list .ct-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-toolbox .ct-file-list .ct-file-size { color: var(--ct-faint); flex: none; font-family: var(--ct-mono); }
.ct-toolbox .ct-file-list li.is-bad { border-color: #b32d2e; }
.ct-toolbox .ct-file-list li.is-bad .ct-file-size { color: #ff8a80; }

/* 按钮行居中；下方信息行：左「本次消耗」· 右「单文件/总量上限」 */
.ct-toolbox .ct-vrx-actions {
  display: flex;
  justify-content: center;
  width: 80%;
  margin: 20px auto 0;
}
.ct-toolbox .ct-vrx-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 信息行与按钮行之间的上下距离 */
.ct-toolbox .ct-vrx-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 80%;
  margin: 12px auto 8px;
  font-size: 12px;
  color: var(--ct-faint);
}
.ct-toolbox .ct-vrx-cost { text-align: left; }
.ct-toolbox .ct-vrx-limits {
  white-space: nowrap;
}
@media (max-width: 680px) {
  .ct-toolbox .ct-vrx-actions { width: 100%; }
  .ct-toolbox .ct-vrx-info { width: 100%; flex-direction: column; gap: 8px; }
  .ct-toolbox .ct-vrx-cost { text-align: center; }
  .ct-toolbox .ct-vrx-limits { white-space: normal; }
}

.ct-toolbox .ct-vrx-progress {
  height: 8px;
  margin: 8px 0 12px;
  overflow: hidden;
  background: var(--ct-surface-1);
  border: 1px solid var(--ct-hair-soft);
  border-radius: 99px;
}
.ct-toolbox .ct-vrx-bar {
  height: 100%;
  width: 0;
  background: var(--ct-accent);
  transition: width .2s ease;
}

/* ─── 13. 下载按钮（墨绿描边，!important 对抗子比主题 a 覆盖）──── */
.ct-toolbox .ct-dl-btn {
  display: inline-block !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 3px 14px !important;
  border: 1px solid var(--ct-accent) !important;
  border-radius: 5px !important;
  color: var(--ct-accent) !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
}
.ct-toolbox .ct-dl-btn:hover {
  background: var(--ct-hover) !important;
  color: var(--ct-accent) !important;
  text-decoration: none !important;
}
.ct-toolbox .ct-dl-btn.is-downloading {
  color: var(--ct-faint) !important;
  border-color: var(--ct-hair) !important;
  background: transparent !important;
  pointer-events: none !important;
  cursor: default !important;
}

/* ─── 14. 子比风格弹窗 ───────────────────────────────────────────── */
.ct-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ct-modal {
  width: 430px;
  max-width: 92vw;
  background: #12181c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 28px 26px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #eef4f0;
}
.ct-modal-title { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.ct-modal-sub { margin: 0 0 20px; font-size: 13px; line-height: 1.7; color: rgba(238, 244, 240, 0.62); }
.ct-modal-actions { display: flex; gap: 12px; justify-content: center; }
.ct-modal-btn {
  flex: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
}
.ct-modal-btn--primary {
  background: linear-gradient(135deg, #3ecf9a 0%, #2aa878 100%);
  color: #04170f;
  border: none;
}
.ct-modal-btn--primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.ct-modal-btn--ghost {
  background: transparent;
  color: rgba(238, 244, 240, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.ct-modal-btn--ghost:hover { background: rgba(255, 255, 255, 0.06); color: #eef4f0; }

/* ─── 15. 服务端渲染 / 无 JS 表格与分页 ─────────────────────────── */
.ct-legacy-table {
  width: 80%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--ct-surface-1);
  border: 1px solid var(--ct-hair);
  border-radius: 8px;
}
.ct-legacy-table th,
.ct-legacy-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--ct-hair-soft);
  text-align: left;
  vertical-align: top;
  word-break: break-all;
}
.ct-legacy-table thead th {
  background: var(--ct-surface-2);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ct-faint);
  position: sticky;
  top: 0;
  text-align: left !important;
}
.ct-pager--legacy {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.ct-legacy-page {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--ct-hair);
  border-radius: 6px;
  background: var(--ct-surface-1);
  color: var(--ct-accent);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}
.ct-legacy-page:hover { background: var(--ct-hover); border-color: var(--ct-accent); color: var(--ct-accent-ink); }
.ct-legacy-pos {
  font-size: 12px;
  color: var(--ct-muted);
  font-family: var(--ct-mono);
  font-variant-numeric: tabular-nums;
}

/* ─── 16. 旧内核提示 + flex gap 兜底 ────────────────────────────── */
.ct-old-browser .ct-toolbox::before {
  content: '当前浏览器版本过低，查询与翻页可能不可用。请升级浏览器，或在浏览器设置里切换为「极速模式」（不要用「兼容模式」）。';
  display: block;
  margin: 0 0 14px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #f0d48a;
  border-radius: 6px;
  color: #7a5c00;
  font-size: 13px;
  line-height: 1.6;
}
/* 老内核不支持 flex gap 时，横向容器用 margin 拉开 */
.ct-old-browser .ct-pager > * + * { margin-left: 8px; }
.ct-old-browser .ct-search > * + * { margin-left: 8px; }
.ct-old-browser .ct-bulk > * + * { margin-left: 8px; }
.ct-old-browser .ct-vrx-actions > * + * { margin-left: 10px; }
.ct-old-browser .ct-modal-actions > * + * { margin-left: 12px; }

/* ─── 17. 响应式（媒体查询，替代 @container）────────────────────── */
@media (max-width: 900px) {
  .ct-shell--menu { gap: 20px; min-height: 0; display: block; padding: var(--ct-sp-4); }
  .ct-body { grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
  .ct-main { overflow: visible; padding-right: 0; }
  .ct-sidebar {
    align-self: auto;
    display: block;
    position: static;
    padding: 12px 0 0;
    border-right: 0;
    border-bottom: 1px solid var(--ct-hair-soft);
  }
  .ct-topbar { margin-bottom: 14px; }
  .ct-sidebar-nav { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
  .ct-side-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 7px 12px;
    white-space: nowrap;
    border: 1px solid var(--ct-hair-soft);
  }
  .ct-side-link::before { display: none; }
  .ct-shell .ct-side-link.is-active { border-color: var(--ct-accent); }
}
@media (max-width: 680px) {
  .ct-page-body { grid-template-columns: 1fr; }
  .ct-toolbox .ct-search { gap: 10px; padding: 12px; width: 100%; }
  .ct-toolbar-label { width: 100%; }
  .ct-toolbox .ct-search > label,
  .ct-toolbox .ct-search > label.ct-q { flex: 1 1 100%; min-width: 0; width: 100%; }
  .ct-toolbox .ct-gen > label,
  .ct-toolbox .ct-convert > label { flex: 1 1 100%; }
  .ct-toolbox .ct-search > button { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; }
  .ct-toolbox .ct-search > button.ct-reset { flex: 0 1 88px; }
  .ct-toolbox .ct-status,
  .ct-toolbox .ct-results,
  .ct-toolbox .ct-live-results,
  .ct-toolbox .ct-bulk,
  .ct-toolbox .ct-pager { width: 100%; }
  .ct-toolbox .ct-drop { width: 100%; }
  .ct-page-title { font-size: 22px; }
}

/* ─── 18. 减少动效偏好 ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ct-shell *,
  .ct-toolbox * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .ct-toolbox button.is-loading::after { animation: none; background-position: 50% 0; }
}

/* ─── 19. 弹窗内三档权限与额度对比（非常驻，触发时才弹）─────────── */
.ct-modal-tiers {
  margin: 2px 0 18px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.ct-modal-tiers-head {
  font-size: 12px;
  font-weight: 700;
  color: #3ecf9a;
  margin: 0 0 10px;
}
.ct-modal-tier-row { display: flex; gap: 8px; }
.ct-modal-tier {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.ct-modal-tier.is-mine {
  border-color: #3ecf9a;
  background: rgba(62, 207, 154, 0.12);
}
.ct-modal-tier-name {
  font-size: 11px;
  color: rgba(238, 244, 240, 0.62);
  margin: 0 0 5px;
}
.ct-modal-tier.is-mine .ct-modal-tier-name { color: #a6ecd2; font-weight: 700; }
.ct-modal-tier-quota {
  font-size: 12px;
  font-weight: 700;
  color: #eef4f0;
  line-height: 1.4;
}
.ct-modal-tier.is-mine .ct-modal-tier-quota { color: #4ad5a6; }
.ct-modal-tiers-mine {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(238, 244, 240, 0.75);
}
@media (max-width: 680px) {
  .ct-modal-tier-row { flex-direction: column; }
  .ct-modal-tier { display: flex; align-items: center; justify-content: space-between; }
  .ct-modal-tier-quota { margin: 0; }
}

/* 关闭时 hidden 必须生效，否则 99999 遮罩会盖住子比主题弹窗导致点不了 */
.ct-modal-mask[hidden] { display: none !important; }


/* 确认支付弹窗三档对比：当前组边框高亮 + 当前角标 */
.ct-modal-tiers { margin: 0 0 18px; padding: 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.03); text-align: left; }
.ct-modal-tiers-head { font-size: 12px; font-weight: 700; color: #3ecf9a; margin: 0 0 10px; }
.ct-modal-tier-row { display: flex; gap: 8px; }
.ct-modal-tier { flex: 1 1 0; min-width: 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(255,255,255,.03); }
.ct-modal-tier.is-mine { border: 2px solid #3ecf9a; background: rgba(62,207,154,.14); box-shadow: 0 0 0 3px rgba(62,207,154,.12); }
.ct-modal-tier-name { font-size: 12px; color: rgba(238,244,240,.7); margin: 0 0 6px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.ct-modal-tier.is-mine .ct-modal-tier-name { color: #a6ecd2; font-weight: 700; }
.ct-modal-tier-mine { font-size: 10px; line-height: 1; padding: 2px 5px; color: #04170f; background: #3ecf9a; border-radius: 3px; }
.ct-modal-tier-quota { font-size: 13px; font-weight: 700; color: #eef4f0; white-space: nowrap; }
.ct-modal-tier.is-mine .ct-modal-tier-quota { color: #4ad5a6; }
