/* 项目、选区与历史：复用全站暖中性Workbench、组件和动效原语。 */
.os-projects {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-8) var(--market-page-gutter);
}
.os-projects__inner {
  max-width: var(--market-content-width);
  margin: 0 auto;
  animation: os-fade-up var(--dur-slow) var(--ease);
}
.os-projects__head,
.os-authoring-actions,
.os-project-section__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.os-projects__head {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.os-projects__back {
  padding: 0 var(--space-2);
  margin-left: calc(-1 * var(--space-2));
  margin-bottom: var(--space-3);
  color: var(--text-secondary);
}
.os-projects__tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  height: auto;
  padding: 0;
}
.os-projects__tools .os-authoring-actions {
  margin: 0;
  gap: var(--space-2);
}
.os-projects__tools .os-topbar__right:has(> [data-auth][hidden]) {
  display: none;
}
.os-project-more {
  flex: none;
  padding: 0;
  transition:
    background var(--transition),
    color var(--transition),
    opacity var(--transition);
}
.os-project-more:hover,
.os-project-more[aria-expanded="true"] {
  background: var(--ghost-hover);
  color: var(--text-primary);
}
.os-project-more:focus-visible {
  outline: 2px solid var(--keyboard-focus);
  outline-offset: var(--files-seg-inset);
}
.os-projects__tools .os-input,
.os-projects__tools .os-select {
  height: var(--control-h);
}
.os-projects__tools .os-input {
  border-radius: var(--radius-sm);
}
/* 与同行 .os-btn（如「创建项目」主按钮）保持同一 --radius-card 圆角 */
.os-projects__tools .os-select {
  border-radius: var(--radius-card);
}
.os-projects__tools input[type="search"] {
  width: var(--menu-width);
}
.os-projects__head p {
  color: var(--text-secondary);
  margin-top: var(--space-2);
}
.os-project-grid {
  display: grid;
  grid-template-columns: repeat(var(--project-library-columns), minmax(0, 1fr));
  gap: var(--space-8) var(--space-5);
}
.os-project-card {
  position: relative;
  min-width: 0;
  color: var(--text-primary);
  text-align: left;
}
.os-project-card__open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.os-project-card__open strong {
  padding-right: var(--space-8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
}
.os-project-card__preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-input);
  background: var(--bg-subtle);
  margin-bottom: var(--space-1);
  gap: var(--project-cover-gap);
}
.os-project-card__preview[data-kind="cover"],
.os-project-card__preview[data-kind="empty"] {
  display: block;
}
.os-project-card__preview[data-kind="create"] {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text-secondary);
  transition:
    background var(--transition),
    color var(--transition);
}
.os-project-card--create:hover .os-project-card__preview[data-kind="create"],
.os-project-card--create:focus-within .os-project-card__preview[data-kind="create"] {
  background: var(--bg-fill);
  color: var(--text-primary);
}
.os-project-card__preview[data-kind="create"]::after {
  display: none;
}
.os-project-card__preview[data-kind="create"] .os-icon {
  width: var(--space-6);
  height: var(--space-6);
}
.os-project-card__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.os-project-card__tile {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-subtle);
}
.os-project-card__more {
  position: absolute;
  top: calc(100% - var(--control-h) - var(--space-3));
  right: 0;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.os-project-card:hover .os-project-card__more,
.os-project-card:focus-within .os-project-card__more,
.os-project-card__more[aria-expanded="true"] {
  opacity: 1;
}
@media (hover: none) {
  .os-project-card__more {
    opacity: 1;
  }
}
@media (max-width: 1024px) {
  .os-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .os-project-grid {
    grid-template-columns: 1fr;
  }
}
.os-project-notice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
}
.os-project-card__preview {
  position: relative;
}
.os-project-card__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--project-cover-hover);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.os-project-card:hover .os-project-card__preview::after,
.os-project-card:focus-within .os-project-card__preview::after {
  opacity: 1;
}

.os-project-card__image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.os-project-section {
  margin-top: var(--space-5);
}
.os-project-resource-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  background: var(--bg-canvas);
}
.os-project-tabs,
.os-project-subtabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.os-project-tab {
  position: relative;
  color: var(--text-secondary);
}
.os-project-tab[aria-selected="true"] {
  color: var(--text-primary);
}
.os-project-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: var(--stroke);
  background: var(--text-primary);
}
.os-project-tab__count {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
}
.os-project-subtabs {
  margin-top: var(--space-4);
}
.os-project-subtabs [aria-pressed="true"] {
  background: var(--bg-subtle);
}
.os-project-resource-nav .os-input {
  height: var(--control-h);
  border-radius: var(--radius-sm);
  width: var(--menu-width);
}
.os-project-resources {
  animation: os-fade-in var(--dur) var(--ease);
}
.os-project-section__head {
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.os-project-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.os-project-file:hover {
  background: var(--bg-subtle);
}
.os-project-file.is-selected {
  background: var(--bg-subtle);
}
.os-project-file.is-selecting > .os-project-more,
.os-project-asset.is-selecting > .os-project-more {
  visibility: hidden;
}
@media (hover: hover) and (pointer: fine) {
  .os-project-file:not(:hover):not(:focus-within) > .os-project-more:not([aria-expanded="true"]),
  .os-project-asset:not(:hover):not(:focus-within) > .os-project-more:not([aria-expanded="true"]),
  .os-project-episode-item:not(:hover):not(:focus-within) > .os-project-more:not([aria-expanded="true"]) {
    opacity: 0;
  }
}
.os-project-file.is-selecting {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
}
.os-project-checkbox {
  width: var(--icon);
  height: var(--icon);
  margin: 0;
  accent-color: var(--text-primary);
  cursor: pointer;
}
.os-project-card__select {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--control-h-btn);
  height: var(--control-h-btn);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  cursor: pointer;
}
.os-project-file__name {
  min-width: 0;
  justify-content: flex-start;
  font-size: var(--fs-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-project-file__scope {
  max-width: var(--project-file-scope-max);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-project-empty {
  padding: var(--space-8) 0;
  color: var(--text-secondary);
  line-height: var(--lh-prose);
}
.os-project-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: var(--menu-width);
  height: var(--control-h);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}
.os-project-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-project-chip:hover,
.os-project-chip[aria-expanded="true"] {
  background: var(--bg-fill);
  color: var(--text-primary);
}
.os-project-picker {
  --project-picker-available-height: 100vh;
  position: fixed;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(var(--project-picker-width), calc(100vw - var(--space-4)));
  max-height: min(65vh, var(--dropdown-max-h), var(--project-picker-available-height));
  padding: var(--space-1);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--bg-input);
  box-shadow: var(--shadow-pop);
  transform-origin: bottom left;
  animation: os-pop-in var(--dur-menu) var(--ease-spring);
}
.os-project-picker__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  margin-bottom: var(--space-1);
  min-height: var(--control-h-btn);
  border-bottom: 1px solid var(--border-hairline);
  flex: none;
}
.os-project-picker__search input {
  border: 0;
  outline: 0;
  min-width: 0;
  width: 100%;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--fs-body-sm);
}
.os-project-picker__rows {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}
.os-project-picker .os-btn {
  flex: none;
  justify-content: flex-start;
  gap: var(--space-2);
  width: 100%;
  height: var(--control-h-btn);
  min-height: var(--control-h-btn);
  padding: 0 var(--space-2);
  font-size: var(--fs-body-sm);
  white-space: nowrap;
}
.os-project-picker .os-btn.is-selected {
  background: var(--bg-fill);
  color: var(--text-title);
  font-weight: var(--fw-medium);
}
.os-project-picker__empty {
  padding: var(--space-3) var(--space-2);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  text-align: center;
}
.os-project-picker__footer {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: none;
  padding-top: var(--space-1);
  margin-top: var(--space-1);
  border-top: 1px solid var(--border-hairline);
}
.os-project-picker__createform {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding-bottom: var(--space-1);
}
.os-project-picker__createactions {
  display: flex;
  gap: var(--space-1);
}
.os-project-picker__createactions .os-btn {
  flex: 1;
  width: auto;
  justify-content: center;
}
.os-project-picker__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-project-picker .os-project-picker__check {
  margin-left: auto;
}
.os-project-picker .os-icon {
  flex: none;
}
.os-project-picker [aria-busy="true"],
.os-project-picker[aria-busy="true"] .os-btn {
  pointer-events: none;
}
.os-project-picker__rows:empty {
  display: none;
}
.os-project-picker__placeholder {
  flex: none;
  height: var(--control-h);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}
