.imagegen-layout-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
}

.assets-layout-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
}

.storyboard-layout-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.imagegen-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.imagegen-mode-button {
  border: 1px solid rgba(133, 84, 40, 0.16);
  background: rgba(255, 253, 249, 0.86);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.imagegen-mode-button:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 92, 35, 0.26);
}

.imagegen-mode-button.is-active {
  background: linear-gradient(145deg, rgba(140, 62, 21, 0.98), rgba(107, 43, 12, 0.98));
  border-color: transparent;
  color: #fff7f1;
}

.imagegen-model-panel,
.imagegen-picker,
.imagegen-output-block,
.assets-toolbar,
.assets-detail {
  position: relative;
  z-index: 1;
}

.imagegen-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.model-platform-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
}

.model-platform-title {
  margin: 4px 0 0;
  color: var(--brand-deep);
  font-size: 14px;
  line-height: 1.35;
}

.model-platform-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.imagegen-goal-shell {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(123, 75, 34, 0.12);
  border-radius: 18px;
  background: rgba(255, 248, 239, 0.76);
}

.imagegen-goal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.imagegen-goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.imagegen-goal-chip {
  border: 1px solid rgba(133, 84, 40, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.imagegen-goal-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 92, 35, 0.26);
}

.imagegen-goal-chip.is-active {
  background: linear-gradient(145deg, rgba(140, 62, 21, 0.98), rgba(107, 43, 12, 0.98));
  border-color: transparent;
  color: #fff7f1;
}

.imagegen-model-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(111, 66, 27, 0.12);
  background: rgba(255, 252, 247, 0.92);
  box-shadow: 0 12px 26px rgba(77, 47, 19, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.imagegen-model-card:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 92, 35, 0.24);
}

.imagegen-model-card.is-active {
  border-color: rgba(178, 92, 35, 0.42);
  background: linear-gradient(180deg, rgba(255, 245, 231, 0.96), rgba(255, 251, 245, 0.92));
  box-shadow: 0 18px 34px rgba(100, 53, 20, 0.12);
}

.imagegen-model-card.is-openrouter {
  border-color: rgba(25, 90, 104, 0.32);
  background:
    linear-gradient(145deg, rgba(241, 255, 250, 0.98), rgba(232, 246, 255, 0.95) 48%, rgba(255, 252, 244, 0.96));
  box-shadow: 0 18px 36px rgba(17, 74, 85, 0.14);
}

.imagegen-model-card.is-featured-model {
  min-height: 178px;
  border-width: 2px;
}

@media (min-width: 1080px) {
  .imagegen-model-card.is-featured-model {
    grid-column: span 2;
  }
}

.imagegen-model-card.is-openrouter:hover {
  border-color: rgba(22, 132, 149, 0.5);
  box-shadow: 0 22px 44px rgba(14, 81, 96, 0.2);
}

.imagegen-model-card.is-openrouter.is-active {
  border-color: rgba(17, 116, 134, 0.7);
  background:
    linear-gradient(145deg, rgba(221, 255, 247, 0.98), rgba(228, 243, 255, 0.98) 52%, rgba(255, 249, 235, 0.98));
  box-shadow: 0 24px 52px rgba(13, 77, 89, 0.24);
}

.imagegen-model-card.is-openrouter .imagegen-model-short {
  color: #0c6c7b;
}

.imagegen-model-card.is-openrouter .imagegen-model-badge {
  background: rgba(19, 111, 127, 0.12);
  color: #075664;
  border: 1px solid rgba(19, 111, 127, 0.2);
  font-weight: 700;
}

.imagegen-model-card h4,
.imagegen-asset-card h3,
.assets-detail h3,
.imagegen-picker-head h3 {
  margin: 0;
}

