.auto-button {
  height: 40px;
  border: 1px solid #b7d4cf;
  background: #fff;
  color: var(--teal);
  border-radius: 5px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.auto-button:hover,
.auto-button.active {
  background: var(--teal-soft);
  border-color: var(--teal);
}
.auto-button.active {
  color: var(--teal-dark);
}
.auto-button svg {
  width: 16px;
}
.rules-inline {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf0ef;
}
.rules-inline-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 11px;
}
.rules-inline-title small {
  font-size: 10px;
  color: var(--muted);
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.rules-grid label > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #485256;
  margin-bottom: 7px;
}
.rules-grid textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  outline: 0;
}
.rules-grid textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 120, 0.1);
}
.settings-dialog .rules-grid {
  display: none;
}
@media (max-width: 720px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }
}
.task-progress-inline {
  margin-top: 18px;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 15px;
  background: #f0f8f6;
  border: 1px solid #a9d8cf;
  border-radius: 6px;
}
.task-progress-inline div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.task-progress-inline strong {
  font-size: 12px;
}
.task-progress-inline small,
.task-progress-inline time {
  color: var(--muted);
  font-size: 10px;
}
.task-progress-inline time {
  font-variant-numeric: tabular-nums;
}
.task-error {
  display: block;
  color: #b34b4b;
  font-size: 10px;
  margin-top: 5px;
  font-style: normal;
}
.task-retry {
  display: block;
  color: #8a681f;
  font-size: 10px;
  margin-top: 4px;
  font-style: normal;
}
.profile-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-box label {
  font-size: 11px;
  font-weight: 700;
}
.profile-box textarea {
  width: 100%;
  font: inherit;
  font-size: 11px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  resize: vertical;
}
.profile-box .secondary-button {
  align-self: flex-end;
  height: 34px;
}
.video-form {
  display: grid;
  gap: 16px;
}
.video-form label > span,
.video-options label > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #485256;
  margin-bottom: 8px;
}
.video-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: 0;
}
.video-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 120, 0.1);
}
.video-options {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.video-options select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfc;
  padding: 0 10px;
  color: var(--ink);
}
.video-notice {
  margin-top: 16px;
  padding: 11px 13px;
  background: #fff6e6;
  border: 1px solid #efd39a;
  color: #7c5c1d;
  border-radius: 6px;
  font-size: 12px;
}
.video-task-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.video-task {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  background: #fff;
}
.video-task-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.video-task-head strong {
  color: var(--teal);
  font-size: 12px;
}
.video-task-head time {
  color: var(--muted);
  font-size: 10px;
}
.video-task p {
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0;
  color: #3f4b4e;
}
.video-preview {
  display: block;
  width: min(100%, 480px);
  max-height: 300px;
  background: #111;
  border-radius: 5px;
  margin: 10px 0;
}
@media (max-width: 620px) {
  .video-options {
    grid-template-columns: 1fr 1fr;
  }
  .video-options .run-button {
    grid-column: span 2;
  }
}
.echotik-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.echotik-actions select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 10px;
  background: #fff;
}
.echotik-table-wrap {
  overflow: auto;
  margin-top: 16px;
}
.echotik-table-wrap table {
  min-width: 640px;
}
.echotik-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin: 4px 0 16px;
  overflow: auto;
}
.echotik-tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.echotik-tabs button:hover,
.echotik-tabs button.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: var(--teal-soft);
}
.echotik-monitor {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  margin: 4px 0 10px;
  border: 1px solid var(--line);
  background: #f8fafb;
  font-size: 12px;
}
.echotik-monitor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 auto;
}
.echotik-monitor-dot.live {
  background: #0f9f78;
  box-shadow: 0 0 0 4px rgba(15, 159, 120, 0.12);
}
.echotik-monitor-dot.running {
  background: #e29a17;
  animation: pulse 1s infinite;
}
.echotik-monitor-dot.error {
  background: #d84a4a;
}
.echotik-monitor strong {
  font-size: 12px;
}
.echotik-monitor span:last-child {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.echotik-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}.echotik-kpi{border:1px solid var(--line);background:#fff;padding:15px;min-height:96px}.echotik-kpi span{display:block;color:var(--muted);font-size:12px;margin-bottom:8px}.echotik-kpi strong{font-size:22px;line-height:1.2;color:#17212b}.echotik-overview-wide{grid-column:span 2}.echotik-overview-wide ul{margin:8px 0 0;padding:0;list-style:none;display:grid;gap:7px}.echotik-overview-wide li{display:flex;justify-content:space-between;gap:12px;font-size:12px}.echotik-overview-empty{grid-column:1/-1;border:1px solid var(--line);background:#f8fafb;padding:20px;color:var(--muted)}@media(max-width:900px){.echotik-overview{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.echotik-overview{grid-template-columns:1fr}.echotik-overview-wide{grid-column:span 1}}
.echo-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.echo-product img,
.echo-no-image {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
  background: #eef1f0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 9px;
  flex: 0 0 auto;
}
.echo-product span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-reason {
  color: #b34b4b !important;
  font-size: 11px !important;
  margin-top: 6px !important;
  font-weight: 600;
}
.settings-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.ali-api-settings {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr 2fr 2fr 2fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}
.ali-api-settings input,
.ali-api-settings select {
  height: 40px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  outline: 0;
}
.ali-api-settings input:focus,
.ali-api-settings select:focus {
  border-color: #e98b24;
  box-shadow: 0 0 0 2px rgba(233, 139, 36, 0.12);
}
.ali-api-settings span {
  font-size: 11px;
  color: #a65308;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .ali-api-settings {
    grid-template-columns: 1fr;
  }
  .ali-api-settings span {
    white-space: normal;
  }
}
.extension-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #a65308;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.extension-download:hover {
  text-decoration: underline;
}
.extension-download svg {
  width: 14px;
  height: 14px;
}
.ali1688-control {
  margin-top: 26px;
  border-top: 3px solid #e98b24;
}
.api-badge.ali {
  color: #b45b05;
  background: #fff6e8;
  border-color: #f1c78f;
}
.api-badge.ali span {
  background: #ee8b22;
}
.ali1688-mode {
  display: flex;
  gap: 8px;
  margin: 20px 0 16px;
}
.ali1688-mode label {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.ali1688-mode label.active {
  border-color: #e98b24;
  color: #a65308;
  background: #fff7eb;
}
.ali1688-mode input {
  position: absolute;
  opacity: 0;
}
.ali1688-mode svg {
  width: 15px;
}
.ali1688-fields {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.ali1688-fields > label > span,
.ali1688-urls > span,
.ali1688-rule > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #485256;
  margin-bottom: 9px;
}
.ali1688-run {
  background: #d97516;
}
.ali1688-run:hover {
  background: #b85c08;
}
.ali1688-urls,
.ali1688-rule {
  display: block;
  margin-top: 14px;
}
.ali1688-urls textarea,
.ali1688-rule textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  resize: vertical;
  outline: 0;
}
.ali1688-rule small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}
.ali1688-urls textarea:focus,
.ali1688-rule textarea:focus {
  border-color: #e98b24;
  box-shadow: 0 0 0 2px rgba(233, 139, 36, 0.12);
}
.ali1688-results {
  margin-top: 18px;
}
.ali1688-results .table-wrap {
  min-height: 230px;
}
.ali1688-results th:first-child {
  width: 42%;
}
.ali1688-results th:nth-child(2) {
  width: 14%;
}
.ali1688-results th:nth-child(3) {
  width: 13%;
}
.ali1688-results th:nth-child(4) {
  width: 23%;
}
.ali1688-results th:nth-child(5) {
  width: 8%;
}
@media (max-width: 900px) {
  .ali1688-fields {
    grid-template-columns: 1fr 1fr;
  }
  .ali1688-run {
    grid-column: span 2;
  }
}
@media (max-width: 620px) {
  .ali1688-mode {
    display: grid;
    grid-template-columns: 1fr;
  }
  .ali1688-fields {
    grid-template-columns: 1fr;
  }
  .ali1688-run {
    grid-column: auto;
  }
}
.nav-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 24px;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}
.panel-heading h2 {
  margin-bottom: 5px;
}
.panel-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.panel-heading-actions .secondary-button { text-decoration: none; }
.panel-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.library-item {
  display: flex;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
}
.library-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 5px;
  background: #f1f3f2;
}
.library-item div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.library-item strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.library-item small,
.task-item small {
  color: var(--muted);
  font-size: 10px;
}
.links-list,
.tasks-list {
  display: grid;
  gap: 8px;
}
.link-item,
.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
}
.link-item:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.link-item svg {
  width: 16px;
  color: var(--teal);
}
.task-item div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.task-item > b {
  color: var(--teal);
  font-size: 13px;
}
.panel-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 30px;
  text-align: center;
}
@media (max-width: 900px) {
  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .library-grid {
    grid-template-columns: 1fr;
  }
}
.shop-collector-band {
  margin-top: 18px;
  border-top: 3px solid var(--teal);
}
.shop-heading-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.shop-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid #d4dcda;
  border-radius: 5px;
  background: #f3f5f4;
  color: #66716f;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.shop-state-badge svg {
  width: 14px;
  height: 14px;
}
.shop-state-badge.collected {
  border-color: #e4a7a7;
  background: #fff2f2;
  color: #b42323;
}
.shop-state-badge.running {
  border-color: #f0c77b;
  background: #fff8e8;
  color: #a65c00;
}
.shop-state-badge.running svg {
  animation: shop-spin 1.1s linear infinite;
}
.shop-state-badge.new {
  border-color: #d4dcda;
  background: #f3f5f4;
  color: #66716f;
}
@keyframes shop-spin {
  to {
    transform: rotate(360deg);
  }
}
.shop-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.shop-form label > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #485256;
  margin-bottom: 9px;
}
.shop-form input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 11px;
  font: inherit;
  font-size: 12px;
  outline: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.shop-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 120, 0.1);
}
.shop-form input.collected {
  border-color: #d46b6b;
  box-shadow: 0 0 0 2px rgba(180, 35, 35, 0.08);
}
.shop-form input.new {
  border-color: #b9c1bf;
}
.shop-form input.running {
  border-color: #e3a63c;
  box-shadow: 0 0 0 2px rgba(166, 92, 0, 0.08);
}
.shop-result {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f5faf8;
  border: 1px solid #b7d9d0;
  border-radius: 6px;
}
.shop-result strong {
  font-size: 12px;
}
.shop-result p {
  margin: 5px 0 0;
}
.shop-table-wrap {
  margin-top: 16px;
}
.shop-table-wrap th:first-child {
  width: 44%;
}
.shop-table-wrap th:nth-child(2) {
  width: 13%;
}
.shop-table-wrap th:nth-child(3) {
  width: 13%;
}
.shop-table-wrap th:nth-child(4) {
  width: 20%;
}
.shop-table-wrap th:nth-child(5) {
  width: 10%;
}
.shop-history-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 30px;
  padding: 22px 0 12px;
  border-top: 1px solid var(--line);
}
.shop-history-heading h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.shop-history-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.history-count {
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.shop-history-list {
  display: grid;
  gap: 8px;
}
.shop-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.shop-history-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.shop-history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.shop-history-title strong {
  max-width: min(48vw, 460px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.shop-history-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
}
.shop-history-status svg {
  width: 13px;
  height: 13px;
}
.shop-history-status.completed {
  color: #b42323;
}
.shop-history-status.partial {
  color: #a65c00;
}
.shop-history-status.failed {
  color: #6b7280;
}
.shop-history-url,
.shop-history-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.shop-history-reason {
  margin: 0;
  color: #a53b2d;
  font-size: 10px;
  line-height: 1.4;
}
.shop-history-download {
  height: 34px;
  flex: 0 0 auto;
  text-decoration: none;
  white-space: nowrap;
}
.shop-history-no-file {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .shop-heading-status {
    justify-content: flex-start;
    margin-top: 10px;
  }
  .shop-form {
    grid-template-columns: 1fr;
  }
  .shop-result {
    display: block;
  }
  .shop-result .download-button {
    margin-top: 10px;
  }
  .shop-history-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .shop-history-download {
    align-self: flex-end;
  }
  .shop-history-title strong {
    max-width: calc(100vw - 110px);
  }
}
.pdd-store-panel {
  border-top: 3px solid var(--teal);
}
.plugin-download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid #b7d9d0;
  border-radius: 7px;
  background: #f5faf8;
}
.plugin-download-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
}
.plugin-download-icon svg {
  width: 22px;
}
.plugin-download-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.plugin-download-copy strong {
  font-size: 13px;
  color: var(--ink);
}
.plugin-download-copy span,
.plugin-download-copy small {
  font-size: 11px;
  color: var(--muted);
}
.plugin-download-button {
  height: 40px;
  text-decoration: none;
  white-space: nowrap;
}
.plugin-guide {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.plugin-guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 13px;
}
.plugin-guide-head svg {
  width: 17px;
}
.plugin-guide ol {
  margin: 14px 0 0 20px;
  padding: 0;
  color: #3f4b4e;
  font-size: 12px;
  line-height: 1.9;
}
.plugin-guide code {
  padding: 2px 5px;
  border-radius: 3px;
  background: #eef3f2;
  color: #14645f;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}
.plugin-guide-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
@media (max-width: 620px) {
  .plugin-download-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .plugin-download-copy {
    flex-basis: calc(100% - 58px);
  }
  .plugin-download-button {
    margin-left: 58px;
  }
}
.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.workspace-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #b7d4cf;
  border-radius: 4px;
  background: #eef8f6;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .page-title {
    gap: 7px;
  }
  .workspace-badge {
    padding: 0 6px;
  }
}