.os-authoring-menu {
  position: fixed;
  z-index: 100;
  width: var(--menu-width);
  padding: var(--space-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  background: var(--bg-input);
  box-shadow: var(--shadow-pop);
  animation: os-pop-in var(--dur) var(--ease);
  transform-origin: top right;
}
.os-authoring-menu .os-btn {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 0 var(--space-3);
}
.os-authoring-menu .is-danger {
  color: var(--semantic-negative-line);
}
.os-composer-selection {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  margin: 0 var(--space-2) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  animation: os-fade-in var(--dur) var(--ease);
}
.os-composer-selection span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.os-authoring-dialog {
  width: min(var(--content-modal), calc(100vw - var(--space-8)));
  max-height: calc(100dvh - var(--space-8));
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  color: var(--text-primary);
  box-shadow: none;
  animation: os-pop-in var(--dur) var(--ease);
}
.os-authoring-dialog--wide {
  width: min(var(--content-settings-modal), calc(100vw - var(--space-8)));
}
.os-authoring-dialog--medium {
  width: min(var(--content-settings), calc(100vw - var(--space-8)));
}
.os-authoring-dialog__head .os-icon-btn {
  padding: 0;
  flex: none;
}
.os-authoring-dialog::backdrop {
  background: var(--scrim);
}
.os-authoring-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
}
.os-authoring-dialog__body {
  padding: 0 var(--space-6) var(--space-6);
}
.os-authoring-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: var(--content-settings);
}
.os-authoring-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.os-authoring-actions {
  margin-bottom: var(--space-4);
}
.os-authoring-error {
  color: var(--semantic-negative-line);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-ui);
}
.os-authoring-error:empty {
  display: none;
}
.os-history-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--history-list-width)) minmax(0, 1fr);
  gap: var(--space-4);
}
.os-authoring-dialog.os-history-window {
  width: var(--history-panel-width);
  max-width: var(--history-panel-width);
  height: var(--history-panel-height);
  max-height: var(--history-panel-height);
}
.os-project-milestones-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.os-project-milestones-dialog .os-authoring-dialog__body {
  min-height: 0;
  overflow: auto;
}
.os-history-dialog[open] {
  display: flex;
  flex-direction: column;
  height: var(--history-panel-height);
  overflow: hidden;
}
.os-history-dialog .os-authoring-dialog__head {
  flex: none;
}
.os-history-dialog .os-authoring-dialog__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.os-history-dialog .os-history-layout {
  flex: 1;
  min-height: 0;
}
.os-history-dialog .os-history-list {
  overflow: auto;
  scrollbar-gutter: stable;
}
.os-history-placeholder {
  flex: none;
  height: var(--space-12);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  animation: os-skel-pulse var(--boot-pulse) ease-in-out infinite;
}
.os-history-placeholder:nth-child(2n) {
  animation-delay: 0.16s;
}
.os-history-diff__loading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  flex: 1;
  min-height: 0;
}
.os-history-diff__loading-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.os-history-diff__loading-col .os-skel {
  animation: os-skel-pulse var(--boot-pulse) ease-in-out infinite;
}
.os-history-diff__loading-col .os-skel--line:nth-child(2) {
  width: 84%;
  animation-delay: 0.12s;
}
.os-history-diff__loading-col .os-skel--line:nth-child(3) {
  width: 92%;
  animation-delay: 0.24s;
}
.os-history-diff__loading-col .os-skel--line:nth-child(4) {
  width: 68%;
  animation-delay: 0.36s;
}
.os-history-diff__loading-col .os-skel--line:nth-child(5) {
  width: 86%;
  animation-delay: 0.48s;
}
.os-history-diff__loading-col .os-skel--line:nth-child(6) {
  width: 58%;
  animation-delay: 0.6s;
}
@media (prefers-reduced-motion: reduce) {
  .os-history-placeholder,
  .os-history-diff__loading-col .os-skel {
    animation: none;
  }
}
.os-preview-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
}
.os-history-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}
.os-history-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  height: auto;
  padding: var(--space-2);
  gap: var(--space-1);
}
.os-history-row[aria-pressed="true"] {
  background: var(--bg-fill);
}
.os-history-row .os-caption {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-history-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}
.os-history-toolbar,
.os-history-comparebar,
.os-history-namerow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: none;
}
.os-history-toolbar {
  flex-wrap: wrap;
}
.os-history-namerow {
  flex: 1;
  min-width: 0;
  justify-content: flex-end;
}
.os-history-namerow input {
  width: var(--history-milestone-width);
  min-width: var(--history-version-width);
}
.os-history-namerow input,
.os-history-version {
  height: var(--control-h);
  box-sizing: border-box;
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm);
  padding: 0 var(--space-3);
}
.os-history-version {
  padding-right: var(--space-8);
}
.os-history-diff {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-right: var(--space-1);
}
.os-history-diff > p {
  margin: 0;
}
.os-history-diff > * {
  flex: none;
}
.os-history-restore {
  align-self: flex-end;
}
.os-history-footer {
  flex: none;
  display: flex;
  justify-content: flex-end;
}
.os-history-footer:empty {
  display: none;
}
.os-history-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}
.os-history-milestones:empty {
  display: none;
}
.os-history-version {
  width: var(--history-version-width);
}
.os-history-diff__columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.os-history-diff__columns > section {
  min-width: 0;
}
.os-history-diff__columns h3 {
  margin: 0 0 var(--space-2);
}
.os-history-diff__text {
  white-space: normal;
  overflow-wrap: anywhere;
  background: var(--bg-subtle);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  font: inherit;
  line-height: var(--lh-prose);
}
.os-history-diff__text > :first-child {
  margin-top: 0;
}
.os-history-diff__text > :last-child {
  margin-bottom: 0;
}
.os-history-diff__text[data-format="hollywood-v1"] {
  font-family: var(--font-screenplay-en);
}
.os-history-format-changes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-prose);
}
.os-history-diff__text .os-history-removed,
.os-history-diff__text .os-history-added {
  color: inherit;
  border-radius: var(--radius-xs);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.os-history-diff__text .os-history-removed {
  background: var(--semantic-negative);
  text-decoration: line-through;
}
.os-history-diff__text .os-history-added {
  background: var(--semantic-positive);
  text-decoration: none;
}
.os-project-image {
  display: block;
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  margin: 0 auto;
}
.os-project-filepanel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 60vh;
}
.os-project-filepanel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.os-project-filepanel__identity {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.os-project-filepanel__identity .os-files__editstatus {
  min-width: 0;
}
.os-project-filepanel__controls {
  max-width: 100%;
  gap: var(--space-2);
}
.os-project-viewmodes {
  --document-view-index: 0;
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  padding: var(--space-1);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}
.os-project-viewmodes__thumb {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  width: var(--control-h-btn);
  height: var(--control-h-btn);
  box-sizing: border-box;
  border: var(--stroke) solid var(--border-hairline);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  pointer-events: none;
  transform: translateX(calc(var(--document-view-index) * 100%));
  transition: transform var(--dur) var(--ease);
}
.os-project-viewmodes__tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--control-h-btn);
  height: var(--control-h-btn);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.os-project-viewmodes__tab[aria-selected="true"],