.imagegen-model-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.imagegen-model-short {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

.imagegen-model-badge {
  border-radius: 999px;
  background: rgba(178, 92, 35, 0.1);
  color: var(--brand-deep);
  padding: 4px 8px;
  font-size: 12px;
}

.imagegen-model-desc,
.imagegen-model-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.imagegen-model-cost {
  margin: 0;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
}

.imagegen-model-provider {
  margin: 0;
  color: #075664;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.imagegen-cost-estimate-card,
.imagegen-actual-cost-card {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  white-space: pre-wrap;
}

.imagegen-cost-estimate-card {
  border: 1px solid rgba(178, 92, 35, 0.16);
  background: rgba(255, 246, 234, 0.82);
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.7;
}

.imagegen-actual-cost-card {
  margin-bottom: 12px;
  border: 1px solid rgba(255, 214, 163, 0.22);
  background: linear-gradient(135deg, rgba(156, 86, 28, 0.92), rgba(123, 53, 16, 0.94));
  color: #fff4e5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 32px rgba(90, 38, 11, 0.18);
}

.imagegen-lora-helper {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(93, 107, 66, 0.18);
  border-radius: 18px;
  background: rgba(250, 252, 246, 0.88);
}

.imagegen-lora-helper-head,
.imagegen-lora-helper-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.imagegen-prompt-set-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(116, 72, 30, 0.12);
  border-radius: 16px;
  background: rgba(255, 250, 244, 0.74);
}

.imagegen-prompt-set-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.imagegen-prompt-set-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.imagegen-prompt-set-head .status-text {
  margin: 0;
}

.imagegen-prompt-set-actions,
.imagegen-prompt-set-manage {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.imagegen-prompt-set-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  gap: 12px;
  align-items: end;
}

.imagegen-lora-helper-head h3,
.imagegen-lora-helper-head h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.imagegen-lora-helper-head .status-text {
  margin: 0;
}

.imagegen-lora-helper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.imagegen-lora-helper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.imagegen-lora-saved-list {
  display: grid;
  gap: 8px;
}

.imagegen-lora-saved-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(116, 72, 30, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.imagegen-lora-saved-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.imagegen-lora-saved-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.imagegen-lora-saved-card-actions {
  display: flex;
  gap: 6px;
}

.imagegen-lora-preview-shell {
  display: grid;
  gap: 8px;
}

.imagegen-lora-preview-shell iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid rgba(116, 72, 30, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.imagegen-asset-card,
.imagegen-picker,
.assets-toolbar,
.assets-detail,
.storyboard-reference-shell {
  border: 1px solid rgba(123, 75, 34, 0.12);
  background: rgba(255, 252, 247, 0.82);
  border-radius: 22px;
  padding: 14px;
}

.imagegen-asset-card-head,
.imagegen-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.imagegen-asset-card-body {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(123, 75, 34, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  overflow: hidden;
}

.imagegen-asset-preview,
.assets-detail-preview {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 18px;
}

.imagegen-asset-empty,
.imagegen-runtime-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.imagegen-runtime-hint {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 244, 228, 0.84);
  border: 1px dashed rgba(178, 92, 35, 0.2);
}

.imagegen-picker-toolbar,
.assets-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.imagegen-picker-grid,
.imagegen-result-grid,
.imagegen-stored-grid,
.assets-grid,
.storyboard-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.storyboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.video-toolbar {
  margin-top: 14px;
}

.video-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.video-preset-chip {
  border-radius: 999px;
}

.video-prompt-groups-shell {
  margin-bottom: 16px;
}

.video-prompt-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.video-prompt-group-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(123, 75, 34, 0.12);
  background: rgba(255, 250, 243, 0.9);
}

.video-prompt-group-card input {
  margin-right: 8px;
}

.video-prompt-group-card label {
  display: flex;
  align-items: center;
  color: var(--brand-deep);
  font-weight: 600;
}

.video-prompt-group-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(57, 39, 24, 0.78);
}

.video-first-frame-shell {
  margin-top: 18px;
}

.video-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.video-reference-shell {
  margin-top: 18px;
}

.video-reference-preview-item {
  margin: 0;
  display: grid;
  gap: 6px;
}

.video-reference-preview-item figcaption {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(57, 39, 24, 0.72);
}

.video-reference-editor {
  display: grid;
  gap: 8px;
}

.video-reference-editor label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: rgba(57, 39, 24, 0.72);
}

