:root {
  color-scheme: dark;
  --bg: #101010;
  --sidebar: #141414;
  --surface: #1a1a1a;
  --surface-hover: #232323;
  --input: #141414;
  --line: #303030;
  --text: #f2f3f0;
  --muted: #a4a7a2;
  --faint: #777c75;
  --accent: #d4ff58;
  --accent-dark: #1d250b;
  --danger: #ff9b97;
  --radius: 14px;
  --sidebar-width: 194px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#director-form { display: grid; gap: 20px; min-width: 0; }
#image-form { display: grid; gap: 20px; min-width: 0; }
.account-dialog { width: min(520px,calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.account-dialog::backdrop { background: #000a; }
.account-dialog .card { margin: 0; border: 0; }
#account-key-form input { width: 100%; padding: 12px; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); font: inherit; }
.account-actions { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.connection-panel { width: min(620px,100%); margin: 40px auto; }
.connection-intro { margin-bottom: 28px; }
.connection-intro h1 { margin: 24px 0 12px; font-size: clamp(24px,3vw,34px); }
.connection-intro p { color: var(--muted); line-height: 1.8; }
#registration-key-fields label { display: block; }
#registration-key-fields input { width: 100%; margin-bottom: 8px; }
#registration-key-fields .helper { margin: 0 0 18px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.required-mark { margin-left: 6px; font-size: 10px; color: var(--accent); }
@media(max-width:650px) {
  #login-view[data-registering="true"] .login-art { display: none; }
  #login-view[data-registering="true"] .login-form { padding: 24px; }
}
.side-bottom > div { min-width: 0; flex: 1; }
#account-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-bottom .logout { flex-shrink: 0; white-space: nowrap; }
@media(max-width:650px) { .top-actions { flex-wrap: wrap; } #account-connect { padding: 8px; font-size: 11px; } }
.nav-item.module-active { color: var(--accent); background: #d4ff580a; }
.image-intro { background: radial-gradient(ellipse at 90% 0%,#3e674645,transparent 70%),var(--surface); }
.image-eyebrow { color: var(--accent); font-size: 10px; letter-spacing: 2px; }
.image-intro h2 { font-size: clamp(21px,2.1vw,28px); margin: 16px 0 8px; letter-spacing: -.5px; }
#image-form textarea { margin-top: 12px; min-height: 140px; resize: vertical; }
.image-prompt-flow { margin: 12px 0 0; padding: 11px 13px; border-left: 2px solid #a8c958; border-radius: 0 5px 5px 0; background: #d4ff5808; color: #b8c99d; }
.image-stage-surface { display: flex; align-items: center; justify-content: center; margin-top: 18px; }
.image-stage-upload > small { color: var(--faint); font-size: 10px; line-height: 1.8; }
.image-stage-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; height: 100%; gap: 12px; padding: 12px; }
.image-stage-grid[data-count="1"] { grid-template-columns: minmax(0,1fr); }
.image-stage-slot { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 9px; }
.image-stage-photo { flex: 1; display: block; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #101310; cursor: zoom-in; }
.image-stage-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-stage-caption { display: flex; align-items: center; min-width: 0; gap: 8px; }
.image-stage-number { flex-shrink: 0; color: #d2e2b1; font-size: 11px; }
.image-stage-file-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 11px; }
.image-stage-slot-actions,.image-stage-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.image-stage-slot-actions { justify-content: flex-end; }
.image-stage-slot-actions button,.image-stage-actions button { font-size: 11px; }
.image-stage-actions { margin-top: 13px; }
.image-stage-actions > .image-stage-caption { flex: 1 1 100px; }
.image-stage-actions:empty { display: none; }
.image-stage-surface > #image-mask-canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; flex: none; border: 0; border-radius: 0; }
.image-settings-grid,.outpaint-directions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.image-settings-grid label,.outpaint-directions label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.image-settings-grid input,.image-settings-grid select,.outpaint-directions input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); font: inherit; font-size: 13px; }
.image-settings-grid input:focus,.image-settings-grid select:focus,.outpaint-directions input:focus { outline: 1px solid var(--accent); outline-offset: 1px; }
.outpaint-editor { min-width: 0; }
.outpaint-editor .section-title { margin-bottom: 0; }
.outpaint-ratio { color: var(--accent) !important; font-size: 12px; }
.outpaint-instruction { margin: 10px 0 20px; }
.outpaint-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.outpaint-presets > span { flex-basis: 100%; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.outpaint-presets button { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #151713; font-size: 12px; font-variant-numeric: tabular-nums; color: #d5dacc; cursor: pointer; }
.outpaint-presets button small { color: var(--faint); font-size: 10px; }
.outpaint-presets button[aria-pressed=true] { border-color: #d4ff5880; color: var(--accent); background: #d4ff5810; }
.outpaint-presets button:disabled { opacity: .35; cursor: default; }
.outpaint-presets .outpaint-reset { margin-left: auto; color: var(--muted); }
.outpaint-stage { position: relative; height: 360px; overflow: hidden; border: 1px solid #363c30; border-radius: 10px; background-color: #11140f; background-image: radial-gradient(#75836230 .7px, transparent .7px); background-size: 16px 16px; user-select: none; }
.outpaint-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; width: 100%; padding: 20px; border: 0; border-radius: inherit; background: transparent; color: var(--muted); cursor: pointer; }
.outpaint-placeholder:hover:not(:disabled),.outpaint-stage.is-file-over { background-color: #d4ff5809; }
.outpaint-placeholder:focus-visible { outline: 2px solid var(--accent); outline-offset: -6px; }
.outpaint-placeholder:disabled { opacity: .4; cursor: default; }
.outpaint-stage.is-file-over { border-color: var(--accent); }
.outpaint-source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.outpaint-file-name { min-width: 0; flex: 1 1 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.outpaint-source-actions button { flex-shrink: 0; font-size: 11px; }
.outpaint-placeholder .icon { width: 32px; height: 32px; color: #8b9b72; }
.outpaint-placeholder strong { font-size: 14px; font-weight: 500; }
.outpaint-placeholder > span { color: var(--faint); font-size: 12px; }
.outpaint-frame { position: absolute; border: 1px solid #d4ff58; outline: 1px solid #d4ff5820; background-color: #303c22; background-image: linear-gradient(45deg,#bcd39110 25%,transparent 25%),linear-gradient(-45deg,#bcd39110 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#bcd39110 75%),linear-gradient(-45deg,transparent 75%,#bcd39110 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; box-shadow: 0 12px 30px #0005; cursor: grab; touch-action: none; }
.outpaint-original { position: absolute; overflow: hidden; background: #fff; cursor: grab; touch-action: none; outline: 1px solid #eef1e07a; }
.outpaint-original > img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.outpaint-original > span { position: absolute; top: 6px; left: 6px; padding: 3px 6px; border-radius: 3px; color: #f2f3f0; background: #151a11b8; font-size: 9px; pointer-events: none; }
.outpaint-original[aria-disabled=true] { cursor: default; }
.outpaint-original:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.outpaint-handle { position: absolute; z-index: 2; top: 50%; left: 50%; width: 36px; height: 36px; padding: 0; transform: translate(-50%,-50%); border: 0; border-radius: 5px; background: transparent; touch-action: none; cursor: ew-resize; }
.outpaint-handle > span { display: block; width: 6px; height: 22px; margin: auto; border: 1px solid #e5ff9e; border-radius: 3px; background: #a7c849; box-shadow: 0 1px 6px #0007; }
.outpaint-handle[data-outpaint-sides~=left] { left: 0; }
.outpaint-handle[data-outpaint-sides~=right] { left: 100%; }
.outpaint-handle[data-outpaint-sides~=top] { top: 0; cursor: ns-resize; }
.outpaint-handle[data-outpaint-sides~=bottom] { top: 100%; cursor: ns-resize; }
.outpaint-edge[data-outpaint-sides=top] > span,.outpaint-edge[data-outpaint-sides=bottom] > span { width: 22px; height: 6px; }
.outpaint-corner > span { width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.outpaint-corner[data-outpaint-sides="left top"],.outpaint-corner[data-outpaint-sides="right bottom"] { cursor: nwse-resize; }
.outpaint-corner[data-outpaint-sides="right top"],.outpaint-corner[data-outpaint-sides="left bottom"] { cursor: nesw-resize; }
.outpaint-handle:focus-visible { outline: 1px solid #fff; outline-offset: -3px; }
.outpaint-handle:disabled { opacity: .35; cursor: default; }
.outpaint-side-value { position: absolute; color: #b8ce91; font-size: 10px; font-variant-numeric: tabular-nums; pointer-events: none; }
.outpaint-side-value[data-outpaint-value=left] { right: calc(100% + 16px); top: calc(50% - 6px); }
.outpaint-side-value[data-outpaint-value=right] { left: calc(100% + 16px); top: calc(50% - 6px); }
.outpaint-side-value[data-outpaint-value=top] { bottom: calc(100% + 16px); left: 50%; transform: translateX(-50%); }
.outpaint-side-value[data-outpaint-value=bottom] { top: calc(100% + 16px); left: 50%; transform: translateX(-50%); }
.outpaint-stage.is-dragging,.outpaint-stage.is-dragging * { cursor: grabbing; }
.outpaint-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.outpaint-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.outpaint-legend i { width: 9px; height: 9px; border: 1px solid #b5c7a0; background: #d9decf; }
.outpaint-legend > span:nth-child(2) i { background: #3a5029; border-color: #a9c85b; }
.outpaint-legend > strong { margin-left: auto; font-size: 11px; font-weight: 500; color: #c8d6b4; font-variant-numeric: tabular-nums; }
.outpaint-footnote { color: var(--faint); font-size: 10px; line-height: 1.8; margin: 9px 0 0; }
@media (max-width: 650px) { .outpaint-stage { height: 300px; } .outpaint-presets button { padding: 8px; } .outpaint-presets button small { display: none; } .outpaint-legend { gap: 8px; } .outpaint-legend > strong { flex-basis: 100%; margin-left: 0; } }
.image-advanced summary { cursor: pointer; }
.image-advanced summary > span { font-size: 12px; color: var(--muted); }
.image-option { display: flex; align-items: center; gap: 12px; margin-top: 22px; cursor: pointer; }
.image-option input { width: 17px; height: 17px; accent-color: var(--accent); }
.image-option span { display: grid; gap: 3px; font-size: 14px; }
.image-option small { color: var(--muted); font-size: 12px; }
.mask-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 12px; }
.mask-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mask-toolbar input[type=range] { width: 100px; }
.mask-toolbar button,.mask-import { font-size: 12px; padding: 5px 8px; cursor: pointer; }
#image-mask-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 9px; touch-action: none; cursor: crosshair; background: #111; }
.generated-image-open { display: block; width: 100%; padding: 0; border: 0; background: #101310; cursor: zoom-in; border-radius: 9px; overflow: hidden; }
.generated-image-open img { display: block; width: 100%; max-height: 70vh; object-fit: contain; }
.creation-card[data-media-kind=image] .creation-preview img { object-fit: contain; background: #101310; }
.director-intro { background: radial-gradient(ellipse at 90% 0%, #333d204d, transparent 65%), var(--surface); }
.director-eyebrow { display: flex; justify-content: space-between; gap: 12px; color: var(--accent); font-size: 10px; letter-spacing: 2px; }
.director-eyebrow span { color: var(--muted); letter-spacing: 0; font-size: 12px; }
.director-intro h2 { font-size: clamp(21px, 2.1vw, 28px); font-weight: 600; letter-spacing: -.7px; margin: 18px 0 8px; }
.director-intro .helper { margin-top: 0; }
.director-timeline { display: flex; gap: 6px; margin-top: 24px; overflow-x: auto; padding-bottom: 8px; }
.director-timeline-part { flex: 1; min-width: 48px; padding: 11px 13px; border: 1px solid #d4ff5840; background: #d4ff580a; border-radius: 8px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.director-timeline-part span { color: var(--accent); font-size: 11px; }
.director-timeline-part strong { font-weight: 500; font-size: 13px; }
.director-total { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; margin-top: 7px; }
.director-shared > label { display: block; margin-top: 22px; margin-bottom: 10px; }
.director-images:empty { display: none; }
.director-images { margin-bottom: 12px; }
.director-image-drop { min-height: 64px; }
.director-segments-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.director-segments-heading h2 { font-size: 18px; font-weight: 600; margin: 0; }
#director-segments { display: grid; gap: 18px; }
.director-segment { position: relative; border-top-color: #d4ff5859; }
.director-segment-title { display: flex; align-items: center; gap: 10px; }
.director-segment-title h3 { font-size: 16px; font-weight: 500; margin: 0; }
.director-number { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 8px; color: var(--accent); background: #d4ff5810; border: 1px solid #d4ff5828; font-size: 12px; font-variant-numeric: tabular-nums; }
.director-segment-actions { display: flex; gap: 12px; }
.director-segment-actions .text-button { font-size: 12px; padding: 4px 0; }
.director-segment-timing { display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: end; gap: 16px; margin: 22px 0; }
.director-segment-timing label { display: block; font-size: 12px; margin-bottom: 8px; color: var(--muted); }
.director-segment-timing .helper { margin: 0 0 10px; font-size: 12px; }
.director-segment > label { display: block; margin: 16px 0 10px; font-size: 14px; }
.director-segment textarea, .director-shared textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
.director-audio-drop { display: flex; align-items: center; gap: 12px; border: 1px dashed #5c6741; background: #d4ff5805; padding: 16px; border-radius: 10px; cursor: pointer; }
.director-audio-drop > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; flex: 1; font-size: 13px; }
.director-audio-drop small { color: var(--muted); font-size: 10px; }
.director-audio-icon { color: var(--accent); font-size: 23px; }
.director-audio-slot audio { display: block; width: 100%; height: 38px; margin-top: 12px; }
.director-audio-slot > .text-button { display: block; margin-top: 8px; font-size: 12px; }
.director-local-media { padding-top: 16px; border-top: 1px solid var(--line); margin-top: 18px; }
.director-local-media summary { color: var(--muted); cursor: pointer; font-size: 13px; }
.director-continuity { display: flex !important; align-items: center; flex-wrap: wrap; gap: 9px; margin: 18px 0 0 !important; padding-top: 16px; border-top: 1px solid var(--line); cursor: pointer; }
.director-continuity input { width: 16px; height: 16px; accent-color: var(--accent); }
.director-continuity small { font-size: 11px; color: var(--muted); margin-left: auto; }
.director-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 20px; }
.director-settings-grid label { display: block; margin-bottom: 8px; font-size: 13px; }
@media (max-width: 600px) {
  .director-timeline-part { padding: 10px 8px; gap: 7px; }
  .director-segment-timing { grid-template-columns: 120px minmax(0,1fr); gap: 10px; }
  .director-segment-actions { gap: 10px; }
  .director-audio-drop { flex-wrap: wrap; }
  .director-audio-drop small { flex-basis: 100%; margin-left: 27px; }
  .director-continuity small { margin-left: 25px; }
}
* {
  box-sizing: border-box;
}
html {
  font-size: 16px;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
label[for],
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
button:active:not(:disabled) {
  filter: brightness(0.91);
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
.shell {
  min-height: 100vh;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -70px;
  background: var(--accent);
  color: #101010;
  padding: 12px;
  z-index: 30;
}
.skip-link:focus {
  top: 12px;
}
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--sidebar);
  border-right: 1px solid #242424;
  display: flex;
  flex-direction: column;
  padding: 28px 14px 18px;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 7px;
  margin-bottom: 36px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.brand img {
  width: 32px;
  height: 32px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.4px;
  margin-top: 3px;
}
.nav-caption {
  color: var(--faint);
  font-size: 12px;
  padding: 0 12px;
  margin: 0 0 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #b4b7b0;
  padding: 11px 12px;
  font-size: 14px;
  text-align: left;
  margin: 4px 0;
  transition:
    background 0.16s,
    color 0.16s;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
}
.nav-item:hover {
  background: #202020;
  color: white;
}
.nav-item.active {
  background: #272c1e;
  color: var(--accent);
}
.sidebar-divider {
  height: 1px;
  background: #282828;
  margin: 24px 12px;
}
.side-note {
  margin: auto 12px 28px;
  padding-top: 42px;
  font-size: 14px;
  line-height: 1.9;
  color: #7d8378;
}
.side-bottom {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 7px 0;
  border-top: 1px solid #2a2a2a;
}
.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #343b26;
  border: 1px solid #505d32;
  color: #d7ef9c;
  border-radius: 50%;
  font-size: 12px;
}
.side-bottom strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.side-bottom small {
  color: var(--faint);
  font-size: 11px;
}
.logout {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 0;
}
.logout:hover {
  color: var(--text);
}
main {
  margin-left: var(--sidebar-width);
  min-width: 0;
}
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 34px;
  border-bottom: 1px solid #252525;
  background: #111111f2;
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(16px);
}
.breadcrumb {
  color: #c1c3be;
  font-size: 13px;
  min-width: 0;
  flex: 1;
}
.breadcrumb > span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-field {
  width: 320px;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #202020;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  padding: 0 11px;
  color: var(--faint);
}
.search-field .icon {
  width: 16px;
  height: 16px;
}
.search-field input {
  min-width: 0;
  flex: 1;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.search-field input::placeholder {
  color: #878a84;
}
.search-field kbd {
  font-size: 11px;
  border: 1px solid #41433d;
  border-radius: 3px;
  width: 18px;
  text-align: center;
  color: #7d8176;
}
.search-field:focus-within {
  border-color: #798d43;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mode-pill {
  color: #bdc6a7;
  border: 1px solid #424936;
  background: #24291e;
  border-radius: 20px;
  padding: 5px 11px;
  white-space: nowrap;
  font-size: 11px;
}
.mobile-logout {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  font-size: 13px;
  color: var(--muted);
}
.page-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 34px 20px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.7px;
  margin: 0 0 7px;
}
.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 17px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
  transition:
    background 0.16s,
    border-color 0.16s;
}
.primary {
  color: #1b2409;
  background: var(--accent);
  border: 1px solid var(--accent);
}
.primary:hover {
  background: #e0ff8c;
  border-color: #e0ff8c;
}
.primary .icon,
.secondary .icon {
  height: 17px;
  width: 17px;
}
.secondary {
  background: #222;
  color: #d7d9d3;
  border: 1px solid #3a3a3a;
  font-weight: 500;
}
.secondary:hover {
  background: #2c2c2c;
  border-color: #5d6252;
}
.featured-workflow {
  position: relative;
  min-height: 214px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #343a2d;
  background: #1a201c;
}
.featured-image {
  position: absolute;
  right: 0;
  top: 0;
  width: 67%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 42%;
}
.featured-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      #1b221cfb 0%,
      #1b221cf2 29%,
      #1b221c99 48%,
      #0d111218 74%
    ),
    linear-gradient(0deg, #07111066, transparent 60%);
}
.featured-content {
  position: relative;
  padding: 25px 30px;
  width: 62%;
  z-index: 1;
}
.featured-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #d3e0b8;
  margin-bottom: 10px;
}
.featured-label .icon {
  width: 15px;
  height: 15px;
}
.featured-content h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.6px;
  margin: 0 0 10px;
  text-wrap: balance;
}
.featured-content h2 span {
  display: inline-block;
  white-space: nowrap;
}
.featured-content p {
  font-size: 12px;
  color: #aebbad;
  line-height: 1.8;
  margin: 0 0 18px;
}
.featured-content p br {
  display: none;
}
.featured-content .primary {
  min-height: 36px;
  padding: 8px 15px;
  font-size: 12px;
}
.featured-signature {
  position: absolute;
  bottom: 24px;
  right: 26px;
  font-size: 16px;
  font-weight: 500;
  color: #e0e9e4;
  text-shadow: 0 1px 10px #0009;
}
.featured-signature span {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  color: #b6c1b8;
  font-size: 10px;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 16px;
  gap: 12px;
}
.library-heading h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
.library-heading h2 span {
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
  vertical-align: middle;
  padding-left: 9px;
}
.library-heading p {
  font-size: 11px;
  color: var(--faint);
  margin: 4px 0 0;
}
.sort-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 11px;
}
.sort-control select {
  background: #1b1b1b;
  color: #b6bab0;
  border: 1px solid #303030;
  padding: 7px 28px 7px 9px;
  border-radius: 6px;
  font-size: 11px;
}
.library-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 19px;
}
.filter-chip {
  min-height: 32px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: #9b9f95;
  padding: 7px 13px;
  font-size: 12px;
  line-height: 1.3;
  transition:
    background 0.15s,
    color 0.15s;
}
.filter-chip:hover {
  background: #232323;
  color: white;
}
.filter-chip.active {
  color: var(--accent);
  background: #282e1b;
  border-color: #414b2a;
}
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.workflow-card {
  min-width: 0;
  border: 1px solid #303030;
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.18s;
}
.workflow-card:hover {
  border-color: #646c52;
}
.workflow-cover {
  position: relative;
  aspect-ratio: 1.65;
  background: #242424;
}
.workflow-cover-open {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  text-align: left;
  background: none;
  overflow: hidden;
  color: white;
}
.workflow-cover-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.workflow-card:hover .workflow-cover-open img {
  transform: scale(1.035);
}
.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0005, transparent 50%, #0008);
}
.kind-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #e8ebe4;
  background: #121610b8;
  border: 1px solid #a9b49e33;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 10px;
  pointer-events: none;
  backdrop-filter: blur(10px);
}
.favorite-button {
  position: absolute;
  right: 9px;
  top: 8px;
  width: 34px;
  height: 34px;
  border: 1px solid #d3d7d936;
  border-radius: 50%;
  background: #10131080;
  display: grid;
  place-items: center;
  color: #e6e9e5;
  backdrop-filter: blur(8px);
}
.favorite-button .icon {
  width: 16px;
  height: 16px;
}
.favorite-button:hover {
  background: #141911c9;
  color: var(--accent);
}
.favorite-button.is-favorite {
  color: var(--accent);
}
.favorite-button.is-favorite .icon {
  fill: var(--accent);
  stroke: #d4ff58;
}
.execution-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  border: 1px solid #ffffff2b;
  border-radius: 4px;
  background: #151515aa;
  color: #dedfd9;
  font-size: 10px;
  padding: 4px 7px;
  pointer-events: none;
}
.execution-badge.is-local {
  background: #d4ff58;
  color: #25300e;
  border-color: #d4ff58;
}
.cover-open-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 10px 14px;
  background: #111c;
  border: 1px solid #ffffff42;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.cover-open-hint .icon {
  height: 15px;
  width: 15px;
}
.workflow-cover-open:hover .cover-open-hint,
.workflow-cover-open:focus-visible .cover-open-hint {
  opacity: 1;
}
.workflow-card-content {
  padding: 16px 17px 13px;
}
.workflow-card h3 {
  margin: 0 0 9px;
  min-height: 44px;
  line-height: 1.5;
}
.workflow-card h3 button {
  background: none;
  border: 0;
  text-align: left;
  padding: 0;
  font-size: 15px;
  font-weight: 600;
  color: #ededeb;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.workflow-card h3 button:hover {
  color: var(--accent);
}
.workflow-card-content > p {
  color: #a0a49a;
  font-size: 12px;
  line-height: 1.7;
  margin: 0 0 13px;
  min-height: 40px;
}
.workflow-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.workflow-tags > span {
  font-size: 10px;
  color: #aab19e;
  border-radius: 4px;
  background: #2a2e25;
  padding: 3px 6px;
}
.workflow-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #7e8379;
  margin-top: 16px;
  padding-top: 11px;
  border-top: 1px solid #2b2b2b;
}
.source-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a9aea2;
}
.source-mark .icon {
  width: 13px;
  height: 13px;
}
.remove-workflow {
  background: none;
  border: 0;
  font-size: 11px;
  color: #a5aa9c;
  padding: 3px;
}
.remove-workflow:hover {
  color: var(--danger);
}
.cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  background: radial-gradient(ellipse at 65% 30%, #33412d, #1d221b 75%);
  color: #879477;
  font-size: 12px;
}
.cover-placeholder > .icon {
  width: 40px;
  height: 40px;
}
.add-workflow-card {
  background: #171717;
  border: 1px dashed #3e4238;
  min-height: 100%;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px 20px;
  color: #9ba58b;
  text-align: center;
  gap: 11px;
  transition:
    border-color 0.18s,
    background 0.18s;
}
.add-workflow-card > .icon {
  height: 40px;
  width: 40px;
  padding: 9px;
  border: 1px solid #4c5840;
  background: #22271d;
  border-radius: 10px;
  margin-bottom: 7px;
  color: #c5dd9b;
}
.add-workflow-card strong {
  font-size: 14px;
  color: #d7ddcc;
  font-weight: 500;
}
.add-workflow-card > span {
  font-size: 12px;
  color: #888f7f;
}
.add-workflow-card .add-card-action {
  color: #bdce9f;
  border: 1px solid #4b563d;
  padding: 7px 13px;
  border-radius: 5px;
  font-size: 11px;
  margin-top: 8px;
}
.add-workflow-card:hover {
  background: #1c2118;
  border-color: #819266;
}
.library-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0;
  color: #767c70;
  font-size: 11px;
}
.library-note .icon {
  width: 15px;
  height: 15px;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed #34392d;
  border-radius: 12px;
}
.empty-state > .icon {
  width: 34px;
  height: 34px;
  color: #99ab7b;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 17px;
  color: #d0d7c3;
  margin: 0 0 8px;
  font-weight: 500;
}
.empty-state p {
  font-size: 13px;
  margin: 0 0 22px;
}
.page-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #73786e;
  font-size: 10px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid #242823;
}
.page-footer > span:first-child {
  color: #adb3a4;
  font-weight: 500;
}
.page-footer a {
  margin-left: auto;
  color: #8b947e;
}
.page-footer a:hover {
  color: var(--accent);
}
.workspace-heading {
  margin-bottom: 22px;
}
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  padding: 5px 0;
  color: #a8ae9c;
  font-size: 12px;
  margin-bottom: 17px;
}
.back-button .icon {
  width: 15px;
  height: 15px;
}
.back-button:hover {
  color: var(--accent);
}
.workflow-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.workflow-origin {
  color: #b5c69c;
  font-size: 11px;
  margin-bottom: 8px;
}
.workflow-title-row h1 {
  font-size: 25px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}
.workflow-title-row p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.source-link {
  font-size: 12px;
}
.notice {
  color: #b9c89d;
  background: #24291e;
  border: 1px solid #414b30;
  border-radius: 8px;
  font-size: 12px;
  padding: 13px 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.notice.warning {
  background: #28251b;
  border-color: #4f4630;
  color: #cfbf92;
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr);
  gap: 22px;
  align-items: start;
}
.creator {
  min-width: 0;
}
.card {
  padding: 23px;
  background: var(--surface);
  border: 1px solid #33332f;
  border-radius: 12px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}
.section-title h2 {
  font-size: 16px;
  font-weight: 550;
  margin: 0;
  color: #e4e9dc;
}
.section-title > span {
  font-size: 11px;
  color: #93998a;
}
.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.label-row label {
  font-size: 14px;
  color: #d7deca;
}
.label-row > span {
  font-size: 11px;
  color: #929b83;
}
.required {
  color: #d4ff58;
  margin-left: 3px;
}
.optional {
  font-size: 11px;
  color: #8e987f;
  margin-left: 7px;
  font-weight: 400;
}
.upload-zone {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 25px 15px;
  border: 1px dashed #515b40;
  border-radius: 8px;
  background: #1b2018;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.upload-zone:hover,
.image-drop:hover,
.dragover {
  background: #262f1d !important;
  border-color: #91a767 !important;
}
.upload-icon {
  display: grid;
  place-items: center;
  background: #303b23;
  color: #b8d48c;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 13px;
}
.upload-zone strong {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 7px;
  color: #dae5c8;
}
.upload-zone > span:not(.upload-icon):not(.file-choose) {
  font-size: 11px;
  color: #909c7c;
}
.file-choose {
  color: #c8d9aa;
  font-size: 12px;
  background: #2a3320;
  border: 1px solid #4a5938;
  padding: 7px 14px;
  border-radius: 5px;
  margin-top: 17px;
}
.audio-preview {
  background: #20261a;
  border: 1px solid #465438;
  border-radius: 9px;
  padding: 15px;
}
.audio-details {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sound-icon {
  font-size: 26px;
  color: #b1cd89;
}
.audio-details > div {
  flex: 1;
  min-width: 0;
}
.audio-details strong {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.audio-details span:not(.sound-icon) {
  font-size: 11px;
  color: #98ad7b;
  display: block;
  margin-top: 5px;
}
.text-button {
  border: 0;
  background: none;
  color: #bed49a;
  padding: 7px;
  font-size: 12px;
}
.text-button:hover {
  color: var(--accent);
}
.audio-preview audio {
  width: 100%;
  height: 36px;
  margin-top: 12px;
}
.images-label {
  margin-top: 25px;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.image-grid:not(:empty) {
  margin-bottom: 12px;
}
.image-tile {
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  background: #252b20;
  border: 1px solid #414b35;
}
.image-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 4px 6px;
}
.image-open {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  cursor: zoom-in;
  background: #111310;
}
.image-open > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-number {
  border-radius: 4px;
  background: #111a0fe6;
  color: #e4efcf;
  font-size: 11px;
  padding: 3px 5px;
}
.image-remove {
  background: #111b0dd9;
  border: 1px solid #e0e9d16b;
  color: #e8efd9;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 16px;
  padding: 0;
}
.image-remove:hover {
  background: #4a3427;
}
.image-controls {
  display: flex;
  justify-content: space-between;
  gap: 2px;
}
.image-controls button {
  border: 0;
  padding: 7px 8px;
  font-size: 11px;
  color: #becba9;
  background: none;
  min-height: 30px;
}
.image-drop {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 13px 14px;
  background: #1b2018;
  border: 1px dashed #48533a;
  border-radius: 7px;
  cursor: pointer;
}
.image-drop > span {
  font-size: 23px;
  color: #a4be7e;
}
.image-drop > strong {
  font-size: 13px;
  font-weight: 500;
}
.image-drop > small {
  margin-left: auto;
  font-size: 10px;
  color: #8e9c7a;
}
.helper {
  font-size: 11px;
  color: #939e82;
  line-height: 1.8;
  margin: 12px 0 0;
}
.prompt-card {
  margin-top: 19px;
  padding-bottom: 15px;
}
.prompt-card .section-title {
  margin-bottom: 15px;
}
textarea,
input:not([type="file"]),
select {
  border: 1px solid #404639;
  background: #171b13;
  color: #e2ead5;
  border-radius: 6px;
}
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 150px;
  max-height: 500px;
  font-size: 13px;
  padding: 13px;
  line-height: 1.9;
}
textarea::placeholder,
input::placeholder {
  color: #7f8974;
}
.prompt-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #87937a;
  gap: 12px;
  margin-top: 12px;
}
.settings-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 19px;
}
.settings-card label {
  display: block;
  font-size: 13px;
  margin-bottom: 9px;
  color: #d2dfbe;
}
.settings-card select {
  width: 100%;
  padding: 11px 30px 11px 12px;
  font-size: 13px;
}
.settings-card > div {
  min-width: 0;
}
.settings-card > .section-title,
.settings-card > .scheduler-field {
  grid-column: 1 / -1;
}
.settings-card > .section-title {
  margin-bottom: 0;
}
.settings-card input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 11px 12px;
  font-size: 13px;
}
.parameter-input-row {
  display: flex;
  gap: 7px;
  align-items: center;
}
.parameter-input-row input {
  flex: 1;
  width: 0;
}
.parameter-input-row button {
  white-space: nowrap;
  padding: 7px 0;
  font-size: 11px;
}
.parameter-help {
  display: block;
  color: #9aa988;
  font-size: 11px;
  line-height: 1.7;
  margin-top: 7px;
}
.settings-card > p {
  grid-column: 1/-1;
  font-size: 11px;
  color: #9aa988;
  margin: 0;
}
.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}
.selflift-settings {
  margin-top: 19px;
}
.selflift-settings > .section-title {
  margin-bottom: 0;
}
.selflift-settings[open] > .section-title {
  margin-bottom: 14px;
}
.selflift-summary {
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
}
.selflift-summary::-webkit-details-marker {
  display: none;
}
.selflift-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.selflift-summary-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.selflift-summary-action .icon {
  width: 15px;
  height: 15px;
}
.selflift-collapse-label,
.selflift-settings[open] .selflift-expand-label {
  display: none;
}
.selflift-settings[open] .selflift-collapse-label {
  display: inline;
}
.selflift-settings[open] .selflift-summary-action .icon {
  transform: rotate(180deg);
}
.selflift-settings > .helper {
  margin: 0 0 20px;
}
.node-control-group {
  border: 0;
  border-top: 1px solid #353d2c;
  padding: 16px 0 0;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 17px;
  min-width: 0;
}
.node-control-group legend {
  color: #d2dfbe;
  font-size: 13px;
  padding-right: 12px;
}
.node-control {
  min-width: 0;
}
.node-control label {
  display: block;
  color: #d2dfbe;
  font-size: 13px;
  margin-bottom: 8px;
}
.parameter-name {
  display: block;
  color: #8f9c80;
  font-size: 10px;
  font-weight: 400;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.node-control input:not([type="checkbox"]),
.node-control select {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  min-height: 42px;
  font-size: 12px;
}
.node-control select {
  padding-right: 26px;
  text-overflow: ellipsis;
}
.node-control input[type="text"] {
  font-variant-numeric: tabular-nums;
}
.node-control .text-button {
  padding: 7px 0 0;
  font-size: 11px;
}
.node-control-wide,
.node-toggle {
  grid-column: 1 / -1;
}
.node-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #414b34;
  padding: 12px;
  border-radius: 7px;
  background: #202719;
  gap: 14px;
}
.node-toggle label {
  margin: 0;
  flex: 1;
}
.node-toggle input {
  width: 20px;
  height: 20px;
  accent-color: #d4ff58;
  flex-shrink: 0;
  cursor: pointer;
}
.submit-row > span {
  font-size: 11px;
  color: #98a585;
}
.generate-button {
  min-width: 155px;
  min-height: 43px;
}
.generate-button > span {
  font-size: 16px;
}
.error-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--danger);
  margin: 13px 0 0;
}
.error-text:empty {
  display: none;
}
.preview-column {
  position: sticky;
  top: 92px;
}
.preview-card {
  padding: 21px 18px 0;
  overflow: hidden;
}
.preview-card .section-title {
  margin: 0 2px 18px;
}
.preview-stage {
  aspect-ratio: 1.22;
  border: 1px solid #39442f;
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 36%, #2a361f, #182013 78%);
}
.stage-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#b1cc8420 0.9px, transparent 0.9px);
  background-size: 20px 20px;
}
.stage-art {
  height: 113px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 90%;
  margin-bottom: 9px;
}
.play-emblem {
  font-size: 31px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 1px solid #6f8550;
  background: #2c3b20d9;
  color: #d0eab0;
  z-index: 1;
  padding-left: 4px;
  box-shadow: 0 0 40px #a5d56413;
}
.stage-wave {
  display: flex;
  align-items: center;
  justify-content: space-around;
  position: absolute;
  width: 95%;
  height: 65px;
  opacity: 0.38;
}
.stage-wave i {
  width: 3px;
  height: 9px;
  background: #9ebb78;
  border-radius: 4px;
}
.stage-wave i:nth-child(3n) {
  height: 26px;
}
.stage-wave i:nth-child(2n) {
  height: 41px;
}
.stage-wave i:nth-child(5n) {
  height: 62px;
}
.preview-stage > strong {
  z-index: 1;
  color: #d3e4bb;
  font-weight: 400;
  font-size: 14px;
}
.preview-stage > p {
  font-size: 11px;
  z-index: 1;
  color: #8c9f75;
}
.preview-footer {
  padding: 15px 8px;
  text-align: center;
  color: #96a47f;
  font-size: 10px;
}
.lock-icon {
  font-size: 15px;
  margin-right: 5px;
}
.outputs video {
  width: 100%;
  max-height: 500px;
  background: #0c1308;
  border-radius: 8px;
  display: block;
}
.output-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #9cab89;
  font-size: 11px;
  margin-top: 13px;
}
.download-button {
  color: #c3dc9b;
  border: 1px solid #5b6a43;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
}
.download-button:hover {
  background: #2d3d1d;
}
.job-progress {
  padding: 15px;
  background: #242d1c;
  border: 1px solid #3e4c2d;
  border-radius: 7px;
  margin-top: 18px;
}
.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c1d9a0;
  font-size: 13px;
}
.job-progress p {
  font-size: 12px;
  line-height: 1.8;
  color: #acbe94;
  margin: 10px 0 14px;
}
.progress-track {
  height: 4px;
  border-radius: 3px;
  background: #3b492e;
  overflow: hidden;
}
.progress-track > div {
  height: 100%;
  width: 10%;
  background: #d4ff58;
  transition: width 0.5s;
}
.job-time {
  font-size: 10px;
  color: #93a17d;
  display: block;
  margin-top: 10px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
}
.progress-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid #657945;
  border-top-color: #d4ff58;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.tips {
  padding: 24px 8px;
}
.tips h3 {
  font-size: 12px;
  font-weight: 500;
  color: #c0cead;
  margin: 0 0 14px;
}
.tips p {
  font-size: 11px;
  color: #939e82;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.7;
  margin: 10px 0;
}
.tips p > span {
  color: #b4cb91;
}
.external-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 38px;
  align-items: center;
  margin: 24px 0 55px;
  padding: 30px;
  border: 1px solid #393b35;
  border-radius: 15px;
  background: #1a1b18;
}
.external-layout > img {
  width: 100%;
  aspect-ratio: 1.45;
  object-fit: cover;
  border-radius: 11px;
}
.external-layout h1 {
  font-size: 28px;
  line-height: 1.5;
  font-weight: 600;
  margin: 14px 0;
}
.external-layout p {
  font-size: 14px;
  color: #b3b8aa;
  line-height: 1.9;
}
.external-layout .external-help {
  font-size: 12px;
  color: #969f89;
  margin-bottom: 25px;
}
.external-layout .secondary {
  display: flex;
  margin-top: 12px;
  width: fit-content;
}
.tag {
  font-size: 11px;
  background: #2d3425;
  border: 1px solid #49543a;
  color: #c7d8b0;
  padding: 5px 8px;
  border-radius: 5px;
}
.creations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.creation-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.creation-tabs [role=tab] { padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.creation-tabs [role=tab]:hover { color: var(--text); background: var(--surface); }
.creation-tabs [role=tab][aria-selected=true] { color: var(--accent); background: #d4ff5810; border-color: #d4ff5833; }
.creation-tabs [role=tab]:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
@media (max-width:650px) { .creation-tabs { gap: 4px; } .creation-tabs [role=tab] { flex: 1; padding: 10px 8px; font-size: 12px; } }
.creation-card {
  border: 1px solid #363b2f;
  background: #1b1f16;
  border-radius: 11px;
  overflow: hidden;
}
.creation-preview {
  display: block;
  width: 100%;
  position: relative;
  aspect-ratio: 1.65;
  background: #192014;
  padding: 0;
  border: 0;
  overflow: hidden;
}
.creation-preview > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #10120e;
  filter: brightness(0.82);
}
.creation-preview > span:not(.creation-status) {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #d5e2c980;
  background: #1d2a13aa;
  color: #ecf8d9;
}
.creation-status {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #dfedc6;
  font-size: 10px;
  background: #25351cd9;
  border: 1px solid #7a915c55;
  border-radius: 5px;
  padding: 4px 7px;
}
.creation-card > div {
  padding: 17px;
}
.creation-card h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}
.creation-card p {
  color: #97a184;
  font-size: 11px;
  margin: 9px 0;
}
.creation-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #a3b38b;
}
.creation-card-footer > span { min-width: 0; overflow-wrap: anywhere; }
.creation-actions { display: flex; align-items: center; flex-shrink: 0; gap: 14px; margin-left: 12px; }
.creation-actions .creation-delete { color: var(--danger); }
.creation-actions .creation-delete:disabled { color: var(--faint); opacity: .45; cursor: default; }
.delete-creation-dialog #delete-creation-summary { line-height: 1.8; overflow-wrap: anywhere; }
.delete-creation-dialog > p { font-size: 13px; line-height: 1.9; color: var(--muted); }
.delete-creation-dialog .error-text { color: var(--danger); }
.danger-button { padding: 11px 20px; border: 1px solid #ff9b9740; border-radius: 8px; background: #a83c39; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.danger-button:hover:not(:disabled) { background: #bb4844; }
.danger-button:disabled { opacity: .5; cursor: wait; }
.login-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1020px;
  margin: 35px auto;
  min-height: 480px;
  background: #1a1c17;
  border: 1px solid #393f30;
  border-radius: 15px;
  overflow: hidden;
}
.login-art {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.login-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% center;
  filter: brightness(0.7);
}
.login-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0b1208f2, transparent 85%);
}
.login-art > div {
  position: relative;
  z-index: 1;
  padding: 40px;
}
.login-art h1 {
  font-size: 35px;
  line-height: 1.5;
  margin: 14px 0;
  color: #edf5e3;
  font-weight: 500;
  letter-spacing: -0.8px;
}
.login-art p {
  font-size: 12px;
  color: #b1c49b;
}
.login-tag {
  color: #d2e4b9;
  font-size: 11px;
  border: 1px solid #b8d58e70;
  border-radius: 5px;
  padding: 5px 9px;
  background: #24341b90;
}
.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 45px 43px;
}
.login-form h2 {
  font-size: 24px;
  margin: 22px 0 4px;
  font-weight: 550;
}
.login-form > p:not(.error-text) {
  color: #9daa8b;
  font-size: 13px;
  margin: 0 0 27px;
}
.login-form label {
  font-size: 13px;
  color: #c5d2b2;
  margin: 0 0 9px;
}
.login-form input {
  padding: 12px;
  font-size: 14px;
  margin-bottom: 20px;
  background: #12170e;
  border-color: #414b34;
}
.login-form .primary {
  margin-top: 7px;
}
.workflow-dialog {
  color: var(--text);
  background: #1b1d18;
  border: 1px solid #4a513f;
  border-radius: 14px;
  padding: 26px;
  width: min(510px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 24px 100px #0009;
}
.workflow-dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 550;
}
.dialog-heading p {
  font-size: 12px;
  color: #9fa98f;
  margin: 0;
}
.icon-button {
  border: 1px solid #3f4833;
  background: #242b1d;
  color: #bac9a2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
}
.icon-button .icon {
  width: 16px;
  height: 16px;
}
.workflow-dialog form > label:not(.cover-upload) {
  display: block;
  margin: 18px 0 9px;
  color: #d3dfc1;
  font-size: 13px;
}
.workflow-dialog form > input:not([type="file"]),
.workflow-dialog textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  font-size: 13px;
}
.workflow-dialog textarea {
  min-height: 72px;
}
.cover-upload {
  height: 122px;
  border: 1px dashed #52613c;
  border-radius: 7px;
  background: #20271a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.cover-upload > span {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  color: #bdcea4;
  font-size: 12px;
}
.cover-upload small {
  font-size: 10px;
  color: #94a47f;
}
.cover-upload > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dialog-note {
  font-size: 11px;
  color: #94a37c;
  line-height: 1.8;
  margin: 13px 0 0;
}
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  margin-top: 18px;
  border-top: 1px solid #343c2a;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #d9e8c0;
  border: 1px solid #edffce;
  color: #233414;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 6px 25px #0005;
  max-width: calc(100% - 30px);
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a5af93'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  .page-content {
    padding: 34px 46px 24px;
  }
  .topbar {
    padding: 0 46px;
  }
  .featured-workflow {
    min-height: 245px;
  }
  .featured-content {
    padding: 31px 38px;
  }
  .featured-content h2 {
    font-size: 32px;
  }
  .featured-content p {
    font-size: 14px;
  }
  .workflow-card h3 button {
    font-size: 17px;
  }
  .workflow-card-content > p {
    font-size: 13px;
  }
  .workflow-cover {
    aspect-ratio: 1.75;
  }
}
@media (max-width: 1190px) {
  :root {
    --sidebar-width: 178px;
  }
  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand {
    font-size: 17px;
    gap: 8px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .topbar {
    padding: 0 25px;
    gap: 16px;
  }
  .search-field {
    width: 260px;
  }
  .page-content {
    padding: 25px;
  }
  .workflow-grid {
    gap: 15px;
  }
  .workflow-card-content {
    padding: 14px;
  }
  .workflow-card h3 button {
    font-size: 14px;
  }
  .featured-content {
    width: 68%;
  }
  .featured-content h2 {
    font-size: 23px;
  }
  .featured-signature {
    display: none;
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(285px, 1fr);
    gap: 18px;
  }
  .card {
    padding: 19px;
  }
  .preview-card {
    padding: 19px 15px 0;
  }
  .prompt-foot > span:last-child {
    display: none;
  }
  .image-drop small {
    display: none;
  }
}
@media (max-width: 950px) {
  :root {
    --sidebar-width: 72px;
  }
  .sidebar {
    padding: 23px 10px;
  }
  .brand {
    padding: 0;
    margin: 0 auto 32px;
  }
  .brand > span,
  .nav-caption,
  .nav-item > span,
  .side-note,
  .side-bottom > div,
  .logout {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 13px 8px;
  }
  .nav-item .icon {
    width: 21px;
    height: 21px;
  }
  .nav-caption {
    margin-top: 20px;
  }
  .sidebar-divider {
    margin: 19px 7px;
  }
  .side-bottom {
    margin-top: auto;
    padding: 16px 0 0;
    justify-content: center;
  }
  .mobile-logout {
    display: block;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .featured-content {
    width: 72%;
    padding: 23px;
  }
  .featured-content h2 {
    font-size: 24px;
  }
  .featured-image {
    width: 72%;
  }
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .add-workflow-card {
    min-height: 200px;
    grid-column: 1/-1;
  }
  .workflow-card h3 button {
    font-size: 16px;
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .preview-column {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .preview-stage {
    aspect-ratio: 1.45;
  }
  .tips {
    padding: 20px 10px;
  }
  .external-layout {
    gap: 25px;
    padding: 22px;
  }
  .external-layout h1 {
    font-size: 23px;
  }
  .creations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-field {
    width: 250px;
  }
  .breadcrumb {
    font-size: 12px;
  }
}
@media (max-width: 650px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    height: 62px;
    display: block;
    border-right: 0;
    border-top: 1px solid #343a2b;
    padding: 0 5px;
    background: #171b13f7;
    backdrop-filter: blur(16px);
  }
  .sidebar > .brand,
  .sidebar > .nav-caption,
  .sidebar > .sidebar-divider,
  .sidebar > .nav-item,
  .side-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    height: 100%;
    justify-content: space-around;
  }
  .sidebar nav .nav-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    width: 32%;
    margin: 4px 0;
    padding: 5px 0;
    border-radius: 7px;
    min-height: 0;
    font-size: 10px;
  }
  .sidebar nav .nav-item > span {
    display: block;
  }
  .sidebar nav .icon {
    width: 19px;
    height: 19px;
  }
  .topbar {
    padding: 0 18px;
    height: 60px;
    gap: 10px;
  }
  .breadcrumb {
    flex: 0 1 auto;
    font-size: 12px;
    min-width: 65px;
  }
  .search-field {
    width: auto;
    min-width: 0;
    flex: 1;
    max-width: 220px;
    height: 34px;
    padding: 0 9px;
    gap: 7px;
  }
  .search-field input {
    font-size: 11px;
  }
  .search-field kbd {
    display: none;
  }
  .top-actions {
    gap: 5px;
  }
  .mode-pill {
    font-size: 10px;
    padding: 5px 7px;
  }
  .mobile-logout {
    font-size: 11px;
    padding: 7px 3px;
  }
  .page-content {
    padding: 23px 17px 85px;
  }
  .page-heading {
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 26px;
    margin-bottom: 7px;
  }
  .page-heading p {
    font-size: 12px;
    line-height: 1.7;
    max-width: 240px;
  }
  .page-heading > .primary {
    font-size: 11px;
    padding: 9px 10px;
    min-height: 36px;
    margin-top: 3px;
  }
  .page-heading > .primary > .icon {
    width: 14px;
    height: 14px;
  }
  .featured-workflow {
    min-height: 235px;
  }
  .featured-content {
    width: 90%;
    padding: 23px 20px;
  }
  .featured-content h2 {
    font-size: 25px;
    max-width: 300px;
    margin: 0 0 13px;
    line-height: 1.4;
  }
  .featured-content p {
    font-size: 11px;
    color: #bdc9b3;
    line-height: 1.9;
    max-width: 235px;
    margin-bottom: 18px;
  }
  .featured-content p br {
    display: block;
  }
  .featured-label {
    font-size: 10px;
    margin-bottom: 12px;
  }
  .featured-image {
    width: 100%;
    object-position: 70% center;
    opacity: 0.65;
  }
  .featured-scrim {
    background:
      linear-gradient(90deg, #182015f7, #172013b3 55%, #0b100e33),
      linear-gradient(0deg, #0d150fcc, transparent);
  }
  .library-heading {
    margin-top: 24px;
    margin-bottom: 15px;
  }
  .library-heading h2 {
    font-size: 18px;
  }
  .library-heading p {
    font-size: 10px;
  }
  .sort-control {
    font-size: 10px;
    gap: 5px;
  }
  .sort-control select {
    font-size: 10px;
    padding: 6px 25px 6px 7px;
  }
  .library-filters {
    gap: 6px;
    margin-bottom: 16px;
  }
  .filter-chip {
    font-size: 11px;
    padding: 7px 10px;
    min-height: 34px;
  }
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .workflow-cover {
    aspect-ratio: 1.8;
  }
  .workflow-card-content {
    padding: 16px 17px;
  }
  .workflow-card h3 {
    min-height: 0;
    margin-bottom: 10px;
  }
  .workflow-card h3 button {
    font-size: 16px;
  }
  .workflow-card-content > p {
    font-size: 12px;
    min-height: 0;
  }
  .workflow-card-footer {
    margin-top: 15px;
  }
  .workflow-tags > span {
    font-size: 11px;
  }
  .execution-badge,
  .kind-badge {
    font-size: 10px;
  }
  .favorite-button {
    width: 38px;
    height: 38px;
    top: 9px;
    right: 10px;
  }
  .favorite-button .icon {
    height: 18px;
    width: 18px;
  }
  .add-workflow-card {
    min-height: 190px;
  }
  .page-footer {
    gap: 12px;
    font-size: 10px;
    margin-top: 30px;
    line-height: 1.8;
  }
  .page-footer > span:nth-child(2) {
    max-width: 195px;
  }
  .page-footer a {
    display: none;
  }
  .library-note {
    font-size: 10px;
    align-items: flex-start;
  }
  .workspace-heading {
    margin-bottom: 20px;
  }
  .workflow-title-row {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }
  .workflow-title-row h1 {
    font-size: 24px;
  }
  .workflow-title-row p {
    font-size: 12px;
  }
  .workflow-origin {
    font-size: 11px;
  }
  .source-link {
    font-size: 11px;
    min-height: 32px;
    padding: 7px 10px;
  }
  .studio-grid {
    gap: 18px;
  }
  .card {
    padding: 19px;
  }
  .section-title h2 {
    font-size: 16px;
  }
  .section-title > span {
    font-size: 10px;
  }
  .label-row label {
    font-size: 13px;
  }
  .label-row > span {
    font-size: 10px;
  }
  .upload-zone {
    padding: 23px 12px;
  }
  .upload-zone > span:not(.upload-icon):not(.file-choose) {
    font-size: 10px;
  }
  .image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .image-controls button {
    min-height: 36px;
  }
  .image-remove {
    width: 30px;
    height: 30px;
  }
  .preview-column {
    display: block;
  }
  .preview-card {
    padding: 19px 15px 0;
  }
  .tips {
    padding: 22px 4px;
  }
  .submit-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .generate-button {
    min-height: 45px;
    width: 100%;
  }
  .settings-card {
    gap: 13px;
  }
  .prompt-foot {
    font-size: 10px;
  }
  .notice {
    font-size: 12px;
  }
  .external-layout {
    display: block;
    padding: 18px;
    margin-top: 8px;
  }
  .external-layout > img {
    aspect-ratio: 1.6;
    margin-bottom: 24px;
  }
  .external-layout h1 {
    font-size: 23px;
  }
  .external-layout p {
    font-size: 13px;
  }
  .external-layout .primary {
    width: 100%;
    margin-top: 5px;
  }
  .external-layout .secondary {
    width: 100%;
    margin-top: 10px;
  }
  .creations-grid {
    grid-template-columns: 1fr;
  }
  .login-panel {
    display: block;
    margin: 12px 0;
  }
  .login-art {
    min-height: 230px;
  }
  .login-art > img {
    object-position: center 34%;
  }
  .login-art > div {
    padding: 25px;
  }
  .login-art h1 {
    font-size: 29px;
    line-height: 1.3;
    margin: 13px 0;
  }
  .login-art p {
    font-size: 11px;
  }
  .login-form {
    padding: 29px 25px;
  }
  .login-form > img {
    display: none;
  }
  .login-form h2 {
    font-size: 24px;
    margin: 0 0 7px;
  }
  .login-form > p:not(.error-text) {
    font-size: 12px;
  }
  .workflow-dialog {
    padding: 22px;
    max-height: calc(100dvh - 30px);
  }
  .dialog-heading {
    margin-bottom: 20px;
  }
  .dialog-heading h2 {
    font-size: 21px;
  }
  .dialog-heading p {
    font-size: 11px;
  }
  .icon-button {
    width: 36px;
    height: 36px;
  }
  .dialog-note {
    font-size: 11px;
  }
  .dialog-actions {
    gap: 10px;
  }
  .dialog-actions > * {
    min-height: 42px;
  }
  .toast {
    bottom: 80px;
  }
  .empty-state {
    padding: 45px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Keep the search field visually integrated and keyboard uploads visible. */
.search-field input[type="search"] {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text);
}
.upload-icon .icon,
.sound-icon .icon {
  width: 24px;
  height: 24px;
}
.image-drop > span .icon {
  width: 19px;
  height: 19px;
}
.tips p .icon {
  width: 13px;
  height: 17px;
}
.lock-icon .icon {
  width: 12px;
  height: 12px;
}
.play-emblem .icon {
  width: 28px;
  height: 28px;
}
.upload-zone:focus-within,
.image-drop:focus-within,
.cover-upload:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.video-source-preview { margin-top: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #151613; }
.video-source-preview video { display: block; width: 100%; max-height: 320px; margin-top: 14px; border-radius: 8px; background: #080908; }
.video-source-preview .audio-details > div { min-width: 0; flex: 1; }
.video-source-preview strong { display: block; overflow-wrap: anywhere; }
.video-source-preview #video-duration { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.reference-frames-field { grid-column: 1 / -1; }
.main-image-drop { margin-top: 0; }
.main-image-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #121410; }
.main-image-open { display: block; width: 100%; padding: 0; border: 0; border-radius: 0; background: #10120e; cursor: zoom-in; }
.main-image-open img { display: block; width: 100%; height: 260px; object-fit: contain; }
.main-image-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; }
.main-image-info strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 500; }
.main-image-info button { flex-shrink: 0; }
.motion-settings .node-control textarea { width: 100%; min-height: 85px; padding: 10px 12px; font-size: 12px; line-height: 1.8; }
.motion-settings > .helper:last-child { margin: 20px 0 0; }
.motion-settings #reference-images { margin-top: 20px; }

/* The image itself stays unobstructed; labels and actions live in the toolbar. */
.reference-dialog {
  width: min(1120px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 20px;
  border: 1px solid #43483b;
  border-radius: 14px;
  background: #181a16;
  color: var(--text);
  box-shadow: 0 24px 100px #0009;
}
.reference-dialog::backdrop { background: #090b08d9; backdrop-filter: blur(6px); }
.reference-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.reference-dialog-heading > div { min-width: 0; }
.reference-dialog-heading span { color: #9eab8c; font-size: 11px; }
.reference-dialog-heading h2 { font-size: 14px; font-weight: 500; margin: 7px 0 0; overflow-wrap: anywhere; }
.reference-dialog-heading button { flex-shrink: 0; }
.reference-dialog > img { display: block; width: 100%; height: min(72dvh, 860px); object-fit: contain; background: #10120e; border-radius: 8px; }
.reference-dialog > p { margin: 14px 0 0; color: #a0aa94; text-align: center; font-size: 11px; }

/* Generation art is driven by task state, with no simulated percentage or timer. */
.preview-stage.is-generating {
  min-height: 340px;
  width: 100%;
  isolation: isolate;
  background: radial-gradient(ellipse at 50% 40%, #29321d 0%, #151912 65%, #141712);
  border-color: #4a5935;
}
.preview-stage.is-generating .stage-grid { opacity: 0.55; mask-image: radial-gradient(ellipse, #000, transparent 85%); }
.generation-badge { position: absolute; top: 20px; left: 20px; display: flex; align-items: center; gap: 8px; color: #c7d7ad; font-size: 10px; letter-spacing: 0.08em; }
.generation-badge > span:first-child { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #d4ff5870; }
.generation-art { position: relative; width: 180px; height: 174px; flex-shrink: 0; margin: 18px 0 12px; }
.render-halo { position: absolute; inset: 14px 10px; background: radial-gradient(circle, #b4db3522, transparent 68%); border-radius: 50%; }
.render-orbit { position: absolute; inset: 7px 10px; border: 1px solid #b5cf5e1c; border-radius: 50%; }
.render-orbit::after { content: ""; position: absolute; inset: 12px; border: 1px dashed #b5cf5e26; border-radius: 50%; }
.render-orbit > span { position: absolute; top: 19px; right: 19px; width: 5px; height: 5px; border-radius: 50%; background: #d4ff58; box-shadow: 0 0 14px #d4ff5890; }
.render-frames { position: absolute; width: 100px; height: 78px; left: 40px; top: 51px; }
.render-frame { position: absolute; inset: 0; border: 1px solid #8aab4c66; border-radius: 10px; }
.render-frame-back { transform: translate(12px, -13px) rotate(10deg); background: #20291b; opacity: 0.5; }
.render-frame-middle { transform: translate(-10px, 10px) rotate(-8deg); background: #202919; opacity: 0.75; }
.render-frame-front { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #303d24, #1b2315); box-shadow: 0 9px 32px #0005, inset 0 1px #e5ff9b0d; overflow: hidden; }
.render-frame-front::before,
.render-frame-front::after { content: ""; position: absolute; left: 7px; right: 7px; height: 2px; background: repeating-linear-gradient(90deg, #acbe794d 0 5px, transparent 5px 12px); }
.render-frame-front::before { top: 6px; }
.render-frame-front::after { bottom: 6px; }
.render-icon { position: relative; width: 29px; height: 29px; color: #d8efaf; margin-bottom: 8px; stroke-width: 1.4; }
.render-scan { position: absolute; inset: -2px; background: linear-gradient(110deg, transparent 30%, #d4ff581a 48%, #d4ff5855 50%, transparent 52%); transform: translateX(-120%); }
.render-meter { position: absolute; bottom: 17px; left: 32px; right: 32px; height: 9px; display: flex; align-items: center; justify-content: space-between; }
.render-meter i { width: 2px; height: 4px; border-radius: 2px; background: #cbe58a; transform-origin: center; }
.render-meter i:nth-child(2n) { height: 8px; }
.render-meter i:nth-child(3n) { height: 6px; }
.render-speck { position: absolute; width: 3px; height: 3px; background: #c7e38a; opacity: 0.4; border-radius: 50%; }
.render-speck-one { top: 34px; left: 28px; }
.render-speck-two { right: 12px; top: 100px; }
.render-speck-three { left: 51px; bottom: 8px; }
.preview-stage.is-generating > strong { font-size: clamp(14px, 1.3vw, 17px); font-weight: 500; letter-spacing: 0.02em; text-align: center; }
.preview-stage > #preview-caption { max-width: 86%; line-height: 1.8; text-align: center; margin: 10px 0 0; }
.generation-steps { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; color: #6f7a62; font-size: 10px; }
.generation-steps > span { display: flex; align-items: center; gap: 5px; }
.generation-steps i { width: 4px; height: 4px; border-radius: 50%; border: 1px solid currentColor; }
.generation-steps b { display: block; width: 21px; height: 1px; background: #5c684047; }
.generation-steps [data-state="current"] { color: #d4ff58; }
.generation-steps [data-state="current"] i { background: #d4ff58; box-shadow: 0 0 8px #d4ff5860; }
.generation-steps [data-state="done"] { color: #a3b683; }
.generation-steps [data-state="done"] i { background: currentColor; }
.is-generating .render-frames { animation: render-float 4.8s ease-in-out infinite; }
.is-generating .render-orbit { animation: spin 7s linear infinite; }
.is-generating .render-halo { animation: render-breathe 3.4s ease-in-out infinite; }
.is-generating .render-speck { animation: render-breathe 2.6s ease-in-out infinite; }
.is-generating .render-speck-two { animation-delay: -1.2s; }
.is-generating .render-speck-three { animation-delay: -0.6s; }
[data-phase="running"] .render-scan { animation: render-sweep 3.2s ease-in-out infinite; }
[data-phase="running"] .render-meter i { animation: render-meter 1.1s ease-in-out infinite alternate; }
[data-phase="running"] .render-meter i:nth-child(2n) { animation-delay: -0.5s; }
[data-phase="running"] .render-meter i:nth-child(3n) { animation-delay: -0.8s; }
[data-phase="queued"] .render-orbit { animation-duration: 12s; }
[data-phase="saving"] .render-orbit { animation-duration: 4s; }
[data-phase="saving"] .render-meter { opacity: 0; }
.job-progress[data-active="true"] .progress-track > div { position: relative; overflow: hidden; }
.job-progress[data-active="true"] .progress-track > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #fff9, transparent); animation: render-sweep 2.3s ease-in-out infinite; }
@keyframes render-float { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-5px); } }
@keyframes render-breathe { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.85; } }
@keyframes render-sweep { 0%, 10% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes render-meter { from { transform: scaleY(0.4); opacity: 0.45; } to { transform: scaleY(1.25); opacity: 1; } }
@media (max-width: 650px) {
  .reference-dialog { padding: 15px; }
  .reference-dialog > img { height: 64dvh; }
  .generation-art { width: 180px; height: 150px; margin-top: 36px; margin-bottom: 8px; }
  .render-orbit { inset: 0 20px; }
  .render-frames { top: 41px; }
  .generation-badge { top: 15px; left: 15px; }
  .generation-steps { margin-top: 15px; margin-bottom: 20px; }
}

.draft-tools { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border:1px solid var(--border, #30342b); border-radius:12px; }
.draft-tools p { margin:0; font-size:13px; color:var(--muted, #adb2a1); }
.draft-tools > div, .creation-reuse-tools { display:flex; flex-wrap:wrap; gap:8px; }
.creation-reuse-tools { margin-bottom:12px; }
.creation-actions { flex-wrap:wrap; }
.parameters-dialog { width:min(680px, calc(100vw - 32px)); max-height:85vh; overflow:auto; }
#creation-parameters pre { white-space:pre-wrap; overflow-wrap:anywhere; font-family:inherit; font-size:14px; }
#creation-parameters p { overflow-wrap:anywhere; }
@media(max-width:600px) { .draft-tools { align-items:flex-start; flex-direction:column; } }