.os-project-viewmodes__tab:hover {
  color: var(--text-primary);
}
.os-project-viewmodes__tab:disabled {
  cursor: default;
}
.os-project-filepanel__editor-surface {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: var(--field-tall);
}
.os-project-filepanel__preview,
.os-project-filepanel[data-view="rich"] .os-story,
.os-project-filepanel[data-view="source"] .os-files__editinput {
  animation: os-fade-in var(--dur) var(--ease);
}
.os-project-filepanel__preview {
  flex: 1;
  min-height: 0;
}
.os-project-filepanel__preview > pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: var(--lh-prose);
}
.os-project-filepanel__preview iframe {
  display: block;
  width: 100%;
  height: 65vh;
  border: 0;
}
.os-project-filepanel .os-files__editor {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
  min-height: 0;
  padding: 0;
}
.os-project-filepanel .os-files__editinput {
  min-height: var(--field-tall);
}
.os-project-filepanel__office {
  overflow: auto;
}
.os-project-filepanel__office .docx-wrapper {
  padding: var(--space-4);
  background: var(--bg-subtle);
}
.os-project-filepanel__office .docx-wrapper > section.docx {
  box-shadow: none;
}
.os-project-filepanel__office table {
  width: 100%;
  border-collapse: collapse;
}
.os-project-filepanel__office td,
.os-project-filepanel__office th {
  border: 1px solid var(--border-hairline);
  padding: var(--space-2);
}
/* 只读预览态按中文剧本紧缩排布；可编辑态保持块级段落与正常选区几何 */
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="character"],
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="parenthetical"],
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="dialogue"] {
  display: inline;
  margin: 0;
  padding: 0;
  text-align: left;
  width: auto;
}
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="character"]::after {
  content: "：";
}
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="character"]:has(+ [data-line-type="parenthetical"])::after {
  content: "";
}
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="parenthetical"]::after {
  content: "：";
}
.os-story__preview[data-format="chinese-v1"] .os-story__line[data-line-type="dialogue"]::after {
  content: "";
  display: block;
  margin-bottom: var(--space-3);
}
:is(.os-story, .os-story__preview)[data-format="hollywood-v1"] :is(.os-story__document, .os-story__draft) {
  font-family: var(--font-screenplay-en);
}
.os-story__toolbar button:disabled {
  color: var(--disabled-text);
  cursor: default;
}