.video-reference-editor input,
.video-reference-editor select,
.video-reference-editor textarea {
  width: 100%;
  border: 1px solid rgba(123, 75, 34, 0.16);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-deep);
  font: inherit;
}

.video-reference-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(123, 75, 34, 0.12);
  background: rgba(255, 255, 255, 0.8);
}

.video-result-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgba(39, 24, 13, 0.92);
  cursor: pointer;
}

.video-result-link {
  display: block;
  margin-top: 8px;
  color: var(--brand-deep);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.video-result-extra {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.video-result-extra-card {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(123, 75, 34, 0.12);
  background: rgba(255, 250, 243, 0.9);
}

.video-result-extra-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.video-result-extra-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  margin-bottom: 10px;
}

.video-result-extra-card .action-row {
  margin-top: 10px;
}

.storyboard-project-binding {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(178, 92, 35, 0.16);
  background: rgba(255, 246, 234, 0.82);
  color: var(--brand-deep);
}

.storyboard-project-binding strong {
  display: block;
  margin-bottom: 6px;
}

.storyboard-project-binding .action-row {
  margin-top: 10px;
}

.storyboard-reference-grid {
  min-height: 160px;
}

.storyboard-reference-card {
  border-radius: 18px;
  border: 1px solid rgba(116, 72, 30, 0.12);
  background: rgba(255, 252, 247, 0.9);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(77, 47, 19, 0.08);
}

.storyboard-reference-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.storyboard-reference-card-body {
  padding: 10px 12px 12px;
}

.storyboard-reference-card-title {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
}

.storyboard-reference-card-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.storyboard-reference-card textarea {
  min-height: 72px;
  resize: vertical;
}

.storyboard-reference-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.storyboard-reference-card-actions .ghost-btn {
  width: 100%;
}

.reference-mention-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.reference-mention-menu {
  position: absolute;
  z-index: 1200;
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(116, 72, 30, 0.16);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.98);
  box-shadow: 0 22px 56px rgba(77, 47, 19, 0.2);
  backdrop-filter: blur(12px);
}

.reference-mention-menu.hidden {
  display: none;
}

.reference-mention-option {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: start;
  gap: 12px;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
  position: relative;
}

.reference-mention-shortcut {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(116, 72, 30, 0.08);
  color: rgba(92, 62, 33, 0.72);
  font-size: 11px;
  font-weight: 700;
}

