:root {
  color-scheme: light;
  --bg: #f8f9fa;
  --side: #fff;
  --surface: #fff;
  --composer: #fff;
  --pop: #fff;
  --text: #000;
  --secondary: #737373;
  --muted: #8c8c8c;
  --hover: rgba(0, 0, 0, 0.05);
  --selected: rgba(0, 0, 0, 0.1);
  --line: rgba(0, 0, 0, 0.05);
  --button: #000;
  --on-button: #fff;
  --blue: #3686ad;
  --danger: #b44b44;
  --field: #fff;
  --focus: #3686ad;
  --shadow: 0 8px 56px rgba(0, 0, 0, 0.12);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111;
  --side: #171717;
  --surface: #1e1e1e;
  --composer: #222;
  --pop: #262626;
  --text: #fafafa;
  --secondary: #ccc;
  --muted: #777;
  --hover: rgba(255, 255, 255, 0.07);
  --selected: rgba(255, 255, 255, 0.12);
  --line: rgba(204, 221, 255, 0.08);
  --button: #fff;
  --on-button: #191919;
  --blue: #68a8db;
  --danger: #ee9b92;
  --field: #383838;
  --focus: #77aace;
  --shadow: 0 8px 56px rgba(0, 0, 0, 0.24);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.38;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
:where(button, a, input, textarea, [contenteditable]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button {
  transition:
    background-color 100ms linear,
    color 100ms linear,
    opacity 100ms linear;
}
button:not(:disabled):active {
  filter: brightness(0.96);
}
.icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.chevron {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  flex-shrink: 0;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--secondary);
}
.icon-button:hover {
  background: var(--hover);
  color: var(--text);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.brand img {
  width: 28px;
  height: 28px;
}
.brand b {
  font-weight: 650;
}
.brand-button {
  display: flex;
}
.dark-icon {
  display: none;
}
[data-theme="dark"] .light-icon {
  display: none;
}
[data-theme="dark"] .dark-icon {
  display: inline-flex;
}
.shell {
  --rail: 240px;
  display: flex;
  min-height: 100dvh;
}
.side {
  position: sticky;
  top: 0;
  height: 100dvh;
  width: var(--rail);
  min-width: var(--rail);
  padding: 20px 12px 12px;
  background: var(--side);
  display: flex;
  flex-direction: column;
  z-index: 20;
  transition:
    width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    min-width 0.52s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.side-head {
  position: relative;
  flex: none;
  height: 32px;
  overflow: hidden;
  margin: 0 0 30px;
}
.side-head .brand-button {
  position: absolute;
  top: 2px;
  left: 6px;
  width: max-content;
}
.side-head .brand img {
  flex: none;
}
.side-head .brand > span {
  opacity: 1;
  visibility: visible;
  transition: opacity 150ms ease;
}
.collapse-button,
.expand-button {
  position: absolute;
  top: 0;
  width: 32px;
  min-width: 32px;
  height: 32px;
}
.collapse-button {
  right: 0;
}
.expand-button {
  left: 4px;
  visibility: hidden;
  pointer-events: none;
  background: transparent;
}
.collapse-button .icon,
.expand-button .icon {
  width: 15px;
  height: 15px;
}
.collapse-glyph {
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
.side-head .brand img {
  transition: opacity 160ms ease;
}
.collapsed .side-head .brand-button {
  pointer-events: none;
}
.collapsed .side-head .brand > span {
  opacity: 0;
  visibility: hidden;
}
.collapsed .collapse-button {
  visibility: hidden;
  pointer-events: none;
}
.collapsed .expand-button {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
}
.collapsed .expand-button:hover {
  background: transparent;
}
.collapsed
  .side-head:has(.expand-button:is(:hover, :focus-visible))
  .brand
  img {
  opacity: 0;
}
.collapsed .expand-button:is(:hover, :focus-visible) .collapse-glyph {
  opacity: 1;
}
.rail-backdrop {
  display: none;
}
.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  visibility: visible;
  transition: opacity 150ms ease;
}
.side nav {
  display: grid;
  gap: 4px;
}
.side nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: 36px;
  padding: 8px 10px;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
  white-space: nowrap;
}
.side nav button:nth-child(3) {
  margin-top: 20px;
}
.side nav button.active {
  background: var(--selected);
  font-weight: 550;
}
.side nav button:hover {
  background: var(--hover);
}
.side-bottom {
  margin-top: auto;
  padding-top: 20px;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  padding: 6px;
  border-radius: 8px;
  overflow: hidden;
}
.account:hover {
  background: var(--hover);
}
.profile-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--selected);
  border-radius: 50%;
  font-size: 12px;
}
.shell.collapsed {
  --rail: 64px;
}
.collapsed .side {
  background: var(--bg);
  box-shadow: inset -1px 0 var(--line);
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}
.collapsed .nav-label {
  opacity: 0;
  visibility: hidden;
}
.workspace {
  flex: 1;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  height: 64px;
  padding: 16px 24px;
  position: relative;
  z-index: 5;
}
#global-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--secondary);
}
.capacity {
  font-variant-numeric: tabular-nums;
}
.node-summary {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
}
.status-dot.on {
  background: #71b99b;
}
.warning {
  color: #aa781c;
}
.danger {
  color: var(--danger);
}
#view {
  min-width: 0;
}
.home-view {
  padding: 36px 40px 60px;
  position: relative;
}
.home-view > h1 {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  margin: 0 0 65px;
  letter-spacing: -0.6px;
}
.home-view > h1 span {
  margin: 0 5px;
}
.home-view:before {
  content: "";
  pointer-events: none;
  position: absolute;
  top: -64px;
  left: 10%;
  right: 10%;
  height: 245px;
  z-index: -1;
  background: radial-gradient(
    ellipse at top,
    rgba(114, 174, 204, 0.07),
    transparent 65%
  );
}
.home-composer {
  max-width: 1036px;
  margin: 0 auto 70px;
}
.composer {
  border-radius: 24px;
  border: 0.5px solid var(--line);
  background: var(--composer);
  padding: 18px 16px 16px;
  transition:
    border-color 100ms linear,
    background-color 100ms linear;
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.015);
}
[data-theme="dark"] .composer {
  background: linear-gradient(180deg, #1c1c1c, #242424);
}
.composer.dragging {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.editor-row {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  min-height: 76px;
}
.reference-stack {
  position: relative;
  flex: none;
  width: 58px;
  height: 68px;
  margin: 4px 0 0 4px;
  color: var(--muted);
}
.stack-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 48px;
  height: 64px;
  background: var(--hover);
  transform: rotate(-7deg);
  border-radius: 2px;
  transition:
    transform 0.15s ease-out,
    color 0.1s;
}
.stack-card small {
  font-size: 12px;
  white-space: nowrap;
}
.stack-card .icon {
  width: 18px;
  height: 18px;
}
.reference-stack:hover .stack-card {
  transform: rotate(0deg);
  color: var(--text);
}
.reference-stack.has-refs img {
  width: 48px;
  height: 58px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.6);
  position: absolute;
  left: calc(var(--stack) * 3px);
  top: calc(var(--stack) * -2px);
  transform: rotate(calc(-7deg + var(--stack) * 7deg));
  border-radius: 2px;
}
.stack-add {
  position: absolute;
  left: 34px;
  top: 41px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--pop);
  color: var(--text);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}