/* 2026-10-30 用户要求资源工具同排、紧凑列表和分集文件夹。 */
.os-project-resource-nav {
  justify-content: flex-start;
  padding: var(--space-2) 0;
  gap: var(--space-2);
}
.os-project-resource-controls {
  margin-left: auto;
  gap: var(--space-2);
}
.os-project-resource-controls .os-input {
  width: var(--project-search-width);
}
.os-project-section.os-project-resources {
  margin-top: var(--space-2);
}
.os-project-file {
  gap: var(--space-2);
  padding: var(--space-1) 0;
}
.os-project-file .os-btn {
  height: var(--control-h-btn);
  padding: var(--space-1) var(--space-2);
}
.os-project-file__thumbnail {
  width: var(--control-h-btn);
  height: var(--control-h-btn);
  object-fit: cover;
  border-radius: var(--radius-xs);
}
.os-project-layout {
  display: flex;
  align-items: center;
  gap: var(--files-seg-inset);
  padding: var(--files-seg-inset);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.os-project-layout .os-icon-btn {
  width: var(--control-h-btn);
  height: var(--control-h-btn);
}
.os-project-layout [aria-pressed="true"] {
  background: var(--bg-input);
  box-shadow: var(--shadow-input);
}
.os-project-episodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--project-card-min)), 1fr));
  gap: var(--space-2);
}
.os-project-episode {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.os-project-episode:hover {
  background: var(--bg-subtle);
}
.os-project-episode .os-caption {
  margin-left: auto;
}
.os-project-episode-name {
  font-size: var(--fs-body);
}
.os-projects {
  position: relative;
}
.os-project-drop {
  position: sticky;
  bottom: var(--space-4);
  z-index: 5;
  padding: var(--space-6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  background: var(--bg-input);
  text-align: center;
  pointer-events: none;
  animation: os-fade-in var(--dur) var(--ease);
}
.os-project-upload-dialog[open] {
  display: flex;
  flex-direction: column;
  max-height: var(--history-panel-height);
}
.os-project-upload-dialog .os-authoring-dialog__body {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.os-project-upload-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.os-project-upload-row {
  padding: var(--space-4);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  transition:
    border-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.os-project-upload-row:hover {
  border-color: var(--line);
}
.os-project-upload-row__main {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  min-width: 0;
}
.os-project-upload-thumb {
  position: relative;
  flex: none;
  width: var(--project-upload-thumb-w);
  height: var(--project-upload-thumb-h);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-input);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.os-project-upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.os-project-upload-thumb__dim {
  position: absolute;
  left: var(--space-1);
  bottom: var(--space-1);
  padding: 0 var(--space-1);
  border-radius: var(--radius-xs);
  background: var(--project-canvas-ref-badge-bg);
  color: var(--project-canvas-ref-badge-ink);
  font-size: var(--fs-nano);
  font-variant-numeric: tabular-nums;
  line-height: var(--lh-ui);
}
.os-project-upload-row__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.os-project-upload-row__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.os-project-upload-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-title);
}
.os-project-upload-size {
  flex: none;
  font-size: var(--fs-micro);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.os-project-upload-status {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--files-seg-inset) var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  flex: none;
}
.os-project-upload-status.is-done {
  background: var(--semantic-positive);
  color: var(--semantic-positive-ink);
}
.os-project-upload-status.is-busy {
  background: var(--bg-fill);
  color: var(--text-secondary);
}
.os-project-upload-status.is-err {
  background: var(--semantic-negative);
  color: var(--semantic-negative-line);
}
@keyframes os-project-upload-spin {
  to {
    transform: rotate(360deg);
  }
}
.os-project-upload-spin {
  animation: os-project-upload-spin var(--ring-spin) linear infinite;
}
.os-project-upload-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.os-project-upload-fields.has-dup {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.os-project-upload-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}
.os-project-upload-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.os-project-upload-field__lbl {
  font-size: var(--fs-micro);
  color: var(--text-muted);
  line-height: 1;
}
.os-project-upload-row .os-input,
.os-project-upload-row .os-select {
  width: 100%;
  min-width: 0;
  height: var(--control-h-btn);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm);
}
.os-project-upload-row[data-complete="true"] {
  opacity: var(--project-upload-complete-opacity);
}
.os-project-upload-foot {
  align-items: center;
  padding-top: var(--space-1);
}
.os-project-upload-summary {
  margin-inline-end: auto;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .os-project-upload-spin {
    animation: none;
  }
}
.os-episode-needs {
  margin-top: var(--space-2);
  animation: os-fade-in var(--dur) var(--ease);
}
.os-episode-needs__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.os-episode-needs__toolbar > span {
  margin-right: auto;
}
.os-asset-need__state {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
}
.os-project-card__open > span.os-asset-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.os-asset-placeholder:has(.os-media-placeholder) {
  overflow: hidden;
}
.os-asset-needed-empty {
  padding: var(--space-4) 0;
}
.os-asset-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--asset-tile-min)), 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
  max-height: var(--field-tall);
  overflow: auto;
}
.os-asset-picker__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  padding: var(--space-2);
  color: var(--text-primary);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}
.os-asset-picker__card:hover {
  background: var(--bg-subtle);
}
.os-asset-picker__card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xs);
  object-fit: contain;
  background: var(--bg-subtle);
}
.os-project-resource-defaults,
.os-project-selection-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.os-project-selection-tools {
  min-height: var(--control-h);
  justify-content: space-between;
  margin-bottom: var(--space-2);
  padding: var(--space-1) 0;
}
.os-project-selection-summary,
.os-project-selection-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.os-project-selection-actions {
  margin-left: auto;
  flex-wrap: wrap;
}
.os-project-asset-view {
  max-width: var(--project-search-width);
}
.os-projects__head h1 {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  gap: var(--space-3);
}
.os-project-episode-name {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.os-project-assets {
  grid-template-columns: repeat(auto-fill, minmax(var(--asset-tile-min), 1fr));
  gap: var(--space-4);
}
.os-project-asset {
  position: relative;
  min-width: 0;
  padding: var(--space-1);
  border: 0;
  border-radius: var(--radius-card);
  background: transparent;
  transition: background var(--transition);
}
.os-project-asset:hover,
.os-project-asset:focus-within {
  background: var(--bg-subtle);
}
.os-project-asset.is-selected {
  background: var(--bg-fill);
  outline: 2px solid var(--keyboard-focus);
  outline-offset: calc(-1 * var(--stroke));
}
.os-project-asset .os-project-card__open {
  gap: 0;
  min-width: 0;
}
.os-project-asset .os-project-card__open > span:not(.os-asset-placeholder):not(.os-create-tile__surface) {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-8) var(--space-1) var(--space-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-body-sm);
  color: var(--text-primary);
}
.os-project-asset .os-project-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
}
.os-project-asset > .os-icon-btn {
  position: absolute;
  right: var(--space-1);
  bottom: var(--space-1);
  opacity: 0;
  transition: opacity var(--transition);
}
.os-project-asset:hover > .os-icon-btn,
.os-project-asset:focus-within > .os-icon-btn,
.os-project-asset > .os-icon-btn[aria-expanded="true"] {
  opacity: 1;
}
@media (hover: none) {
  .os-project-asset > .os-icon-btn {
    opacity: 1;
  }
}
.os-project-asset .os-project-card__select {
  z-index: 1;
}
.os-project-card__open > span.os-asset-placeholder {
  border: 0;
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
}
.os-create-tile__surface {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  transition:
    background var(--transition),
    color var(--transition);
}
.os-create-tile__surface .os-icon {
  width: var(--space-6);
  height: var(--space-6);
}
.os-project-asset--create .os-create-tile__surface .os-icon {
  width: var(--space-8);
  height: var(--space-8);
}
.os-project-asset--create .os-create-tile__surface path {
  vector-effect: non-scaling-stroke;
}
.os-project-asset--create:hover .os-create-tile__surface,
.os-project-asset--create:focus-within .os-create-tile__surface {
  background: var(--bg-fill);
  color: var(--text-primary);
}
.os-project-asset--create:hover,
.os-project-asset--create:focus-within {
  background: transparent;
}
.os-create-tile--project .os-create-tile__surface {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-input);
}
.os-asset-lightbox .os-authoring-dialog__body {
  display: flex;
  justify-content: center;
}
.os-asset-lightbox img {
  width: 100%;
  max-height: var(--asset-preview-height);
  object-fit: contain;
}

.os-projects[data-project-detail="true"] .os-projects__head {
  margin-bottom: var(--space-3);
  align-items: center;
}
.os-project-resource-controls.os-projects__tools input[type="search"] {
  width: var(--project-search-width);
}

.os-project-metadata-dialog[open] {
  max-height: var(--history-panel-height);
}
.os-project-metadata-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--project-card-min)), 1fr));
  gap: var(--space-3);
}
.os-project-metadata-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.os-project-metadata-field .os-input,
.os-project-metadata-field .os-select {
  width: 100%;
  height: var(--control-h);
  min-width: 0;
  border-radius: var(--radius-sm);
}
.os-project-metadata-spec summary {
  cursor: pointer;
  margin: var(--space-2) 0;
}