/* Seedance video studio */
.video-connect-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.video-connect-fields input {
  height: 38px;
  border: 1px solid #d5c58c;
  border-radius: 5px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  background: #fff;
}
@media (max-width: 760px) {
  .video-connect-fields {
    grid-template-columns: 1fr;
  }
  .video-connect-fields .secondary-button {
    width: 100%;
    justify-content: center;
  }
}
.video-studio {
  padding: 0;
  overflow: hidden;
  border-top: 3px solid var(--teal);
}
.video-studio-head {
  min-height: 76px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.video-studio-head h2,
.video-studio-head p {
  margin: 0;
}
.video-studio-head p:not(.eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.video-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.video-connect {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff8ea;
  border-bottom: 1px solid #ead5a7;
}
.video-connect > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.video-connect strong {
  font-size: 12px;
}
.video-connect small {
  font-size: 10px;
  color: #7e6a40;
}
.video-connect > div:last-child {
  display: flex;
  gap: 8px;
}
.video-connect input {
  width: 280px;
  height: 38px;
  border: 1px solid #d4bea0;
  border-radius: 5px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  outline: 0;
}
.video-connect input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 120, 0.1);
}
.video-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  min-height: 650px;
}
.video-composer {
  padding: 24px;
  min-width: 0;
}
.video-section-title,
.video-label-row,
.video-submit,
.video-jobs-head,
.video-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.video-section-title {
  margin-bottom: 22px;
}
.video-section-title h3,
.video-jobs-head h3,
.video-result-head h3 {
  font-size: 15px;
  margin: 0;
}
.video-section-title p,
.video-jobs-head p,
.video-result-head p {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0 0;
}
.video-worker {
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f7f9f8;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.video-worker > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #929a9d;
}
.video-worker.online > span {
  background: #43b581;
}
.video-worker.error > span {
  background: var(--red);
}
.video-field {
  display: block;
  padding: 0;
  margin: 0 0 20px;
  border: 0;
}
.video-field > span,
.video-field > legend,
.video-label-row > span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #3b474a;
}
.video-label-row > span {
  margin: 0;
}
.video-label-row small,
.video-field > small {
  font-size: 10px;
  color: var(--muted);
}
.video-field > small {
  display: block;
  text-align: right;
  margin-top: 5px;
}
.video-field textarea {
  width: 100%;
  min-height: 166px;
  max-height: 360px;
  padding: 12px 13px;
  border: 1px solid #cfd8d6;
  border-radius: 6px;
  resize: vertical;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
  outline: 0;
}
.video-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(8, 127, 120, 0.1);
}
.video-ratios {
  display: grid;
  grid-template-columns: repeat(6, minmax(54px, 1fr));
  border: 1px solid #cfd8d6;
  border-radius: 6px;
  overflow: hidden;
}
.video-ratios label {
  min-width: 0;
}
.video-ratios input {
  position: absolute;
  opacity: 0;
}
.video-ratios span {
  height: 39px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--line);
  background: #fff;
  color: #4e595d;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.video-ratios label:first-child span {
  border-left: 0;
}
.video-ratios input:checked + span {
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.video-duration {
  height: 40px;
  padding: 0 12px;
  margin: -7px 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f8;
  font-size: 11px;
}
.video-duration span {
  color: var(--muted);
}
.video-duration strong {
  margin-right: 14px;
}
.video-upload {
  width: 100%;
  min-height: 86px;
  margin-top: 9px;
  border: 1px dashed #aab9b6;
  border-radius: 6px;
  background: #f7f9f8;
  color: #3b474a;
  display: grid;
  grid-template-columns: 23px auto;
  grid-template-rows: auto auto;
  align-content: center;
  justify-content: center;
  column-gap: 9px;
  text-align: left;
}
.video-upload:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.video-upload svg {
  grid-row: 1/3;
  align-self: center;
  color: var(--teal);
}
.video-upload span {
  font-size: 12px;
  font-weight: 700;
}
.video-upload small {
  font-size: 10px;
  color: var(--muted);
}
.video-assets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}
.video-asset {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: #edf1f0;
}
.video-asset img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video-asset button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 25px;
  height: 25px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: rgba(18, 28, 29, 0.78);
  color: #fff;
}
.video-asset button svg {
  width: 14px;
}
.video-asset progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
}
.video-asset.uploaded progress {
  display: none;
}
.video-asset.failed {
  border-color: var(--red);
}
.video-submit {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.video-submit p {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.video-submit p.error {
  color: var(--red);
}
.video-script-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: -4px;
}
.video-script-tools input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
}
.video-script-tools .secondary-button {
  height: 38px;
  white-space: nowrap;
}
.video-script-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.video-jobs {
  min-width: 0;
  border-left: 1px solid var(--line);
  background: #f7f9f8;
}
.video-jobs-head {
  min-height: 72px;
  padding: 14px 16px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}
