:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1c312f;
  background: #f8faf7;
  --muted: #52635d;
  --accent: #0e6455;
  --line: #cdd8d0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.55; }
.mast { border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); background: #fff; }
.mast-inner { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 62px); display: flex; gap: 18px; align-items: center; min-height: 70px; }
.wordmark { font-size: 29px; font-weight: 780; letter-spacing: -.075em; color: #213734; text-decoration: none; }
.wordmark span { color: var(--accent); }
.service { border-left: 1px solid var(--line); padding-left: 18px; color: var(--muted); font-size: 14px; }
.navlink, .nav-action { color: var(--muted); font-size: 14px; text-decoration: none; }
.navlink { margin-left: auto; padding: 9px 0; }
.navlink span { margin-left: 3px; }
.nav-action { background: none; border: 0; border-left: 1px solid var(--line); padding: 4px 0 4px 14px; cursor: pointer; }
.navlink:hover, .nav-action:hover, .text-button:hover { color: var(--accent); text-decoration: underline; }
.single { width: min(100% - 40px, 470px); margin: clamp(68px, 15vh, 152px) auto 48px; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: clamp(36px, 6vw, 48px); line-height: 1.2; font-weight: 650; letter-spacing: -.05em; }
h2 { font-size: 23px; line-height: 1.35; font-weight: 650; }
.intro { margin: 15px 0 36px; color: var(--muted); }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
input, select, textarea, button, a.primary { font: inherit; }
input, select, textarea { border: 1px solid #899b91; border-radius: 5px; background: #fff; color: #1c312f; padding: 10px 13px; width: 100%; min-height: 46px; }
input.code { font-family: ui-monospace, monospace; font-size: 25px; letter-spacing: .12em; text-transform: uppercase; }
input[type="file"] { padding: 5px 8px; line-height: 34px; }
input[type="file"]::file-selector-button { font: inherit; font-size: 14px; color: var(--accent); border: none; border-radius: 3px; background: #e9f0eb; padding: 0 12px; margin-right: 10px; cursor: pointer; }
button, a.primary { cursor: pointer; }
:focus-visible { outline: 3px solid #227969; outline-offset: 3px; }
.primary, .secondary { align-items: center; display: inline-flex; justify-content: center; border-radius: 5px; min-height: 44px; padding: 9px 18px; border: 1px solid transparent; font-weight: 600; text-decoration: none; transition: background-color .15s ease; }
.primary { color: white; background: var(--accent); }
.primary:hover { background: #0b4b40; }
.secondary { background: white; border-color: var(--line); color: #26443c; font-size: 14px; }
.secondary:hover { background: #eaf1ea; }
.primary:disabled, .secondary:disabled, input:disabled, select:disabled { opacity: .6; cursor: default; }
.wide { width: 100%; margin-top: 18px; justify-content: space-between; min-height: 49px; }
.wide span { font-size: 21px; }
.status { font-size: 14px; color: var(--accent); white-space: pre-line; overflow-wrap: anywhere; }
.status:not(:empty) { margin-top: 12px; }
.error { color: #973622; }
.filename, .dialog-file, .file-name { overflow-wrap: anywhere; }
.filename { margin-top: 34px; }
.facts { margin: 17px 0 10px; padding: 12px 0; border-block: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: right; }
.text-button { background: none; border: 0; padding: 9px 0; color: var(--accent); font-size: 14px; }
.workspace { width: min(100% - 48px, 1000px); margin: clamp(34px, 6vw, 72px) auto 72px; }
.workspace h1 { font-size: clamp(32px, 5vw, 42px); margin-bottom: 30px; }
.upload-area { background: #edf3ed; border-left: 3px solid var(--accent); padding: clamp(18px, 3vw, 30px); margin-bottom: 36px; }
.sub { margin: 6px 0 19px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.upload-fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: end; }
.file-field { min-width: 0; }
.upload-fields .primary { min-height: 46px; }
progress { width: 100%; height: 9px; accent-color: var(--accent); margin-top: 18px; }
.section-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.files { list-style: none; padding: 0; margin: 16px 0 0; border-top: 1px solid var(--line); }
.files li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.files li.empty { color: var(--muted); }
.file-name { font-size: 17px; font-weight: 620; }
.file-meta { margin-top: 5px; display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 15px; row-gap: 3px; font-size: 13px; color: var(--muted); }
.file-state { color: #24443b; font-weight: 600; }
.file-actions { display: flex; flex-shrink: 0; gap: 8px; flex-wrap: wrap; }
dialog { margin: auto; width: min(480px, calc(100% - 32px)); max-height: 88vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #1c312f; padding: clamp(20px, 4vw, 34px); }
dialog::backdrop { background: rgb(18 37 28 / 40%); }
.dialog-file { color: var(--muted); margin: 9px 0 20px; }
.dialog-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; }
textarea { resize: vertical; }
@media (max-width: 640px) {
  .mast-inner { min-height: 60px; gap: 10px; }
  .wordmark { font-size: 25px; }
  .service { padding-left: 10px; }
  .service, .navlink, .nav-action { font-size: 13px; }
  .workspace { width: calc(100% - 32px); }
  .upload-fields { grid-template-columns: 1fr 1fr; gap: 12px; }
  .file-field { grid-column: 1 / -1; }
  .files li { flex-direction: column; align-items: stretch; gap: 11px; }
}
@media (max-width: 360px) {
  .mast-inner { gap: 7px; padding: 0 10px; }
  .nav-action, .service { padding-left: 7px; }
  .single { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  .primary, .secondary { transition: none; }
}