/* 文件选择沿统一18px方框与28px点击区，不使用浏览器默认复选框外观。 */
.os-select-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--selection-hit);
  height: var(--selection-hit);
  flex: none;
  cursor: pointer;
}
.os-select-control > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.os-select-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--selection-box);
  height: var(--selection-box);
  border: 1px solid var(--line-strong);
  border-radius: var(--selection-radius);
  background: var(--bg-input);
  pointer-events: none;
  transition:
    background var(--transition),
    border-color var(--transition);
}
.os-select-box .os-icon {
  width: var(--icon-inline);
  height: var(--icon-inline);
  opacity: 0;
  color: var(--cta-text);
}
.os-select-control > input:checked + .os-select-box,
.os-select-control > input:indeterminate + .os-select-box {
  background: var(--cta-solid);
  border-color: var(--cta-solid);
}
.os-select-control > input:checked + .os-select-box .os-icon {
  opacity: 1;
}
.os-select-control > input:indeterminate + .os-select-box::after {
  content: "";
  width: var(--space-2);
  border-bottom: var(--stroke) solid var(--cta-text);
}
.os-select-control > input:indeterminate + .os-select-box .os-icon {
  display: none;
}
.os-select-control > input:focus-visible + .os-select-box {
  outline: 2px solid var(--keyboard-focus);
  outline-offset: var(--files-seg-inset);
}
.os-select-control:hover .os-select-box {
  border-color: var(--text-secondary);
}
.os-project-resource-browse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.os-project-resource-browse input[type="search"] {
  width: var(--project-search-width);
}
.os-project-resource-controls {
  margin-left: auto;
}
.os-project-episode-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-radius: var(--radius-sm);
}
.os-project-episode-item:hover {
  background: var(--bg-subtle);
}
.os-project-episode-item > .os-project-episode {
  min-width: 0;
}
.os-project-episode-item > .os-icon-btn {
  margin-right: var(--space-1);
}
.os-file-properties__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
}
.os-file-properties .os-input,
.os-file-properties .os-select {
  width: 100%;
  min-width: 0;
  height: var(--control-h);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body);
}
.os-file-properties textarea.os-file-properties__notes {
  height: calc(var(--lh-prose) * 4em);
  resize: none;
  line-height: var(--lh-prose);
}
.os-history-import__list {
  max-height: var(--field-tall);
  overflow: auto;
}
.os-history-import__group > h3 {
  margin: var(--space-3) 0 var(--space-1);
  font-weight: var(--fw-medium);
}
.os-history-import__row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}
.os-history-import__row > label:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.os-project-trash-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}
.os-project-remove {
  color: var(--semantic-negative-line);
}
/* 同一窗口承载看图/直接生图/历史，保留全站中性Workbench语态。 */
.os-image-studio[open] {
  display: flex;
  flex-direction: column;
  width: var(--history-panel-width);
  max-width: var(--content-page);
  height: var(--history-panel-height);
  max-height: var(--history-panel-height);
  overflow: hidden;
}
.os-image-studio .os-authoring-dialog__head h2 {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-image-studio .os-authoring-dialog__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.os-image-studio__stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  gap: var(--space-4);
}
.os-image-studio__stage.has-history {
  grid-template-columns: minmax(0, 1fr) var(--image-studio-history-width);
}
.os-image-studio__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
}
.os-image-studio__preview > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.os-image-studio__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--text-secondary);
}
.os-image-studio__placeholder > .os-icon {
  height: var(--space-10);
  width: var(--space-10);
}
.os-image-studio__progress {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  overflow: hidden;
}
.os-image-studio__progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, var(--bg-input), transparent);
  animation: os-image-studio-wait var(--image-studio-loading-duration) var(--ease) infinite;
}
.os-image-studio__progress > * {
  position: relative;
}
.os-resource-task-progress {
  position: absolute;
  inset: 0 0 var(--control-h-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  font-size: var(--fs-caption);
}
.os-resource-task-progress::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, var(--bg-input), transparent);
  animation: os-image-studio-wait var(--image-studio-loading-duration) var(--ease) infinite;
}
.os-resource-task-progress > * {
  position: relative;
}
.os-image-studio__history-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2);
  border-radius: var(--radius-card);
  background: transparent;
  transition: background var(--transition);
}
.os-image-studio__history-entry:hover,
.os-image-studio__history-entry.is-selected {
  background: var(--bg-subtle);
}
.os-image-studio__history-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.os-image-studio__history-btn {
  flex: 1;
  min-width: 0;
  height: var(--control-h-sm);
  padding: 0 var(--space-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--fs-caption);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}