.video-filters {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.video-filters button {
  height: 29px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 10px;
}
.video-filters button:first-child {
  border-left: 0;
}
.video-filters button.active {
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 700;
}
.video-task-list {
  display: block;
  margin: 0;
  max-height: 720px;
  overflow: auto;
}
.video-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.video-empty svg {
  width: 24px;
}
.video-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.video-job:hover {
  background: #fff;
}
.video-job-main {
  min-width: 0;
  padding: 12px 10px 12px 16px;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  text-align: left;
  color: inherit;
}
.video-job-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e8edec;
  color: #5f696c;
}
.video-job-icon.active {
  background: #e7f0fa;
  color: #3974ad;
}
.video-job-icon.success {
  background: var(--teal-soft);
  color: var(--teal);
}
.video-job-icon.failed {
  background: #fbeaea;
  color: var(--red);
}
.video-job-copy {
  min-width: 0;
}
.video-job-copy > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.video-job-copy > small {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}
.video-job-progress {
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
}
.video-job-cancel {
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.video-job-cancel:hover {
  background: #fbeaea;
  color: var(--red);
}
.video-job-cancel svg {
  width: 15px;
}
.video-result-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 18px;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(12, 30, 31, 0.26);
}
.video-result-dialog::backdrop {
  background: rgba(9, 25, 26, 0.55);
}
.video-result-head {
  margin-bottom: 14px;
}
.video-result-dialog video {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: #111;
  border-radius: 6px;
  margin-bottom: 14px;
}
.video-result-dialog > a {
  float: right;
}
.video-result-dialog[open] {
  animation: videoDialogIn 0.16s ease-out;
}
@keyframes videoDialogIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1080px) {
  .video-studio-grid {
    grid-template-columns: 1fr;
  }
  .video-jobs {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .video-task-list {
    max-height: 430px;
  }
}
@media (max-width: 700px) {
  .video-studio-head,
  .video-connect {
    align-items: flex-start;
    flex-direction: column;
  }
  .video-connect > div:last-child {
    width: 100%;
  }
  .video-connect input {
    width: 100%;
    min-width: 0;
  }
  .video-composer {
    padding: 18px;
  }
  .video-ratios {
    grid-template-columns: repeat(3, 1fr);
  }
  .video-ratios span {
    border-top: 1px solid var(--line);
  }
  .video-assets {
    grid-template-columns: repeat(3, 1fr);
  }
  .video-submit {
    align-items: stretch;
    flex-direction: column;
  }
  .video-submit .run-button {
    width: 100%;
  }
}
.title-optimizer-panel {
  border-top: 3px solid #7b61a8;
}
.title-optimizer-form {
  display: grid;
  gap: 16px;
}
.title-optimizer-form label > span,
.title-file-field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #485256;
}
.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px dashed #b6bfc1;
  border-radius: 6px;
  background: #fafbfb;
  color: var(--muted);
  cursor: pointer;
}
.file-drop:hover {
  border-color: #7b61a8;
  background: #faf8ff;
}
.file-drop svg {
  width: 22px;
  color: #7b61a8;
  flex: 0 0 auto;
}
.file-drop strong,
.file-drop small {
  display: block;
}
.file-drop strong {
  color: var(--ink);
  font-size: 12px;
}
.file-drop small {
  margin-top: 4px;
  font-size: 10px;
}
.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.title-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.title-optimizer-form input:not([type="checkbox"]),
.title-optimizer-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 11px;
  font: inherit;
  font-size: 12px;
  outline: 0;
}
.title-optimizer-form input:not([type="checkbox"]) {
  height: 40px;
}
.title-optimizer-form textarea {
  line-height: 1.5;
  resize: vertical;
}
.title-optimizer-form input:focus,
.title-optimizer-form textarea:focus {
  border-color: #7b61a8;
  box-shadow: 0 0 0 2px rgba(123, 97, 168, 0.12);
}
.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}
.jinluopan-title-opt {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}
.jinluopan-lang {
  display: grid;
  gap: 6px;
  max-width: 340px;
  font-size: 12px;
  color: var(--muted);
}
.jinluopan-lang select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.jinluopan-opt-hint {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.title-tool-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #485256;
  font-size: 12px;
}
.check-option input {
  width: 15px;
  height: 15px;
  accent-color: #7b61a8;
}
.title-tool-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
/* ---------- AI 图片处理 ---------- */
.image-form { display: grid; gap: 16px; }
.image-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}
.image-options label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.image-options select,
.image-options input[type="color"] {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}
.image-options input[type="color"] { padding: 4px; cursor: pointer; }
.image-options .check-option { display: flex; align-items: center; gap: 8px; height: 38px; }
.file-drop.dragging { border-color: var(--teal); background: var(--teal-soft); }
.image-result { margin-top: 20px; }
.image-result-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.image-result-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.image-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.image-card-preview {
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(45deg, #f0f2f1 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(-45deg, #f0f2f1 25%, transparent 25%) 0 8px / 16px 16px,
    linear-gradient(45deg, transparent 75%, #f0f2f1 75%) 8px -8px / 16px 16px,
    linear-gradient(-45deg, transparent 75%, #f0f2f1 75%) -8px 0 / 16px 16px,
    #fff;
  display: grid;
  place-items: center;
}
.image-card-preview img { width: 100%; height: 100%; object-fit: contain; }
.image-card-body { padding: 10px 12px 12px; display: grid; gap: 6px; }
.image-card-body strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-card-body small { color: var(--muted); font-size: 10px; }
.image-card-actions { display: flex; gap: 6px; }
.mini-button {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
  text-align: center;
  text-decoration: none;
}
.mini-button:hover { border-color: var(--teal); color: var(--teal-dark); }
.image-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.image-divider::before,
.image-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  align-items: start;
}
.gen-grid label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.gen-grid textarea,
.gen-grid select,
.gen-grid input[type="text"] {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.gen-grid select,
.gen-grid input[type="text"] { height: 38px; padding: 0 10px; }
.gen-mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6f5;
  margin-bottom: 16px;
}
.gen-tab {
  padding: 7px 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.gen-tab:hover { color: var(--ink); }
.gen-tab.active { background: #fff; color: var(--teal-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.gen-full { grid-column: 1 / -1; }
.gen-grid textarea::placeholder { color: #9aa5a3; }
.title-tool-status {
  color: var(--muted);
  font-size: 11px;
}
.title-tool-result {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px;
  background: #faf8ff;
  border: 1px solid #d8ccef;
  border-radius: 6px;
}
.title-tool-result strong {
  font-size: 12px;
}
.title-tool-result p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.title-tool-downloads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.title-tool-downloads a {
  text-decoration: none;
  white-space: nowrap;
}
.title-preview-wrap {
  margin-top: 18px;
}
.title-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.title-preview-head h3 {
  margin: 0;
  font-size: 14px;
}
.title-preview-head span {
  color: var(--muted);
  font-size: 10px;
}
.title-preview-wrap th:first-child,
.title-preview-wrap th:nth-child(2) {
  width: 40%;
}
.title-preview-wrap th:last-child {
  width: 20%;
}
.title-preview-wrap td {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .title-tool-grid {
    grid-template-columns: 1fr;
  }
  .title-tool-result {
    display: block;
  }
  .title-tool-downloads {
    margin-top: 12px;
  }
  .title-tool-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

.title-lang-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr);
  gap: 16px;
  align-items: start;
  margin: 4px 0 2px;
}

.title-lang-row > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-lang-row select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  font-size: 13px;
}

.title-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.3);
}

.title-scope-list .check-option {
  font-size: 13px;
  opacity: 0.9;
}

@media (max-width: 760px) {
  .title-lang-row {
    grid-template-columns: 1fr;
  }
}

.title-monitor {
  margin: 10px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.34);
}

