.storyboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 0;
  height: 100%;
  overflow: hidden;
}
@media (max-width: 1200px) {
  .storyboard-layout {
    grid-template-columns: 260px 1fr 280px;
  }
}
@media (max-width: 992px) {
  .storyboard-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
}

.storyboard-sidebar-left {
  background: var(--canvas-soft);
  border-right: 1px solid var(--hairline-soft);
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.storyboard-sidebar-left .sidebar-section {
  background: var(--surface-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 12px;
  padding: 16px;
}
.storyboard-sidebar-left .sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 992px) {
  .storyboard-sidebar-left {
    border-right: none;
    border-bottom: 1px solid var(--hairline-soft);
    max-height: 300px;
  }
}

.storyboard-editor {
  background: var(--canvas);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 992px) {
  .storyboard-editor {
    padding: 16px;
  }
}

.editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  gap: 12px;
}
.editor-empty svg {
  opacity: 0.3;
}
.editor-empty p {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.editor-empty .empty-hint-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.editor-scenes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-scenes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hairline-soft);
}

.editor-scenes-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.editor-scenes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.editor-scene-item {
  background: var(--surface-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
}
.editor-scene-item:hover {
  border-color: var(--hairline-strong);
  box-shadow: 0 4px 12px rgba(var(--ink-rgb), 0.04);
}
.editor-scene-item:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.editor-scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.editor-scene-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

.editor-scene-move {
  display: flex;
  gap: 4px;
}

.editor-scene-move-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline-soft);
  background: var(--surface-card);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.editor-scene-move-btn:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.editor-scene-move-btn svg {
  width: 14px;
  height: 14px;
}

.editor-scene-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--hairline-soft);
  background: var(--surface-card);
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 4px;
}
.editor-scene-remove:hover {
  background: rgba(var(--semantic-error-rgb), 0.1);
  color: var(--semantic-error);
  border-color: var(--semantic-error);
}
.editor-scene-remove svg {
  width: 14px;
  height: 14px;
}

.editor-scene-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: all 0.2s ease;
  line-height: 1.6;
}
.editor-scene-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.editor-scene-textarea::placeholder {
  color: var(--muted-soft);
  font-size: 13px;
}

.editor-add-scene-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--surface-card);
  border: 2px dashed var(--hairline-soft);
  border-radius: 12px;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.editor-add-scene-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
}
.editor-add-scene-btn svg {
  width: 18px;
  height: 18px;
}

.storyboard-sidebar-right {
  background: var(--canvas-soft);
  border-left: 1px solid var(--hairline-soft);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
@media (max-width: 992px) {
  .storyboard-sidebar-right {
    border-left: none;
    border-top: 1px solid var(--hairline-soft);
    max-height: 400px;
  }
}

.result-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--hairline-soft);
  background: var(--surface-card);
}
.result-panel-header .sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.result-panel-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.result-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.result-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  gap: 8px;
  padding: 32px 16px;
}
.result-panel-empty svg {
  opacity: 0.3;
}
.result-panel-empty p {
  font-size: 13px;
  font-weight: 500;
}
.result-panel-empty .empty-hint-sub {
  font-size: 11px;
  color: var(--muted-soft);
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.result-grid--horizontal {
  flex-direction: row;
  flex-wrap: wrap;
}
.result-grid--horizontal .result-thumb {
  flex: 1;
  min-width: 200px;
}
.result-grid--vertical .result-thumb {
  width: 100%;
}
.result-grid--grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.result-grid--grid2 .result-thumb {
  width: 100%;
}
.result-grid--grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.result-grid--grid3 .result-thumb {
  width: 100%;
}

.result-thumb {
  background: var(--surface-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.result-thumb:hover {
  border-color: var(--hairline-strong);
  box-shadow: 0 4px 12px rgba(var(--ink-rgb), 0.06);
}

.result-thumb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline-soft);
}

.result-thumb-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

.result-thumb-actions {
  display: flex;
  gap: 4px;
}

.result-thumb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--hairline-soft);
  border-radius: 5px;
  background: var(--surface-card);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.result-thumb-btn:hover {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}