.os-image-studio__history-btn:hover:not(:disabled) {
  background: var(--bg-fill);
  border-color: var(--line-strong);
}
.os-image-studio__history-btn.is-active,
.os-image-studio__history-btn:disabled {
  border-color: transparent;
  background: var(--bg-fill);
  color: var(--text-secondary);
  cursor: default;
}
.os-image-studio__history-btn--secondary {
  background: transparent;
  border-color: var(--line);
}
.os-image-studio__history-empty {
  padding: var(--space-3) var(--space-2);
  color: var(--text-secondary);
}
.os-image-studio__history-more {
  width: 100%;
  height: var(--control-h-sm);
  font-size: var(--fs-caption);
}
@keyframes os-image-studio-wait {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .os-image-studio__progress::before {
    animation: none;
  }
  .os-resource-task-progress::before {
    animation: none;
  }
}
.os-image-studio__history {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  min-height: 0;
  overflow: auto;
}
.os-image-studio__history-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.os-image-studio__history-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
}
.os-image-studio__history-item:focus-visible {
  outline: none;
  background: var(--selection-surface);
}
.os-image-studio__history-item:focus-visible .os-image-studio__history-ver {
  font-weight: var(--fw-semibold);
}
.os-image-studio__history-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.os-image-studio__history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  padding: 0 var(--space-1);
}
.os-image-studio__history-ver {
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-image-studio__form {
  display: flex;
  flex-direction: column;
  flex: none;
  gap: var(--space-2);
  padding-top: var(--space-3);
}
.os-image-studio__controls,
.os-image-studio__footer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.os-image-studio__controls > .os-select {
  height: var(--control-h);
  min-width: 0;
  width: var(--image-studio-select-width);
  flex: none;
}
.os-image-studio__controls > .os-image-studio__composition {
  width: auto;
  min-width: var(--image-studio-select-width);
}
.os-studio-model-picker {
  position: relative;
  width: var(--image-studio-model-width);
  min-width: 0;
}
.os-studio-model-picker > .os-select {
  width: 100%;
  height: var(--control-h);
  padding-inline-start: calc(var(--space-3) + var(--icon-inline) + var(--space-2));
}
.os-studio-model-picker > .os-media-model-logo {
  position: absolute;
  inset-inline-start: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.os-studio-model-option {
  display: grid;
  grid-template-columns: var(--icon-inline) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-2);
}
.os-studio-model-picker > .os-media-model-logo,
.os-studio-model-option .os-media-model-logo {
  width: var(--icon-inline);
  height: var(--icon-inline);
}
.os-select-menu:has(.os-studio-model-option) {
  width: min(var(--project-model-menu-width), calc(100vw - var(--space-6)));
}
.os-select-menu__option:has(.os-studio-model-option) {
  height: var(--project-model-row-height);
  box-sizing: border-box;
}
.os-studio-model-option__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--files-seg-inset);
  min-width: 0;
  height: var(--control-h);
  font-size: var(--fs-body-sm);
  line-height: var(--lh-ui);
  text-align: start;
}
.os-studio-model-option__text > span {
  transition: transform var(--dur) var(--ease);
}
.os-studio-model-option__text:has(small) > span {
  transform: translateY(calc((var(--fs-micro) * var(--lh-ui) + var(--files-seg-inset)) / 2));
}
.os-studio-model-option small {
  font-size: var(--fs-micro);
  color: var(--text-secondary);
  visibility: hidden;
  opacity: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--dur) var(--ease);
}
.os-select-menu__option:is(:hover, :focus-visible, .is-active) .os-studio-model-option small {
  visibility: visible;
  opacity: 1;
}
.os-select-menu__option:is(:hover, :focus-visible, .is-active) .os-studio-model-option__text:has(small) > span {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .os-studio-model-option__text > span,
  .os-studio-model-option small {
    transition: none;
  }
}
.os-image-studio__controls > .os-icon-btn {
  margin-left: auto;
}
/* 输入框内的图片引用保持为原子标签；底栏透明悬浮在输入框内，释放全部可见编辑空间。 */
.os-image-studio__composer {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-input);
  background: var(--bg-input);
  overflow: hidden;
  min-height: 0;
}
.os-image-prompt__chip {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  max-width: var(--image-prompt-chip-width);
  padding: 0 var(--space-2);
  margin: 0 var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--image-reference-bg);
  color: var(--image-reference-ink);
  font-size: inherit;
  line-height: var(--lh-ui);
  white-space: nowrap;
  vertical-align: baseline;
  cursor: grab;
}
.os-image-prompt__chip-icon,
.os-image-prompt__remove {
  align-self: center;
  height: var(--icon-inline);
  width: var(--icon-inline);
  flex: none;
}
.os-image-prompt__remove {
  position: absolute;
  left: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.os-image-prompt__remove .os-icon {
  width: 100%;
  height: 100%;
}
.os-image-prompt__chip:hover .os-image-prompt__remove,
.os-image-prompt__chip:focus-within .os-image-prompt__remove {
  opacity: 1;
  pointer-events: auto;
}
.os-image-prompt__chip:hover .os-image-prompt__chip-icon,
.os-image-prompt__chip:focus-within .os-image-prompt__chip-icon {
  opacity: 0;
}
.os-image-prompt__name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-image-prompt__caret {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--image-prompt-peek-layer);
  width: var(--image-prompt-caret-width);
  background: var(--image-reference-ink);
  pointer-events: none;
}
.os-image-prompt__caret::before,
.os-image-prompt__caret::after {
  content: "";
  position: absolute;
  left: calc(-1 * var(--image-prompt-caret-width));
  width: calc(var(--image-prompt-caret-width) * 3);
  height: var(--image-prompt-caret-width);
  background: inherit;
}
.os-image-prompt__caret::before {
  top: 0;
}
.os-image-prompt__caret::after {
  bottom: 0;
}
.os-image-prompt__peek {
  position: fixed;
  z-index: var(--image-prompt-peek-layer);
  width: var(--image-prompt-peek-width);
  height: var(--image-prompt-peek-height);
  padding: var(--space-2);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  box-shadow: var(--shadow-pop);
  pointer-events: none;
  animation: os-fade-in var(--dur) var(--ease);
}
.os-image-prompt__peek > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.os-image-studio.is-reference-dragging .os-image-studio__preview {
  outline: var(--stroke) dashed var(--text-secondary);
  outline-offset: calc(-1 * var(--space-2));
}
.os-image-studio__prompt {
  width: 100%;
  height: calc(var(--image-studio-prompt-height) + var(--space-12));
  border: 0;
  outline: none;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: var(--space-3) var(--space-3) var(--space-4);
  color: var(--text-primary);
  background: transparent;
  font: inherit;
  line-height: var(--lh-prose);
  -webkit-mask-image: linear-gradient(to bottom, currentColor calc(100% - var(--space-4)), transparent);
  mask-image: linear-gradient(to bottom, currentColor calc(100% - var(--space-4)), transparent);
}
.os-image-studio__form > .os-authoring-error {
  min-height: calc(var(--fs-caption) * var(--lh-ui));
  margin: 0;
  font-size: var(--fs-caption);
}
.os-image-studio__form > .os-authoring-error:empty {
  display: block;
}
.os-image-studio__controls {
  flex-wrap: wrap;
}
.os-image-studio__style-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-h);
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
}
.os-image-studio__style-label {
  flex: none;
  font-size: var(--fs-caption);
  color: var(--text-secondary);
  white-space: nowrap;
}
.os-image-studio__style-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.os-image-studio__style-chip {
  height: var(--control-h-sm);
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--fs-caption);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition),
    color var(--transition);
}
.os-image-studio__style-chip:hover:not(:disabled) {
  background: var(--bg-fill);
}
.os-image-studio__style-chip--custom {
  background: transparent;
  color: var(--text-secondary);
}
.os-image-studio__style-chip--custom:hover:not(:disabled) {
  background: var(--bg-input);
  color: var(--text-primary);
}
.os-image-studio__style-chip--confirm {
  background: var(--cta-solid);
  color: var(--cta-text);
}
.os-image-studio__style-chip--confirm:hover:not(:disabled) {
  background: var(--cta-solid-hover);
}
.os-image-studio__style-chip:disabled {
  opacity: var(--project-upload-complete-opacity);
  cursor: default;
}
.os-image-studio__style-custom {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  min-width: 0;
}
.os-image-studio__style-input {
  flex: 1;
  min-width: 0;
  height: var(--control-h-sm);
  padding: 0 var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--fs-caption);
  outline: none;
}
.os-image-studio__style-input:focus {
  border-color: var(--line-strong);
}
.os-image-studio__style-close {
  flex: none;
  width: var(--control-h-sm);
  height: var(--control-h-sm);
  margin-left: auto;
}
.os-image-studio__prompt:empty::before {
  content: attr(data-placeholder);
  color: var(--text-secondary);
  pointer-events: none;
}
.os-image-studio__footer {
  flex: none;
  justify-content: space-between;
  padding: 0 var(--space-3) var(--space-2);
  background: transparent;
}
.os-image-studio__footer > .os-image-studio__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: var(--control-h);
  width: auto;
  padding: 0 var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}
