.script-workspace {
  min-height: 680px;
}

.script-left {
  position: relative;
}

.script-left-scroll {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 4px;
}

.script-method-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:56px;
  padding:10px 38px 10px 12px;
  border:1px solid var(--hf-line);
  border-radius:var(--hf-r-control);
  background:var(--hf-surface);
}

.script-method-mark{
  width:34px;
  height:34px;
  flex:none;
  display:grid;
  place-items:center;
  border:1px solid var(--hf-line-soft);
  border-radius:10px;
  background:rgba(255,255,255,.08);
  color:var(--hf-text);
  font-size:10px;
  font-weight:720;
}

.script-method-copy{
  min-width:0;
  display:grid;
  gap:4px;
}

.script-method-copy strong{
  color:var(--hf-text);
  font-size:13px;
  font-weight:600;
}

.script-method-copy small{
  color:var(--hf-text-3);
  font-size:11px;
  line-height:1.35;
}

.script-method-lock{
  position:absolute;
  top:11px;
  right:11px;
  color:rgba(255,255,255,.42);
}

.script-method-lock svg{
  width:13px;
  height:13px;
}

.script-detail-list{
  display:grid;
  gap:1px;
  overflow:hidden;
  border:1px solid var(--hf-line-soft);
  border-radius:11px;
  background:var(--hf-line-soft);
}

.script-detail-row{
  min-height:51px;
  padding:9px 13px;
  display:flex;
  align-items:center;
  background:var(--hf-surface);
}

