/* VSHI workspace density and live task states — 2026-07-26 */
.creator-page {
  min-height: calc(100dvh - 62px);
  padding: clamp(10px, 1.1vh, 16px) clamp(18px, 2vw, 34px) 24px;
}

.creator-heading.is-topbar-mirrored,
.page-title.is-topbar-mirrored {
  display: none;
}

.creator-heading.is-topbar-mirrored > div,
.creator-heading.is-topbar-mirrored > span,
.creator-heading.is-topbar-mirrored > h1,
.creator-heading.is-topbar-mirrored > p,
.page-title.is-topbar-mirrored > div,
.page-title.is-topbar-mirrored > span,
.page-title.is-topbar-mirrored > h1,
.page-title.is-topbar-mirrored > p {
  display: none;
}

.topbar-page-heading {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 820px;
  margin: 0 clamp(18px, 3vw, 52px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: baseline;
  column-gap: 12px;
  overflow: hidden;
}

.topbar-page-heading > span {
  grid-column: 1;
  grid-row: 1;
  color: #d9b65f;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .2em;
  white-space: nowrap;
}

.topbar-page-heading h1 {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #e6e0d5;
  font: 500 clamp(18px, 1.35vw, 25px)/1.12 Georgia, "Songti SC", serif;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-page-heading p {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  margin: 2px 0 0;
  overflow: hidden;
  color: #77776f;
  font-size: 9px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-page-action,
.topbar-page-role {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  margin-left: 12px;
  white-space: nowrap;
}

.topbar-page-action {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #494238;
  border-radius: 6px;
  background: #12120f;
  color: #cdb773;
  font-size: 10px;
}

.topbar-page-role {
  color: #cdb773;
  font-size: 10px;
  font-style: normal;
}

.creator-heading {
  min-height: 48px;
  margin-bottom: 10px;
  align-items: center;
}

.creator-heading > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 14px;
}

.creator-heading > div > span {
  grid-column: 1;
  grid-row: 1;
  font-size: 8px;
}

.creator-heading h1 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: clamp(25px, 1.85vw, 36px);
  line-height: 1.1;
}

.creator-heading p {
  grid-column: 2;
  grid-row: 2;
  margin-top: 3px;
  font-size: clamp(11px, .68vw, 13px);
}

.workbench {
  grid-template-columns: minmax(0, 2.12fr) minmax(350px, .78fr);
  gap: clamp(12px, 1vw, 18px);
}

.creator-page .drop-target {
  min-height: clamp(74px, 8vh, 100px);
}

.creator-page .media-grid {
  width: 100%;
  max-height: none;
  flex-wrap: wrap;
  overflow: visible;
  align-content: flex-start;
}

.creator-page .media-grid article {
  flex: 0 0 94px;
}

.composer-panel,
.task-panel {
  height: max(656px, calc(100dvh - 88px));
  min-height: max(656px, calc(100dvh - 88px));
}

.composer-panel {
  display: flex;
  flex-direction: column;
}

.composer-panel > .media-drop,
.composer-panel > .control-row,
.composer-panel > .submit-bar {
  flex: 0 0 auto;
}

.composer-panel > .prompt-box {
  flex: 1 1 auto;
  min-height: 258px;
  display: flex;
  flex-direction: column;
}

.composer-panel .prompt-editor-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.composer-panel .prompt-editor-shell textarea {
  height: 100%;
  max-height: none;
}

.creator-page .section-line {
  min-height: 34px;
}

.task-panel {
  padding: 14px 15px;
  overflow: hidden;
}

.panel-heading {
  align-items: center;
  padding-bottom: 9px;
}

.panel-heading > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
}

.panel-heading span {
  grid-column: 1;
  grid-row: 1;
  font-size: 8px;
}

.panel-heading h2 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 19px;
}

.task-panel-meta {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgb(217 182 95 / 28%);
  border-radius: 999px;
  background: rgb(217 182 95 / 7%);
  color: #d9b65f;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
}

.task-panel-meta::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #d9b65f;
  box-shadow: 0 0 0 4px rgb(217 182 95 / 8%);
}

.task-body {
  gap: 8px;
  padding: 10px 0 8px;
}

.task-preview {
  border-radius: 9px;
}

img.media-type-corrected {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090a0b;
}

.task-center-preview img.media-type-corrected {
  object-fit: cover;
}

.task-body dl div {
  padding: 6px 0;
}

.task-retention-note {
  display: none;
}

.task-actions {
  gap: 6px;
}

.task-actions button,
.task-actions a {
  min-height: 32px;
  padding: 0 10px;
}

.task-actions .task-works-button {
  border-color: #80693d;
  color: #e0c474;
}

.task-panel-history {
  min-height: 0;
  flex: 1 1 auto;
  margin: 4px 0 9px;
  padding-top: 9px;
  display: flex;
  flex-direction: column;
}