.os-image-studio__send-cost {
  font-variant-numeric: tabular-nums;
}
.os-image-studio.is-prompt-expanded .os-image-studio__stage {
  display: none;
}
.os-image-studio.is-prompt-expanded .os-image-studio__form {
  flex: 1;
  min-height: 0;
}
.os-image-studio.is-prompt-expanded .os-image-studio__composer {
  flex: 1;
}
.os-image-studio.is-prompt-expanded .os-image-studio__prompt {
  flex: 1;
  min-height: 0;
}
.os-project-asset .os-project-card__select {
  top: var(--space-2);
  left: var(--space-2);
  width: var(--selection-hit);
  height: var(--selection-hit);
  border-radius: var(--selection-radius);
}
.os-image-studio__history-actions {
  flex-wrap: wrap;
}
.os-image-studio__history-btn {
  flex-basis: max-content;
}

.os-image-studio .os-authoring-dialog__body[hidden] {
  display: none;
}

/* 项目以胶片叠层标记；单张图片以一幅风景相片标记。 */
.os-media-placeholder {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--placeholder-ink);
  background: var(--bg-subtle);
}
.os-media-placeholder--cover {
  color: var(--placeholder-ink);
  background:
    radial-gradient(
        circle,
        color-mix(in srgb, var(--placeholder-ink) 23%, transparent) calc(var(--project-cover-gap) * 0.65),
        transparent calc(var(--project-cover-gap) * 0.9)
      )
      center / var(--space-2) var(--space-2),
    var(--bg-subtle);
}
.os-media-placeholder--cover::before,
.os-media-placeholder--cover > i {
  content: "";
  position: absolute;
  display: block;
  width: 20%;
  max-width: 84px;
  aspect-ratio: 1.36;
  border-radius: 12%;
  box-sizing: border-box;
}
.os-media-placeholder--cover::before {
  transform: translate(-9%, -9%) rotate(-13deg);
  background: linear-gradient(150deg, var(--line-strong), var(--character-control-bg) 82%);
  border-top: 1px solid color-mix(in srgb, currentColor 32%, transparent);
}
.os-media-placeholder--cover > i {
  transform: translate(8%, 10%) rotate(5deg);
  background: linear-gradient(150deg, var(--character-surface-hover), var(--character-surface-active));
  border: 1px solid color-mix(in srgb, currentColor 40%, transparent);
}
.os-media-placeholder--cover > i::before {
  content: "";
  position: absolute;
  inset: 20% 12% 22%;
  border-radius: 6%;
  background: linear-gradient(145deg, var(--placeholder-ink), var(--character-control-hover));
}
.os-media-placeholder--cover > i::after {
  content: "";
  position: absolute;
  inset: auto 12% 10%;
  height: 5%;
  background: repeating-linear-gradient(to right, currentColor 0 10%, transparent 10% 22%);
  opacity: 0.7;
}
.os-media-placeholder--image {
  background: var(--bg-subtle);
}
.os-media-placeholder__photo {
  display: grid;
  width: clamp(26px, 35%, 76px);
  max-width: 80%;
  aspect-ratio: 1.34;
  padding: clamp(var(--files-seg-inset), 1.1%, var(--space-1));
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--text-muted) 48%, transparent);
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  box-shadow: var(--shadow-card);
}
.os-media-placeholder__landscape {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius-xs) / 2);
  background: color-mix(in srgb, var(--text-muted) 14%, var(--bg-subtle));
}
.os-media-placeholder__landscape::before {
  content: "";
  position: absolute;
  top: 17%;
  right: 17%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text-secondary) 61%, var(--bg-subtle));
}
.os-media-placeholder__landscape::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 76%, 28% 38%, 47% 66%, 64% 47%, 100% 86%, 100% 100%, 0 100%);
  background: color-mix(in srgb, var(--text-secondary) 54%, var(--bg-subtle));
}
.os-projects[data-project-detail="false"] .os-projects__head {
  align-items: center;
  margin-bottom: var(--space-5);
}
.os-projects[data-project-detail="false"] .os-projects__inner {
  padding-bottom: var(--space-8);
}
.os-project-card__preview {
  border: 0;
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--border-hairline);
  transition: box-shadow var(--dur) var(--ease);
}
.os-project-card__preview[data-kind="cover"] .os-project-card__tile {
  display: block;
  height: 100%;
}
.os-project-card__open strong {
  font-weight: var(--fw-medium);
  margin-top: var(--space-1);
}
.os-project-card__open time {
  color: var(--text-secondary);
  font-size: var(--fs-caption);
}
.os-project-card__preview[data-kind="create"] {
  background: transparent;
  border: 1px dashed var(--line-strong);
}
.os-project-card__preview[data-kind="create"] .os-icon {
  padding: var(--space-2);
  box-sizing: content-box;
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
}
.os-authoring-dialog {
  box-shadow: var(--shadow-pop);
}
.os-authoring-dialog__head .os-section-title {
  margin: 0;
}
.os-authoring-dialog__head .os-icon-btn[aria-pressed="true"] {
  background: var(--selection-surface);
  color: var(--text-title);
}
.os-authoring-dialog:has(.os-authoring-form) .os-authoring-dialog__head,
.os-project-link-dialog .os-authoring-dialog__head,
.os-project-milestones-dialog .os-authoring-dialog__head {
  padding: var(--space-5) var(--space-6) var(--space-4);
}
.os-authoring-form {
  max-width: none;
}
.os-authoring-dialog .os-project-form-fields {
  gap: var(--space-4);
}
.os-authoring-dialog .os-project-form-fields :is(label, .os-project-metadata-field) {
  gap: var(--space-2);
  min-width: 0;
}
.os-authoring-dialog .os-project-form-fields label,
.os-authoring-dialog .os-field__label {
  color: var(--text-secondary);
  font-size: var(--fs-body-sm);
}
.os-authoring-dialog :is(.os-project-form-fields, .os-authoring-form) :is(input:not([type="checkbox"], [type="radio"], [type="file"]), textarea, .os-select),
.os-project-link-dialog input[type="search"],
.os-project-milestones-dialog input.os-input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: var(--dialog-field-height);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background-color: var(--field-active);
  padding-inline: var(--space-3);
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text-primary);
}
.os-authoring-dialog .os-project-form-fields textarea {
  min-height: calc(var(--dialog-field-height) * 1.8);
  padding-block: var(--space-2);
  resize: none;
}
.os-authoring-dialog .os-project-form-fields :is(input, textarea, .os-select):focus-visible,
.os-project-link-dialog input:focus-visible,
.os-project-milestones-dialog input:focus-visible {
  background-color: var(--field-active);
  outline: none;
  border-color: var(--keyboard-focus);
  box-shadow: none;
}
.os-authoring-form__actions {
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
}
.os-project-link-dialog {
  width: min(var(--content-settings), calc(100vw - var(--space-8)));
}
.os-project-link-dialog .os-asset-picker {
  overflow-y: auto;
  max-height: 54dvh;
  margin-top: var(--space-4);
}
.os-project-milestones-dialog:not(.os-history-window) {
  width: min(var(--content-settings), calc(100vw - var(--space-8)));
  height: auto;
}
.os-project-milestones-dialog form.os-authoring-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}
.os-project-milestones-dialog form.os-authoring-actions > :is(.os-input, .os-btn) {
  box-sizing: border-box;
  height: var(--dialog-field-height);
  min-height: var(--dialog-field-height);
  border-radius: var(--radius-sm);
  align-self: stretch;
}
.os-project-milestones-dialog form.os-authoring-actions > .os-btn {
  padding-block: 0;
}
.os-authoring-dialog__head .os-icon-btn:focus-visible {
  outline: none;
  background: var(--selection-surface);
  color: var(--text-title);
}
.os-project-milestones-dialog .os-project-empty {
  text-align: center;
  padding: var(--space-6);
  background: var(--bg-subtle);
  border-radius: var(--radius-card);
}
/* 同一个窗口和图片节点。只在点击时测量首末画幅，过渡期间只合成 transform 与 opacity。 */
.os-image-studio .os-image-studio__workspace {
  display: grid;
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: var(--space-5);
  row-gap: var(--space-3);
  min-height: 0;
}
.os-image-studio__workspace > .os-image-studio__stage {
  grid-area: 1 / 1 / 2 / -1;
  min-width: 0;
}
.os-image-studio__workspace > .os-image-studio__form {
  grid-area: 2 / 1 / 3 / -1;
}
.os-image-studio__form[hidden] {
  display: none;
}
.os-image-studio.is-prompt-expanded .os-image-studio__form {
  grid-row: 1 / -1;
}
.os-image-studio__workspace.os-file-character > .os-image-studio__stage {
  grid-column: 1;
}
.os-image-studio__workspace .os-image-studio__preview {
  background: transparent;
}
.os-image-studio__preview[data-moving] {
  overflow: visible;
  z-index: 2;
  pointer-events: none;
}
.os-image-studio__mat,
.os-image-studio__picture {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  border-radius: inherit;
}
.os-image-studio__mat {
  background: var(--bg-subtle);
}
.os-image-studio__preview > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.os-image-studio__picture {
  overflow: hidden;
}
.os-file-character__film {
  grid-area: 2 / 1 / 3 / 2;
  align-self: end;
}
.os-file-character__details {
  grid-area: 1 / 2 / 3 / 3;
}
.os-image-studio__workspace :is(.os-file-character__film, .os-file-character__details) {
  min-width: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    transform var(--dur-slow) var(--ease),
    opacity var(--dur) var(--ease),
    visibility 0s;
}
.os-image-studio__workspace:not(.os-file-character) :is(.os-file-character__film, .os-file-character__details) {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition-delay: 0s, 0s, var(--dur);
}
.os-image-studio__workspace:not(.os-file-character) .os-file-character__film {
  bottom: 0;
  transform: translateY(var(--space-2));
}
.os-image-studio__workspace:not(.os-file-character) .os-file-character__details {
  top: 0;
  transform: translateX(var(--space-3));
}
:is(.os-file-character__film, .os-file-character__details) > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
:is(.os-file-character__film, .os-file-character__details) h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}
:is(.os-file-character__film, .os-file-character__details) h3 .os-icon {
  color: var(--text-secondary);
}
.os-file-character__film {
  min-width: 0;
}
.os-file-character__views {
  overflow-x: auto;
  padding-block: var(--space-2);
}
.os-file-character__views .os-character-gallery__reorder {
  margin: 0;
}
.os-file-character__details {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--bg-subtle);
}
.os-file-character__details > header {
  flex: none;
}
.os-file-character__details .os-voice-dialog__body {
  flex: 1 0 auto;
  height: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  gap: var(--space-4);
}
.os-file-voice__library,
.os-file-voice__design {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
}
.os-file-voice__design {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-hairline);
}
.os-file-voice__design h4 {
  margin: 0;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}
