/* Standard Storyboard Mode UI polish (non-intrusive additions) */
.hy-sb-modal {
  width: min(760px, 94vw);
  max-height: 86vh;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #151922;
  color: #f1f5f9;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.hy-sb-modal::backdrop {
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(3px);
}
.hy-sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.hy-sb-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.hy-sb-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.hy-sb-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.hy-sb-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  overflow-y: auto;
  max-height: 64vh;
}
.hy-sb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.hy-sb-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #0f131b;
  color: #f8fafc;
  font-size: 13px;
}
.hy-sb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.hy-sb-hint {
  font-size: 12px;
  color: #94a3b8;
}
.hy-sb-textarea {
  width: 100%;
  min-height: 240px;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #0f131b;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}
.hy-sb-preview {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
}
.hy-sb-error {
  margin: 0;
  font-size: 12px;
  color: #f87171;
  min-height: 16px;
}
.hy-sb-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.hy-sb-btn {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  font-size: 13px;
  cursor: pointer;
}
.hy-sb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
}
.hy-sb-btn.primary {
  background: #d97706;
  border-color: #f59e0b;
  color: #fff;
  font-weight: 600;
}
.hy-sb-btn.primary:hover:not(:disabled) {
  background: #b45309;
}
.hy-sb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hy-sb-tabs {
  display: flex;
  gap: 8px;
}
.hy-sb-tab {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
}
.hy-sb-tab.is-active {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
  font-weight: 600;
}
.hy-sb-manual-add {
  display: flex;
  gap: 8px;
}
.hy-sb-manual-add .hy-sb-input {
  flex: 1;
}
.hy-sb-extract-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
}
.hy-sb-extract-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}
.hy-sb-extract-row.is-exists {
  opacity: 0.55;
  cursor: default;
}
.hy-sb-extract-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hy-sb-extract-info strong {
  font-size: 13px;
  color: #f8fafc;
}
.hy-sb-extract-info small {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hy-sb-empty {
  grid-column: 1 / -1;
  padding: 24px 12px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}

/* Panel image / video mode switcher */
.hy-panel-output-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.hy-panel-output-switch button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 12px;
  cursor: pointer;
}
.hy-panel-output-switch button[aria-pressed="true"] {
  background: rgba(245, 158, 11, 0.24);
  color: #fde68a;
  font-weight: 600;
}
.hy-panel-image-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.hy-panel-image-controls select {
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.8);
  color: #f1f5f9;
  font-size: 12px;
}
.hy-panel-image-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.5);
  margin-bottom: 10px;
}
.hy-panel-image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}
.hy-panel-image-preview img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: #0b0e14;
}
.hy-panel-image-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.hy-panel-image-thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  flex: 0 0 auto;
}
.hy-panel-image-thumbs button.is-selected {
  border-color: #f59e0b;
}
.hy-panel-image-thumbs img {
  width: 52px;
  height: 36px;
  object-fit: cover;
  display: block;
}
.hy-home-quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* Storyboard rule dialog enhancements */
.comic-custom-prompt-dialog footer .hy-rule-import-btn {
  margin-right: auto;
}
.comic-project-mode-select select {
  min-width: 240px;
}


/* Rule-based direct storyboard inference dialog */
.hy-rule-infer-modal {
  width: min(860px, calc(100vw - 36px));
}
.hy-rule-infer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hy-rule-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #e2e8f0;
}
.hy-rule-infer-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.hy-rule-stream-out {
  min-height: 300px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
}