.reference-mention-option:hover,
.reference-mention-option:focus-visible,
.reference-mention-option.is-active {
  background: rgba(178, 92, 35, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.reference-mention-option img,
.reference-mention-option-fallback {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(116, 72, 30, 0.08);
}

.reference-mention-option-fallback {
  display: grid;
  place-items: center;
  color: rgba(116, 72, 30, 0.62);
  font-weight: 700;
  font-size: 22px;
}

.reference-mention-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reference-mention-option strong,
.reference-mention-option small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mention-option small {
  color: var(--muted);
  font-size: 12px;
}

.reference-mention-option em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: rgba(92, 62, 33, 0.84);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.reference-mention-match {
  padding: 0 3px;
  border-radius: 6px;
  background: rgba(242, 187, 91, 0.28);
  color: inherit;
}

.reference-mention-inline-preview {
  position: absolute;
  z-index: 1199;
  pointer-events: none;
}

.reference-mention-inline-preview.hidden {
  display: none;
}

.reference-mention-inline-chip {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.96);
  border: 1px solid rgba(116, 72, 30, 0.14);
  box-shadow: 0 10px 24px rgba(77, 47, 19, 0.14);
}

.reference-mention-inline-chip img,
.reference-mention-inline-fallback {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(116, 72, 30, 0.08);
}

.reference-mention-inline-fallback {
  display: grid;
  place-items: center;
  color: rgba(116, 72, 30, 0.62);
  font-weight: 700;
}

.reference-mention-inline-chip span {
  min-width: 0;
}

.reference-mention-inline-chip strong,
.reference-mention-inline-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mention-inline-chip small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.reference-mention-inline-chip strong {
  font-size: 12px;
  line-height: 1.15;
}

.reference-mention-textarea-shell {
  position: relative;
  width: 100%;
}

.reference-mention-textarea-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.reference-mention-textarea-overlay.hidden {
  display: none;
}

.reference-textarea-mention {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 1px 8px 1px 4px;
  border-radius: 999px;
  background: rgba(255, 245, 231, 0.98);
  border: 1px solid rgba(210, 146, 71, 0.34);
  box-shadow: 0 6px 14px rgba(77, 47, 19, 0.1);
  color: #7c4b20;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.reference-textarea-mention img,
.reference-textarea-mention-fallback {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(116, 72, 30, 0.12);
}

.reference-textarea-mention-fallback {
  display: inline-grid;
  place-items: center;
  color: rgba(116, 72, 30, 0.72);
  font-size: 10px;
  font-weight: 700;
}

.reference-textarea-mention span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reference-mention-caret-mirror {
  position: absolute;
  visibility: hidden;
  pointer-events: none;
  white-space: pre-wrap;
}

.imagegen-result-card,
.imagegen-stored-card,
.assets-card {
  border-radius: 18px;
  border: 1px solid rgba(116, 72, 30, 0.12);
  background: rgba(255, 252, 247, 0.9);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(77, 47, 19, 0.08);
}

.imagegen-result-card img,
.imagegen-stored-card img,
.assets-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.assets-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgba(39, 24, 13, 0.92);
}

.imagegen-result-card-body,
.imagegen-stored-card-body,
.assets-card-body {
  padding: 10px 12px 12px;
}

.imagegen-result-card-title,
.imagegen-stored-card-title,
.assets-card-title {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
}

.imagegen-result-card-meta,
.imagegen-stored-card-meta,
.assets-card-meta,
.assets-detail-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.imagegen-result-card-actions,
.imagegen-stored-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.imagegen-result-card-actions .ghost-btn,
.imagegen-stored-card-actions .ghost-btn,
.assets-card .ghost-btn {
  width: 100%;
}

.assets-grid {
  min-height: 320px;
}

.assets-card {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.assets-card:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 92, 35, 0.24);
}

.assets-card.is-active {
  border-color: rgba(178, 92, 35, 0.42);
  box-shadow: 0 16px 30px rgba(100, 53, 20, 0.12);
}

.assets-detail {
  display: grid;
  gap: 14px;
}

.assets-detail-preview {
  background: rgba(255, 255, 255, 0.68);
}

.assets-detail-preview-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgba(39, 24, 13, 0.92);
}

.assets-detail-meta {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(123, 75, 34, 0.12);
}