.title-monitor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.title-monitor-head #titleMonitorMeta {
  opacity: 0.75;
  font-size: 12px;
}

.title-monitor-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.title-monitor-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.title-monitor-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.title-monitor-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.title-monitor-refresh {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.title-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.title-monitor-card {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12px;
}

.title-monitor-card span {
  display: block;
  opacity: 0.68;
  margin-bottom: 4px;
}

.title-monitor-card strong {
  font-size: 13px;
  word-break: break-all;
}

.title-monitor-trends {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.title-monitor-trend {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.4);
}

.title-monitor-trend.ok {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.title-monitor-trend.bad {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.video-quota-monitor {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.34);
}

.video-quota-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.video-quota-head #videoQuotaMeta {
  opacity: 0.75;
  font-size: 12px;
}

.video-quota-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}

.video-quota-dot.ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.video-quota-dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); }
.video-quota-dot.bad { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }

.video-quota-refresh {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.video-quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.video-quota-card {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12px;
}

.video-quota-card span {
  display: block;
  opacity: 0.68;
  margin-bottom: 4px;
}

.video-quota-card strong {
  font-size: 14px;
}

.video-quota-accounts {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.video-quota-account {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.42);
  line-height: 1.5;
}

.video-quota-account.ok { border-color: rgba(34, 197, 94, 0.45); }
.video-quota-account.busy { border-color: rgba(245, 158, 11, 0.5); }
.video-quota-account.bad { border-color: rgba(239, 68, 68, 0.5); }

.video-quota-account small {
  display: block;
  opacity: 0.72;
}

/* ================= AI 图片工作台 ================= */
.studio-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.studio-head-side {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #c8e2dd;
  background: #f0f8f6;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
}

.studio-pill.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 600;
}