/* Storyboard Asset Pipeline Skill Modal */
.hy-asset-skill-modal {
  width: min(980px, calc(100vw - 36px));
}
.hy-skill-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(129, 140, 248, 0.3);
}
.hy-skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hy-skill-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}
.hy-skill-badge.is-master {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fde68a;
}
.hy-skill-badge.is-derived {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #bae6fd;
}
.hy-skill-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 820px) {
  .hy-skill-split {
    grid-template-columns: 1fr;
  }
}
.hy-skill-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.hy-skill-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
}
.hy-skill-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 330px;
  overflow-y: auto;
  padding: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.hy-skill-group {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.55);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hy-skill-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.hy-skill-outfit-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.5);
  font-size: 12px;
  line-height: 1.5;
}
.hy-skill-outfit-row.is-derived {
  margin-left: 14px;
  border-left: 2px solid rgba(56, 189, 248, 0.55);
}
.hy-skill-outfit-desc {
  color: #94a3b8;
  font-size: 11.5px;
  margin-top: 2px;
}
.hy-skill-mini-btn {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  cursor: pointer;
}
.hy-skill-mini-btn:hover {
  border-color: rgba(245, 158, 11, 0.7);
  color: #fde68a;
}
.hy-skill-prompt-details {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.4);
  font-size: 12px;
  color: #cbd5e1;
}
.hy-skill-prompt-details summary {
  cursor: pointer;
  user-select: none;
}
.hy-skill-prompt-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.hy-skill-prompt-grid pre {
  margin: 4px 0 0;
  padding: 8px;
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.65);
  font-size: 11px;
  line-height: 1.5;
  color: #cbd5e1;
}
.hy-skill-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #e2e8f0;
  user-select: none;
}


/* Per-episode split controls & progress chips */
.hy-rule-infer-controls.is-4col {
  grid-template-columns: 165px 115px 215px minmax(0, 1fr);
}
@media (max-width: 780px) {
  .hy-rule-infer-controls.is-4col {
    grid-template-columns: 1fr 1fr;
  }
}
.hy-skill-mini-select {
  width: auto !important;
  min-width: 120px;
  padding: 5px 8px !important;
  font-size: 12px !important;
}
.hy-ep-progress-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hy-ep-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}
button.hy-ep-chip {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
button.hy-ep-chip:hover {
  border-color: rgba(245, 158, 11, 0.65);
}
button.hy-ep-chip.is-selected {
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.85);
}
.hy-ep-chip.is-running {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.6);
  color: #bfdbfe;
}
.hy-ep-chip.is-done {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.55);
  color: #bbf7d0;
}
.hy-ep-chip.is-warn {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}
.hy-ep-chip.is-error {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.55);
  color: #fecaca;
}

/* Asset Library header top-right Skill button */
.comic-asset-filters.hy-asset-header-row {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.hy-asset-header-skill-btn {
  margin-left: auto;
}

/* Skill Extract Settings (Built-in + Custom template selector & manager) */
.hy-skill-settings-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.24);
}
.hy-skill-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.hy-skill-settings-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
}
.hy-skill-settings-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.hy-skill-tpl-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 320px;
  min-width: 260px;
}
.hy-skill-tpl-control > span {
  font-size: 11.5px;
  color: #94a3b8;
}
.hy-skill-tpl-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hy-skill-tpl-select-wrap select {
  flex: 1;
  min-width: 210px;
}
.hy-skill-run-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.hy-skill-custom-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.hy-skill-custom-box textarea {
  min-height: 116px;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hy-skill-custom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.hy-skill-tpl-manager-modal {
  width: min(860px, calc(100vw - 36px));
}
.hy-skill-tpl-manager-body {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 14px;
  min-height: 350px;
}
@media (max-width: 720px) {
  .hy-skill-tpl-manager-body {
    grid-template-columns: 1fr;
  }
}
.hy-skill-tpl-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.hy-skill-tpl-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 12.5px;
}
.hy-skill-tpl-item.is-active {
  border-color: rgba(245, 158, 11, 0.72);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}
