:root {
  color-scheme: light;
  --ink: #10231d;
  --muted: #607069;
  --paper: #f4f2ea;
  --card: #fffdf7;
  --accent: #0d6b50;
  --accent-dark: #084d3a;
  --line: #d8ddd6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at top left, #dcecdf 0, transparent 34rem), var(--paper); }
.shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 32px; }
header { margin-bottom: 32px; }
h1 { margin: 4px 0 12px; font-family: Georgia, serif; font-size: clamp(42px, 8vw, 72px); line-height: .95; font-weight: 500; letter-spacing: -.04em; }
h2 { margin: 2px 0 0; font-size: 22px; }
.intro { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.55; }
.eyebrow { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.queue-status { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255, 253, 247, .75); font-size: 13px; font-weight: 700; }
.queue-pulse { width: 8px; height: 8px; border-radius: 50%; background: #839089; }
.queue-status[data-state="busy"] .queue-pulse { background: #d99d25; box-shadow: 0 0 0 4px #f5e8c9; }
.queue-status[data-state="idle"] .queue-pulse { background: #17875f; box-shadow: 0 0 0 4px #d7eee5; }
.queue-status[data-state="unavailable"] .queue-pulse { background: #bd483e; box-shadow: 0 0 0 4px #f3deda; }
.card { margin: 18px 0; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: color-mix(in srgb, var(--card) 94%, transparent); box-shadow: 0 16px 50px rgba(23, 50, 39, .08); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin-top: 5px; }
.task-count { display: inline-grid; place-items: center; min-width: 28px; height: 28px; margin-left: 6px; padding: 0 8px; border-radius: 999px; color: var(--accent); background: #dceee6; font-size: 14px; vertical-align: 2px; }
.dropzone { display: grid; place-items: center; min-height: 190px; padding: 28px; border: 2px dashed #9db0a7; border-radius: 14px; cursor: pointer; text-align: center; transition: .2s ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: #f2f8f3; transform: translateY(-1px); }
.drop-title { margin-bottom: 8px; font-size: 20px; font-weight: 750; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.field { display: grid; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.field input { width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: white; font: inherit; }
.checkbox-field { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 12px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7f7f1; cursor: pointer; }
.checkbox-field input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.checkbox-field span { display: grid; gap: 4px; }
.checkbox-field strong { font-size: 14px; }
.checkbox-field small { color: var(--muted); line-height: 1.45; }
.checkbox-field.disabled { opacity: .52; cursor: not-allowed; }
.checkbox-field strong em { margin-left: 6px; padding: 3px 7px; border-radius: 999px; color: #7a5200; background: #f5e8c9; font-size: 10px; font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.fast-mode-field { border-color: #ddcfaa; background: #fffaf0; }
button, .button { display: inline-flex; justify-content: center; margin-top: 18px; padding: 13px 18px; border: 0; border-radius: 10px; color: white; background: var(--accent); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
button { width: 100%; }
button:hover, .button:hover { background: var(--accent-dark); }
button:disabled { opacity: .5; cursor: wait; }
.secondary { color: var(--ink); background: #e6ebe6; }
.button.compact { width: auto; margin-top: 0; padding: 9px 12px; font-size: 13px; }
.button.ghost { color: var(--muted); background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.button.ghost:hover { color: var(--ink); background: #eef1ed; }
.status-row { display: flex; align-items: center; gap: 14px; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: #d99d25; box-shadow: 0 0 0 6px #f5e8c9; }
.dot[data-status="completed"] { background: #17875f; box-shadow: 0 0 0 6px #d7eee5; }
.dot[data-status="failed"], .dot[data-status="needs_review"] { background: #bd483e; box-shadow: 0 0 0 6px #f3deda; }
.progress { height: 7px; margin: 22px 0; overflow: hidden; border-radius: 10px; background: #e2e6e1; }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .45s ease; }
.timing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 8px; }
.timing-grid div { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f7f7f1; }
.timing-grid span { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.timing-grid strong { font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.estimate-note { min-height: 20px; margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.error { padding: 12px; white-space: pre-wrap; border-radius: 8px; color: #7c211d; background: #f8e5e2; }
.storage-note { margin: -6px 0 20px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.storage-note.storage-warning { color: #8a4d0f; }
.empty-tasks { display: grid; justify-items: center; gap: 6px; padding: 42px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.empty-tasks strong { color: var(--ink); font-size: 16px; }
.task-list { display: grid; gap: 14px; }
.task-item { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(23, 50, 39, .05); }
.task-item[data-status="completed"] { border-color: #b9dcca; }
.task-item[data-status="failed"], .task-item[data-status="needs_review"], .task-item[data-status="upload_failed"] { border-color: #e6c1bc; }
.task-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.task-title { display: flex; align-items: center; min-width: 0; gap: 13px; }
.task-title > div { min-width: 0; }
.task-title h3 { overflow: hidden; margin: 0; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.task-title p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.task-item .dot { flex: 0 0 auto; width: 12px; height: 12px; box-shadow: 0 0 0 4px #f5e8c9; }
.dot[data-status="uploading"], .dot[data-status="queued"], .dot[data-status="processing"] { background: #d99d25; box-shadow: 0 0 0 4px #f5e8c9; }
.dot[data-status="cancelled"], .dot[data-status="expired"] { background: #839089; box-shadow: 0 0 0 4px #e3e8e5; }
.dot[data-status="upload_failed"] { background: #bd483e; box-shadow: 0 0 0 4px #f3deda; }
.status-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; color: #70500d; background: #f5e8c9; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status-badge[data-status="completed"] { color: #0b6244; background: #d7eee5; }
.status-badge[data-status="failed"], .status-badge[data-status="needs_review"], .status-badge[data-status="upload_failed"] { color: #872b24; background: #f3deda; }
.status-badge[data-status="cancelled"], .status-badge[data-status="expired"] { color: #526059; background: #e3e8e5; }
.task-badges { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.mode-badge { padding: 6px 9px; border-radius: 999px; color: #76500b; background: #f5e8c9; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.task-item .progress { height: 6px; margin: 16px 0 10px; }
.task-item[data-status="uploading"] .progress span { min-width: 10%; animation: upload-pulse 1.3s ease-in-out infinite alternate; }
.stage-message { margin: 0; color: var(--muted); font-size: 13px; }
.compact-timing { margin: 14px 0 6px; }
.compact-timing div { padding: 10px 12px; }
.compact-timing strong { font-size: 18px; }
.task-actions { margin-top: 14px; }
.task-error { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; color: #7c211d; background: #f8e5e2; font-size: 13px; line-height: 1.45; }
@keyframes upload-pulse { from { opacity: .45; } to { opacity: 1; } }
.hidden { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 4px; color: var(--muted); font-size: 13px; }
footer a { color: var(--accent); }
@media (max-width: 560px) { .shell { padding-top: 36px; } .card { padding: 18px; } .section-heading, .task-topline { align-items: stretch; flex-direction: column; } .tasks-heading { align-items: flex-start; } .task-badges { justify-content: flex-start; } .status-badge { align-self: flex-start; } .timing-grid { grid-template-columns: 1fr; } .task-actions .button { width: 100%; } footer { flex-direction: column; } }