.stack-add .icon {
  width: 16px;
  height: 16px;
}
.ref-count {
  position: absolute;
  bottom: -3px;
  left: 9px;
  font-size: 12px;
  color: var(--secondary);
}
.prompt {
  flex: 1;
  min-width: 0;
  min-height: 64px;
  max-height: 340px;
  overflow-y: auto;
  padding: 1px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.75;
  outline: 0 !important;
  caret-color: var(--text);
}
.prompt:empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
.reference-token,
.inline-reference {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
  font-size: 14px;
  color: var(--secondary);
  white-space: nowrap;
}
.reference-token img,
.inline-reference img {
  width: 17px;
  height: 17px;
  object-fit: cover;
  border-radius: 4px;
}
.reference-token {
  border-radius: 5px;
  background: var(--hover);
  padding: 0 3px;
  line-height: 23px;
}
.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
  min-height: 32px;
}
.creation-type,
.model-name,
.parameter-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  height: 32px;
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 8px;
}
.creation-type {
  color: var(--blue);
}
.model-name {
  color: var(--text);
}
.creation-type .icon,
.model-name .icon,
.parameter-button .icon {
  width: 14px;
  height: 14px;
}
.parameter-button:hover,
.parameter-button[aria-expanded="true"] {
  background: var(--selected);
}
.parameter-button.only-icon {
  padding: 0 7px;
}
.quality-label {
  margin-left: 4px;
}
.submit-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}
.generate-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--button);
  color: var(--on-button);
}
.generate-button .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}
.generate-button:disabled {
  background: var(--selected);
  color: var(--muted);
  opacity: 0.7;
}
.generate-button:not(:disabled):hover {
  transform: translateY(-1px);
}
.generate-button.working {
  opacity: 0.5;
}
.composer-status {
  font-size: 12px;
  color: var(--muted);
  margin-left: 80px;
}
.composer-status:empty {
  display: none;
}
.recent-section {
  max-width: 1200px;
  margin: auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.section-head h2 {
  font-size: 14px;
  font-weight: 500;
}
.quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--secondary);
}
.quiet-button:hover {
  background: var(--hover);
  color: var(--text);
}
.quiet-button .chevron {
  transform: rotate(-90deg);
}
.assets-view {
  padding: 0 40px 220px;
}
.asset-top {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 46px;
}
.top-tab {
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 24px;
}
.top-tab.selected {
  background: var(--selected);
}
.asset-filter {
  display: flex;
  gap: 24px;
  align-items: center;
  height: 62px;
  padding-left: 16px;
}
.asset-filter button {
  font-size: 12px;
  color: var(--muted);
  height: 32px;
}
.asset-filter button[aria-selected="true"] {
  color: var(--text);
  font-weight: 600;
}
.asset-date {
  font-size: 12px;
  font-weight: 400;
  margin: 22px 0 12px;
}
.asset-date:first-child {
  margin-top: 4px;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.asset-card {
  position: relative;
  min-width: 0;
  scroll-margin: 130px;
}
.asset-preview {
  display: grid;
  place-items: center;
  position: relative;
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 12px;
  background: var(--composer);
  text-align: left;
}
.asset-preview img,
.asset-preview video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.asset-preview:after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0.5px solid var(--line);
  border-radius: inherit;
  pointer-events: none;
}
.asset-duration {
  position: absolute;
  bottom: 10px;
  left: 12px;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.asset-preview:has(.placeholder-media) .asset-duration {
  color: var(--muted);
  text-shadow: none;
}
.asset-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.1s linear;
}
.asset-actions button,
.asset-actions a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.asset-actions .icon {
  width: 15px;
  height: 15px;
}
.asset-card:hover .asset-actions,
.asset-card:focus-within .asset-actions {
  opacity: 1;
}
.asset-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.09);
  transition: opacity 0.15s;
}
.asset-play .icon {
  width: 22px;
  height: 22px;
  fill: white;
  stroke: white;
  filter: drop-shadow(0 1px 5px #0005);
}
.asset-card:hover .asset-play {
  opacity: 1;
}
.placeholder-media .icon {
  width: 30px;
  height: 30px;
  color: var(--muted);
}
.pending-caption {
  font-size: 12px;
  color: var(--muted);
  padding: 7px 4px;
}
.new-result {
  animation: highlight 1.4s ease-out;
}
@keyframes highlight {
  0%,
  30% {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
  }
  100% {
    outline: 2px solid transparent;
    outline-offset: 7px;
  }
}
.floating-composer {
  position: fixed;
  z-index: 9;
  bottom: 20px;
  left: calc(var(--rail) + 7%);
  right: 7%;
  max-width: 1036px;
  margin: auto;
  transition: left 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.floating-composer .composer {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.collapsed .floating-composer {
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}
.empty-state {
  display: grid;
  place-items: center;
  min-height: 250px;
  color: var(--muted);
  font-size: 14px;
}
.assets-view > .empty-state {
  min-height: 55vh;
}
.popover {
  position: fixed;
  z-index: 60;
  width: 280px;
  max-width: calc(100vw - 24px);
  padding: 16px;
  border: 0.5px solid var(--line);
  border-radius: 16px;
  background: var(--pop);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: scale(0.97) translateY(4px);
  transition:
    opacity 0.12s linear,
    transform 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.popover.open {
  opacity: 1;
  transform: scale(1) translateY(0);
}
.popover[hidden] {
  display: none;
}
.popover.format {
  width: 336px;
}
.popover.duration {
  width: 160px;
  padding: 8px;
}
.popover-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ratio-options,
.quality-options {
  display: flex;
  border-radius: 12px;
  background: var(--hover);
  padding: 2px;
}
.ratio-options button {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  height: 56px;
  border-radius: 10px;
}
.ratio-options button:hover,
.quality-options button:hover {
  background: var(--hover);
}
.ratio-options button[aria-checked="true"],
.quality-options button[aria-checked="true"] {
  background: var(--selected);
}
.ratio-glyph {
  width: 17px;
  max-height: 15px;
  aspect-ratio: var(--ratio);
  border: 1.25px solid currentColor;
  border-radius: 2px;
}
.ratio-options button:nth-child(4) .ratio-glyph {
  width: 12px;
}
.ratio-options button:nth-child(5) .ratio-glyph {
  width: 9px;
}
.ratio-options button:nth-child(6) .ratio-glyph {
  width: 8px;
}
.resolution-label {
  margin-top: 20px;
}
.quality-options button {
  flex: 1;
  font-size: 12px;
  border-radius: 10px;
  height: 40px;
}
.duration .popover-label {
  margin: 4px 8px 6px;
}
.duration-options {
  display: grid;
  gap: 2px;
}
.duration-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.duration-options button:hover,
.duration-options button:focus-visible {
  background: var(--hover);
}
.duration-options button[aria-selected="true"] {
  background: var(--selected);
}
.duration-options .icon {
  width: 14px;
  height: 14px;
}
.reference-list {
  display: grid;
  gap: 4px;
  max-height: 330px;
  overflow: auto;
}
.reference-row {
  display: flex;
  align-items: center;
  gap: 3px;
}
.ref-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 5px;
  border-radius: 8px;
  text-align: left;
}
.ref-entry:hover {
  background: var(--hover);
}
.ref-entry img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}
.ref-entry span {
  font-size: 12px;
}
.reference-row .icon-button {
  width: 26px;
  min-width: 26px;
  height: 26px;
}
.reference-row .icon {
  width: 13px;
  height: 13px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
  border-radius: 8px;
  text-align: left;
}
.menu-item:hover {
  background: var(--hover);
}
.menu-item .icon {
  width: 15px;
  height: 15px;
}
.empty-note {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 12px;
}
.account-name {
  padding: 4px 8px 12px;
  font-weight: 550;
}
.management-view {
  padding: 12px 40px 60px;
  max-width: 1120px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 30px;
}
.page-heading h1 {
  font-size: 24px;
  font-weight: 600;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  min-height: 36px;
  font-size: 14px;
  font-weight: 550;
  border-radius: 10px;
  background: var(--button);
  color: var(--on-button);
}
.primary:hover {
  opacity: 0.85;
}
.primary .icon {
  width: 16px;
  height: 16px;
}
.list-surface {
  border-top: 0.5px solid var(--line);
}
.node-row {
  padding: 22px 0;
  border-bottom: 0.5px solid var(--line);
}
.node-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.node-heading h2 {
  font-size: 14px;
  font-weight: 550;
  flex: 1;
  overflow-wrap: anywhere;
}
.node-icon .icon {
  width: 18px;
  height: 18px;
}
.node-state {
  font-size: 12px;
  color: var(--muted);
}
.metadata {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.install-detail {
  font-size: 12px;
  margin: 12px 0;
  color: var(--secondary);
  overflow-wrap: anywhere;
}
.node-actions {
  display: flex;
  gap: 4px;
  margin: 12px 0 -5px -8px;
}
.member-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--line);
}
.member-name {
  flex: 1;
  overflow-wrap: anywhere;
}
.member-row small,
.member-row .muted {
  font-size: 12px;
  color: var(--muted);
}
.footnote {
  margin-top: 24px;
  font-size: 12px;
  color: var(--muted);
}
.job-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 200px 52px;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
}
.job-row-main {
  flex: 1;
  min-width: 0;
}
.job-row-main > button {
  max-width: 100%;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
}
.job-id {
  font-size: 12px;
  color: var(--muted);
}
.job-progress {
  display: grid;
  font-size: 12px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.job-actions { display: flex; justify-content: flex-end; align-items: center; min-height: 32px; }
.job-progress small {
  font-size: 12px;
  color: var(--muted);
}
.detail-view {
  position: fixed;
  inset: 0 0 0 var(--rail);
  background: var(--bg);
  z-index: 4;
  display: flex;
  transition: left 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.collapsed .detail-view {
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
}
.detail-stage {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 75px 70px 54px 58px;
  position: relative;
}
.detail-back {
  position: absolute;
  top: 22px;
  left: 22px;
}
.video-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video,
.detail-image {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 145px);
  object-fit: contain;
  border-radius: 16px;
}
.detail-image {
  display: block;
}
.detail-info {
  flex: none;
  width: 35%;
  min-width: 320px;
  max-width: 440px;
  border-left: 0.5px solid var(--line);
  padding: 64px 32px 20px;
  display: flex;
  flex-direction: column;
}
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 18px;
  border-bottom: 0.5px solid var(--line);
}
.download-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.detail-actions .icon {
  width: 18px;
  height: 18px;
}
.detail-copy {
  padding: 22px 0;
  overflow: auto;
  flex: 1;
}
.subheading {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.prompt-text {
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-params {
  margin: 18px 0;
}
.detail-references {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.detail-references button {
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 7px;
}
.detail-references img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
details {
  font-size: 12px;
  color: var(--muted);
}
details summary {
  cursor: pointer;
  list-style: none;
}
details summary:after {
  content: "›";
  display: inline-block;
  transform: rotate(90deg);
  margin-left: 6px;
}
details[open] summary:after {
  transform: rotate(-90deg);
}
dl {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 8px;
  margin: 14px 0;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--secondary);
}
.detail-footer {
  padding-top: 12px;
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}
.edit-actions {
  display: flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--hover);
}
.edit-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
}
.edit-actions button:hover,
.edit-actions button.selected {
  background: var(--selected);
}
.edit-actions .icon {
  width: 16px;
  height: 16px;
}
.locate-action,
.full-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  height: 36px;
  background: var(--hover);
  font-size: 12px;
}
.locate-action:hover,
.full-button:hover {
  background: var(--selected);
}
.locate-action .icon,
.full-button .icon {
  width: 15px;
  height: 15px;
}
.detail-composer:empty {
  display: none;
}
.detail-composer {
  margin: 12px -12px -20px;
  flex-shrink: 0;
}
.editing .video-stage {
  height: 40vh;
  flex: 1;
}
.editing .detail-video {
  max-height: 40vh;
}
.editing .prompt {
  max-height: 240px;
  min-height: 90px;
}
.detail-paging {
  position: absolute;
  right: 23px;
  top: 50%;
  display: grid;
  gap: 12px;
}
.detail-paging button:first-child {
  transform: rotate(180deg);
}
.detail-paging .icon {
  width: 20px;
  height: 20px;
}
.result-pending {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}
.result-pending h2 {
  font-size: 14px;
  font-weight: 500;
}
.result-pending p {
  font-size: 12px;
}
.formlabel {
  display: block;
  font-size: 14px;
  margin: 16px 0;
}
.formlabel small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
}
.formlabel input,
.formlabel textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  outline-offset: 1px;
}
.formlabel textarea {
  resize: vertical;
}
.check {
  display: flex;
  gap: 6px;
  font-size: 12px;
  align-items: center;
  margin: 10px 0;
}
input[type="checkbox"] {
  accent-color: var(--text);
}
#modal {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 36px);
  margin: auto;
  border: 0.5px solid var(--line);
  border-radius: 20px;
  background: var(--pop);
  padding: 28px;
  color: var(--text);
  box-shadow: var(--shadow);
}
#modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
#modal h2 {
  font-size: 24px;
  line-height: 1.4;
  margin: 0 30px 18px 0;
  font-weight: 600;
}
#modal p {
  font-size: 14px;
  color: var(--secondary);
  margin: 12px 0;
}
#modal .buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
#modal .ghost {
  padding: 6px 14px;
  border-radius: 8px;
}
#close-modal {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 8px;
}
#close-modal:hover {
  background: var(--hover);
}
#toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate(-50%, -6px);
  padding: 10px 18px;
  background: var(--pop);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition:
    opacity 0.12s,
    transform 0.18s;
  max-width: 90vw;
  font-size: 14px;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.hide {
  display: none !important;
}
.mono {
  font-family: ui-monospace, monospace;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.loading-screen {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg);
}
.loading-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.4px;
  line-height: 1;
}
.loading-brand img {
  display: block;
  width: 48px;
  height: 48px;
}
.loading-brand b {
  font-weight: 550;
}
.loading-track {
  width: 112px;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.loading-track span {
  display: block;
  width: 40px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a9ded6, #78b9e9);
  animation: loading-slide 1.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes loading-slide {
  from {
    transform: translateX(-42px);
  }
  to {
    transform: translateX(114px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-track span {
    animation: none;
    transform: translateX(36px);
  }
}
.auth {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.auth-top {
  display: flex;
  justify-content: flex-end;
  padding: 18px 30px;
  height: 64px;
}
.auth-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px max(66px, 12vh);
}
.auth-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  width: min(960px, 100%);
  min-height: 460px;
  border: 0.5px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
}
.auth-art {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background: #e8f1ef;
  padding: 28px;
}
.auth-art .brand {
  position: relative;
  z-index: 1;
}
.ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ribbon-start {
  stop-color: #5c9496;
}
.ribbon-middle {
  stop-color: #79c7b7;
}
.ribbon-end {
  stop-color: #7199bc;
}
[data-theme="dark"] .auth-art {
  background: #172327;
}
[data-theme="dark"] .ribbon-start {
  stop-color: #5d797f;
}
[data-theme="dark"] .ribbon-middle {
  stop-color: #bbf1df;
}
[data-theme="dark"] .ribbon-end {
  stop-color: #7290ba;
}
.auth-form {
  width: 100%;
  align-self: center;
  padding: 42px clamp(28px, 4vw, 58px);
}
.auth-form h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 26px;
}
.auth-form .primary {
  width: 100%;
  margin-top: 10px;
}
.authnote {
  color: var(--danger);
  font-size: 12px;
}
.authnote:empty {
  display: none;
}
.textbtn {
  font-size: 12px;
  color: var(--secondary);
  padding: 7px 0;
}
@media (max-width: 1080px) {
  .home-view {
    padding-left: 32px;
    padding-right: 32px;
  }
  .composer-toolbar {
    flex-wrap: wrap;
  }
  .detail-info {
    padding-left: 20px;
    padding-right: 20px;
    min-width: 300px;
  }
  .detail-stage {
    padding-left: 30px;
    padding-right: 50px;
  }
  .model-name {
    padding-left: 6px;
    padding-right: 6px;
  }
}
@media (max-width: 760px) {
  .shell {
    --rail: 64px;
  }
  .side {
    position: fixed;
    padding: 20px 12px 12px;
    box-shadow: inset -1px 0 var(--line);
  }
  .shell:not(.collapsed) .side {
    position: fixed;
    width: 240px;
    min-width: 240px;
  }
  .workspace {
    margin-left: 64px;
  }
  .shell:not(.collapsed) .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0 0 0 240px;
    z-index: 19;
    background: rgba(0, 0, 0, 0.22);
  }
  .topbar {
    padding: 12px 16px;
    height: 58px;
  }
  #global-status {
    gap: 9px;
    font-size: 12px;
  }
  .home-view {
    padding: 30px 16px 40px;
  }
  .home-view > h1 {
    font-size: 24px;
    margin-bottom: 38px;
  }
  .home-composer {
    margin-bottom: 40px;
  }
  .editor-row {
    gap: 10px;
  }
  .composer {
    padding: 14px 12px 12px;
    border-radius: 20px;
  }
  .reference-stack {
    width: 46px;
    transform: scale(0.9);
    transform-origin: top left;
    margin-left: 0;
  }
  .prompt {
    font-size: 14px;
    min-height: 100px;
  }
  .composer-toolbar {
    gap: 0;
    margin-top: 8px;
  }
  .model-name {
    font-size: 12px;
  }
  .creation-type,
  .parameter-button {
    padding-left: 5px;
    padding-right: 5px;
  }
  .asset-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  .assets-view {
    padding: 0 16px 260px;
  }
  .floating-composer {
    left: calc(var(--rail) + 10px);
    right: 10px;
    bottom: 12px;
  }
  .asset-filter {
    padding-left: 4px;
    height: 48px;
  }
  .management-view {
    padding: 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading .primary {
    font-size: 12px;
    padding: 7px 10px;
  }
  .job-row {
    grid-template-columns: 34px minmax(0, 1fr) 44px;
    gap: 6px 10px;
  }
  .job-row-main {
    grid-column: 2;
    grid-row: 1;
  }
  .job-progress {
    grid-column: 2;
    grid-row: 2;
  }
  .job-id { grid-column: 1; grid-row: 1 / span 2; }
  .job-actions { grid-column: 3; grid-row: 1 / span 2; }
  .member-row {
    gap: 8px;
    flex-wrap: wrap;
  }
  .detail-view {
    display: block;
    overflow: auto;
    padding-top: 0;
  }
  .detail-stage {
    height: 52vh;
    padding: 64px 32px 18px 16px;
  }
  .detail-video,
  .detail-image {
    max-height: 42vh;
    border-radius: 10px;
  }
  .detail-paging {
    right: 1px;
  }
  .detail-info {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 48vh;
    padding: 0 18px 22px;
    border: 0;
  }
  .detail-copy {
    max-height: 38vh;
  }
  .detail-back {
    left: 12px;
    top: 16px;
  }
  .detail-footer {
    padding-top: 10px;
  }
  .detail-view.editing .detail-stage {
    height: auto;
    min-height: 65vh;
  }
  .detail-view.editing .video-stage {
    height: 30vh;
    flex: auto;
  }
  .editing .detail-video {
    height: 30vh;
  }
  .detail-composer {
    margin: 10px -16px 5px 0;
  }
  .editing .prompt {
    max-height: 170px;
  }
  .auth-body {
    align-items: flex-start;
    padding: 8px 18px 32px;
  }
  .auth-wrap {
    grid-template-columns: 1fr;
    min-height: 0;
    max-width: 440px;
    border-radius: 16px;
  }
  .auth-art {
    min-height: 150px;
    padding: 20px;
  }
  .auth-form {
    padding: 26px 24px 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.player {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0b0b;
}
.player .detail-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
}
.player-controls {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 12px;
  color: #fff;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.15s;
}
.player-controls:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -24px;
  right: -24px;
  bottom: -12px;
  height: 90px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  pointer-events: none;
}
.player-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
}
.player-controls button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 26px;
}
.player-controls .icon {
  width: 17px;
  height: 17px;
}
.player-toggle .icon {
  fill: white;
}
.player-time,
.player-quality {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.player-fill {
  flex: 1;
}
.seek-slider {
  appearance: none;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 4px;
  margin: 0 0 5px;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #fff var(--progress, 0%),
    #fff5 var(--progress, 0%)
  );
}
.seek-slider::-webkit-slider-thumb {
  appearance: none;
  width: 9px;
  height: 9px;
  background: white;
  border-radius: 50%;
  opacity: 0;
}
.seek-slider:hover::-webkit-slider-thumb,
.seek-slider:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}
.volume-control {
  position: relative;
}
.volume-control input {
  position: absolute;
  width: 80px;
  right: -25px;
  bottom: 32px;
  accent-color: white;
  opacity: 0;
  pointer-events: none;
  background: #222;
}
.volume-control:hover input,
.volume-control:focus-within input {
  opacity: 1;
  pointer-events: auto;
}
.player.is-playing .player-controls {
  opacity: 0;
}
.player.is-playing:hover .player-controls,
.player:focus-within .player-controls {
  opacity: 1;
}
.player:fullscreen {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  border-radius: 0;
}
.editing .player {
  max-height: 40vh;
}
.editing .player .detail-video {
  max-height: none;
}
.result-pending p:empty {
  display: none;
}
@media (max-width: 760px) {
  .player-controls {
    left: 12px;
    right: 12px;
    bottom: 8px;
  }
  .player-quality {
    display: none;
  }
  .editing .player {
    height: 30vh;
  }
  .player .detail-video {
    height: 100%;
  }
}
.topbar {
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.popover.account-menu {
  width: 220px;
  padding: 6px;
  border-radius: 12px;
}
.account-menu-header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  min-width: 0;
}
.account-menu-header .profile-avatar {
  width: 34px;
  height: 34px;
  background: var(--selected);
  font-size: 12px;
}
.account-menu-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.account-menu-identity strong {
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-menu-identity > span {
  font-size: 12px;
  color: var(--muted);
}
.menu-divider {
  height: 0.5px;
  background: var(--line);
  margin: 4px 10px;
}
.account-menu .menu-item {
  font-size: 14px;
  min-height: 34px;
  gap: 10px;
  padding: 6px 8px;
}
.account-menu .menu-item .icon {
  width: 18px;
  height: 18px;
}
.settings-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 42px 64px;
}
.settings-title {
  margin-bottom: 30px;
}
.settings-title h1 {
  font-size: 24px;
  font-weight: 600;
}
.settings-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 48px;
}
.settings-navigation {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.settings-navigation button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  color: var(--secondary);
}
.settings-navigation .icon {
  width: 17px;
  height: 17px;
}
.settings-navigation button:hover {
  background: var(--hover);
}
.settings-navigation button.active {
  background: var(--selected);
  color: var(--text);
}
.settings-content {
  min-width: 0;
}
.settings-content .management-view {
  padding: 0;
  margin: 0;
}
.settings-content .page-heading {
  margin-bottom: 24px;
  gap: 12px;
}
.settings-content .page-heading h2,
.settings-section h2 {
  font-size: 18px;
  font-weight: 600;
}
.settings-content .page-heading .primary {
  font-size: 12px;
  min-height: 32px;
  padding: 5px 12px;
}
.settings-section h2 {
  margin-bottom: 16px;
}
.setting-row {
  min-height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 0.5px solid var(--line);
  font-size: 14px;
}
.theme-choices {
  display: flex;
  padding: 3px;
  background: var(--hover);
  border-radius: 9px;
  gap: 3px;
}
.theme-choices button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--secondary);
}
.theme-choices .icon {
  width: 15px;
  height: 15px;
}
.theme-choices button.selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.storage-total {
  margin: 26px 0 12px;
  color: var(--muted);
}
.storage-total strong {
  font-size: 24px;
  color: var(--text);
  font-weight: 550;
}
.storage-total > span {
  font-size: 14px;
}
.storage-track {
  height: 6px;
  border-radius: 8px;
  background: var(--hover);
  overflow: hidden;
}
.storage-track > span {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--blue);
}
.settings-facts {
  margin: 28px 0;
  grid-template-columns: 1fr auto;
  gap: 16px;
  font-size: 14px;
}
.settings-facts dt {
  color: var(--secondary);
}
.settings-facts dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.settings-content .node-actions {
  flex-wrap: wrap;
}
@media (max-width: 950px) {
  .settings-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 24px;
  }
  .settings-page {
    padding: 18px 24px 50px;
  }
}
@media (max-width: 760px) {
  .settings-page {
    padding: 16px;
  }
  .settings-title {
    margin-bottom: 20px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .settings-navigation {
    flex-direction: row;
    overflow: auto;
    gap: 2px;
    padding-bottom: 4px;
  }
  .settings-navigation button {
    flex-shrink: 0;
    font-size: 12px;
    min-height: 32px;
    padding: 6px 9px;
    gap: 5px;
  }
  .settings-navigation .icon {
    display: none;
  }
  .setting-row {
    gap: 12px;
  }
  .theme-choices button {
    padding: 6px 8px;
  }
  .account-menu-identity strong {
    font-size: 14px;
  }
  .settings-content .page-heading {
    align-items: center;
  }
  .settings-content .member-row {
    gap: 8px;
  }
}
.user-avatar {
  display: block;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.account-menu-header .user-avatar {
  width: 28px;
  height: 28px;
}
.account-menu .menu-item .icon {
  width: 16px;
  height: 16px;
}
.profile-section {
  width: 100%;
  max-width: 440px;
}
.profile-section h2 {
  margin-bottom: 24px;
}
.profile-field-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 16px 0;
  border-bottom: 0.5px solid var(--line);
}
.profile-field-label {
  font-size: 14px;
  color: var(--secondary);
}
.profile-avatar-control {
  display: contents;
}
.profile-avatar-control .user-avatar {
  width: 48px;
  height: 48px;
}
.profile-input-action {
  display: contents;
}
.profile-input-action input {
  min-width: 0;
  flex: 1;
  width: 100%;
  height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 14px;
}
.profile-save,
.profile-secondary {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 500;
}
.profile-save {
  min-width: 60px;
  background: var(--button);
  color: var(--on-button);
}
.profile-save:disabled {
  background: var(--hover);
  color: var(--muted);
  opacity: 1;
}
.profile-secondary {
  border: 1px solid transparent;
  background: var(--hover);
  color: var(--secondary);
}
.profile-secondary:hover {
  background: var(--selected);
  color: var(--text);
}
.profile-readonly {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.profile-save-status:has(.form-message:empty) {
  display: none;
}
.profile-save-status {
  padding: 8px 0 0 104px;
}
.form-message {
  font-size: 12px;
  color: var(--muted);
}
.avatar-library {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 4px 0 20px;
}
.avatar-library button {
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  border: 2px solid transparent;
  min-width: 0;
}
.avatar-library button:hover {
  background: var(--hover);
}
.avatar-library button[aria-pressed="true"] {
  border-color: var(--blue);
}
.avatar-library img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.avatar-upload-row {
  border-top: 0.5px solid var(--line);
  padding-top: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.avatar-upload-row .quiet-button .icon {
  width: 16px;
  height: 16px;
}
.avatar-upload-row .muted {
  font-size: 12px;
}
.team-add-actions,
.member-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.member-identity {
  flex: 1;
  min-width: 0;
  display: grid;
}
.member-identity .member-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.member-identity small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.member-row .user-avatar {
  width: 32px;
  height: 32px;
}
@media (max-width: 760px) {
  .member-actions {
    margin-left: 40px;
    gap: 4px;
  }
  .team-add-actions {
    gap: 3px;
  }
  .profile-field-row {
    grid-template-columns: 52px minmax(0, 1fr) 80px;
    gap: 12px;
    min-height: 64px;
  }
  .profile-avatar-control .user-avatar {
    width: 44px;
    height: 44px;
  }
  .profile-save-status {
    padding-left: 64px;
  }
  .settings-content .page-heading {
    align-items: flex-start;
  }
  .account-menu-header .user-avatar {
    width: 26px;
    height: 26px;
  }
}

/* Image generation shares the video composer's controls and motion. */
.parameter-button[hidden] { display: none; }
.popover.creation { width: 184px; padding: 6px; }
.popover.image-model { width: 284px; padding: 6px; }
.choice-list { display: grid; gap: 2px; }
.choice-list button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 9px 12px; border-radius: 9px; text-align: left; }
.choice-list button > span { flex: 1; }
.choice-list button:not(:disabled):hover { background: var(--hover); }
.choice-list button[aria-selected="true"] { background: var(--selected); }
.choice-list .icon { width: 18px; height: 18px; }
.asset-duration:empty { display: none; }
.openai-settings { max-width: 640px; }
.openai-settings select { max-width: 240px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 10px; background: var(--surface); }
.openai-settings input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--text); }
.openai-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 24px 0 12px; }
.openai-note { color: var(--muted); font-size: 12px; margin-top: 24px; }
@media (max-width: 760px) {
  .composer .model-name { display: flex; max-width: 200px; }
  .composer .model-name > span { overflow: hidden; text-overflow: ellipsis; }
  .openai-settings .setting-row { gap: 16px; }
  .openai-settings select { max-width: 210px; font-size: 12px; }
}

