:root {
  color-scheme: dark;
  --bg: #141517;
  --panel: #1d1f22;
  --control: #17191c;
  --line: #36393f;
  --ink: #f1f0ee;
  --mute: #a9aeb7;
  --accent: #f3df74;
  --blue: #a9c5ff;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
.top { height: 66px; padding: 0 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 720; white-space: nowrap; }
.brand img { display: block; flex-shrink: 0; }
.brand small { padding-left: 7px; color: var(--mute); font-size: 10px; font-weight: 650; }
.status { color: var(--mute); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #81bd9f; flex: none; }
.workspace { max-width: 1330px; margin: auto; display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: calc(100dvh - 66px); }
.tabs { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; gap: 5px; flex-direction: column; }
.tab { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 8px 11px; color: var(--mute); background: transparent; border: 1px solid transparent; border-radius: 6px; text-align: left; }
.tab[aria-current="true"] { color: var(--accent); background: #29271f; border-color: #3c3828; font-weight: 650; }
.tab:hover:not([aria-current="true"]), .icon-button:hover { background: var(--panel); color: var(--ink); }
main { padding: 31px 32px 38px; min-width: 0; }
.section-head, .preview header, .preview-info, .order, dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--mute); margin: 0 0 3px; font-size: 10px; font-weight: 700; }
h1 { margin: 0; line-height: 1.18; font-size: 32px; font-weight: 740; }
h2 { font-size: 15px; line-height: 1.35; margin: 0; }
.icon-button { min-width: 36px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--mute); }
svg { width: 19px; height: 19px; flex-shrink: 0; }
.tasks { display: flex; flex-wrap: wrap; gap: 7px; margin: 21px 0 22px; }
.task { background: var(--control); border: 1px solid var(--line); border-radius: 6px; min-height: 39px; padding: 7px 11px; color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.task[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: #2a281f; }
.columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(228px, .85fr); gap: 20px; align-items: start; }
form { min-width: 0; }
.pane { padding: 15px; margin-bottom: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.field-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.picker { display: flex; align-items: center; min-width: 0; background: var(--control); border: 1px solid var(--line); border-radius: 5px; }
.picker-icon { color: var(--accent); padding-left: 12px; display: flex; align-items: center; }
.picker select { border: 0; background: none; min-height: 42px; }
select, textarea, input:not([type="checkbox"]) { display: block; width: 100%; min-width: 0; padding: 9px 10px; background: var(--control); border-radius: 5px; border: 1px solid var(--line); }
textarea { resize: vertical; min-height: 100px; }
textarea::placeholder { color: #818894; }
.model-meta, .counter, .hint { margin: 6px 0 0; font-size: 12px; color: var(--mute); overflow-wrap: anywhere; }
.counter { text-align: right; }
.fields, .uploads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 11px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 5px; color: var(--mute); font-size: 12px; overflow-wrap: anywhere; }
.field input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--accent); }
.upload { position: relative; min-width: 0; min-height: 82px; border: 1px dashed #626871; border-radius: 5px; display: grid; gap: 4px; place-content: center; text-align: center; padding: 9px; background: var(--control); overflow-wrap: anywhere; cursor: pointer; }
.upload .upload-name { font-size: 12px; font-weight: 650; }
.upload .filename { font-size: 11px; color: var(--mute); }
.upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; height: 100%; }
.upload:focus-within { outline: 2px solid var(--blue); }
.preview { border: 1px solid var(--line); border-radius: 8px; padding: 13px; min-width: 0; background: var(--panel); }
.preview header { margin: 1px 0 12px; }
.preview header span { color: var(--blue); background: #263248; border-radius: 4px; padding: 2px 6px; font-size: 11px; }
.preview-frame { display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 3; background: #181d26; border-radius: 5px; color: #859bbc; }
.preview-frame img, .preview-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-frame audio { width: 93%; }
.preview-frame svg { width: 44px; height: 44px; }
.preview-info { margin: 11px 0 1px; align-items: flex-start; font-size: 12px; }
.preview-info span { min-width: 0; overflow-wrap: anywhere; }
.preview-info span:last-child { color: var(--mute); text-align: right; }
.order { padding: 13px 0 0; border-top: 1px solid var(--line); align-items: flex-start; }
.order > div { min-width: 0; }
.order .field-label { margin-bottom: 0; color: var(--mute); }
.order strong { font-size: 21px; }
.chat-link { display: inline-block; margin-top: 10px; color: var(--blue); }
.history { display: grid; gap: 7px; margin-top: 10px; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; border-top: 1px solid var(--line); padding-top: 7px; overflow-wrap: anywhere; }
.history-item small { color: var(--mute); }
.primary { flex: 0 0 auto; color: #1d1c15; background: var(--accent); border: 1px solid transparent; border-radius: 6px; padding: 10px 14px; min-height: 42px; font-weight: 710; }
.primary:disabled { color: var(--mute); background: var(--panel); border-color: var(--line); }
dialog { color: var(--ink); width: min(440px, calc(100% - 24px)); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
dialog::backdrop { background: #08090ac9; }
dialog .primary { margin-top: 16px; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 15px; }
dt { color: var(--mute); }
dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 150px minmax(0, 1fr); }
  main { padding: 24px 18px; }
  .columns { gap: 12px; }
}
@media (max-width: 700px) {
  .top { height: 54px; padding: 0 13px; }
  .brand { font-size: 15px; gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .brand small { display: none; }
  .status { font-size: 11px; }
  .workspace { display: block; padding-bottom: 65px; min-height: calc(100dvh - 54px); }
  .tabs { position: fixed; inset: auto 0 0; z-index: 3; flex-direction: row; justify-content: space-around; gap: 2px; padding: 5px 5px max(5px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); background: #17191b; }
  .tab { justify-content: center; flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; text-align: center; font-size: 11px; padding: 4px 2px; }
  main { padding: 17px 12px 24px; }
  h1 { font-size: 25px; }
  .tasks { margin: 12px 0; gap: 5px; }
  .task { padding: 6px 7px; font-size: 12px; min-height: 35px; }
  .columns { display: block; }
  .pane { margin-bottom: 8px; padding: 10px; }
  .preview { margin-top: 14px; }
  .preview-frame { aspect-ratio: 16 / 9; }
  .order .primary { font-size: 12px; padding-inline: 8px; white-space: normal; max-width: 45%; }
}