.studio-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43cf9a;
}

.studio-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.studio-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.studio-tab svg {
  width: 16px;
}

.studio-tab:hover {
  color: var(--ink);
}

.studio-tab.active {
  background: var(--teal);
  color: #fff;
}

.studio-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.studio-main {
  min-width: 0;
}

.studio-rail {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.studio-form {
  display: grid;
  gap: 14px;
}

.studio-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.studio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.studio-card-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0;
}

.studio-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.studio-card textarea,
.studio-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  outline: 0;
  resize: vertical;
  background: #fbfcfc;
}

.studio-card textarea:focus,
.studio-input:focus,
.studio-field select:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 127, 120, 0.1);
}

.studio-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.studio-field {
  display: grid;
  gap: 6px;
}

.studio-field > span {
  font-size: 11px;
  font-weight: 700;
  color: #485256;
}

.studio-field select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
  font-size: 12px;
  background: #fbfcfc;
  outline: 0;
}

.studio-field input[type="color"] {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px;
  background: #fbfcfc;
  cursor: pointer;
}

.studio-check {
  font-size: 12px;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 9px;
}

.scene-card {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.scene-card:hover {
  border-color: #a8cac7;
}

.scene-card.active {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.scene-card strong {
  font-size: 12px;
}

.scene-card small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.studio-hidden-select {
  display: none;
}

.studio-summary {
  display: grid;
  gap: 9px;
}

.studio-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.studio-summary span {
  color: var(--muted);
}

.studio-summary strong {
  font-size: 15px;
  color: var(--teal-dark);
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 4px 0 2px;
}

.studio-run {
  height: 44px;
  padding: 0 26px;
  font-size: 13px;
}

.studio-status {
  font-size: 12px;
  color: var(--muted);
}

.studio-results {
  margin-top: 20px;
}

.studio-results-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.studio-results-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.studio-drop {
  min-height: 150px;
}

@media (max-width: 1080px) {
  .studio-columns {
    grid-template-columns: 1fr;
  }
  .studio-rail {
    position: static;
  }
}

.studio-quota {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 8px;
}

.studio-quota-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.studio-quota-head .mini-button {
  margin-left: auto;
}

.studio-quota-body {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.studio-quota-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.studio-quota-account b {
  color: var(--ink);
  font-weight: 600;
}

.studio-quota-account.bad b {
  color: #c94c52;
}

.studio-quota-account.warn b {
  color: #d58b22;
}


.video-quota-account.stale {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(69, 10, 10, 0.35);
}

.video-quota-account small b {
  color: #fca5a5;
  font-weight: 600;
}

.video-tiktok {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.34);
}

.video-tiktok-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
}

.video-tiktok-head strong { font-size: 13px; }
.video-tiktok-head span { font-size: 12px; opacity: 0.72; }

.video-tiktok-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.video-tiktok-row input[type="text"] {
  flex: 1 1 320px;
  min-width: 220px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(2, 6, 23, 0.4);
  color: inherit;
  font-size: 13px;
}

.video-tiktok-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.video-tiktok-lang select {
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(2, 6, 23, 0.4);
  color: inherit;
  font-size: 12px;
}

.video-tiktok-status {
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.8;
  min-height: 16px;
}

.video-tiktok-result { margin-top: 10px; }

.video-tiktok-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.video-tiktok-images img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.4);
}

