:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #edf1ff;
  background: #101321;
  color-scheme: dark;
  --panel: #1a2033;
  --border: #303952;
  --muted: #a5afca;
  --accent: #a5e8ff;
  --error: #ffabae;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 66% 0%, #263652 0%, transparent 52%); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1080px; margin: auto; padding: 22px 30px; }
.brand, .top-actions { display: flex; align-items: center; gap: 13px; }
.brand { color: #edf1ff; font-weight: 700; white-space: nowrap; }
.brand-mark, .empty-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: var(--accent); background: #293e56; font-size: 23px; }
.top-actions { color: var(--muted); font-size: 14px; }
.top-actions a { white-space: nowrap; }
.page { max-width: 900px; margin: auto; padding: 45px 30px 80px; }
.intro { margin-bottom: 35px; }
.eyebrow { color: var(--accent); font: 700 12px ui-monospace, monospace; letter-spacing: .18em; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--accent); }
h1 { margin: 14px 0 12px; font-size: clamp(28px, 6vw, 49px); letter-spacing: -.035em; line-height: 1.23; }
h2 { margin: 0; font-size: 20px; }
.intro > p:last-child, .muted, .notice { color: var(--muted); line-height: 1.6; }
.panel { border: 1px solid var(--border); border-radius: 15px; background: var(--panel); }
.login, .compose { padding: 24px; }
.login { max-width: 520px; }
form { margin-top: 18px; }
label { display: block; color: #d4def7; margin-bottom: 8px; font-size: 14px; font-weight: 650; }
.input-row, .form-actions, .queue-title, .task-top, .progress-row, .files li { display: flex; align-items: center; gap: 12px; }
input, textarea { border: 1px solid var(--border); border-radius: 9px; color: #edf1ff; background: #121827; padding: 12px; min-width: 0; }
input { flex: 1; }
textarea { display: block; width: 100%; resize: vertical; font: 14px/1.5 ui-monospace, monospace; }
input::placeholder, textarea::placeholder { color: #8996b6; }
.primary, .quiet { border: 1px solid transparent; border-radius: 8px; padding: 10px 15px; font-weight: 700; white-space: nowrap; }
.primary { color: #132535; background: var(--accent); }
.primary:hover { background: #c3efff; }
.quiet { color: #c7d1ed; background: #1b2336; border-color: var(--border); }
.quiet:hover { background: #28344c; }
.form-actions, .queue-title, .task-top, .files li { justify-content: space-between; }
.form-actions { margin-top: 12px; }
.feedback { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback.error { color: var(--error); }
#login-note:not(:empty), #queue-note:not(:empty), .file-note:not(:empty) { margin-top: 12px; }
.queue { margin-top: 28px; }
.queue-title { margin-bottom: 12px; }
.count, .badge { color: var(--accent); background: #263c54; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge[data-status="completed"] { color: #a9f2d3; background: #25453f; }
.badge[data-status="error"] { color: var(--error); background: #51313e; }
.empty { display: grid; justify-items: center; gap: 8px; border: 1px dashed var(--border); border-radius: 14px; padding: 28px 16px; text-align: center; color: var(--muted); }
.empty p { margin: 0; color: #edf1ff; font-weight: 700; }
.empty span:last-child { font-size: 14px; }
.tasks { display: grid; gap: 12px; }
.task { padding: 18px; min-width: 0; }
.task-name { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.progress-row { margin: 11px 0 7px; }
progress { height: 8px; flex: 1; min-width: 0; accent-color: var(--accent); border: 0; }
.percent { font-variant-numeric: tabular-nums; min-width: 4.7em; text-align: right; font-size: 14px; }
.task-meta { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
details { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border); }
summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.files { margin: 0; padding: 0; list-style: none; }
.files li { padding-top: 10px; font-size: 14px; }
.files li span { overflow-wrap: anywhere; }
.files a { flex: none; }
@media (max-width: 520px) {
  .topbar, .page { padding-left: 17px; padding-right: 17px; }
  .page { padding-top: 27px; }
  .login, .compose { padding: 16px; }
  .top-actions { gap: 8px; }
  .quiet { padding: 7px 10px; }
}
