:root {
  color-scheme: dark;
  --bg: #101310;
  --panel: #171c18;
  --panel2: #1c221d;
  --surface: #121712;
  --line: #2f382e;
  --line-strong: #434f41;
  --ink: #eff1e8;
  --dim: #9ca899;
  --muted: #7d8a7a;
  --accent: #dff49c;
  --accent-ink: #1f2d11;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

button[data-busy="1"] {
  cursor: progress;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.top, main {
  max-width: 1240px;
  padding: 0 clamp(16px, 4.5vw, 64px);
  margin: 0 auto;
}

/* Header */
.top {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.brandmark {
  background: var(--accent);
  color: var(--accent-ink);
  font: 21px/32px var(--mono);
  font-style: normal;
  text-align: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brandName {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: .04em;
}

.brand b {
  color: #566050;
  font-weight: 400;
}

.brand small {
  font: 11px var(--mono);
  letter-spacing: .1em;
  color: #bdc5b5;
}

.topend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--dim);
  background: #171d17;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
  min-width: 0;
  max-width: 60vw;
}

#gpu {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pulse {
  font-size: 9px;
  line-height: 1;
  color: #707d6e;
  flex-shrink: 0;
}

.pulse[data-online="1"] {
  color: #b7e876;
}

/* Hero */
.hero {
  min-height: 184px;
  border: 1px solid #3f483c;
  border-radius: 14px;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #1f2720 url(studio-art.svg) center center / cover;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 20, 17, .86), rgba(20, 27, 21, .38) 68%, rgba(16, 20, 17, .15));
  z-index: -1;
}

.heroText {
  padding: 28px clamp(20px, 3.6vw, 44px);
  min-width: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .1em;
  color: #cadac0;
  margin-bottom: 8px;
}

.kicker span {
  height: 1.5px;
  width: 22px;
  background: #bdd096;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 48px);
  font-family: var(--serif);
  letter-spacing: -.03em;
  line-height: 1.22;
  font-weight: 600;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: #c2ccbc;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* Section headers */
.sectionbar {
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.heading .num {
  font: 10px var(--mono);
  letter-spacing: .1em;
  color: #9cb296;
  border: 1px solid #394539;
  border-radius: 5px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.micro {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Main workspace grid */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.idea, .board {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  padding: 20px 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  min-width: 0;
}

.kindPick {
  margin: 0 0 16px !important;
}

.ideaHead, .boardTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.idea h3, .boardTitle h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
  min-width: 0;
}

.boardMeta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ghostBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #cfe0bd;
  background: #212921;
  border: 1px solid #3b483a;
  border-radius: 999px;
  padding: 4px 11px;
  min-height: 28px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color .15s ease, border-color .15s ease;
}

.ghostBtn:hover {
  background: #2b352b;
  border-color: #536451;
}

/* Reply / sequel banner */
#reply {
  margin-top: 10px;
  background: #232d22;
  color: #d8e9bc;
  border: 1px solid #3c4d39;
  border-left: 3px solid #c5df98;
  border-radius: 7px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  min-width: 0;
}

#replyText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reply button {
  font-size: 11.5px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 6px;
}

/* Prompt textarea */
.idea textarea {
  margin-top: 12px;
  padding: 12px 14px;
  min-height: 120px;
  width: 100%;
  resize: vertical;
  line-height: 1.65;
  background: #101510;
  border: 1px solid #3f4a3e;
  border-radius: 9px;
  color: var(--ink);
  transition: border-color .15s ease;
}

.idea textarea::placeholder {
  color: #707d6f;
}

.idea textarea:focus {
  border-color: #8ea572;
}

.inputmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: #8c9888;
  font-size: 11.5px;
}

.metaHint {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#count {
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Model & Canvas & Duration controls */
.modelPick {
  border: 0;
  margin: 16px 0 0;
  padding: 0;
  min-width: 0;
}

.modelPick legend {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 0;
}

.modelOptions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.modelOptions.threeCols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modelOptions label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: #131813;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, background-color .15s ease;
}

.modelOptions label:has(:checked) {
  border-color: var(--accent);
  background: #1f281c;
  color: var(--accent);
  font-weight: 600;
}

.modelOptions input {
  accent-color: var(--accent);
  margin: 0;
}

.sub {
  font-size: 12.5px;
  color: var(--dim);
  margin: 7px 0 0;
  line-height: 1.5;
}

.lengthPick {
  margin: 16px 0 0;
}

.lengthPick label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.lengthPick output {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

#duration {
  width: 100%;
  height: 28px;
  accent-color: var(--accent);
  cursor: pointer;
  margin: 2px 0 4px;
}