.library-scopes { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.asset-top { height: auto; min-height: 46px; flex-wrap: wrap; gap: 12px; }
#selection-toolbar { margin-left: auto; }
.bulk-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 12px; font-size: 12px; }
.bulk-toolbar button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-height: 34px; }
.bulk-toolbar .icon { width: 16px; height: 16px; }
.selection-count { color: var(--muted); white-space: nowrap; }
.bulk-actions { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.bulk-actions button { padding: 0 12px; border-radius: 7px; }
.bulk-actions button + button { border-left: 1px solid var(--line); }
.bulk-actions button:not(:disabled):hover, .cancel-select:hover { background: var(--hover); }
.cancel-select { padding: 0 6px; border-radius: 7px; }
.select-all { color: var(--secondary); }
.select-all > span { width: 16px; height: 16px; border: 1px solid var(--secondary); border-radius: 4px; display: grid; place-items: center; }
.select-all[aria-checked="true"] > span, .select-all[aria-checked="mixed"] > span { background: var(--button); color: var(--on-button); border-color: var(--button); }
.select-all .icon { width: 12px; height: 12px; }
.asset-checkbox { position: absolute; top: 10px; left: 10px; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; background: rgba(0,0,0,.42); color: #fff; opacity: 0; transition: opacity 100ms linear, background-color 100ms linear; }
.asset-checkbox .icon { width: 16px; height: 16px; opacity: 0; stroke-width: 2; }
.asset-checkbox[aria-checked="true"] .icon { opacity: 1; }
.asset-checkbox[aria-checked="true"] { background: #242424; border-color: #fff; }
.asset-checkbox[hidden] { display: none; }
.is-selecting .asset-card:hover .asset-checkbox,
.is-selecting .asset-card:has(:focus-visible) .asset-checkbox,
.is-selecting .asset-card.is-selected .asset-checkbox { opacity: 1; }
.is-selecting .asset-checkbox { pointer-events: none; }
.is-selecting .asset-card:hover .asset-checkbox,
.is-selecting .asset-card:has(:focus-visible) .asset-checkbox,
.is-selecting .asset-card.is-selected .asset-checkbox { pointer-events: auto; }
.asset-card.is-selected .asset-preview { outline: 2px solid var(--text); outline-offset: 3px; }
.is-selecting .asset-actions { display: none; }
.is-selecting .asset-play { display: none; }
.assets-view.is-selecting { padding-bottom: 48px; }
.favorite-button.is-favorite .icon { fill: currentColor; }
.asset-card.is-favorite .asset-actions { opacity: 1; }
.asset-card.is-favorite:not(:hover):not(:focus-within) .asset-actions > :not(.favorite-button) { display: none; }
.detail-favorite { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.detail-favorite .icon { width: 17px; height: 17px; }
.detail-favorite:hover { background: var(--hover); }
.detail-actions { gap: 10px; }
@media (max-width: 1050px) {
  .assets-view.is-selecting #selection-toolbar { flex-basis: 100%; margin: 0; }
  .bulk-toolbar { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .library-scopes { gap: 0; }
  .library-scopes .top-tab { padding: 7px 11px; }
  .bulk-toolbar { gap: 8px; }
  .selection-count { margin-left: auto; }
  .bulk-actions { flex: 1; flex-wrap: wrap; }
  .bulk-actions button { flex: 1; padding: 0 10px; }
  .asset-checkbox { width: 26px; height: 26px; }
}

.assets-view .asset-top { position: sticky; top: 0; z-index: 10; background: var(--bg); padding-block: 8px; }

.composer-estimate { font-size: 12px; color: var(--muted); white-space: nowrap; }
.composer-estimate:empty, .pending-caption:empty { display: none; }

.detail-copy dl > [data-time-details] { display: contents; }

.profile-section .profile-save,
.profile-section .profile-secondary { width: 80px; justify-self: start; }
.profile-password-row > div { grid-column: 3; }