.result-thumb-btn svg {
  width: 12px;
  height: 12px;
}

.result-thumb-body {
  background: repeating-conic-gradient(var(--canvas-soft) 0% 25%, var(--hairline-soft) 0% 50%) 50%/8px 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-thumb-body img {
  width: 100%;
  display: block;
  max-height: 200px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.result-thumb-body img:hover {
  transform: scale(1.02);
}

.result-thumb-placeholder {
  font-size: 12px;
  color: var(--muted-soft);
  padding: 20px;
  text-align: center;
}
.result-thumb-placeholder.result-thumb-error {
  color: var(--semantic-error);
}

.result-thumb-footer {
  padding: 8px 10px;
  border-top: 1px solid var(--hairline-soft);
}

.result-thumb-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.editor-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-state {
  text-align: center;
  padding: 48px;
  background: var(--surface-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 20px;
  box-shadow: 0 12px 40px -8px rgba(var(--ink-rgb), 0.08);
  min-width: 320px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border: 3px solid var(--hairline-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}

.loading-progress {
  width: 100%;
  height: 6px;
  background: var(--hairline-soft);
  border-radius: 3px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gradient-mint), var(--gradient-peach), var(--gradient-lavender));
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}

.character-upload-area {
  border: 1px dashed var(--hairline-strong);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
}
.character-upload-area:hover {
  border-color: var(--hairline);
  background: var(--canvas-soft);
}

.character-upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 12px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}
.character-upload-drop svg {
  opacity: 0.5;
}
.character-upload-drop span {
  font-size: 12px;
  text-align: center;
}
.character-upload-drop:hover {
  color: var(--primary);
}
.character-upload-drop:hover svg {
  opacity: 1;
}

.character-preview {
  position: relative;
}
.character-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}

.character-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(var(--ink-rgb), 0.7);
  color: var(--on-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.character-preview-remove:hover {
  background: var(--semantic-error);
}

.setting-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
}
.setting-textarea:focus {
  /* border-color: var(--primary); */
  background: var(--surface-card);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.setting-textarea::placeholder {
  color: var(--muted-soft);
}

.setting-hint {
  font-size: 11px;
  color: var(--muted-soft);
  margin-top: 4px;
  line-height: 1.4;
}

.preset-scenes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.preset-scene-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--canvas-soft);
  border: 1px solid var(--hairline-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.preset-scene-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gradient-mint), var(--gradient-peach));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.preset-scene-btn:hover {
  background: var(--surface-strong);
  border-color: var(--hairline-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(var(--ink-rgb), 0.08);
}
.preset-scene-btn:hover::before {
  opacity: 1;
}
.preset-scene-btn:active {
  transform: scale(0.96) translateY(0);
}
.preset-scene-btn .preset-scene-icon {
  color: var(--muted);
  transition: color 0.2s ease;
}
.preset-scene-btn:hover .preset-scene-icon {
  color: var(--primary);
}
.preset-scene-btn span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.2px;
}

.toolbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  background: var(--gradient-peach);
  color: var(--ink);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  font-family: "Plus Jakarta Sans", sans-serif;
  margin-left: 4px;
}

.preview-modal {
  padding: 8px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.preview-modal-content img {
  border-radius: 16px;
  box-shadow: 0 32px 64px -16px rgba(var(--ink-rgb), 0.2);
}

@media (max-width: 768px) {
  .storyboard-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
  }
  .storyboard-sidebar-left,
  .storyboard-sidebar-right {
    max-height: 250px;
  }
  .result-grid--grid2,
  .result-grid--grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-thumb-body img {
    max-height: 150px;
  }
}

/*# sourceMappingURL=storyboard.css.map */
