:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #101018;
  color: #f6f3ff;
  color-scheme: dark;
  --muted: #b8b3ca;
  --line: #373246;
  --accent: #d1b7ff;
  --panel: #1b1926;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 12% 0%, #2b1b403d, transparent 45%); }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .upload:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.top { border-bottom: 1px solid var(--line); background: #161420; }
.top-inner, main { max-width: 1170px; margin: auto; padding-inline: clamp(16px, 4vw, 42px); }
.top-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 750; white-space: nowrap; }
.mark { width: 29px; height: 29px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.mark::before { content: ""; display: block; width: 0; height: 0; border: 6px solid transparent; border-right: 0; border-left: 10px solid #271a40; margin-left: 2px; }
.toolbar { display: flex; gap: 6px; align-items: center; }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: .85rem; color: var(--muted); margin-right: 6px; }
.connection i { width: 8px; height: 8px; border-radius: 50%; background: #e1a46f; flex: none; }
.connection.online i { background: #86d6a8; }
.intro { margin: 40px 0 25px; }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 750; letter-spacing: .13em; }
h1, h2, p { margin-top: 0; }
h1 { margin: 9px 0 12px; font-size: clamp(1.95rem, 5vw, 3.1rem); letter-spacing: -.045em; }
h2 { font-size: 1.16rem; margin-bottom: 16px; }
p { color: var(--muted); line-height: 1.55; }
.layout { display: grid; grid-template-columns: minmax(315px, .86fr) minmax(0, 1.14fr); gap: 20px; padding-bottom: 40px; align-items: start; }
.panel, .login, dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 27px); color: inherit; }
.login { width: min(100%, 445px); margin: clamp(36px, 10vh, 105px) auto; }
.login h1 { font-size: clamp(1.7rem, 5vw, 2.15rem); }
form { display: grid; gap: 10px; }
form > label, .fields > label { color: #e5dff3; font-size: .9rem; }
small { font-size: .8rem; color: var(--muted); }
input, textarea, select { width: 100%; color: inherit; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; background: #14121e; }
textarea { resize: vertical; min-height: 100px; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.upload { display: flex; align-items: center; gap: 13px; min-height: 73px; background: #221a32; border: 1px dashed #8065aa; border-radius: 9px; padding: 12px; cursor: pointer; position: relative; }
.upload > span { min-width: 0; display: grid; gap: 4px; }
.upload strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload img { width: 45px; height: 45px; border-radius: 5px; object-fit: cover; }
.upload input { position: absolute; inset: 0; opacity: 0; padding: 0; cursor: pointer; }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fields label { display: grid; gap: 6px; }
.field-hint { margin: 0; font-size: .85rem; }
.prompt-segments { display: grid; justify-items: start; gap: 8px; }
.primary, .ghost { padding: 9px 13px; border-radius: 8px; border: 1px solid transparent; min-height: 38px; }
.primary { margin-top: 5px; background: var(--accent); color: #221635; font-weight: 750; }
.primary:hover { background: #e0ceff; }
.ghost { background: #201b2e; color: #ede6fa; border-color: var(--line); font-size: .88rem; }
.ghost:hover { border-color: #a38aba; }
button:disabled { opacity: .55; cursor: default; }
.feedback { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.feedback:empty { display: none; }
.feedback.error, .job-error { color: #ffb1ad; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head span, .pagination { color: var(--muted); font-size: .88rem; }
.empty { padding: 34px 12px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; margin: 0; }
.job { background: #171422; border: 1px solid var(--line); border-radius: 10px; padding: 13px; margin-bottom: 9px; }
.job:last-child { margin-bottom: 0; }
.job .section-head { margin-bottom: 8px; }
.job strong { font-size: .9rem; }
.job p { margin: 5px 0; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.job .badge { background: #332345; color: #e1ceff; border-radius: 20px; padding: 4px 8px; white-space: nowrap; font-size: .81rem; }
.job .badge.completed { background: #19362d; color: #a6e8bc; }
.job .badge.failed, .job .badge.unconfirmed { background: #40252c; color: #ffbcb8; }
.job details, .job time { color: var(--muted); font-size: .84rem; overflow-wrap: anywhere; }
.job summary { cursor: pointer; margin-top: 7px; }
.job .part-count { margin-top: 9px; font-weight: 650; color: #e5dff3; }
.part-list { display: grid; gap: 7px; margin: 8px 0 0; padding-inline-start: 20px; }
.part-list p { overflow-wrap: anywhere; }
.part-prompt { padding-inline-start: 8px; border-inline-start: 2px solid var(--line); }
.job-progress { margin-top: 9px; display: grid; gap: 5px; }
.job .job-progress p { margin: 0; }
.job-progress progress { display: block; width: 100%; height: 8px; overflow: hidden; color: var(--accent); background: #342d42; border: 0; border-radius: 8px; accent-color: var(--accent); }
.job-progress progress::-webkit-progress-bar { background: #342d42; }
.job-progress progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.job-progress progress::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
.downloads { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 8px; }
.pagination { display: flex; justify-content: end; align-items: center; gap: 9px; margin-top: 14px; }
dialog { width: min(calc(100% - 32px), 460px); }
dialog::backdrop { background: #0c0914c9; }
dialog p, dialog .section-head { margin-bottom: 2px; }
@media (max-width: 740px) { .layout { grid-template-columns: 1fr; } .intro { margin-top: 26px; } }
@media (max-width: 400px) { .top-inner { flex-wrap: wrap; padding-block: 10px; } .toolbar { margin-left: auto; } }