.rangeStops {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.rangeStops button {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.rangeStops button:hover {
  color: var(--ink);
  background: #1b221a;
}

.rangeStops button[aria-pressed="true"] {
  color: var(--accent);
  background: #1f281c;
  border-color: #465a37;
  font-weight: 600;
}

#qualityHint {
  margin-top: 12px;
}

.actionrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: background-color .15s ease, transform .08s ease;
}

.primary {
  background: var(--accent);
  color: var(--accent-ink);
  min-height: 42px;
}

.primary:hover:not(:disabled) {
  background: #ecffba;
}

.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.secondary {
  border: 1px solid #4a5847;
  background: #212821;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

.secondary:hover {
  background: #2b342b;
  text-decoration: none;
}

.msg {
  color: #e6cfa8;
  font-size: 12.5px;
  margin: 10px 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.msg:empty {
  display: none;
}

.bannerMsg {
  margin: 12px 0 0;
  padding: 9px 13px;
  background: #1d251c;
  border: 1px solid #364534;
  border-radius: 9px;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #bfd0b2;
  background: #222b21;
  border: 1px solid #364434;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.tag[data-online="1"] {
  color: #d6efb0;
  background: #222e1f;
  border-color: #415839;
}

/* Storyboard & Image Design shots */
.board #shotHint {
  margin-bottom: 10px;
}

.board[data-collapsed="1"] #shots {
  display: none;
}

.board #shots {
  max-height: 36rem;
  overflow: auto;
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.shot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid #262f25;
  border-radius: 8px;
}

.shot > span {
  width: 28px;
  line-height: 26px;
  text-align: center;
  border: 1px solid #3c4a37;
  border-radius: 6px;
  color: #bdd3a2;
  font: 11.5px/26px var(--mono);
  background: #1f271e;
  font-variant-numeric: tabular-nums;
}

.shot > div {
  min-width: 0;
}

.shot label {
  display: block;
  color: #96a58e;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
  white-space: nowrap;
}

.shot p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.66;
  color: #e4e8de;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shot details {
  margin-top: 8px;
  border-top: 1px solid #242d23;
  padding-top: 6px;
}

.shot summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--dim);
  user-select: none;
}

.shot details p {
  margin-top: 6px;
  font-size: 12.5px;
  color: #b7c3b2;
}

/* Media category switcher & Jobs library */
.workSwitch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.workTab {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  min-width: 0;
  transition: border-color .16s ease, background-color .16s ease;
}

.workTab:hover {
  border-color: var(--line-strong);
  background: #1a211b;
}

.workTab[aria-selected="true"] {
  border-color: var(--accent);
  background: #1d261a;
  box-shadow: inset 0 1px 0 rgba(223, 244, 156, .08);
}

.workTabTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.workTabTitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.workIcon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 11px/1 var(--mono);
  font-style: normal;
  background: #232c22;
  color: #b7c8a9;
  border: 1px solid #354334;
  flex-shrink: 0;
}

.workTab[aria-selected="true"] .workIcon {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 700;
}

.workTabTitle strong {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}

.workTab[aria-selected="true"] .workTabTitle strong {
  color: #f4fae6;
}

.workCount {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 9px;
  border-radius: 999px;
  background: #111611;
  border: 1px solid #2b352a;
  color: var(--dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.workTab[aria-selected="true"] .workCount {
  background: #273422;
  border-color: #465d39;
  color: var(--accent);
}

.workTabSub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.workHint {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.workTab[aria-selected="true"] .workHint {
  color: #aebfa5;
}

.workActiveBadge {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: #25331d;
  border: 1px solid #445c34;
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.jobbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  background: #181e18;
}

.jobsMsg {
  margin: 10px 2px 0;
  padding: 8px 12px;
  background: #1d251c;
  border: 1px solid #364534;
  border-radius: 9px;
}

.jobbarLeft,
.jobbarRight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.jobbarRight {
  margin-left: auto;
}

.topPager {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #111511;
  border: 1px solid #2a3329;
  border-radius: 8px;
  padding: 2px;
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topPager span {
  padding: 0 6px;
}

.topPageBtn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd7c6;
  font-size: 13px;
  line-height: 1;
  transition: background-color .15s ease, color .15s ease;
}

.topPageBtn:hover:not(:disabled) {
  background: #273226;
  color: var(--accent);
}

.libraryLabel {
  font-size: 13px;
  font-weight: 650;
  color: #d9e6cb;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #111511;
  border: 1px solid #2a3329;
  border-radius: 8px;
  padding: 2px;
  flex-shrink: 0;
}

.tabs button {
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--dim);
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color .15s ease, color .15s ease;
}

.tabs button[aria-pressed="true"] {
  background: #2f3c2e;
  color: #e7f6d4;
  font-weight: 600;
}

#jobs,
.jobGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: stretch;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  line-height: 1.7;
  color: var(--dim);
  padding: 32px 18px;
  font-size: 13px;
  border: 1px dashed #2d372c;
  border-radius: 12px;
  background: #151a15;
}

.job {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161b16;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition: border-color .15s ease;
}

.job:hover {
  border-color: var(--line-strong);
}

.job.isExpanded {
  grid-column: 1 / -1;
}

.job.isFailed {
  background: #151815;
  border-color: #2c2826;
}

.jobPager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 16px;
  background: #181e18;
}