.video-tiktok-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.video-tiktok-fact {
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12px;
}

.video-tiktok-fact span { display: block; opacity: 0.68; margin-bottom: 4px; }
.video-tiktok-fact strong { font-size: 13px; word-break: break-word; }

.video-tiktok-outline,
.video-tiktok-prompt {
  grid-column: 1 / -1;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 12px;
}

.video-tiktok-outline span,
.video-tiktok-prompt span { display: block; opacity: 0.68; margin-bottom: 5px; }

.video-tiktok-outline ol { margin: 0; padding-left: 18px; line-height: 1.6; }
.video-tiktok-prompt p { margin: 0; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

.video-tiktok-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.video-tiktok-picker-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.video-tiktok-picked {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  font-size: 11px;
}

.video-tiktok-link {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 12px;
  color: #93c5fd;
  cursor: pointer;
  text-decoration: underline;
}

.video-tiktok-pick {
  position: relative;
  display: block;
  cursor: pointer;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.15s;
}

.video-tiktok-pick input {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  width: 16px;
  height: 16px;
  accent-color: #22c55e;
  cursor: pointer;
}

.video-tiktok-pick img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
}

.video-tiktok-pick.on {
  border-color: #22c55e;
  transform: translateY(-1px);
}

.video-tiktok-pick-no {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 11px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #e2e8f0;
}