.script-detail-row > span{
  width:100%;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.script-detail-row small{
  color:var(--hf-text-3);
  font-size:10.5px;
}

.script-detail-row strong{
  max-width:64%;
  overflow:hidden;
  color:var(--hf-text);
  font-size:10.5px;
  font-weight:600;
  text-align:right;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.script-left-footer{
  display:grid;
  gap:10px;
}

.script-cost-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#8d949c;
  font-size:10px;
}

.script-cost-summary > strong{
  display:inline-flex;
  align-items:baseline;
  gap:3px;
  color:#fff;
}

.script-cost-summary svg{
  width:12px;
  height:12px;
  color:#fff;
}

.script-cost-summary b{
  font-size:14px;
  font-weight:760;
}

.script-cost-summary small{
  color:#a4aab1;
  font-size:9px;
}

.script-breakdown-body .script-submit{
  width:100%;
  height:49px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  border:0;
  color:#141518;
  background-color:#fff;
  background-image:linear-gradient(180deg,#fff 0%,#e4e7eb 100%);
  box-shadow:none;
}

.script-breakdown-body .script-submit:hover:not(:disabled){
  color:#141518;
  background-color:#fff;
  background-image:linear-gradient(180deg,#fff 0%,#daddE3 100%);
}

.script-breakdown-body .script-submit:disabled{
  color:rgba(255,255,255,.4);
  background-color:#3d4044;
  background-image:none;
  opacity:1;
}

.script-breakdown-body .script-submit.is-loading:disabled{
  color:#141518;
  background-color:#fff;
  background-image:linear-gradient(180deg,#fff 0%,#e4e7eb 100%);
}

.script-submit-arrow{
  width:16px;
  height:16px;
}

.script-breakdown-body .script-submit .ugc-submit-loading{
  border-color:rgba(20,21,24,.18);
  border-top-color:#141518;
}

.script-upload-card {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.script-upload-zone {
  width: 100%;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.script-upload-zone:hover,
.script-upload-zone:focus-visible,
.script-upload-zone.is-dragging {
  outline: none;
  background: rgba(255, 255, 255, 0.045);
}

.script-upload-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 3px;
}

.script-upload-stack > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.62);
}

.script-upload-stack svg {
  width: 16px;
  height: 16px;
}

.script-upload-zone > strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 550;
}

.script-upload-zone > span:last-child {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
  line-height: 1.5;
}

.script-video-preview {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 78px;
  padding: 8px 10px;
}

.script-video-preview[hidden],
.script-upload-zone[hidden] {
  display: none;
}

.script-video-file {
  display: grid;
  gap: 4px;
  min-height: 64px;
  justify-content: center;
  padding: 8px 52px 8px 14px;
}

.script-video-file strong {
  overflow: hidden;
  color: #f2f6f4;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-video-file span,
.script-optional {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.script-video-remove {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(15, 17, 19, 0.84);
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  transform: translateY(-50%);
}

.script-video-remove:hover {
  border-color: rgba(255, 111, 111, 0.45);
  color: #ff8585;
}

.script-video-remove svg {
  width: 17px;
  height: 17px;
}

.script-model-select .ugc-model-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: #eef3ef;
  font-size: 11px;
  font-weight: 760;
}

.script-model-select {
  position: relative;
  z-index: 70;
}

.script-model-select .ugc-select-trigger {
  min-height: 54px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.script-model-select .ugc-select-trigger:hover,
.script-model-select .ugc-select-trigger.is-open {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.045);
}

.script-model-select .ugc-select-menu {
  z-index: 90;
  background: #17191c;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.58);
}

.script-prompt-section {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.script-prompt-box {
  min-height: 250px;
  flex: 1 1 auto;
}

.script-prompt-box textarea {
  height: 100% !important;
  min-height: 248px !important;
}

.script-submit-row {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 12px 0 2px;
  background: linear-gradient(180deg, transparent, #202124 30%);
}

.script-params-summary {
  min-width: 0;
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.64);
  font-size: 10.5px;
  white-space: nowrap;
}

.script-params-summary svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.script-params-summary > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.script-breakdown-cost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  white-space: nowrap;
}

.script-breakdown-cost svg {
  width: 14px;
  height: 14px;
  color: #d7ff66;
}

.script-breakdown-cost strong {
  color: #f5f8f3;
  font-size: 12px;
}

.script-submit-btn {
  width: 40px;
  height: 40px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f6f4;
  color: #1b1d1d;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.script-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.script-submit-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.script-submit-arrow {
  width: 18px;
  height: 18px;
}

.script-submit-spinner {
  width: 15px;
  height: 15px;
  display: none;
  border: 2px solid rgba(7, 15, 11, 0.2);
  border-top-color: #07110d;
  border-radius: 50%;
  animation: script-spin 0.75s linear infinite;
}

.script-submit-btn.is-loading .script-submit-spinner {
  display: block;
}

.script-submit-btn.is-loading .script-submit-arrow {
  display: none;
}

.script-right {
  min-width: 0;
  overflow: hidden;
}

.script-tabs-row {
  min-height: 54px;
}

.script-tabs-row .ugc-tab,
.script-tabs-row .ugc-tab.is-active,
.script-tabs-row .ugc-tab:focus,
.script-tabs-row .ugc-tab:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
}

.script-panel {
  height: 100%;
  overflow: hidden;
}

#script-panel-history {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.script-current-stage {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.45fr);
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.script-current-video {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  background: #050607;
}

.script-current-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.script-current-video > span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(4, 7, 6, 0.7);
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.script-current-structure {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.script-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.script-result-kicker,
.script-template-label {
  display: block;
  color: #87ead3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.script-result-head h2 {
  margin: 7px 0 5px;
  color: #f3f8f5;
  font-size: clamp(22px, 2.2vw, 30px);
}

.script-result-head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
}

.script-secondary-btn,
.script-history-btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.script-secondary-btn:hover,
.script-history-btn:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.script-result-empty {
  min-height: 360px;
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 11px;
  padding: 26px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.script-result-empty[hidden] {
  display: none;
}

.script-result-empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.script-result-empty-icon svg {
  width: 25px;
  height: 25px;
}

.script-result-empty strong {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.script-result-empty > span:last-child {
  max-width: 320px;
  font-size: 12px;
  line-height: 1.7;
}

.script-result-editor {
  width: 100%;
  min-height: 410px;
  flex: 1;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: #e8efeb;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  outline: none;
  resize: vertical;
}

.script-result-editor[hidden],
.script-result-actions[hidden] {
  display: none;
}

.script-result-formatted,
.script-history-preview {
  min-height: 0;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
  color: rgba(255, 255, 255, 0.68);
  scrollbar-width: thin;
}

.script-result-formatted {
  min-height: 410px;
  flex: 1;
  overflow: hidden;
  scrollbar-width: none;
}

.script-history-preview {
  max-height: none;
  overflow: hidden;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.script-result-formatted[hidden],
.script-history-preview[hidden] {
  display: none;
}

.formatted-script-section h3 {
  margin: 0 0 9px;
  color: #f1f6f2;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.03em;
}

.formatted-script-section > p {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.75;
}

.storyboard-list {
  display: grid;
  gap: 8px;
}

.clone-field-row {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.7;
}

.clone-field-row + .clone-field-row {
  margin-top: 3px;
}

.clone-field-row b {
  flex: none;
  color: #d7ff76;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.9;
}

.clone-field-row span {
  white-space: pre-wrap;
}

.storyboard-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.028);
}

.storyboard-time {
  color: #d7ff76;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.storyboard-fields {
  display: grid;
  gap: 4px;
}

.storyboard-fields p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10.5px;
  line-height: 1.55;
}

.storyboard-fields b {
  display: inline-block;
  min-width: 34px;
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.script-example-formatted {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding: 10px 12px 14px;
  overflow: hidden;
  scrollbar-width: none;
}

.script-example-formatted .clone-field-row {
  padding: 4px 0;
}

.script-example-formatted .clone-field-row + .clone-field-row {
  margin-top: 7px;
}

.script-example-formatted .formatted-script-section h3 {
  color: #d7ff76;
  font-size: 10px;
}

.script-example-formatted .formatted-script-section > p,
.script-example-formatted .storyboard-fields p {
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.script-example-formatted .storyboard-row {
  grid-template-columns: 64px minmax(0, 1fr);
  padding: 8px;
}

.script-result-editor:focus {
  box-shadow: 0 0 0 2px rgba(140, 235, 210, 0.24);
}

.script-result-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.script-save-state {
  margin-right: auto;
  color: rgba(255, 255, 255, 0.44);
  font-size: 12px;
}

.script-primary-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  background: #d9ff72;
  color: #12170a;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.script-case-list {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 1040px;
  margin: 8px auto 0;
}

.script-case-card {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.42fr);
  grid-auto-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: 10px 0;
}

.script-case-card:hover {
  background: transparent;
}

.script-case-video {
  position: relative;
  min-width: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: 12px;
  background: #050607;
}

.script-case-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.script-case-video > span {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(4, 7, 6, 0.66);
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.script-case-template {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 15px;
  padding: 18px 16px 18px 4px;
}

.script-case-template strong {
  color: #f4f8f5;
  font-size: clamp(17px, 1.8vw, 22px);
}

.script-case-template .script-example-title {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.script-case-template p {
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.9;
}

.script-history-list {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 4px 0 0;
}

.script-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: height .3s ease, padding .3s ease, opacity .22s ease;
}

.script-history-card.has-video {
  grid-template-columns: 112px minmax(0, 1fr);
}

.script-history-media-column {
  position: relative;
  min-width: 0;
}

.script-history-media-column video {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  max-height: 220px;
  border-radius: 10px;
  background: #050607;
  object-fit: cover;
}

.script-history-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(12, 14, 16, 0.72);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.script-history-play:hover {
  background: #ff2d68;
}

.script-history-play svg {
  width: 17px;
  height: 17px;
  margin-left: 2px;
}

.script-history-play[hidden] {
  display: none;
}

.script-history-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.script-history-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.script-history-copy strong {
  overflow: hidden;
  color: #f3f7f4;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.script-history-meta span {
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: var(--hf-surface);
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.script-history-meta span.is-running,
.script-history-meta span.is-status {
  color: #ff8ab2;
  background: rgba(255, 45, 104, 0.16);
}

.script-history-meta span.is-error {
  color: #ff7979;
  background: rgba(255, 82, 82, 0.13);
}

.script-history-progress {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.script-history-progress strong {
  font-size: 12px;
  font-weight: 550;
}

.script-history-progress.is-failed strong {
  color: #ff8585;
}

.script-history-editor {
  width: 100%;
  min-height: 170px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: #e7ede9;
  font: 12px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  resize: vertical;
  outline: none;
}

.script-history-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.script-history-btn.is-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ff466f, #ff2d68);
  box-shadow: 0 6px 18px rgba(255, 45, 104, 0.2);
  color: #fff;
}

.script-history-btn.is-primary:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #ff5c81, #ff3d74);
  color: #fff;
}

.script-history-btn.is-danger:hover {
  border-color: rgba(255, 119, 119, 0.35);
  color: #ff8d8d;
}

.script-history-btn.is-deleting {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: progress;
  color: #ffb3ac;
  background: rgba(255, 113, 100, 0.14);
  border-color: rgba(255, 113, 100, 0.34);
}

.script-history-btn.is-deleting:disabled {
  opacity: 1;
}

.script-history-btn.is-deleting::before {
  width: 11px;
  height: 11px;
  flex: none;
  border: 2px solid rgba(255, 179, 172, 0.32);
  border-top-color: #ffb3ac;
  border-radius: 50%;
  content: "";
  animation: script-spin 0.7s linear infinite;
}

.script-history-card.is-deleting {
  opacity: 0.55;
  pointer-events: none;
}

.script-history-card.is-removing {
  overflow: hidden;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
}

.script-history-empty,
.script-history-skeleton {
  min-height: 130px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
}

.script-history-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px;
  color: rgba(255, 255, 255, 0.44);
  text-align: center;
}

.script-history-empty strong {
  color: rgba(255, 255, 255, 0.72);
}

.script-history-skeleton {
  position: relative;
  overflow: hidden;
}

.script-history-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.06) 48%, transparent 76%);
  content: "";
  transform: translateX(-100%);
  animation: script-shimmer 1.3s infinite;
}

