:root {
  color-scheme: light;
  --paper: #f3f2eb;
  --ink: #20231f;
  --muted: #77796f;
  --line: #d8d8cd;
  --green: #365c45;
  --lime: #d4ed6b;
  --red: #a54c3c;
  --sans: "Avenir Next", "Segoe UI", "DejaVu Sans", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
button, input, select { font: inherit; }
.topbar { height: 72px; padding: 0 max(5vw, 24px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); text-decoration: none; display: flex; gap: 11px; align-items: center; font: 500 11px var(--mono); letter-spacing: 0; }
.mark { display: grid; place-items: center; width: 27px; height: 27px; background: var(--green); color: white; font: 600 17px var(--serif); }
.connection-trigger { display: flex; align-items: center; gap: 9px; padding: 8px 0 8px 8px; background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.status-light { width: 8px; height: 8px; border-radius: 50%; background: #c58e43; }
.status-light.online { background: #56845e; box-shadow: 0 0 0 3px #56845e20; }
.status-light.offline { background: var(--red); }
.chevron { font-size: 16px; }
main { width: min(100% - 48px, 1040px); margin: 0 auto; }
.intro { min-height: 310px; padding: 66px 0 47px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.intro::after { content: "文"; position: absolute; z-index: -1; right: 12%; top: 20px; color: #e8e8dc; font: 260px var(--serif); line-height: 1; }
.eyebrow { margin: 0 0 15px; color: var(--green); font: 500 10px var(--mono); letter-spacing: 0; }
h1 { margin: 0; font: 500 clamp(42px, 6vw, 69px)/1.06 var(--serif); letter-spacing: 0; }
h1 em { color: var(--green); font-weight: 500; }
.subhead { max-width: 440px; margin: 18px 0 0; color: #696d64; font-size: 14px; line-height: 1.7; }
.route-note { display: flex; align-items: center; gap: 12px; padding-bottom: 5px; color: #676a61; font: 11px/1.65 var(--mono); }
.route-icon { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #c6c8ba; border-radius: 50%; color: var(--green); font-size: 17px; }
.workspace, .library { padding: 39px 0 43px; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin: 0; font: 500 24px/1.2 var(--serif); letter-spacing: 0; }
.format-note { color: var(--muted); font: 10px var(--mono); }
.format-note span { color: #b0b1a7; padding: 0 5px; }
.dropzone { min-height: 154px; border: 1px dashed #aeb5a5; background: #eeefe5; display: flex; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; transition: background .18s, border-color .18s; }
.dropzone:hover, .dropzone.dragging { background: #e6ebda; border-color: var(--green); }
.dropzone input { display: none; }
.upload-symbol { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 9px; border: 1px solid #c0c5b7; border-radius: 50%; color: var(--green); font-size: 20px; }
.drop-title { font-size: 13px; }
.drop-title u { text-underline-offset: 3px; text-decoration-color: var(--green); }
.drop-detail { margin-top: 7px; color: var(--muted); font-size: 11px; }
.translation-options { display: flex; align-items: end; gap: 15px; padding-top: 19px; }
.translation-options label, .settings-form label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font: 10px var(--mono); }
.translation-options input, .translation-options select, .setting-row input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 0; background: #f8f8f2; color: var(--ink); font: 12px var(--sans); outline-color: var(--green); }
.translation-options label:first-child, .translation-options label:nth-of-type(2) { width: 150px; }
.language-arrow { padding-bottom: 11px; color: #92948a; }
.model-field { flex: 1; min-width: 145px; }
.model-field select { width: 100%; }
.button { height: 40px; border: 0; padding: 0 15px; display: inline-flex; gap: 17px; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; font-weight: 600; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button-accent { background: var(--lime); color: #24311f; }
.button-accent:hover { background: #c9e457; }
.button-dark { background: var(--green); color: white; }
.upload-error { color: var(--red); font-size: 12px; }
.upload-error:empty { display: none; }
.library { padding-bottom: 30px; }
.library-heading { margin-bottom: 12px; }
.library-controls { display: flex; align-items: center; gap: 10px; }
.sort-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font: 10px var(--mono); }
.sort-control select { height: 34px; max-width: 180px; padding: 0 9px; border: 1px solid var(--line); border-radius: 0; background: #f8f8f2; color: var(--ink); font: 11px var(--sans); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 10px var(--mono); vertical-align: 3px; }
.job-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(180px, .9fr) auto; gap: 22px; align-items: center; padding: 17px 0; border-top: 1px solid #dfdfd5; animation: appear .3s ease both; }
.job-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.job-meta { margin-top: 5px; color: var(--muted); font: 10px var(--mono); }
.progress-copy { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.progress-copy span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-copy span:last-child { flex: 0 0 auto; font-family: var(--mono); }
.progress-track { height: 4px; background: #ddded3; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); transition: width .35s ease; }
.job-action { min-width: 82px; text-align: right; }
.job-actions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.download-link { color: var(--green); text-decoration: none; font-size: 11px; font-weight: 600; }
.download-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.details-button { padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.details-button:hover { color: var(--green); }
.job-status { color: var(--muted); font: 10px var(--mono); }
.job-status.failed { color: var(--red); }
.retry-button { padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-size: 11px; font-weight: 600; }
.retry-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.retry-button:disabled { cursor: wait; opacity: .6; }
.job-details { grid-column: 1 / -1; padding: 14px 0 2px; border-top: 1px solid #dfdfd5; color: #62665c; font-size: 11px; line-height: 1.6; }
.review-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin-bottom: 8px; }
.review-heading strong { color: var(--ink); font-weight: 600; }
.review-heading span { color: var(--muted); font: 10px var(--mono); }
.review-iteration { padding: 10px 0; border-top: 1px solid #e3e3d9; }
.review-iteration h4 { margin: 0 0 3px; color: var(--green); font: 500 12px var(--serif); }
.review-iteration p { margin: 0; }
.review-iteration ul { margin: 5px 0 0; padding-left: 18px; }
.review-empty { margin: 8px 0 0; color: var(--muted); }
.empty-state { padding: 25px 0; border-top: 1px solid #dfdfd5; color: #898b81; font-size: 12px; }
.settings-panel { display: grid; grid-template-columns: 1fr 1.3fr; gap: 34px; padding: 23px 0; border-bottom: 1px solid var(--line); animation: appear .25s ease both; }
.settings-panel h2 { font-size: 20px; }
.settings-form label { margin-bottom: 8px; }
.setting-row { display: flex; gap: 8px; }
.setting-row input { flex: 1; }
.form-note { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
footer { width: min(100% - 48px, 1040px); margin: auto; padding: 21px 0 27px; display: flex; justify-content: space-between; color: #85877d; font: 9px var(--mono); }
@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) {
  .topbar { height: 60px; }
  main { width: min(100% - 36px, 540px); }
  .intro { min-height: auto; padding: 51px 0 32px; }
  .intro::after { right: -25px; top: 19px; font-size: 190px; }
  h1 { font-size: 47px; }
  .route-note { display: none; }
  .section-heading { align-items: start; gap: 10px; }
  .library-heading { flex-direction: column; }
  .library-controls { width: 100%; justify-content: space-between; }
  .sort-control { flex: 1; }
  .sort-control select { flex: 1; min-width: 0; max-width: none; }
  .format-note { padding-top: 4px; white-space: nowrap; }
  .translation-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
  .translation-options label:first-child, .translation-options label:nth-of-type(2) { width: auto; }
  .translation-options .language-arrow { display: none; }
  .model-field { grid-column: 1; }
  .translation-options .button { grid-column: 2; grid-row: 2; width: 100%; min-width: 0; gap: 6px; padding: 0 8px; }
  .job-row { grid-template-columns: minmax(0, 1fr) auto; gap: 11px 15px; }
  .job-progress { grid-column: 1 / -1; grid-row: 2; }
  .job-action { grid-column: 2; grid-row: 1; }
  .settings-panel { grid-template-columns: 1fr; gap: 19px; }
  footer { width: min(100% - 36px, 540px); gap: 12px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }