:root {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #27374c;
  background: #f4f6f9;
  font-synthesis: none;
  --blue: #1765d8;
  --coral: #f25868;
  --muted: #7b889b;
  --line: #e9edf3;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--blue); text-decoration: none; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 2px solid #378bff; }
[hidden] { display: none !important; }
.conversion-hint { margin: 0 24px 18px; padding: 10px 14px; border-radius: 5px; background: #eef5ff; color: #416995; font-size: 12px; }
.warning-message { margin: 5px 0; font-size: 11px; color: #95611d; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; vertical-align: middle; }
.topbar { background: var(--blue); color: #fff; box-shadow: 0 2px 6px #19366012; }
.topbar-inner { min-height: 66px; max-width: 1580px; margin: 0 auto; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-size: 18px; font-weight: 650; letter-spacing: .15px; }
.brand-mark { display: flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 800; letter-spacing: -1px; padding: 4px 7px; background: #fff; color: var(--blue); border-radius: 5px; line-height: 1.4; }
.brand-mark span { opacity: .6; }
nav { display: flex; align-items: center; gap: 28px; font-size: 13px; }
nav a { color: #e5f0ff; display: flex; align-items: center; gap: 7px; }
nav a:hover { color: #fff; }
nav .icon { width: 16px; height: 16px; }
.nav-current { padding: 23px 0 20px; border-bottom: 3px solid #c2dcff; }
.connection { color: #eaf3ff; border: 1px solid #ffffff35; background: #ffffff0b; border-radius: 99px; display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 5px 12px; }
.status-dot { width: 6px; height: 6px; background: #ffe195; border-radius: 50%; }
.connection.ready .status-dot { background: #8ff0c0; }
.connection.offline .status-dot { background: #ffa6ac; }
main { max-width: 1512px; padding: 0 36px; margin: 0 auto; }
.hero { text-align: center; padding: 74px 10px 48px; }
.eyebrow { color: #8591a1; font-size: 12px; letter-spacing: 3px; margin-bottom: 11px; }
h1 { color: var(--coral); font-size: 32px; font-weight: 500; letter-spacing: 1px; margin: 0 0 10px; }
.hero > p { color: #67788d; margin: 0; font-size: 15px; }
.hero-note { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 15px; color: #8795a8; font-size: 12px; }
.hero-note i { width: 3px; height: 3px; border-radius: 50%; background: #b5c3d3; }
.card { border: 1px solid #edf0f5; border-radius: 9px; background: #fff; box-shadow: 0 5px 19px #263c5806; }
.control-grid { display: grid; grid-template-columns: 1.03fr 1.05fr 1.08fr 1fr; padding: 24px 0; }
.control-cell { padding: 4px 26px; min-width: 0; }
.control-cell + .control-cell { border-left: 1px solid var(--line); }
.instructions h2 { font-size: 14px; font-weight: 600; margin: 2px 0 12px; }
.instructions ol { list-style: none; margin: 0; padding: 0; font-size: 12px; color: #6e7e92; }
.instructions li { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.instructions li span { width: 17px; height: 17px; background: #edf5ff; border-radius: 4px; color: #3980e3; text-align: center; font-size: 10px; font-weight: 600; line-height: 17px; }
.source-tabs { display: flex; gap: 19px; margin: -3px 0 13px; }
.source-tab { border: 0; background: none; padding: 0 0 4px; color: #929cad; border-bottom: 2px solid transparent; font-size: 12px; }
.source-tab.active { color: var(--blue); border-color: var(--blue); font-weight: 600; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 5px; border: 1px solid #dce7f5; background: #fff; color: #4f7cb9; padding: 11px 18px; line-height: 1.4; transition: background .15s, border-color .15s, box-shadow .15s; }
.button-outline { border-color: #5597f4; color: #357fdf; }
.button-outline:hover { background: #f4f8ff; border-color: #1765d8; }
.upload-button { width: 100%; height: 48px; }
.control-hint { color: #8a98a9; font-size: 11px; text-align: center; margin: 10px 0 0; min-height: 18px; }
.field-label { display: block; font-size: 12px; color: #67778a; margin: -1px 0 12px; }
select, input[type="text"], input[type="number"] { width: 100%; height: 43px; border: 1px solid #dce4ef; background: #fff; border-radius: 5px; padding: 0 12px; color: #34445b; }
select { padding-right: 27px; cursor: pointer; }
.target-select { border-color: #81adf0; height: 48px; }
.format-picker { position: relative; }
.format-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; background: #fff; border: 1px solid #81adf0; border-radius: 5px; color: #34445b; text-align: left; }
.format-trigger[aria-expanded="true"] { outline: 2px solid #d5e6ff; }
.format-popover { position: absolute; top: calc(100% + 7px); left: 0; z-index: 30; width: max(100%, 360px); max-width: calc(100vw - 44px); padding: 14px; background: #fff; border: 1px solid #d7e4f6; border-radius: 10px; box-shadow: 0 12px 38px #263c6429; }
#format-search { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #dce4ef; border-radius: 6px; background: #fafcff; font: inherit; font-size: 12px; }
.format-categories { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.format-category { border: 0; border-radius: 5px; padding: 5px 8px; color: #6a7b91; background: #f4f7fb; font-size: 11px; }
.format-category[aria-pressed="true"] { color: #1469de; background: #e9f2ff; }
.format-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 250px; overflow-y: auto; padding: 2px; }
.format-option { min-height: 37px; border: 1px solid #e6edf6; border-radius: 5px; background: #fff; text-align: left; padding: 7px 9px; font-size: 12px; color: #34445b; }
.format-option:hover, .format-option:focus-visible { background: #f1f7ff; border-color: #7faaf0; }
.format-option[aria-selected="true"] { border-color: #4386e1; color: #1469de; background: #f1f7ff; }
.format-empty, .format-result-count { font-size: 11px; color: #8595a9; margin: 10px 0 0; }
.text-button { color: #4386e1; border: 0; background: none; font-size: 12px; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.text-button:hover { color: #125fc9; }
.text-button .icon { width: 15px; height: 15px; }
.settings-toggle { display: flex; margin: 9px auto 0; }
.muted { color: var(--muted); }
.action-cell { display: flex; flex-direction: column; justify-content: center; padding-top: 26px; }
.button-primary { width: 100%; height: 48px; background: var(--coral); color: #fff; border-color: var(--coral); font-weight: 500; box-shadow: 0 3px 7px #f2586818; }
.button-primary:hover:not(:disabled) { background: #e8495b; border-color: #e8495b; box-shadow: 0 4px 9px #f2586828; }
.button-primary:disabled { background: #f3a0a9; border-color: #f3a0a9; box-shadow: none; }
.button-primary.running .icon { display: none; }
.button-primary.running::before, .status-pill.running::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dragging { background: #edf5ff; border-radius: 6px; outline: 2px dashed #73a9f5; outline-offset: -5px; }
.selected-panel, .text-panel, .advanced-panel { margin: 0 26px; padding: 19px 0 22px; border-top: 1px solid var(--line); }
.panel-caption { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 12px; font-size: 12px; color: #6c7a8d; }
.selected-files { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.selected-file { display: flex; align-items: center; gap: 10px; border: 1px solid #e8eef6; border-radius: 5px; padding: 9px 11px; background: #fafcff; min-width: 0; }
.selected-file > .icon { color: #8fa8c8; width: 17px; }
.file-info { flex: 1; min-width: 0; }
.file-info strong { display: block; font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info small { color: #97a3b4; font-size: 10px; }
.icon-button { display: inline-flex; background: none; border: 0; color: #a0adbd; padding: 3px; border-radius: 3px; }
.icon-button:hover { color: #eb6574; background: #fff1f3; }
.icon-button .icon { width: 15px; height: 15px; }
.text-tools { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 12px; color: #64758a; }
textarea { display: block; width: 100%; min-height: 158px; resize: vertical; padding: 14px; line-height: 1.75; border: 1px solid #dce4ef; border-radius: 5px; color: #34445b; background: #fcfdff; font-size: 13px; }
textarea::placeholder { color: #a0adbd; }
.text-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11px; color: #91a0b2; margin-top: 10px; }
.text-meta label { display: flex; align-items: center; gap: 10px; color: #728299; }
.text-meta input { width: 210px; height: 33px; font-size: 12px; }
#character-count { margin-left: auto; }
.options-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.options-grid label { font-size: 12px; color: #68788c; }
.options-grid select, .options-grid input { display: block; margin-top: 7px; height: 39px; font-size: 12px; }
.options-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; color: #8a98a9; font-size: 11px; }
.options-bottom p { margin: 0; }
.checkbox-label { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; color: #667b95; }
input[type="checkbox"] { accent-color: var(--blue); }
.notice { border-radius: 6px; background: #edf5ff; border: 1px solid #d8e9ff; color: #4b77ae; padding: 11px 15px; margin: 14px 0; font-size: 12px; overflow-wrap: anywhere; }
.notice.error { background: #fff4f3; border-color: #ffded9; color: #c96358; }
.notice.success { background: #f0faf5; border-color: #d4eddf; color: #398160; }
.results { margin-top: 18px; overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 23px; border-bottom: 1px solid var(--line); }
.section-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 500; margin: 0; color: #43566d; }
.count-badge { background: #eef3fa; color: #8296b1; padding: 0 7px; border-radius: 5px; font-size: 11px; line-height: 20px; }
.button-small { font-size: 11px; padding: 6px 11px; border-radius: 5px; }
.button-small .icon { width: 13px; height: 13px; }
.button-small:hover:not(:disabled) { background: #f5f9ff; }
.button-small:disabled { opacity: .45; }
.archive-toolbar { padding: 15px 23px; background: #f8fbff; border-bottom: 1px solid var(--line); }
.archive-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.archive-controls label { font-size: 12px; color: #60758e; }
.archive-controls input { width: min(320px, 100%); height: 36px; font-size: 12px; }
.archive-button { padding: 7px 14px; font-size: 12px; background: var(--blue); color: #fff; border-color: var(--blue); border-radius: 5px; }
.archive-button:hover { background: #1458bd; }
.archive-button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.archive-button .icon { width: 16px; height: 16px; }
.archive-toolbar p { margin: 8px 0 0; color: #8191a6; font-size: 11px; }
.job-archive { display: flex; font-size: 10px; margin-top: 8px; }
.table-scroll { overflow-x: auto; padding: 0 23px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; min-width: 660px; }
thead th { font-size: 11px; color: #8a97a7; font-weight: 400; padding: 15px 12px; border-bottom: 1px solid var(--line); }
tbody td { padding: 17px 12px; border-bottom: 1px solid #f0f3f7; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
.number-column { width: 44px; }
.download-column { width: 105px; }
td:nth-child(2) { width: 45%; }
.empty-cell { text-align: center; padding: 28px 15px 30px; color: #8f9caf; }
.empty-cell > .icon { width: 34px; height: 34px; color: #c0cede; stroke-width: 1.2; margin-bottom: 8px; }
.empty-cell p { margin: 0; font-size: 13px; }
.empty-cell small { display: block; color: #a7b1c0; font-size: 11px; margin-top: 5px; }
.result-name { display: block; font-weight: 500; overflow-wrap: anywhere; }
.source-name { display: block; color: #98a4b4; font-size: 10px; margin-top: 3px; overflow-wrap: anywhere; }
.format-tag { color: #8292a5; font-size: 10px; background: #f2f5f9; border-radius: 3px; padding: 3px 6px; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; background: #f1f4f8; color: #8b99ad; font-size: 10px; white-space: nowrap; }
.status-pill.completed { color: #3d9673; background: #eef9f3; }
.status-pill.failed { color: #d46469; background: #fff0f1; }
.status-pill.running { color: #3c80d7; background: #edf5ff; }
.status-pill.unknown, .status-pill.partial { color: #ab8534; background: #fff7e6; }
.status-pill.running::before { width: 9px; height: 9px; border-width: 1.3px; }
.download-link { display: inline-flex; align-items: center; gap: 5px; color: #4b8ade; white-space: nowrap; }
.download-link .icon { width: 15px; height: 15px; }
.error-message { color: #bd6b6e; font-size: 11px; margin: 6px 0 0; }
.job-details { font-size: 10px; color: #8b9aac; margin-top: 7px; }
.job-details summary { cursor: pointer; display: inline list-item; }
.job-details pre { font-family: Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; padding: 10px; background: #f7f9fc; border-radius: 4px; color: #667a93; max-width: 610px; }
.results-footer { display: flex; justify-content: space-between; align-items: center; gap: 15px; background: #fdfdfe; border-top: 1px solid var(--line); padding: 11px 24px; font-size: 10px; color: #97a4b5; }
.quick-section { padding: 39px 0 36px; }
.quick-section h2 { text-align: center; margin: 0; font-size: 16px; font-weight: 400; color: #667b92; }
.quick-section > p { text-align: center; color: #a1acbc; font-size: 11px; margin: 5px 0 22px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.quick-card { display: flex; align-items: center; gap: 13px; text-align: left; padding: 21px 19px; background: #fff; border: 1px solid #eaf0f7; border-radius: 7px; color: #586e8a; transition: border-color .15s, transform .15s; }
.quick-card:hover:not(:disabled) { border-color: #b9d3f6; transform: translateY(-2px); }
.quick-card > .icon { margin-left: auto; width: 15px; color: #b3c1d3; }
.format-icon { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 36px; height: 43px; border-radius: 5px 11px 5px 5px; font-size: 9px; font-weight: 700; letter-spacing: .4px; }
.blue { color: #4c92e9; background: #edf5ff; }
.indigo { color: #7484d2; background: #f0f1ff; }
.orange { color: #d99a4d; background: #fff5e6; }
.coral { color: #e5828a; background: #fff0f2; }
.quick-copy { display: flex; flex-direction: column; gap: 5px; }
.quick-copy strong { font-size: 12px; font-weight: 500; }
.quick-copy > span { font-size: 10px; color: #99a6b7; }
.page-footer { border-top: 1px solid #e7ecf3; color: #a8b2c0; display: flex; justify-content: space-between; gap: 15px; padding: 18px 1px 25px; font-size: 10px; }
@media (min-width: 1650px) { .hero { padding-top: 108px; padding-bottom: 60px; } }
@media (max-width: 1100px) {
  .topbar-inner { padding: 0 24px; }
  main { padding: 0 24px; }
  .control-cell { padding-left: 18px; padding-right: 18px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .options-grid { grid-template-columns: repeat(2, 1fr); }
  .options-bottom { align-items: flex-start; flex-direction: column; gap: 9px; }
  .selected-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .control-grid { grid-template-columns: repeat(2, 1fr); row-gap: 25px; }
  .control-cell:nth-child(3) { border-left: 0; }
  .action-cell { padding-top: 22px; }
  .hero { padding-top: 48px; padding-bottom: 34px; }
  nav { gap: 18px; }
  .nav-current { display: none; }
}
@media (max-width: 560px) {
  .topbar-inner { padding: 0 16px; min-height: 59px; }
  .brand { font-size: 14px; gap: 7px; }
  .brand-mark { font-size: 12px; }
  nav { gap: 13px; }
  nav a span { display: none; }
  .connection { padding: 4px 8px; font-size: 10px; }
  main { padding: 0 14px; }
  .hero { padding: 38px 0 29px; }
  h1 { font-size: 27px; }
  .hero > p { font-size: 12px; }
  .hero-note { gap: 8px; font-size: 10px; }
  .instructions { display: none; }
  .control-grid { grid-template-columns: 1fr; padding: 20px 0; gap: 19px; }
  .control-cell + .control-cell { border-left: 0; }
  .control-cell { padding: 0 20px; }
  .source-tabs { justify-content: center; margin-bottom: 12px; }
  .action-cell { padding-top: 0; }
  .selected-panel, .text-panel, .advanced-panel { margin: 0 20px; }
  .selected-files { grid-template-columns: 1fr; }
  .options-grid { grid-template-columns: 1fr; gap: 12px; }
  .text-meta { gap: 8px; }
  .text-meta input { width: 170px; }
  #character-count { margin-left: 0; }
  .section-heading { padding: 14px 17px; }
  .table-scroll { padding: 0 12px; }
  .results-footer { padding: 10px 17px; }
  .results-footer > span:last-child { display: none; }
  .quick-section { padding-top: 28px; }
  .quick-grid { gap: 9px; }
  .quick-card { padding: 14px 10px; gap: 8px; }
  .quick-card > .icon { display: none; }
  .quick-copy strong { font-size: 11px; }
  .quick-copy > span { font-size: 9px; }
  .format-icon { width: 28px; height: 36px; font-size: 8px; }
  .page-footer { flex-direction: column; align-items: center; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { transition: none !important; animation: none !important; }
}