.script-history-more {
  display: flex;
  justify-content: center;
  padding: 18px 0 0;
}

@keyframes script-spin {
  to { transform: rotate(360deg); }
}

@keyframes script-shimmer {
  to { transform: translateX(100%); }
}

/* 拆解记录去掉内容卡片外壳，直接使用舞台宽度；大屏继续放大视频和文字栏。 */
@media (min-width: 1601px) {
  .script-history-card.has-video {
    grid-template-columns: clamp(150px, 12vw, 220px) minmax(0, 1fr);
    gap: clamp(18px, 2vw, 36px);
  }

  .script-history-media-column video {
    max-height: none;
  }
}

@media (max-width: 980px) {
  .script-case-card {
    grid-template-columns: minmax(150px, 0.65fr) minmax(220px, 1fr);
  }

  .script-current-stage {
    grid-template-columns: minmax(180px, 0.72fr) minmax(220px, 1.28fr);
  }
}

@media (max-width: 720px) {
  .script-main {
    padding-bottom: 44px;
  }

  .script-upload-zone {
    min-height: 144px;
    padding: 22px 16px;
  }

  .script-submit-row {
    padding-top: 14px;
  }

  .script-breakdown-cost {
    margin-left: auto;
  }

  .script-submit-btn {
    width: 40px;
    height: 40px;
  }

  .script-params-summary {
    flex: 1;
  }

  .script-current-stage {
    min-height: calc(100dvh - 210px);
    grid-template-columns: minmax(0, 1fr);
    padding: 14px;
  }

  .script-current-video {
    max-height: 350px;
    justify-self: center;
    max-width: 230px;
  }

  .script-current-structure {
    min-height: 360px;
  }

  .script-result-head {
    align-items: flex-start;
  }

  .script-result-head p {
    display: none;
  }

  .script-result-editor {
    min-height: 300px;
  }

  .script-case-card {
    grid-template-columns: minmax(112px, 0.55fr) minmax(0, 1.45fr);
    gap: 9px;
    padding: 10px;
  }

  .script-case-video {
    max-height: 240px;
  }

  .script-case-template {
    gap: 8px;
    padding: 7px 4px 7px 0;
  }

  .script-case-template strong {
    font-size: 14px;
  }

  .script-case-template p {
    font-size: 10px;
    line-height: 1.75;
  }

  .script-history-card.has-video {
    grid-template-columns: 86px minmax(0, 1fr);
  }
}