.video-tiktok-pick.on .video-tiktok-pick-no {
  background: rgba(34, 197, 94, 0.85);
  color: #052e16;
}

.account-health {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-health-head {
  font-size: 12px;
  opacity: 0.8;
  margin: 0;
}

.account-health-empty {
  font-size: 12px;
  opacity: 0.65;
  margin: 0;
}

.account-health-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(2, 6, 23, 0.32);
}

.account-health-row.ok {
  border-color: rgba(34, 197, 94, 0.45);
}

.account-health-row.bad {
  border-color: rgba(239, 68, 68, 0.45);
}

.account-health-row code {
  font-size: 11px;
  opacity: 0.9;
}

.account-health-kind {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.account-health-row.ok .account-health-kind {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.account-health-row.bad .account-health-kind {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.account-health-msg {
  opacity: 0.75;
  flex: 1 1 200px;
}

.canvas-panel { display: flex; flex-direction: column; gap: 12px; }

.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.canvas-status {
  font-size: 13px;
  opacity: 0.85;
}

.canvas-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.api-badge.offline { opacity: 0.5; }
.api-badge.offline span { background: #ef4444; }

.canvas-frame-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - 260px);
  min-height: 520px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #0b1220;
}

.canvas-frame { width: 100%; height: 100%; border: 0; display: block; }

.canvas-help { font-size: 12px; opacity: 0.7; margin: 0; }

@media (max-width: 900px) {
  .canvas-frame-wrap { height: 70vh; }
}
