:root { color-scheme:light; --background:#f7f7f5; --foreground:#202522; --card:#fff; --muted:#656b68; --soft:#f2f5f3; --border:#dde4df; --primary:#20694f; --on-primary:#fff; --tint:#edf6f0; --danger:#ae2925; --danger-tint:#fff1ef; }
@media (prefers-color-scheme:dark) { :root { color-scheme:dark; --background:#171b18; --foreground:#edf1ee; --card:#202621; --muted:#b2bcb5; --soft:#2a322c; --border:#3e4940; --primary:#93d7ad; --on-primary:#18241c; --tint:#293d30; --danger:#ffb6b0; --danger-tint:#382723; } }
* { box-sizing:border-box; } body { margin:0; background:var(--background); color:var(--foreground); font:15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; -webkit-text-size-adjust:100%; }
[hidden] { display:none!important; } button,input { font:inherit; } button,a,input,summary { -webkit-tap-highlight-color:transparent; touch-action:manipulation; } button,a,summary { cursor:pointer; } button:disabled { cursor:not-allowed; opacity:.48; } a { color:inherit; text-decoration:none; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
#page { padding:env(safe-area-inset-top,0px) max(20px,env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(20px,env(safe-area-inset-left,0px)); }
.header { max-width:800px; margin:auto; height:90px; display:flex; align-items:center; } .brand { display:inline-flex; align-items:center; gap:10px; min-height:44px; font-size:15px; font-weight:650; } .brand-logo { display:block; width:36px; height:36px; flex-shrink:0; }
main { max-width:720px; margin:16px auto 0; } .intro { text-align:center; margin-bottom:28px; } h1 { font-size:32px; letter-spacing:-.8px; line-height:1.3; margin:0 0 10px; font-weight:650; } .intro p { color:var(--muted); margin:0; } h2 { font-size:17px; font-weight:600; margin:0; }
.card { background:var(--card); border:1px solid var(--border); border-radius:18px; padding:28px; box-shadow:0 4px 20px #14251804; }
.dropzone { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; min-height:200px; border:1.5px dashed var(--border); border-radius:12px; background:var(--background); padding:24px; cursor:pointer; }
.dropzone:focus-within { outline:3px solid var(--primary); outline-offset:3px; } .dropzone.dragging { border-color:var(--primary); background:var(--tint); }
.dropzone input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; font-size:16px; cursor:pointer; } .dropzone input:disabled { cursor:wait; } .upload-icon { width:34px; height:34px; color:var(--primary); margin-bottom:4px; } .dropzone strong { font-size:19px; font-weight:600; color:var(--primary); } .drop-tip { color:var(--muted); font-size:13px; }
.file-help { text-align:center; color:var(--muted); font-size:12px; margin:14px 0 20px; line-height:1.8; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:46px; border:1px solid var(--border); border-radius:9px; padding:10px 18px; font-size:14px; font-weight:550; line-height:1.5; background:var(--card); color:var(--foreground); text-align:center; }
.button.primary { background:var(--primary); color:var(--on-primary); border-color:var(--primary); } .button.secondary { background:transparent; } .start { width:100%; min-height:50px; font-size:16px; margin-top:6px; } .hint { text-align:center; font-size:12px; color:var(--muted); margin:10px 0 0; min-height:20px; }
.selection { display:grid; gap:8px; } .selected-file { display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); padding:4px 0; min-height:52px; } .selected-name { flex:1; min-width:0; font-size:14px; overflow-wrap:anywhere; word-break:break-word; } .selected-file small { color:var(--muted); font-size:12px; white-space:nowrap; }
.icon-button { display:inline-grid; place-items:center; border:0; border-radius:8px; background:transparent; color:var(--muted); width:44px; height:44px; flex-shrink:0; padding:0; font-size:26px; line-height:1; }
.upload-status { font-size:13px; overflow-wrap:anywhere; color:var(--primary); margin:14px 0; } progress { width:100%; display:block; height:7px; margin:10px 0; accent-color:var(--primary); }
.error { border-radius:8px; background:var(--danger-tint); color:var(--danger); padding:12px; font-size:13px; overflow-wrap:anywhere; }
.connection { display:flex; align-items:center; gap:12px; justify-content:space-between; background:var(--card); border:1px solid var(--border); border-radius:12px; margin-top:18px; padding:14px; font-size:13px; } .connection .button { white-space:nowrap; }
.tasks-section { margin-top:30px; } .section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; } .muted { font-size:12px; color:var(--muted); }
.job { background:var(--card); border:1px solid var(--border); border-radius:12px; margin-bottom:10px; padding:18px; } .job-top { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; } .job-info { min-width:0; flex:1; } .filename { font-size:15px; font-weight:550; overflow-wrap:anywhere; word-break:break-word; } .meta { color:var(--muted); font-size:12px; margin-top:4px; }
.status { font-size:12px; border-radius:6px; padding:4px 8px; white-space:nowrap; background:var(--soft); color:var(--muted); } .status.completed,.status.running { color:var(--primary); background:var(--tint); } .status.failed { color:var(--danger); background:var(--danger-tint); }
.job-message { font-size:13px; color:var(--muted); margin-top:10px; overflow-wrap:anywhere; } .job-actions { display:flex; align-items:center; gap:10px; margin-top:16px; } .job-actions .primary { min-width:180px; }
.help { color:var(--muted); margin:24px 0 0; font-size:13px; border-top:1px solid var(--border); } summary { min-height:48px; padding:13px 0; } .help p { margin:0 0 12px; line-height:1.9; } footer { max-width:720px; margin:26px auto; color:var(--muted); text-align:center; font-size:12px; }
.modal { position:fixed; z-index:20; inset:0; background:#10191388; display:flex; align-items:center; justify-content:center; padding:24px; padding-top:max(24px,env(safe-area-inset-top,0px)); padding-bottom:max(24px,env(safe-area-inset-bottom,0px)); }
.dialog { display:flex; flex-direction:column; background:var(--card); border:1px solid var(--border); border-radius:16px; width:720px; max-width:100%; max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px); box-shadow:0 20px 80px #0003; min-height:0; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); padding:12px 16px 12px 22px; flex-shrink:0; } .dialog-head h2 { min-width:0; overflow-wrap:anywhere; font-size:15px; }
.dialog-body { overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:20px 22px; min-height:0; } .result-notice { font-size:13px; color:var(--muted); margin:0 0 20px; } .preview-title { font-size:14px; font-weight:550; overflow-wrap:anywhere; margin:0 0 10px; }
.preview { white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; background:var(--background); border:1px solid var(--border); border-radius:8px; padding:16px; font-family:inherit; font-size:14px; line-height:1.9; margin:0 0 22px; }
.dialog-body details { border-top:1px solid var(--border); } .member { display:flex; justify-content:space-between; gap:16px; font-size:12px; padding:8px 0; border-bottom:1px solid var(--border); color:var(--muted); } .member span:first-child { overflow-wrap:anywhere; word-break:break-word; } .member span:last-child { white-space:nowrap; }
.dialog-footer { flex-shrink:0; padding:14px 22px; border-top:1px solid var(--border); } .dialog-footer .button { width:100%; } .modal-open { overflow:hidden; }
.toast { position:fixed; z-index:30; bottom:24px; bottom:max(24px,env(safe-area-inset-bottom,0px)); left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 40px); background:var(--foreground); color:var(--card); border-radius:10px; padding:12px 18px; font-size:13px; text-align:center; box-shadow:0 4px 24px #0002; pointer-events:none; }
@media (hover:hover) { .dropzone:hover { border-color:var(--primary); background:var(--tint); } .button:hover:not(:disabled),.icon-button:hover { filter:brightness(.94); } }
@media (pointer:coarse) { .drop-tip { display:none; } }
@media (max-width:600px) {
  #page { padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); }
  .header { height:70px; } main { margin-top:12px; } h1 { font-size:25px; letter-spacing:-.5px; } .intro { margin-bottom:24px; } .intro p { font-size:14px; }
  .card { padding:20px 16px; border-radius:14px; } .dropzone { min-height:162px; padding:20px; } .file-help { font-size:12px; margin-bottom:14px; }
  .job { padding:16px; } .job-top { gap:10px; } .job-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; } .job-actions .primary { min-width:0; } .job-actions .button { padding-left:12px; padding-right:12px; }
  .connection { flex-direction:column; align-items:stretch; } .modal { padding:12px; padding-top:max(12px,env(safe-area-inset-top,0px)); padding-bottom:max(12px,env(safe-area-inset-bottom,0px)); }
  .dialog { max-height:calc(100vh - 48px); max-height:calc(100dvh - max(24px,env(safe-area-inset-top,0px)) - max(24px,env(safe-area-inset-bottom,0px))); border-radius:12px; }
  .dialog-head { padding-left:16px; } .dialog-body { padding:16px; } .dialog-footer { padding:12px 16px; }
}
@media (prefers-reduced-motion:no-preference) { .button,.dropzone { transition:background .15s,border-color .15s; } }