.os-file-voice__library .os-voice-versions__list {
  max-height: min(25dvh, 200px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.os-file-voice__design .os-voice-design {
  display: grid;
  flex: 1 0 auto;
  grid-template-rows: minmax(min-content, 1.4fr) minmax(min-content, 1fr) auto;
}
.os-file-voice__design .os-voice-design__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.os-file-voice__design .os-voice-design__field > textarea {
  flex: 1 0 auto;
  height: auto;
  min-height: var(--dialog-field-height);
  overflow: auto;
}
.os-file-voice__design .os-voice-design__field > .os-voice-composer__input {
  min-height: 5.5em;
}
.os-file-voice__design .os-voice-design__field > .os-voice-sample-capsule__input {
  min-height: 3.8em;
}
.os-file-voice__design .os-voice-composer__foot {
  align-self: end;
}
@media (max-width: 760px) {
  .os-image-studio .os-image-studio__workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-image-studio .os-image-studio__workspace.os-file-character {
    grid-template-rows: auto auto auto;
    align-content: start;
    overflow-y: auto;
  }
  .os-file-character > .os-image-studio__stage {
    aspect-ratio: 16/9;
  }
  .os-file-character__film {
    grid-column: 1;
    grid-row: 2;
  }
  .os-file-character__details {
    grid-column: 1;
    grid-row: 3;
    max-height: none;
    overflow: visible;
  }
  .os-image-studio__workspace:not(.os-file-character) .os-file-character__details {
    grid-row: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .os-image-studio .os-image-studio__workspace :is(.os-file-character__film, .os-file-character__details) {
    transition: none;
    transform: none;
  }
}
.os-image-studio__controls {
  column-gap: var(--space-2);
}
.os-image-studio__composer {
  background: var(--field-active);
  border-color: var(--border-hairline);
}
.os-image-studio .os-image-studio__composer:focus-within {
  border-color: var(--border-hairline);
  box-shadow: none;
}
.os-image-studio__history-item[aria-pressed="true"] {
  background: var(--selection-surface);
}
.os-file-character__details .os-voice-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--space-20);
  padding: var(--space-4);
  gap: var(--space-3);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  color: var(--text-primary);
  background: var(--bg-input);
  transition:
    background-color var(--transition),
    border-color var(--transition);
}
.os-file-character__details .os-voice-drop:hover,
.os-file-character__details .os-voice-drop.is-drag-over {
  border-color: transparent;
  background: var(--selection-surface);
}
.os-file-character__details .os-voice-drop:focus-visible {
  outline: 2px solid var(--keyboard-focus);
  outline-offset: 2px;
}
.os-file-character__details .os-voice-drop .os-voice-wave {
  display: flex;
  flex: none;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  margin: 0 auto var(--space-1);
  height: var(--space-6);
}
.os-file-character__details .os-voice-wave__bar {
  background: var(--placeholder-ink);
}
.os-file-character__details .os-voice-drop__title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.os-file-character__details .os-voice-drop__meta {
  font-family: inherit;
  line-height: var(--lh-ui);
  text-align: center;
}