.pagerInfo {
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pagerControls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-left: auto;
}

.pageBtn {
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid #303b2f;
  background: #131813;
  color: #cbd7c6;
  font-size: 12px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.pageBtn:hover:not(:disabled):not(.isCurrent) {
  background: #222b21;
  border-color: #485846;
  color: var(--ink);
}

.pageBtn.isCurrent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 700;
  cursor: default;
}

.pageDots {
  color: var(--muted);
  font-size: 12px;
  padding: 0 3px;
  user-select: none;
}

.jobHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.jobMetaRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  background: #232c22;
  color: #cfe3b8;
  border: 1px solid #384735;
}

.pill[data-state="running"],
.pill[data-state="planning"] {
  background: #26341e;
  color: var(--accent);
  border-color: #465f35;
}

.pill[data-state="queued"] {
  background: #2b271b;
  color: #efd499;
  border-color: #4c432b;
}

.pill[data-state="done"] {
  background: #1f291f;
  color: #b9d1ac;
  border-color: #334232;
}

.pill[data-state="failed"] {
  background: #30201d;
  color: #f2bdb0;
  border-color: #52342f;
}

.pill[data-state="cancelled"] {
  background: #1e221e;
  color: #939e91;
  border-color: #2f362f;
}

.seqBadge {
  font-size: 11px;
  color: #c9deaa;
  background: #212a1f;
  border: 1px solid #364532;
  padding: 1px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.specGroup {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 2px;
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.spec {
  white-space: nowrap;
}

.spec + .spec::before {
  content: " · ";
  color: #5c685a;
  white-space: pre;
}

.jobTime {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.jobPrompt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.jobPrompt.isOpen {
  display: block;
  -webkit-line-clamp: unset;
}

/* Live running/queued status box */
.jobLive {
  background: var(--surface);
  border: 1px solid #263025;
  border-radius: 8px;
  padding: 9px 11px;
  display: grid;
  gap: 7px;
}

.sampler {
  display: grid;
  gap: 5px;
}

.samplerTop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  flex-wrap: nowrap;
  min-width: 0;
}

.samplerTop b {
  font-weight: 600;
  color: #ddeace;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.samplerTop span {
  color: var(--dim);
  font-size: 11.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.jobLive progress {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #252f24;
}

.jobLive progress::-webkit-progress-bar {
  background: #252f24;
  border-radius: 999px;
}

.jobLive progress::-webkit-progress-value {
  background: #b8df74;
  border-radius: 999px;
  transition: width .3s ease;
}

.jobLive progress::-moz-progress-bar {
  background: #b8df74;
  border-radius: 999px;
}

.statusLine {
  margin: 0;
  font-size: 12px;
  color: #b5c3b0;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.statusWarn {
  color: #ebd0a2;
}

.statusErr {
  color: #f0beb2;
}

.jobShots {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed #2a3329;
}

.jobActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.actBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 550;
  padding: 5px 10px;
  min-height: 30px;
  border-radius: 7px;
  white-space: nowrap;
  border: 1px solid #364335;
  background: #1d241d;
  color: #d4e3c5;
  transition: background-color .15s ease, border-color .15s ease;
}

.actBtn:hover:not(:disabled) {
  background: #273127;
  border-color: #4c5d4a;
  text-decoration: none;
}

.actPrimary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 650;
}

.actPrimary:hover:not(:disabled) {
  background: #ecffba;
  border-color: transparent;
}

.actSubtle {
  border-color: transparent;
  background: transparent;
  color: var(--dim);
  padding: 5px 7px;
}

.actSubtle:hover:not(:disabled) {
  background: #1e251e;
  border-color: transparent;
  color: var(--ink);
}

/* Folded failed/cancelled drawer */
.failedFold {
  margin-top: 12px;
  border: 1px dashed #30392f;
  border-radius: 12px;
  background: #131713;
  padding: 10px 14px;
}

.failedFold[open] {
  padding-bottom: 14px;
}

.failedSummary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--dim);
  user-select: none;
}

.failedSummary::-webkit-details-marker {
  display: none;
}

.failedSummary:hover {
  color: var(--ink);
}