.hy-skill-tpl-item small {
  font-size: 11px;
  color: #94a3b8;
}
.hy-skill-tpl-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.hy-skill-tpl-editor textarea {
  min-height: 245px;
  font-size: 12px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Warning & Danger buttons inside storyboard dialogs */
.hy-sb-btn.warn {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.72);
  color: #fde68a;
  font-weight: 600;
}
.hy-sb-btn.warn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.34);
}
.hy-sb-btn.danger {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(248, 113, 113, 0.65);
  color: #fecaca;
}
.hy-sb-btn.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.3);
}

/* Persistent Background Storyboard Inference Status Pill (inline in 剧本摘要 header or top-right fallback) */
.hy-bg-infer-slot {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.hy-bg-infer-slot:empty {
  display: none;
}
.hy-bg-infer-pill {
  position: fixed;
  top: auto;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(620px, calc(100vw - 32px));
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}
.hy-bg-infer-pill.is-inline {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  padding: 5px 10px;
  border-radius: 9px;
  box-shadow: none;
  background: rgba(15, 23, 42, 0.85);
}
.hy-bg-infer-pill.is-running {
  border-color: rgba(96, 165, 250, 0.65);
}
.hy-bg-infer-pill.is-done {
  border-color: rgba(74, 222, 128, 0.65);
}
.hy-bg-infer-pill.is-warn {
  border-color: rgba(251, 191, 36, 0.72);
}
.hy-bg-infer-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #94a3b8;
}
.hy-bg-infer-pill.is-running .hy-bg-infer-dot {
  background: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.24);
  animation: hy-bg-infer-pulse 1.5s ease-in-out infinite;
}
.hy-bg-infer-pill.is-done .hy-bg-infer-dot {
  background: #4ade80;
}
.hy-bg-infer-pill.is-warn .hy-bg-infer-dot {
  background: #fbbf24;
}
@keyframes hy-bg-infer-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.22); opacity: 0.65; }
}
.hy-bg-infer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hy-bg-infer-text strong {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hy-bg-infer-text small {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hy-bg-infer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.hy-bg-infer-btn {
  padding: 5px 10px;
  font-size: 12px;
}
.hy-bg-infer-dismiss {
  padding: 2px 6px;
  font-size: 16px;
}

/* Skill Asset Confirmation Dialog & 3-Column Circular Progress View */
.hy-skill-confirm-modal {
  width: min(640px, calc(100vw - 36px));
}
.hy-skill-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .hy-skill-cat-grid {
    grid-template-columns: 1fr;
  }
}
.hy-skill-cat-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  user-select: none;
}
.hy-skill-cat-card.is-checked {
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.12);
}
.hy-skill-cat-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hy-skill-cat-copy strong {
  font-size: 13px;
  color: #f8fafc;
}
.hy-skill-cat-copy small {
  font-size: 11.5px;
  line-height: 1.45;
  color: #94a3b8;
}
.hy-skill-confirm-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hy-skill-prep-host {
  width: 100%;
}
.hy-skill-prep-section .comic-asset-progress-ring.is-running {
  border-color: rgba(245, 158, 11, 0.72);
  color: #fde68a;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}
.hy-skill-prep-section .comic-asset-progress-ring.is-failed {
  border-color: rgba(248, 113, 113, 0.65);
  color: #fecaca;
}
.hy-skill-prep-section .comic-asset-progress-ring.is-skipped {
  border-style: dashed;
  opacity: 0.65;
}
.hy-skill-prep-icon {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}
.hy-skill-prep-icon.is-running {
  display: inline-block;
  animation: hy-skill-spin 1.15s linear infinite;
}
@keyframes hy-skill-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.hy-skill-prep-timer {
  font-size: 12px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
}
.hy-skill-prep-count {
  font-size: 11.5px !important;
  color: #94a3b8 !important;
}
.hy-skill-prep-chips {
  justify-content: center;
  max-width: 720px;
  margin-bottom: 14px;
}
.hy-skill-prep-problems {
  max-width: 660px;
  width: 100%;
  text-align: left;
  margin: 8px auto 16px;
}
.hy-skill-prep-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ============================================================================
   Light Theme Skin for Storyboard Mode Modals, Asset Skill & Progress Views
   ============================================================================ */
html[data-theme="light"] .hy-sb-modal {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #b4c0d0;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}
html[data-theme="light"] .hy-sb-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
html[data-theme="light"] .hy-sb-header {
  background: #f3f6fa;
  border-bottom: 1px solid #cbd5e1;
}
html[data-theme="light"] .hy-sb-header h3 {
  color: #0f172a;
}
html[data-theme="light"] .hy-sb-close {
  color: #475569;
}
html[data-theme="light"] .hy-sb-close:hover {
  color: #0f172a;
  background: #e2e8f0;
}
html[data-theme="light"] .hy-sb-footer {
  background: #f3f6fa;
  border-top: 1px solid #cbd5e1;
}
html[data-theme="light"] .hy-sb-input,
html[data-theme="light"] .hy-sb-textarea,
html[data-theme="light"] .hy-panel-image-controls select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #aebbc9;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
html[data-theme="light"] .hy-sb-input:focus,
html[data-theme="light"] .hy-sb-textarea:focus,
html[data-theme="light"] .hy-panel-image-controls select:focus {
  border-color: #d97706;
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
}
html[data-theme="light"] .hy-sb-hint,
html[data-theme="light"] .hy-sb-empty,
html[data-theme="light"] .hy-sb-extract-info small,
html[data-theme="light"] .hy-skill-outfit-desc,
html[data-theme="light"] .hy-skill-tpl-control > span,
html[data-theme="light"] .hy-skill-tpl-item small,
html[data-theme="light"] .hy-skill-cat-copy small,
html[data-theme="light"] .hy-skill-prep-count {
  color: #475569 !important;
}
html[data-theme="light"] .hy-sb-preview,
html[data-theme="light"] .hy-panel-image-preview-head,
html[data-theme="light"] .hy-skill-col-head,
html[data-theme="light"] .hy-skill-check-row,
html[data-theme="light"] .hy-skill-prep-timer {
  color: #334155;
}
html[data-theme="light"] .hy-sb-error {
  color: #b91c1c;
}
html[data-theme="light"] .hy-sb-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #b4c0d0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07), inset 0 -1px 0 rgba(15, 23, 42, 0.05);
}
html[data-theme="light"] .hy-sb-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #64748b;
}
html[data-theme="light"] .hy-sb-btn.primary {
  background: linear-gradient(135deg, #fbbf24 0%, #e59a12 100%);
  border-color: #b45309;
  color: #1c1304;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
html[data-theme="light"] .hy-sb-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #92400e;
  color: #120c02;
}
html[data-theme="light"] .hy-sb-btn.primary:disabled {
  background: #f1e3c3;
  border-color: #d6bc88;
  color: #6b5224;
  opacity: 1;
}
html[data-theme="light"] .hy-sb-btn.warn {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
html[data-theme="light"] .hy-sb-btn.warn:hover:not(:disabled) {
  background: #fde68a;
  color: #78350f;
}
html[data-theme="light"] .hy-sb-btn.danger {
  background: #fee2e2;
  border-color: #dc2626;
  color: #b91c1c;
}
html[data-theme="light"] .hy-sb-btn.danger:hover:not(:disabled) {
  background: #fecaca;
  color: #7f1d1d;
}
html[data-theme="light"] .hy-sb-tab {
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #475569;
}
html[data-theme="light"] .hy-sb-tab.is-active {
  background: #fffbeb;
  border-color: #d97706;
  color: #9a3412;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.16);
}
html[data-theme="light"] .hy-sb-extract-row,
html[data-theme="light"] .hy-skill-tree,
html[data-theme="light"] .hy-skill-settings-card,
html[data-theme="light"] .hy-panel-image-preview,
html[data-theme="light"] .hy-skill-prompt-details {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
html[data-theme="light"] .hy-sb-extract-info strong,
html[data-theme="light"] .hy-skill-settings-title,
html[data-theme="light"] .hy-skill-cat-copy strong {
  color: #0f172a;
}
html[data-theme="light"] .hy-skill-group,
html[data-theme="light"] .hy-skill-tpl-item,
html[data-theme="light"] .hy-skill-cat-card {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}
html[data-theme="light"] .hy-skill-outfit-row {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}
html[data-theme="light"] .hy-skill-outfit-row.is-derived {
  border-left: 3px solid #0284c7;
}
html[data-theme="light"] .hy-skill-banner {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #1e1b4b;
}
html[data-theme="light"] .hy-rule-pill {
  background: #eef2ff;
  border-color: #a5b4fc;
  color: #312e81;
}
html[data-theme="light"] .hy-skill-badge {
  background: #eef2f7;
  border-color: #cbd5e1;
  color: #334155;
}
html[data-theme="light"] .hy-skill-badge.is-master {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
html[data-theme="light"] .hy-skill-badge.is-derived {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #075985;
}
html[data-theme="light"] .hy-skill-mini-btn {
  background: #ffffff;
  border-color: #b4c0d0;
  color: #1e293b;
}
html[data-theme="light"] .hy-skill-mini-btn:hover {
  border-color: #d97706;
  color: #92400e;
  background: #fffbeb;
}
html[data-theme="light"] .hy-skill-prompt-grid pre {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}
html[data-theme="light"] .hy-skill-tpl-item.is-active,
html[data-theme="light"] .hy-skill-cat-card.is-checked {
  border-color: #d97706;
  background: #fffbeb;
  color: #78350f;
}
html[data-theme="light"] .hy-panel-output-switch {
  background: #dfe6f0;
  border-color: #bcc8d8;
}
html[data-theme="light"] .hy-panel-output-switch button {
  color: #475569;
}
html[data-theme="light"] .hy-panel-output-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: #9a3412;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
html[data-theme="light"] .hy-ep-chip {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}
html[data-theme="light"] .hy-ep-chip.is-running {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}
html[data-theme="light"] .hy-ep-chip.is-done {
  background: #dcfce7;
  border-color: #22c55e;
  color: #15803d;
}
html[data-theme="light"] .hy-ep-chip.is-warn {
  background: #fef3c7;
  border-color: #d97706;
  color: #92400e;
}
html[data-theme="light"] .hy-ep-chip.is-error {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}
html[data-theme="light"] button.hy-ep-chip:hover {
  border-color: #d97706;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
}
html[data-theme="light"] button.hy-ep-chip.is-selected {
  border-color: #d97706;
  box-shadow: 0 0 0 2px #d97706;
  font-weight: 700;
}
html[data-theme="light"] .hy-panel-image-preview img {
  background: #e2e8f0;
}
html[data-theme="light"] .hy-sb-btn:disabled {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.92;
}
.hy-sb-input:focus,
.hy-sb-textarea:focus {
  outline: none;
  border-color: #e5aa38;
  box-shadow: 0 0 0 2px rgba(229, 170, 56, 0.22);
}
.hy-sb-btn:active:not(:disabled),
button.hy-ep-chip:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}
html[data-theme="light"] .hy-bg-infer-pill {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-color: #b4c0d0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}
html[data-theme="light"] .hy-bg-infer-pill.is-inline {
  background: #f8fafc;
}
html[data-theme="light"] .hy-bg-infer-text strong {
  color: #0f172a;
}
html[data-theme="light"] .hy-bg-infer-text small {
  color: #475569;
}
html[data-theme="light"] .hy-skill-prep-section .comic-asset-progress-ring.is-running {
  border-color: #d97706;
  color: #b45309;
  box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.14);
}
html[data-theme="light"] .hy-skill-prep-section .comic-asset-progress-ring.is-failed {
  border-color: #dc2626;
  color: #b91c1c;
}