@media (max-width: 1180px) {
  .imagegen-layout-grid,
  .assets-layout-grid,
  .storyboard-layout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .imagegen-picker-toolbar,
  .assets-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .imagegen-mode-switch {
    flex-direction: column;
  }

  .imagegen-mode-button {
    width: 100%;
  }

  .imagegen-lora-helper-head,
  .imagegen-lora-helper-actions-row,
  .imagegen-lora-saved-card {
    grid-template-columns: minmax(0, 1fr);
    flex-direction: column;
  }

  .imagegen-lora-helper-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .imagegen-prompt-set-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .imagegen-prompt-set-head {
    flex-direction: column;
  }

  .imagegen-lora-helper-actions,
  .imagegen-lora-saved-card-actions,
  .imagegen-prompt-set-actions,
  .imagegen-prompt-set-manage {
    width: 100%;
  }

  .imagegen-lora-helper-actions .ghost-btn,
  .imagegen-lora-saved-card-actions .ghost-btn,
  .imagegen-prompt-set-actions .ghost-btn,
  .imagegen-prompt-set-manage .ghost-btn {
    flex: 1 1 140px;
  }

  .imagegen-asset-card-head,
  .imagegen-picker-head {
    flex-direction: column;
  }

  .imagegen-result-grid,
  .imagegen-stored-grid,
  .assets-grid,
  .imagegen-picker-grid,
  .storyboard-reference-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .video-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .imagegen-result-grid,
  .imagegen-stored-grid,
  .assets-grid,
  .imagegen-picker-grid,
  .imagegen-model-grid,
  .storyboard-reference-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

html[data-ui-mode="neo"] .imagegen-goal-shell,
html[data-ui-mode="neo"] .imagegen-cost-estimate-card,
html[data-ui-mode="neo"] .imagegen-actual-cost-card,
html[data-ui-mode="neo"] .imagegen-lora-helper,
html[data-ui-mode="neo"] .imagegen-lora-saved-card,
html[data-ui-mode="neo"] .imagegen-asset-card,
html[data-ui-mode="neo"] .imagegen-picker,
html[data-ui-mode="neo"] .assets-toolbar,
html[data-ui-mode="neo"] .assets-detail,
html[data-ui-mode="neo"] .storyboard-reference-shell,
html[data-ui-mode="neo"] .video-prompt-group-card,
html[data-ui-mode="neo"] .video-result-extra-card,
html[data-ui-mode="neo"] .storyboard-project-binding,
html[data-ui-mode="neo"] .storyboard-reference-card,
html[data-ui-mode="neo"] .imagegen-result-card,
html[data-ui-mode="neo"] .imagegen-stored-card,
html[data-ui-mode="neo"] .assets-card,
html[data-ui-mode="neo"] .imagegen-model-card {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

html[data-ui-mode="neo"] .imagegen-goal-shell,
html[data-ui-mode="neo"] .imagegen-lora-helper,
html[data-ui-mode="neo"] .imagegen-asset-card,
html[data-ui-mode="neo"] .imagegen-picker,
html[data-ui-mode="neo"] .assets-toolbar,
html[data-ui-mode="neo"] .assets-detail,
html[data-ui-mode="neo"] .storyboard-reference-shell,
html[data-ui-mode="neo"] .storyboard-project-binding,
html[data-ui-mode="neo"] .video-result-extra-card {
  border-color: rgba(126, 137, 153, 0.16);
  background: linear-gradient(180deg, rgba(32, 38, 46, 0.76), rgba(18, 22, 28, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .imagegen-goal-chip,
html[data-ui-mode="neo"] .video-preset-chip {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

html[data-ui-mode="neo"] .imagegen-goal-chip,
html[data-ui-mode="neo"] .video-prompt-group-card,
html[data-ui-mode="neo"] .storyboard-task-item,
html[data-ui-mode="neo"] .imagegen-lora-saved-card,
html[data-ui-mode="neo"] .storyboard-task-status,
html[data-ui-mode="neo"] .imagegen-model-badge {
  border-color: rgba(126, 137, 153, 0.16);
  background: linear-gradient(180deg, rgba(39, 46, 55, 0.72), rgba(20, 24, 30, 0.96));
  color: #dfe5ec;
}

html[data-ui-mode="neo"] .imagegen-goal-chip.is-active,
html[data-ui-mode="neo"] .imagegen-mode-button.is-active {
  border-color: rgba(244, 157, 26, 0.34);
  background: linear-gradient(180deg, rgba(255, 186, 82, 0.92), rgba(166, 95, 3, 0.98));
  color: #111317;
}

html[data-ui-mode="neo"] .imagegen-model-card,
html[data-ui-mode="neo"] .storyboard-reference-card,
html[data-ui-mode="neo"] .imagegen-result-card,
html[data-ui-mode="neo"] .imagegen-stored-card,
html[data-ui-mode="neo"] .assets-card {
  border-color: rgba(126, 137, 153, 0.16);
  background: linear-gradient(180deg, rgba(34, 39, 47, 0.88), rgba(19, 23, 28, 0.98));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

html[data-ui-mode="neo"] .imagegen-model-card::before,
html[data-ui-mode="neo"] .storyboard-reference-card::before,
html[data-ui-mode="neo"] .imagegen-result-card::before,
html[data-ui-mode="neo"] .imagegen-stored-card::before,
html[data-ui-mode="neo"] .assets-card::before {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(82, 208, 255, 0), rgba(82, 208, 255, 0.58), rgba(244, 157, 26, 0.42), rgba(244, 157, 26, 0));
}

html[data-ui-mode="neo"] .imagegen-model-card.is-active,
html[data-ui-mode="neo"] .assets-card.is-active {
  border-color: rgba(244, 157, 26, 0.28);
  background: linear-gradient(180deg, rgba(60, 44, 19, 0.86), rgba(23, 24, 28, 0.98));
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

html[data-ui-mode="neo"] .imagegen-model-short,
html[data-ui-mode="neo"] .imagegen-model-cost,
html[data-ui-mode="neo"] .video-result-link {
  color: #f0a831;
}

html[data-ui-mode="neo"] .imagegen-model-desc,
html[data-ui-mode="neo"] .imagegen-model-status,
html[data-ui-mode="neo"] .imagegen-runtime-hint,
html[data-ui-mode="neo"] .storyboard-reference-card-meta,
html[data-ui-mode="neo"] .imagegen-result-card-meta,
html[data-ui-mode="neo"] .imagegen-stored-card-meta,
html[data-ui-mode="neo"] .assets-card-meta,
html[data-ui-mode="neo"] .assets-detail-meta,
html[data-ui-mode="neo"] .video-prompt-group-card p {
  color: #98a5b5;
}

html[data-ui-mode="neo"] .imagegen-asset-card-body,
html[data-ui-mode="neo"] .imagegen-runtime-hint,
html[data-ui-mode="neo"] .assets-detail-meta,
html[data-ui-mode="neo"] .video-result-extra-card {
  border-radius: 0;
}

html[data-ui-mode="neo"] .imagegen-asset-card-body,
html[data-ui-mode="neo"] .imagegen-runtime-hint,
html[data-ui-mode="neo"] .assets-detail-meta {
  border-color: rgba(126, 137, 153, 0.16);
  background: linear-gradient(180deg, rgba(31, 36, 44, 0.76), rgba(19, 23, 29, 0.96));
}

@media (max-width: 720px) {
  html[data-ui-mode="neo"] .imagegen-goal-shell,
  html[data-ui-mode="neo"] .imagegen-cost-estimate-card,
  html[data-ui-mode="neo"] .imagegen-actual-cost-card,
  html[data-ui-mode="neo"] .imagegen-lora-helper,
  html[data-ui-mode="neo"] .imagegen-lora-saved-card,
  html[data-ui-mode="neo"] .imagegen-asset-card,
  html[data-ui-mode="neo"] .imagegen-picker,
  html[data-ui-mode="neo"] .assets-toolbar,
  html[data-ui-mode="neo"] .assets-detail,
  html[data-ui-mode="neo"] .storyboard-reference-shell,
  html[data-ui-mode="neo"] .video-prompt-group-card,
  html[data-ui-mode="neo"] .video-result-extra-card,
  html[data-ui-mode="neo"] .storyboard-project-binding,
  html[data-ui-mode="neo"] .storyboard-reference-card,
  html[data-ui-mode="neo"] .imagegen-result-card,
  html[data-ui-mode="neo"] .imagegen-stored-card,
  html[data-ui-mode="neo"] .assets-card,
  html[data-ui-mode="neo"] .imagegen-model-card,
  html[data-ui-mode="neo"] .imagegen-mode-button,
  html[data-ui-mode="neo"] .imagegen-goal-chip,
  html[data-ui-mode="neo"] .video-preset-chip {
    clip-path: none;
  }
}