.foldToggleText {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.failedGrid {
  margin-top: 10px;
}

/* Preview modal */
dialog {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--panel);
  width: min(840px, 94vw);
  padding: 16px 18px;
}

dialog::backdrop {
  background: rgba(6, 8, 6, .78);
}

.playerHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.playerHead button {
  color: var(--accent);
  font-size: 13px;
  padding: 4px 8px;
}

#frame video,
#frame img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  background: #0d100d;
  border-radius: 8px;
  object-fit: contain;
}

#frame video {
  width: 100%;
  height: auto;
}

.playerFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

#previewStatus {
  margin: 0;
  font-size: 12.5px;
  color: var(--dim);
  flex: 1 1 200px;
}

.playerActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.downloadBtn {
  font-size: 12.5px;
  padding: 7px 13px;
}

/* Footer */
footer {
  margin: 28px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #778575;
  font-size: 11.5px;
  letter-spacing: .06em;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Mobile optimizations */
@media (max-width: 760px) {
  .top {
    height: 56px;
  }

  .brand b,
  .brand small,
  .kicker,
  .heading .num,
  .footSub {
    display: none;
  }

  .brandName {
    font-size: 18px;
  }

  .brandmark {
    width: 29px;
    height: 29px;
    font-size: 19px;
    line-height: 29px;
    border-radius: 8px;
  }

  .hero {
    min-height: 0;
    border-radius: 12px;
    background-position: 64% center;
  }

  .heroText {
    padding: 18px 18px;
  }

  .hero h1 {
    font-size: clamp(24px, 6.8vw, 30px);
    margin-bottom: 4px;
  }

  .hero p {
    font-size: 12.5px;
  }

  .sectionbar {
    margin: 20px 0 10px;
  }

  .heading h2 {
    font-size: 17px;
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .board[data-empty="1"] {
    display: none;
  }

  .idea, .board {
    padding: 16px;
    border-radius: 12px;
  }

  .idea h3, .boardTitle h3 {
    font-size: 16.5px;
  }

  .idea textarea {
    font-size: 16px;
    min-height: 112px;
    padding: 11px 12px;
  }

  .modelOptions.threeCols label {
    padding: 7px 6px;
    font-size: 12.5px;
    gap: 5px;
  }

  .actionrow .primary {
    width: 100%;
  }

  .workSwitch {
    gap: 8px;
    margin-bottom: 10px;
  }

  .workTab {
    padding: 11px 12px;
    border-radius: 10px;
    gap: 4px;
  }

  .workIcon {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .workTabTitle {
    gap: 6px;
  }

  .workTabTitle strong {
    font-size: 14px;
  }

  .workCount {
    font-size: 11.5px;
    padding: 1px 7px;
  }

  .workHint {
    font-size: 11.5px;
  }

  .libraryLabel,
  .topPager {
    display: none;
  }

  .jobbar {
    padding: 9px 12px;
    border-radius: 10px;
  }

  .tabs button {
    padding: 5px 9px;
    font-size: 12px;
  }

  #jobs,
  .jobGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  .job {
    padding: 10px 10px;
    gap: 6px;
    border-radius: 10px;
  }

  .pill {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .jobTime {
    font-size: 10.5px;
  }

  .specGroup {
    font-size: 11px;
  }

  .seqBadge {
    font-size: 10.5px;
    padding: 1px 5px;
  }

  .jobPrompt {
    font-size: 13px;
    line-height: 1.45;
  }

  .jobLive {
    padding: 7px 8px;
    gap: 5px;
  }

  .samplerTop {
    font-size: 11px;
  }

  .samplerTop span {
    font-size: 10.5px;
  }

  .statusLine {
    font-size: 11px;
  }

  .jobActions {
    gap: 5px;
  }

  .actBtn {
    font-size: 11.5px;
    padding: 4px 8px;
    min-height: 27px;
    border-radius: 6px;
  }

  .actSubtle {
    padding: 4px 5px;
  }

  .failedFold {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 10px;
  }

  .failedSummary {
    font-size: 12px;
  }

  .jobPager {
    margin-top: 10px;
    padding: 10px 12px;
    gap: 8px;
    border-radius: 10px;
  }

  .pagerInfo {
    font-size: 11.5px;
  }

  .pageBtn {
    min-width: 29px;
    height: 28px;
    padding: 0 7px;
    font-size: 11.5px;
  }

  dialog {
    width: 95vw;
    padding: 14px;
  }

  .playerActions {
    width: 100%;
  }

  .playerActions .downloadBtn {
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .workTabSub .workHint {
    display: none;
  }

  .workTabSub:not(:has(.workActiveBadge:not([hidden]))) {
    display: none;
  }

  .pageBtn.pageNum:not(.isCurrent) {
    display: none;
  }

  .pageDots {
    display: none;
  }
}

@media (max-width: 370px) {
  .top, main {
    padding: 0 12px;
  }

  .workTab {
    padding: 9px 10px;
  }

  .workTabTitle strong {
    font-size: 13px;
  }

  .tabs button {
    padding: 4px 7px;
    font-size: 11.5px;
  }

  .tag {
    font-size: 11px;
    padding: 2px 8px;
  }

  .modelOptions.threeCols label {
    font-size: 12px;
    padding: 7px 4px;
  }

  .rangeStops button {
    font-size: 11.5px;
    padding: 3px 6px;
  }

  #jobs,
  .jobGrid {
    gap: 6px;
  }

  .job {
    padding: 9px 8px;
  }

  .actBtn {
    font-size: 11px;
    padding: 4px 6px;
  }
}

#preparation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
  margin: 12px 0;
}
.preparation .samplerTop b {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

#refBox { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.refThumbs { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.refThumb { padding: 0; border: 1px solid #485845; border-radius: 7px; background: #0e130e; cursor: pointer; line-height: 0; overflow: hidden; }
.refThumb img { width: 38px; height: 38px; object-fit: cover; display: block; }

/* Header topic history button & visual tray */
.top { height: 58px; }
.topRight { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.topPillBtn {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #cfdcca;
  background: #161c16; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; white-space: nowrap;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.topPillBtn:hover, .topPillBtn[aria-expanded="true"] { border-color: var(--accent); background: #1e271b; color: var(--accent); }
.topPillBtn b { font: 11px var(--mono); background: #253121; color: var(--accent); padding: 0 6px; border-radius: 999px; }

.topicTray {
  margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #141914;
}
.trayHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.trayHead strong { font-size: 13.5px; font-weight: 600; color: #dbe6d3; }
.topicCards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.topicCard {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; border: 1px solid #283227; background: #171e17; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.topicCard:hover { border-color: var(--line-strong); background: #1c241c; }
.topicCard.isCurrent { border-color: var(--accent); background: #1e281b; }
.topicCover {
  width: 48px; height: 38px; border-radius: 6px; background: #101510;
  border: 1px solid #2d382c; display: flex; align-items: center; justify-content: center;
  color: #6b7b69; font: 13px var(--mono); overflow: hidden;
}
.topicCover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topicMeta { min-width: 0; display: grid; gap: 2px; }
.topicMetaTop { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.topicMeta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topicMeta span { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topicDel { font-size: 13px; color: #8c9888; padding: 0 4px; border-radius: 4px; line-height: 1.2; }
.topicDel:hover { color: #f2bdb0; background: #2c201e; }

/* Segmented controls (zero native radio circle clutter) */
.segGroup {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 10px; background: #111511; border: 1px solid #273026; min-width: 0;
}
.segGroup label,
.segGroup > button {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 5px 11px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--dim);
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.segGroup input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.segGroup label:hover,
.segGroup > button:hover { color: var(--ink); }
.segGroup label:has(:checked),
.segGroup > button[aria-selected="true"] {
  background: #222d1e; color: var(--accent); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(223, 244, 156, .34);
}
.segGroup label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.segGroup label.isOffline { opacity: .55; }
.segGroup.miniSeg { padding: 2px; border-radius: 8px; }
.segGroup.miniSeg label { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.engineOptText { display: inline-flex; align-items: center; gap: 5px; }
.engDot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #5a6658; flex-shrink: 0; }
.engDot[data-on="1"] { background: #b7e876; }

/* Compact editorial hero (restored aperture banner with tightened copy & vertical rhythm) */
.hero {
  min-height: 120px;
  margin-bottom: 14px;
  border-radius: 15px;
}
.heroText {
  padding: 22px clamp(20px, 3.2vw, 36px);
}
.hero h1 {
  margin: 0 0 4px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18;
  text-wrap: balance;
}
.hero p {
  font-size: 13.5px;
  color: #b7c4b1;
}

/* Unified Minimal Studio Composer */
#desk { margin-top: 0; }
.stageBox {
  border: 1px solid #2c362b; border-radius: 16px;
  background: radial-gradient(120% 90% at 10% 0%, rgba(223, 244, 156, .045), transparent 55%), var(--panel);
  padding: 16px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: border-color .16s ease, background-color .16s ease;
}
.stageBox.isDragOver { border-color: var(--accent); background: #1b2419; }

.composerTop {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.composerControls { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.composerTopRight { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.saveBadge { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.textBtn { font-size: 12px; color: var(--dim); padding: 3px 6px; border-radius: 6px; transition: color .15s ease, background-color .15s ease; }
.textBtn:hover { color: var(--ink); background: #212a21; }
.engineWarn { margin: 8px 0 0; font-size: 12px; color: #e6cfa8; }

.stageBox textarea {
  margin-top: 12px; padding: 12px 14px; min-height: 106px; width: 100%; resize: vertical;
  font-size: 15px; line-height: 1.65; background: #101410; border: 1px solid #2e382d; border-radius: 11px; color: var(--ink);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.stageBox textarea::placeholder { color: #677466; }
.stageBox textarea:focus { border-color: #8ea572; box-shadow: 0 0 0 3px rgba(223, 244, 156, .08); outline: none; }

.composerDock {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.refDock { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.chipBtn {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  padding: 5px 11px; border: 1px dashed #425240; border-radius: 8px; font-size: 12.5px; color: #cfe0be; background: #131913;
  white-space: nowrap; transition: border-color .15s ease, background-color .15s ease;
}
.chipBtn:hover { border-color: var(--accent); background: #1a2319; color: var(--accent); }
.refThumbs { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.refThumb { padding: 0; border: 1px solid #485845; border-radius: 7px; background: #0e130e; cursor: pointer; line-height: 0; overflow: hidden; }
.refThumb img { width: 38px; height: 38px; object-fit: cover; display: block; }
.countBadge { font: 11.5px var(--mono); color: #6c7a6b; font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }

.composerFoot {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid #232c22;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.composerParams { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; flex: 1 1 280px; }
.durDock { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.durPills {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: 8px; background: #111511; border: 1px solid #273026;
}
.durPills button {
  padding: 4px 8px; border-radius: 6px; font: 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;
  transition: background-color .14s ease, color .14s ease;
}
.durPills button:hover { color: var(--ink); }
.durPills button[aria-pressed="true"] { background: #222d1e; color: var(--accent); font-weight: 650; }
.durSliderWrap { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.durSliderWrap #duration { width: 96px; height: 22px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.durSliderWrap output { font: 12px var(--mono); color: var(--accent); font-variant-numeric: tabular-nums; min-width: 32px; }

.composerBtns { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.composerBtns .primary,
.composerBtns .secondary { min-height: 38px; padding: 8px 16px; border-radius: 9px; font-size: 13.5px; }
.liveBoard { margin-top: 14px; }

/* Creative Exploration & Branching Tree */
.exploreStage { margin-top: 16px; display: grid; gap: 14px; }
.diagnosisBar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 14px; border: 1px solid #324030;
  background: linear-gradient(180deg, #182017 0%, #141914 100%);
}
.diagMain { flex: 1 1 420px; min-width: 0; display: grid; gap: 7px; }
.diagTopRow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topicHeading { font-size: 16px; font-weight: 650; letter-spacing: -.015em; color: #f3f9e8; }
.diagnosisText { margin: 0; font-size: 13.5px; line-height: 1.58; color: #cad6c2; }
.styleAnchorRow { display: flex; align-items: center; gap: 8px; }
.styleAnchorRow label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.styleAnchorRow input {
  flex: 1 1 220px; min-width: 0; padding: 5px 9px; border-radius: 7px; border: 1px solid #2c382b;
  background: #101410; color: #dbe6d2; font-size: 12.5px;
}
.styleAnchorRow input:focus { border-color: #8ea572; outline: none; }
.diagActions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.compactBtn { min-height: 34px; padding: 6px 13px; font-size: 12.5px; }

.branchTree { display: grid; gap: 14px; }
.branchGroup { display: grid; gap: 12px; }
.branchGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.branchChildren {
  margin-left: 14px; padding-left: 12px; border-left: 2px solid #354731; display: grid; gap: 10px;
}
.branchCrumb { font-size: 11.5px; color: #9db28e; }

.angleCard {
  border: 1px solid #2b352a; border-radius: 13px; background: var(--panel); padding: 15px 16px;
  display: flex; flex-direction: column; gap: 9px; min-width: 0;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.angleCard:hover { border-color: var(--line-strong); }
.angleCard.isStarred { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(223, 244, 156, .2); }
.angleHead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.angleTags { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.angleTag {
  font-size: 11px; font-weight: 600; color: var(--accent); background: #212d1b; border: 1px solid #3b5230;
  padding: 2px 8px; border-radius: 999px;
}
.angleSec { font: 11px var(--mono); color: var(--muted); }
.angleHeadTools { display: inline-flex; align-items: center; gap: 6px; }
.starBtn {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid #354234; background: #192019; color: #c5d4bb;
  transition: background-color .15s ease, color .15s ease;
}
.starBtn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 650; }
.angleTitle { margin: 0; font-size: 16.5px; line-height: 1.35; letter-spacing: -.015em; color: #f4f9ec; }
.angleWhy { margin: 0; font-size: 13px; line-height: 1.55; color: #b9c6b3; }
.angleVisualBox {
  padding: 10px 12px; border-radius: 9px; background: var(--surface); border: 1px solid #242e23;
  display: grid; gap: 8px;
}
.angleVisual { margin: 0; font-size: 13px; line-height: 1.58; color: #e2e8db; }
.angleHook {
  margin: 0; padding-left: 9px; border-left: 2px solid #596f48;
  font-size: 12.5px; line-height: 1.5; color: #e6f4c2; font-style: italic;
}

.anglePromptFold { border-top: 1px dashed #242e23; padding-top: 6px; }
.anglePromptFold summary { cursor: pointer; font-size: 11.5px; color: var(--muted); user-select: none; }
.anglePromptBody { display: grid; gap: 6px; margin-top: 8px; }
.anglePromptBody label { font-size: 11px; color: #8c9e87; }
.anglePromptBody textarea {
  width: 100%; padding: 7px 9px; border-radius: 7px; border: 1px solid #2e3a2d; background: #0e130e;
  color: var(--ink); font-size: 12.5px; line-height: 1.5; resize: vertical;
}

.cardMedia { display: grid; grid-template-columns: repeat(auto-fill, minmax(144px, 1fr)); gap: 8px; }
.mediaTile {
  border: 1px solid #2d382c; border-radius: 9px; background: #111611; overflow: hidden;
  display: flex; flex-direction: column;
}
.mediaThumbBtn { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; background: #0b0e0b; overflow: hidden; }
.mediaThumbBtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mediaVideoPoster {
  position: relative; width: 100%; aspect-ratio: 16 / 10; background: #0e130e;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.mediaVideoPoster img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .72;
  transition: transform .2s ease, opacity .2s ease;
}
.mediaVideoPoster:hover img { opacity: .88; transform: scale(1.03); }
.mediaVideoPoster .mediaVideoBadge { position: relative; z-index: 1; box-shadow: 0 4px 14px rgba(0, 0, 0, .45); }
.previewLoadBox {
  position: relative; width: 100%; min-height: 220px; padding: 14px;
  border-radius: 10px; overflow: hidden; background: #0d110d;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
}
.previewLoadBox .previewPosterBg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .38; filter: blur(2px);
}
.previewLoadOverlay {
  position: relative; z-index: 1; width: min(360px, 92%); padding: 12px 15px;
  border-radius: 11px; background: rgba(16, 20, 16, .9); border: 1px solid #354533;
  display: grid; gap: 8px; text-align: center;
}
.previewLoadOverlay strong { font-size: 13px; color: #eef5e3; font-weight: 600; }
.previewLoadOverlay span { font: 11.5px var(--mono); color: #9fb296; font-variant-numeric: tabular-nums; }
.previewProgTrack { width: 100%; height: 6px; border-radius: 999px; background: #222c21; overflow: hidden; }
.previewProgFill {
  height: 100%; width: 6%; border-radius: 999px; background: var(--accent);
  transition: width .18s ease;
}
.previewStripWrap {
  position: relative; z-index: 1; width: min(560px, 100%);
  display: grid; gap: 6px; text-align: center;
}
.previewStripImg {
  width: 100%; height: auto; display: block; border-radius: 8px;
  border: 1px solid #2c382a; background: #0d110d;
}
.previewStripCap { font-size: 11.5px; color: #9fb296; }
.mediaPending {
  aspect-ratio: 16 / 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 10px; text-align: center; font-size: 11.5px; color: #bfd0b2; background: #131913;
}
.mediaTileFoot {
  padding: 5px 8px; display: flex; align-items: center; justify-content: space-between; gap: 5px; flex-wrap: wrap;
  border-top: 1px solid #222b21; font-size: 11px;
}
.mediaTileBtn {
  font-size: 11px; font-weight: 600; color: var(--accent); padding: 2px 6px; border-radius: 5px;
  background: #202c1b; border: 1px solid #3c5131;
}
.mediaTileBtn:hover:not(:disabled) { background: #2b3c24; }
.mediaVideoBadge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent); padding: 4px 10px; border-radius: 999px;
}

.steerBox {
  display: flex; gap: 7px; align-items: center; padding: 7px; border-radius: 9px;
  background: #111611; border: 1px solid #324230;
}
.steerBox input {
  flex: 1 1 150px; min-width: 0; padding: 6px 9px; border-radius: 7px; border: 1px solid #2e3a2d;
  background: #0d120d; color: var(--ink); font-size: 12.5px;
}
.steerBox input:focus { border-color: var(--accent); outline: none; }
.angleActions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }

/* Unified Compact Works Library Bar */
.workLibrary { margin-top: 20px; }
.libSeg > button { padding: 5px 10px; font-size: 12.5px; }
.segCount { font: 11px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.libSeg > button[aria-selected="true"] .segCount { color: var(--accent); }
.segActiveDot {
  font: 10px var(--mono); font-style: normal; padding: 0 5px; border-radius: 999px;
  background: #2b3c22; color: var(--accent);
}
.quietTag { font-size: 11.5px; font-weight: 500; padding: 2px 9px; }

/* Top-level Studio Mode Switch (Creative Pitch vs Direct Generate) */
.modeSwitch {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 12px; padding: 4px; border-radius: 13px;
  background: #121712; border: 1px solid #283227;
}
.modeSwitch > button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 14px; border-radius: 9px; text-align: left; color: var(--dim);
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.modeSwitch > button:hover { color: var(--ink); background: #182018; }
.modeSwitch > button[aria-selected="true"] {
  background: #1f2a1c; color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(223, 244, 156, .38);
}
.modeTabTitle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 650; letter-spacing: -.01em;
}
.modeTabSub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.modeSwitch > button[aria-selected="true"] .modeTabSub { color: #b9cba8; }

/* Live Streaming Creative Pitch Indicators */
.streamBar {
  display: flex; align-items: center; gap: 9px; padding: 10px 14px;
  border-radius: 11px; border: 1px solid #3c5035;
  background: linear-gradient(90deg, rgba(35, 50, 28, .85), rgba(20, 27, 19, .92));
  font-size: 13px; color: #e6f4c7;
}
.streamDot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 10px rgba(223, 244, 156, .75);
  animation: streamPulse 1.2s ease-in-out infinite;
}
.streamText { flex: 1 1 auto; min-width: 0; }
.streamElapsed { font: 11.5px var(--mono); color: #9db28e; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.angleCard.isStreaming {
  border-color: #4c663e;
  background: linear-gradient(180deg, #1b2319 0%, #151b15 100%);
  box-shadow: 0 0 0 1px rgba(223, 244, 156, .16);
}
.streamBadge {
  font-size: 10.5px; font-weight: 600; color: var(--accent);
  background: #23321c; border: 1px solid #445e36; padding: 1px 7px; border-radius: 999px;
  animation: streamPulse 1.3s ease-in-out infinite;
}
.streamCaret::after {
  content: "▍"; display: inline-block; margin-left: 2px; color: var(--accent);
  animation: caretBlink .9s steps(1) infinite;
}
.streamSkelLine {
  height: 11px; border-radius: 6px;
  background: linear-gradient(90deg, #1d251c 25%, #293527 50%, #1d251c 75%);
  background-size: 200% 100%; animation: skelSlide 1.4s ease infinite;
}
@keyframes streamPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes caretBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes skelSlide { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 820px) {
  .branchGrid { grid-template-columns: minmax(0, 1fr); }
  .branchChildren { margin-left: 8px; padding-left: 10px; }
}
@media (max-width: 760px) {
  .top { height: 52px; }
  .hero { min-height: 0; margin-bottom: 10px; border-radius: 13px; }
  .heroText { padding: 14px 16px; }
  .hero h1 { font-size: 23px; margin-bottom: 2px; }
  .hero p { font-size: 12.5px; }
  .modeSwitch { gap: 6px; margin-bottom: 10px; padding: 3px; }
  .modeSwitch > button { align-items: center; padding: 8px 10px; }
  .modeTabTitle { font-size: 13.5px; }
  .modeTabSub { display: none; }
  .stageBox { padding: 13px 14px; border-radius: 14px; }
  .composerControls { width: 100%; justify-content: space-between; }
  .composerTopRight { width: 100%; justify-content: flex-end; margin-top: -2px; }
  .composerTopRight:not(:has(.saveBadge:not(:empty))):not(:has(#clearPrompt:not([hidden]))) { display: none; }
  .engineSeg { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .engineSeg label { padding: 5px 4px; font-size: 12px; gap: 4px; }
  .stageBox textarea { min-height: 92px; font-size: 16px; margin-top: 10px; padding: 11px 12px; }
  .composerFoot { gap: 10px; padding-top: 10px; }
  .composerParams { flex-basis: 100%; }
  .composerParams:not(:has(> :not([hidden]))) { display: none; }
  .durDock { width: 100%; justify-content: space-between; }
  .durPills { flex: 1 1 auto; justify-content: space-between; }
  .durPills button { padding: 4px 6px; font-size: 11.5px; }
  .durSliderWrap { display: none; }
  .composerBtns { width: 100%; margin-left: 0; }
  .composerBtns .primary, .composerBtns .secondary { flex: 1 1 0; }
  .workLibrary { margin-top: 16px; }
  .jobbar { padding: 8px 10px; gap: 6px; }
  .jobbarRight .quietTag { display: none; }
}