.task-panel-history > header {
  margin-bottom: 6px;
}

.task-panel-history > div {
  flex: 1 1 auto;
  max-height: none;
  min-height: 124px;
}

.task-panel-history > div > button {
  padding: 7px 8px;
}

.task-panel > .panel-note {
  flex: 0 0 auto;
  padding: 8px 10px;
}

.task-processing-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0b0d0f;
}

.task-processing-layer::before {
  content: "";
  position: absolute;
  inset: -35% -20%;
  inset: 24%;
  border-radius: 50%;
  background: rgb(211 174 88 / 8%);
  box-shadow: 0 0 56px 24px rgb(211 174 88 / 7%);
  animation: vshi-task-breathe 2.8s ease-in-out infinite;
}

.task-processing-core {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(211 174 88 / 24%);
  border-radius: 50%;
  color: #d9b65f;
}

.task-processing-core::before,
.task-processing-core::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

.task-processing-core::before {
  inset: 10px;
  border-top-color: #d9b65f;
  border-right-color: rgb(217 182 95 / 30%);
  animation: vshi-task-spin 1.8s linear infinite;
}

.task-processing-core::after {
  inset: 22px;
  border-bottom-color: rgb(217 182 95 / 65%);
  animation: vshi-task-spin 2.5s linear infinite reverse;
}

.task-processing-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #77776f;
}

.task-processing-copy strong {
  color: #e5d4a5;
  font-size: 13px;
  font-weight: 500;
}

.task-processing-copy em {
  display: none;
}

.task-panel.is-processing .status-pill {
  z-index: 3;
  animation: vshi-status-pulse 1.8s ease-in-out infinite;
}

.task-panel.is-processing .progress i {
  position: relative;
  overflow: hidden;
  transition: width 1s linear;
}

.task-panel.is-processing .progress i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 22%;
  background: rgb(255 255 255 / 38%);
  animation: vshi-progress-sweep 1.5s linear infinite;
}

.history-dot.running {
  animation: vshi-status-pulse 1.4s ease-in-out infinite;
}

@keyframes vshi-task-spin { to { transform: rotate(360deg); } }
@keyframes vshi-task-breathe { 50% { opacity: .42; transform: scale(.9); } }
@keyframes vshi-status-pulse { 50% { opacity: .42; box-shadow: 0 0 0 5px rgb(217 182 95 / 8%); } }
@keyframes vshi-progress-sweep { from { transform: translateX(-110%); } to { transform: translateX(110%); } }

.vshi-switching-out {
  pointer-events: none;
  animation: vshi-switch-out 120ms ease-out forwards;
  will-change: opacity, filter, transform;
}

.vshi-switching-in {
  animation: vshi-switch-in 180ms ease-out both;
}

@keyframes vshi-switch-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  to {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(-3px);
  }
}

@keyframes vshi-switch-in {
  from {
    opacity: 0;
    filter: blur(2px);
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .topbar-page-heading {
    margin: 0 16px;
  }
  .topbar-page-heading > span,
  .topbar-page-heading p {
    display: none;
  }
  .topbar-page-heading h1 {
    grid-column: 1 / 3;
    font-size: 18px;
  }
  .creator-heading > div {
    grid-template-columns: 1fr;
  }
  .creator-heading > div > span,
  .creator-heading h1,
  .creator-heading p {
    grid-column: 1;
  }
  .creator-heading > div > span { grid-row: 1; }
  .creator-heading h1 { grid-row: 2; }
  .creator-heading p { grid-row: 3; }
  .workbench { grid-template-columns: minmax(0, 1fr) minmax(320px, .58fr); }
}

@media (max-width: 900px) {
  .topbar-page-heading {
    margin: 0 10px;
  }
  .topbar-page-heading h1 {
    font-size: 16px;
  }
  .creator-page { padding: 10px 12px 22px; }
  .creator-heading { min-height: 42px; }
  .creator-heading p { display: none; }
  .workbench { grid-template-columns: 1fr; }
  .composer-panel,.task-panel { height: auto; min-height: auto; }
  .task-panel { min-height: 600px; }

  .creator-page .media-grid article {
    flex-basis: 88px;
    width: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-processing-layer::before,
  .task-processing-core::before,
  .task-processing-core::after,
  .task-panel.is-processing .status-pill,
  .task-panel.is-processing .progress i::after,
  .history-dot.running,
  .vshi-switching-out,
  .vshi-switching-in { animation: none !important; }
}
.asset-save-permanent {
  margin-top: 10px;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(211, 169, 84, 0.55);
  border-radius: 9px;
  color: #efd187;
  background: rgba(211, 169, 84, 0.08);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.asset-save-permanent:hover {
  border-color: #d3a954;
  background: rgba(211, 169, 84, 0.16);
  transform: translateY(-1px);
}
