:root {
  --bg: #f7f1e7;
  --panel: rgba(255, 251, 244, 0.84);
  --panel-strong: #fffdf9;
  --line: rgba(73, 49, 27, 0.12);
  --line-strong: rgba(73, 49, 27, 0.22);
  --text: #2a2017;
  --muted: #6f5b48;
  --brand: #b25c23;
  --brand-deep: #7b3510;
  --brand-soft: rgba(178, 92, 35, 0.14);
  --accent: #e7c48c;
  --accent-strong: #f0d9b2;
  --success: #1d7c57;
  --shadow: 0 24px 54px rgba(77, 47, 19, 0.1);
  --shadow-soft: 0 14px 32px rgba(71, 46, 21, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 204, 145, 0.5), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(178, 92, 35, 0.12), transparent 22%),
    radial-gradient(circle at bottom right, rgba(125, 65, 23, 0.12), transparent 24%),
    linear-gradient(180deg, #fbf7f0 0%, #f3ecdf 52%, #efe4d3 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(123, 53, 16, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 53, 16, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.5), transparent 78%);
}

.page-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 24px 32px;
}

.site-footer {
  display: flex;
  justify-content: center;
  margin-top: 36px;
  padding: 20px 0 8px;
  border-top: 1px solid rgba(107, 68, 31, 0.12);
}

.site-footer-record-link {
  display: inline-block;
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s ease;
}

.site-footer-record-link:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.referencegen-layout-grid {
  align-items: start;
}

.referencegen-item-list {
  display: grid;
  gap: 14px;
}

.referencegen-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  padding: 14px;
}

.referencegen-item.is-skipped {
  opacity: 0.62;
}

.referencegen-item-head,
.referencegen-badges,
.referencegen-actions,
.referencegen-select-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.referencegen-item-head {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.referencegen-select-row {
  min-width: 0;
  font-weight: 700;
}

.referencegen-select-row span {
  overflow-wrap: anywhere;
}

.referencegen-badges {
  flex-wrap: wrap;
}

.referencegen-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  background: rgba(255, 251, 244, 0.72);
  font-size: 12px;
}

.referencegen-badge-ok {
  color: var(--success);
  border-color: rgba(29, 124, 87, 0.32);
  background: rgba(29, 124, 87, 0.1);
}

.referencegen-item-desc {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.referencegen-card-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.referencegen-image-shell {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 251, 244, 0.78);
}

.referencegen-image-shell img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.referencegen-image-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.referencegen-edit-fields {
  display: grid;
  gap: 10px;
}

.referencegen-edit-fields label {
  display: grid;
  gap: 6px;
}

.referencegen-edit-fields textarea {
  width: 100%;
  resize: vertical;
}

.referencegen-actions {
  flex-wrap: wrap;
}

.referencegen-actions select {
  min-width: 90px;
}

.referencegen-item-status {
  margin: 0;
}

.referencegen-raw-output {
  margin-top: 14px;
}

@media (max-width: 860px) {
  .referencegen-card-grid {
    grid-template-columns: 1fr;
  }

  .referencegen-image-shell {
    min-height: 180px;
  }
}

.admin-shell {
  max-width: 1680px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
  padding: 28px 30px;
  border: 1px solid rgba(107, 68, 31, 0.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(231, 196, 140, 0.42), transparent 34%),
    linear-gradient(135deg, rgba(255, 252, 247, 0.96), rgba(245, 233, 214, 0.88));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -46px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(178, 92, 35, 0.13), transparent 68%);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
  max-width: 14ch;
}

.hero-intro {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hero-copy,
.hero-note p {
  color: var(--muted);
}

.hero-copy {
  max-width: 720px;
  line-height: 1.8;
  font-size: 15px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
}

.ui-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ui-mode-switch-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.ui-mode-switch-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(108, 68, 31, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.ui-mode-button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ui-mode-button:hover {
  transform: translateY(-1px);
}

.ui-mode-button.is-active {
  background: linear-gradient(145deg, rgba(140, 62, 21, 0.98), rgba(107, 43, 12, 0.98));
  color: #fff7f1;
  box-shadow: 0 10px 20px rgba(95, 42, 14, 0.18);
}

.hero-note {
  min-width: 260px;
  max-width: 336px;
  padding: 20px 22px;
  border-radius: 24px;
  border: 1px solid rgba(108, 68, 31, 0.14);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
}

.hero-note strong {
  font-size: 14px;
  letter-spacing: 0.12em;
}

.hero-note p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.hero-note-console {
  display: none !important;
  min-width: min(100%, 360px);
  max-width: 420px;
}

.hero-signal-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero-signal-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(108, 68, 31, 0.14);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.hero-signal-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero-signal-card strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.15;
}

.hero-signal-card p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.workspace-guide {
  margin-bottom: 18px;
}

.workspace-guide-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.workspace-guide-head h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.16;
}

.workspace-guide-context {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: flex-start;
  max-width: 520px;
}

.workspace-guide-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(116, 74, 35, 0.14);
  background: rgba(255, 252, 247, 0.88);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.workspace-guide-chip.is-strong {
  background: linear-gradient(135deg, rgba(140, 62, 21, 0.96), rgba(107, 43, 12, 0.96));
  border-color: rgba(255, 227, 194, 0.14);
  color: #fff7f1;
}

.workspace-guide-switch {
  min-height: 36px;
}

.workspace-guide-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

.workspace-guide-block {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.workspace-guide-actions,
.workspace-case-library {
  display: grid;
  gap: 12px;
}

.workspace-guide-card,
.workspace-case-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.workspace-guide-card-copy,
.workspace-case-card {
  min-width: 0;
}

.workspace-guide-card-copy strong,
.workspace-case-title {
  display: block;
  margin: 4px 0 0;
  font-size: 17px;
  line-height: 1.3;
}

.workspace-guide-card-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

.workspace-guide-card-copy p,
.workspace-case-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.workspace-case-card {
  flex-direction: column;
}

.workspace-case-tags,
.workspace-case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workspace-case-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(178, 92, 35, 0.1);
  color: var(--brand-deep);
  font-size: 12px;
}

.request-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  border-radius: 16px;
  background: rgba(255, 252, 247, 0.86);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.request-status::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(116, 74, 35, 0.28);
  box-shadow: 0 0 0 6px rgba(116, 74, 35, 0.08);
  flex: 0 0 auto;
}

@keyframes requestStatusPulse {
  0% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(178, 92, 35, 0.22);
  }
  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(178, 92, 35, 0);
  }
  100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 0 rgba(178, 92, 35, 0);
  }
}

.request-status.is-running {
  border-color: rgba(178, 92, 35, 0.24);
  background: rgba(255, 247, 235, 0.96);
  color: var(--brand-deep);
}

.request-status.is-running::before {
  background: var(--brand);
  box-shadow: 0 0 0 6px rgba(178, 92, 35, 0.14);
  animation: requestStatusPulse 1.35s ease-in-out infinite;
}

.request-status.is-slow {
  border-color: rgba(178, 92, 35, 0.32);
  background: rgba(250, 236, 214, 0.96);
  color: var(--brand-deep);
}

.request-status.is-slow::before {
  background: #d07a1f;
  box-shadow: 0 0 0 6px rgba(208, 122, 31, 0.16);
  animation: requestStatusPulse 1.35s ease-in-out infinite;
}

.request-status.is-success {
  border-color: rgba(29, 124, 87, 0.24);
  background: rgba(235, 248, 242, 0.98);
  color: var(--success);
}

.request-status.is-success::before {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(29, 124, 87, 0.14);
}

.request-status.is-error {
  border-color: rgba(139, 42, 42, 0.24);
  background: rgba(253, 241, 241, 0.98);
  color: #8b2a2a;
}

.request-status.is-error::before {
  background: #c34747;
  box-shadow: 0 0 0 6px rgba(195, 71, 71, 0.12);
}

.request-status.is-cancelled {
  border-color: rgba(116, 74, 35, 0.2);
  background: rgba(246, 241, 232, 0.98);
  color: var(--ink);
}

.request-status.is-cancelled::before {
  background: rgba(116, 74, 35, 0.48);
  box-shadow: 0 0 0 6px rgba(116, 74, 35, 0.1);
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(520px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.layout-grid:has(> .panel-output[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.workspace-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.workspace-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 108px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 245, 235, 0.92));
  box-shadow: var(--shadow-soft);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workspace-tab:hover {
  transform: translateY(-3px);
  border-color: rgba(178, 92, 35, 0.24);
  box-shadow: 0 18px 34px rgba(88, 54, 26, 0.1);
}

.workspace-tab.is-active {
  background: radial-gradient(circle at top right, rgba(255, 234, 209, 0.22), transparent 28%), linear-gradient(145deg, rgba(140, 62, 21, 0.98), rgba(107, 43, 12, 0.98));
  color: #fff7f1;
  border-color: rgba(255, 227, 194, 0.14);
  box-shadow: 0 22px 42px rgba(95, 42, 14, 0.24);
}

.workspace-tab-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
}

.workspace-tab.is-active .workspace-tab-kicker,
.workspace-tab.is-active .workspace-tab-desc {
  color: rgba(255, 241, 224, 0.9);
}

.workspace-tab-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-tab-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.workspace-panel {
  display: none;
}

.workspace-panel.is-active {
  display: block;
}

.workspace-panels {
  display: grid;
  gap: 14px;
}

.fusion-layout-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
}

.fusion-layout-grid:has(> .panel-output[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 24%);
}

.panel-surface {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 20%),
    var(--panel);
}

.panel-spotlight {
  background:
    linear-gradient(180deg, rgba(81, 51, 24, 0.12), rgba(58, 37, 17, 0.16)),
    rgba(255, 250, 243, 0.72);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.panel-head h2,
.subpanel h3 {
  margin: 0;
}

.panel-head h2 {
  font-size: 24px;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.action-row {
  display: flex;
  gap: 10px;
}

.history-select {
  width: 320px;
  max-width: 55vw;
}

.storyboard-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.resource-graph-list {
  display: grid;
  gap: 14px;
}

.resource-graph-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.7);
  padding: 16px;
}

.resource-graph-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.resource-chain {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.resource-chain-node {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
}

.resource-chain-node.is-complete {
  border-color: rgba(29, 124, 87, 0.26);
  background: rgba(29, 124, 87, 0.1);
  color: var(--success);
}

.resource-project-overview {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(122, 72, 26, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.resource-project-overview-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.resource-section-list {
  display: grid;
  gap: 14px;
}

.resource-section {
  border: 1px solid rgba(122, 72, 26, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.resource-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.resource-section-head h4 {
  margin: 0;
  font-size: 16px;
}

.resource-section-count {
  color: var(--muted);
  font-size: 12px;
}

.resource-section-empty {
  margin: 0;
}

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

.resource-entry-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(116, 74, 35, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 10px 22px rgba(77, 47, 19, 0.07);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.resource-entry-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(77, 47, 19, 0.11);
  border-color: rgba(178, 106, 28, 0.28);
}

.resource-entry-card.is-text {
  padding: 14px;
}

.resource-entry-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: rgba(45, 30, 18, 0.08);
  cursor: pointer;
}

.resource-entry-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.resource-entry-title {
  margin: 0;
  font-size: 15px;
  color: var(--brand-deep);
}

.resource-entry-meta,
.resource-entry-summary,
.resource-entry-action {
  margin: 0;
}

.resource-entry-meta {
  color: var(--muted);
  font-size: 12px;
}

.resource-entry-summary {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.resource-entry-action {
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
}

.resource-detail-dialog {
  width: min(1240px, calc(100vw - 32px));
}

.resource-detail-body {
  display: grid;
  gap: 16px;
}

.resource-detail-image,
.resource-detail-video {
  width: 100%;
  max-height: 72vh;
  border-radius: 14px;
  background: rgba(45, 30, 18, 0.08);
}

.resource-detail-image {
  object-fit: contain;
}

.resource-detail-section {
  display: grid;
  gap: 10px;
}

.resource-detail-section h4 {
  margin: 0;
  font-size: 15px;
}

.resource-detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(178, 106, 28, 0.08);
  border: 1px solid rgba(178, 106, 28, 0.14);
  color: var(--brand-deep);
  font-size: 12px;
}

.resource-detail-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.resource-detail-group-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(122, 72, 26, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.resource-detail-group-card h4 {
  margin: 0;
}

@media (max-width: 760px) {
  .resource-entry-grid {
    grid-template-columns: 1fr;
  }

  .resource-section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  position: relative;
  z-index: 1;
  align-items: start;
}

.more-inputs {
  border: 1px dashed rgba(122, 72, 26, 0.16);
  border-radius: 22px;
  background: rgba(255, 251, 245, 0.68);
  padding: 10px 12px 12px;
}

.more-inputs summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 6px;
  font-size: 14px;
  color: var(--brand-deep);
  user-select: none;
}

.more-inputs summary::-webkit-details-marker {
  display: none;
}

.more-inputs summary::after {
  content: '展开';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(178, 92, 35, 0.16);
  background: rgba(255, 255, 255, 0.76);
  color: var(--brand-deep);
  font-size: 12px;
}

.more-inputs[open] summary::after {
  content: '收起';
}

.more-inputs-panel {
  padding-top: 10px;
}

.full-width {
  grid-column: 1 / -1;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(89, 58, 31, 0.18);
  background: rgba(255, 253, 249, 0.95);
  color: var(--text);
  border-radius: 16px;
  padding: 12px 13px;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(157, 79, 29, 0.5);
  box-shadow: 0 0 0 4px rgba(223, 185, 122, 0.25);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
}

.subpanel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.toggle-grid,
.model-grid {
  display: grid;
  gap: 12px;
}

.toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.toggle-card {
  display: flex;
  gap: 12px;
  align-items: start;
  padding: 14px 15px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.95);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.toggle-card:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 79, 29, 0.22);
  box-shadow: 0 16px 28px rgba(84, 53, 26, 0.08);
}

.toggle-card p,
.field-tip,
.status-text {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 17px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff7f1;
  box-shadow: 0 12px 24px rgba(123, 53, 16, 0.22);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  border: 1px solid var(--line);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.output-box {
  min-height: 360px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 232, 205, 0.08);
  background:
    radial-gradient(circle at top right, rgba(231, 196, 140, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(52, 35, 23, 0.98), rgba(42, 27, 18, 0.98));
  color: #f7ead9;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  line-height: 1.7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.aigc-loading-surface {
  position: relative;
  isolation: isolate;
}

.aigc-loading-surface.is-loading > :not(.aigc-loading-overlay) {
  filter: blur(1.5px);
}

.aigc-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border-radius: inherit;
  background: rgba(255, 247, 236, 0.76);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.aigc-loading-surface.is-loading > .aigc-loading-overlay {
  opacity: 1;
}

.aigc-loading-overlay-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: min(220px, 100%);
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(178, 92, 35, 0.14);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(255, 244, 229, 0.92));
  box-shadow: 0 24px 48px rgba(123, 53, 16, 0.14);
  text-align: center;
}

.aigc-loading-overlay-image {
  width: clamp(72px, 18vw, 112px);
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 16px 28px rgba(123, 53, 16, 0.18);
  animation: aigcLoadingFloat 1.5s ease-in-out infinite;
}

.aigc-loading-overlay-text {
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.6;
}

.primary-btn.is-busy,
.ghost-btn.is-busy {
  cursor: progress;
  transform: none;
}

@keyframes aigcLoadingFloat {
  0% {
    transform: translateY(0) scale(0.98);
  }
  50% {
    transform: translateY(-8px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(0.98);
  }
}

.fusion-output-stack {
  display: grid;
  gap: 14px;
}

.fusion-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.fusion-subtab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.fusion-subtab.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff7f1;
  border-color: rgba(255, 227, 194, 0.14);
  box-shadow: 0 12px 24px rgba(123, 53, 16, 0.22);
}

.fusion-time-group-list {
  display: grid;
  gap: 10px;
}

.fusion-time-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.fusion-empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 232, 205, 0.12);
  background: rgba(41, 27, 18, 0.62);
  color: rgba(247, 234, 217, 0.82);
  text-align: center;
  line-height: 1.7;
}

.fusion-warning-message {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.fusion-group-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 232, 205, 0.09);
  background: rgba(41, 27, 18, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.fusion-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.fusion-group-head h3,
.fusion-group-section h4 {
  margin: 0;
}

.fusion-group-meta {
  margin: 4px 0 0;
  color: rgba(247, 234, 217, 0.72);
  font-size: 12px;
}

.fusion-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fusion-group-section {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.08);
  border: 1px solid rgba(255, 232, 205, 0.08);
}

.fusion-group-section h4 {
  margin-bottom: 10px;
  color: #f7ead9;
}

.fusion-group-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #f7ead9;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  line-height: 1.7;
  max-height: 540px;
  overflow: auto;
}

.liblib-summary-card {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 232, 205, 0.1);
  background: rgba(41, 27, 18, 0.58);
  color: #f7ead9;
  white-space: pre-wrap;
  line-height: 1.8;
}

.storyboard-cost-estimate {
  margin: -4px 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(178, 92, 35, 0.18);
  border-radius: 14px;
  background: rgba(255, 247, 235, 0.86);
  color: var(--brand-deep);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.storyboard-task-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  max-height: 460px;
  overflow: auto;
  padding-right: 2px;
}

.storyboard-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.storyboard-task-row .ghost-btn {
  align-self: stretch;
}

.storyboard-task-item {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid rgba(255, 232, 205, 0.12);
  border-radius: 14px;
  background: rgba(255, 249, 241, 0.76);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(64, 38, 18, 0.08);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.storyboard-task-item:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 92, 35, 0.28);
}

.storyboard-task-item.is-active {
  background: linear-gradient(135deg, rgba(255, 244, 226, 0.98), rgba(239, 216, 181, 0.92));
  border-color: rgba(178, 92, 35, 0.42);
}

.storyboard-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.storyboard-task-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.storyboard-task-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(111, 91, 72, 0.14);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.storyboard-task-status.is-running {
  background: rgba(178, 92, 35, 0.16);
  color: var(--brand-deep);
}

.storyboard-task-status.is-success {
  background: rgba(29, 124, 87, 0.14);
  color: var(--success);
}

.storyboard-task-status.is-error {
  background: rgba(161, 40, 40, 0.12);
  color: #a12828;
}

.storyboard-task-meta,
.storyboard-task-excerpt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.storyboard-result-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.storyboard-result-image-button img {
  display: block;
  width: 100%;
}

.workspace-panels img:not(.storyboard-image-viewer-img) {
  cursor: zoom-in;
}

.storyboard-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.storyboard-image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 21, 12, 0.62);
  backdrop-filter: blur(4px);
}

.storyboard-image-viewer-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 18px;
  border: 1px solid rgba(255, 232, 205, 0.18);
  border-radius: 18px;
  background: #fffaf3;
  box-shadow: 0 26px 80px rgba(24, 16, 8, 0.28);
  overflow: auto;
}

.storyboard-image-viewer-head,
.storyboard-image-viewer-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.storyboard-image-viewer-head h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.storyboard-image-viewer-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  max-height: 70vh;
  padding: 8px;
  border-radius: 12px;
  background: rgba(45, 30, 18, 0.08);
  cursor: grab;
  touch-action: none;
}

.storyboard-image-viewer-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
  background: transparent;
  transition: transform 0.18s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.storyboard-image-viewer.is-dragging .storyboard-image-viewer-canvas,
.storyboard-image-viewer.is-dragging .storyboard-image-viewer-img {
  cursor: grabbing;
}

.storyboard-image-viewer-controls label {
  min-width: 220px;
  flex: 1 1 220px;
}

.liblib-actual-cost-card {
  margin-bottom: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  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);
}

.liblib-cost-estimate-card {
  margin-top: 12px;
  white-space: pre-wrap;
}

.panel-head-inline {
  margin-bottom: 12px;
}

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

.liblib-mode-tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.liblib-mode-tab.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff7f1;
  border-color: rgba(255, 227, 194, 0.14);
  box-shadow: 0 12px 24px rgba(123, 53, 16, 0.22);
}

.liblib-helper-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(105, 66, 31, 0.12);
  background: rgba(255, 251, 244, 0.82);
  color: var(--muted);
  line-height: 1.7;
  min-height: 52px;
}

.liblib-model-panel {
  background:
    radial-gradient(circle at top left, rgba(178, 92, 35, 0.12), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(231, 196, 140, 0.24), transparent 24%),
    rgba(255, 248, 238, 0.84);
}

.liblib-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.liblib-model-grid .model-platform-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.liblib-model-grid-muted {
  margin-bottom: 0;
}

.liblib-unavailable-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(110, 69, 32, 0.16);
}

.liblib-model-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 168px;
  padding: 14px;
  border: 1px solid rgba(110, 69, 32, 0.12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 242, 230, 0.88));
  box-shadow: 0 14px 30px rgba(83, 54, 23, 0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.liblib-model-card:hover {
  transform: translateY(-3px);
  border-color: rgba(178, 92, 35, 0.28);
  box-shadow: 0 18px 36px rgba(93, 58, 24, 0.12);
}

.liblib-model-card.is-active {
  border-color: rgba(123, 53, 16, 0.42);
  background:
    radial-gradient(circle at top right, rgba(231, 196, 140, 0.34), transparent 30%),
    linear-gradient(135deg, rgba(126, 52, 17, 0.98), rgba(94, 38, 11, 0.96));
  color: #fff6ef;
  box-shadow: 0 22px 40px rgba(95, 42, 14, 0.2);
}

.liblib-model-card.is-active .liblib-model-desc,
.liblib-model-card.is-active .liblib-model-cost,
.liblib-model-card.is-active .liblib-model-status,
.liblib-model-card.is-active .liblib-model-short {
  color: rgba(255, 241, 224, 0.9);
}

.liblib-model-card.is-muted {
  cursor: not-allowed;
  color: rgba(89, 76, 64, 0.78);
  background:
    linear-gradient(180deg, rgba(245, 241, 236, 0.98), rgba(232, 227, 220, 0.92));
  border-color: rgba(118, 110, 101, 0.16);
  box-shadow: none;
  opacity: 0.84;
}

.liblib-model-card.is-muted:hover {
  transform: none;
  border-color: rgba(118, 110, 101, 0.16);
  box-shadow: none;
}

.liblib-model-card.is-muted .liblib-model-short,
.liblib-model-card.is-muted .liblib-model-cost,
.liblib-model-card.is-muted .liblib-model-status,
.liblib-model-card.is-muted .liblib-model-desc {
  color: rgba(89, 76, 64, 0.78);
}

.liblib-model-card.is-muted .liblib-model-badge,
.liblib-model-card.is-muted .liblib-model-chip {
  background: rgba(118, 110, 101, 0.1);
  color: rgba(89, 76, 64, 0.84);
}

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

.liblib-model-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

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

.liblib-model-badge {
  align-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(178, 92, 35, 0.14);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.liblib-model-card.is-active .liblib-model-badge {
  background: rgba(255, 244, 227, 0.14);
  color: #fff1de;
}

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

.liblib-model-platform {
  color: rgba(113, 61, 28, 0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.liblib-model-cost {
  font-size: 12px;
  color: rgba(113, 61, 28, 0.88);
  font-weight: 600;
}

.liblib-model-status {
  font-size: 12px;
  color: var(--brand-deep);
}

.liblib-model-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liblib-model-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(178, 92, 35, 0.1);
  color: var(--brand-deep);
  font-size: 11px;
}

.liblib-model-card.is-active .liblib-model-chip {
  background: rgba(255, 244, 227, 0.14);
  color: #fff1de;
}

.liblib-quick-panel {
  background:
    radial-gradient(circle at top right, rgba(231, 196, 140, 0.22), transparent 32%),
    rgba(255, 249, 240, 0.78);
}

.liblib-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.liblib-quick-title {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brand-deep);
}

.liblib-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liblib-chip {
  border: 1px solid rgba(178, 92, 35, 0.16);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.liblib-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(178, 92, 35, 0.3);
  background: rgba(255, 247, 235, 0.96);
}

.liblib-inline-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.liblib-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.liblib-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.liblib-image-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 232, 205, 0.12);
  background: rgba(41, 27, 18, 0.46);
  color: rgba(247, 234, 217, 0.78);
  text-align: center;
  line-height: 1.7;
}

.liblib-image-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 232, 205, 0.1);
  background: rgba(41, 27, 18, 0.58);
}

.liblib-image-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.liblib-image-card a {
  color: #f0d9b2;
  text-decoration: none;
  font-size: 13px;
}

.liblib-image-card a:hover {
  text-decoration: underline;
}

.liblib-image-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liblib-image-card-actions .ghost-btn {
  padding: 9px 12px;
  font-size: 12px;
}

.liblib-output-block {
  margin-top: 14px;
}

.output-box-compact {
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
}

.assets-subtabs {
  margin-bottom: 16px;
}

.sensitive-record-list {
  display: grid;
  gap: 14px;
}

.sensitive-record-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(105, 66, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 251, 244, 0.78);
}

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

.sensitive-record-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.sensitive-record-head p,
.sensitive-record-error,
.sensitive-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.sensitive-record-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(178, 92, 35, 0.2);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand);
  font-size: 12px;
  background: rgba(255, 247, 235, 0.88);
}

.sensitive-record-prompt {
  border-radius: 8px;
  border: 1px solid rgba(105, 66, 31, 0.1);
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
}

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

.sensitive-section {
  border-radius: 8px;
  border: 1px solid rgba(105, 66, 31, 0.1);
  background: rgba(255, 255, 255, 0.58);
  padding: 10px;
}

.sensitive-table-wrap {
  overflow-x: auto;
}

.sensitive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sensitive-table th,
.sensitive-table td {
  border-bottom: 1px solid rgba(105, 66, 31, 0.1);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.sensitive-table th {
  color: var(--muted);
  font-weight: 700;
}

.inline-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-chain-card {
  display: grid;
  gap: 14px;
}

.project-chain-graph {
  display: grid;
  gap: 12px;
}

.project-chain-row {
  display: grid;
  grid-template-columns: minmax(108px, 0.72fr) repeat(2, minmax(140px, 1fr)) repeat(3, minmax(132px, 0.86fr));
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(110, 69, 32, 0.12);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.82);
}

.project-chain-group,
.project-chain-step,
.project-chain-media-step {
  min-width: 0;
  border: 1px solid rgba(110, 69, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.project-chain-group {
  display: grid;
  align-content: center;
  gap: 6px;
  background: rgba(80, 114, 88, 0.1);
}

.project-chain-group strong,
.project-chain-media-head strong {
  color: var(--brand-deep);
}

.project-chain-group span,
.project-chain-kicker,
.project-chain-media-head span,
.project-chain-empty {
  color: var(--muted);
  font-size: 12px;
}

.project-chain-step {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 6px;
}

.project-chain-step p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.project-chain-text-step {
  align-content: start;
}

.project-chain-text-preview {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.project-chain-text-actions {
  justify-content: flex-start;
}

.project-chain-text-actions .ghost-btn {
  flex: 0 0 auto;
}

.project-chain-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(110, 69, 32, 0.14);
  background: rgba(255, 251, 244, 0.92);
}

.project-chain-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-chain-editor-title {
  color: var(--brand-deep);
  font-size: 14px;
  font-weight: 600;
}

.project-shotlist-table-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.project-shotlist-table-wrap {
  overflow: auto;
  border: 1px solid rgba(110, 69, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.project-shotlist-table {
  width: min(100%, 1524px);
  max-width: 1524px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.project-shotlist-table th,
.project-shotlist-table td {
  border-bottom: 1px solid rgba(105, 66, 31, 0.1);
  border-right: 1px solid rgba(105, 66, 31, 0.08);
  padding: 8px;
  vertical-align: top;
  background: rgba(255, 255, 255, 0.72);
}

.project-shotlist-table th:last-child,
.project-shotlist-table td:last-child {
  border-right: 0;
}

.project-shotlist-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-weight: 700;
  background: rgba(246, 242, 236, 0.96);
}

.project-shotlist-col-compact {
  width: 6.3%;
  max-width: 96px;
}

.project-shotlist-col-medium {
  width: 9.2%;
  max-width: 140px;
}

.project-shotlist-col-wide {
  width: 15.75%;
  max-width: 240px;
}

.project-shotlist-cell-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(110, 69, 32, 0.12);
  border-radius: 6px;
  background: rgba(255, 251, 244, 0.9);
  color: var(--text);
  font: inherit;
  line-height: 1.5;
  padding: 6px 8px;
}

textarea.project-shotlist-cell-input {
  min-height: 74px;
  resize: vertical;
  overflow: auto;
}

.project-chain-textarea {
  width: 100%;
  min-height: 132px;
  max-height: 420px;
  resize: vertical;
  overflow: auto;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.project-chain-text-step small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.project-chain-editor-actions {
  justify-content: flex-end;
}

.project-chain-editor .project-chain-textarea {
  min-height: 220px;
}

.project-chain-editor-actions .primary-btn {
  flex: 0 0 auto;
}

.project-chain-media-step {
  display: grid;
  grid-template-rows: auto minmax(72px, 1fr) auto;
  gap: 8px;
}

.project-chain-reference-drop {
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.project-chain-reference-drop.is-drag-over {
  border-color: rgba(29, 124, 87, 0.38);
  background: rgba(233, 248, 238, 0.78);
  box-shadow: inset 0 0 0 1px rgba(29, 124, 87, 0.18);
}

.project-chain-media-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.project-chain-media-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  min-height: 72px;
}

.project-chain-reference-strip {
  grid-template-columns: 1fr;
  align-content: start;
  max-height: 222px;
  overflow-y: auto;
  padding-right: 2px;
}

.project-chain-reference-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 5px;
  align-items: start;
  min-height: 64px;
  padding: 6px;
  border: 1px solid rgba(110, 69, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.72);
}

.project-chain-reference-card.is-editing {
  border-color: rgba(29, 124, 87, 0.34);
  background: rgba(238, 249, 241, 0.82);
}

.project-chain-reference-preview {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
}

.project-chain-reference-card .project-chain-thumb {
  aspect-ratio: 1;
}

.project-chain-reference-body {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-chain-reference-body strong,
.project-chain-reference-body span {
  overflow-wrap: anywhere;
}

.project-chain-reference-body strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.3;
}

.project-chain-reference-body span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-chain-reference-actions {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  gap: 2px;
}

.project-chain-reference-actions .project-chain-icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-width: 0;
  padding: 0;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
}

.project-chain-reference-editor {
  grid-column: 1 / -1;
}

.project-chain-reference-editor {
  display: grid;
  gap: 10px;
}

.project-chain-reference-editor-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.project-chain-reference-editor-preview {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.project-chain-reference-editor-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(110, 69, 32, 0.12);
  background: rgba(246, 242, 236, 0.92);
}

.project-chain-reference-editor-preview figcaption {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-chain-reference-editor-fields {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 0.6fr) minmax(220px, 1.6fr);
  gap: 10px;
  align-items: start;
}

.project-chain-reference-editor label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.project-chain-reference-editor input,
.project-chain-reference-editor select,
.project-chain-reference-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
}

.project-chain-reference-editor-description textarea {
  min-height: 92px;
  resize: vertical;
}

.project-chain-reference-editor-actions {
  justify-content: flex-end;
}

.project-chain-reference-editor-actions .primary-btn {
  flex: 0 0 auto;
}

.project-chain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-chain-actions .ghost-btn {
  flex: 1 1 64px;
  min-width: 0;
}

.project-chain-actions.project-chain-reference-actions {
  display: flex;
}

.project-chain-actions.project-chain-reference-actions .project-chain-icon-btn {
  flex: 0 0 16px;
  width: 16px;
}

.project-chain-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(110, 69, 32, 0.1);
  background: rgba(246, 242, 236, 0.92);
  cursor: pointer;
}

.project-chain-detail-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(110, 69, 32, 0.1);
  background: rgba(246, 242, 236, 0.92);
}

.project-chain-empty {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 6px;
  border: 1px dashed rgba(110, 69, 32, 0.14);
  background: rgba(246, 242, 236, 0.64);
}

@media (max-width: 1180px) {
  .project-chain-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .project-chain-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(105, 66, 31, 0.12);
  background: rgba(255, 251, 244, 0.76);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 14px;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.admin-stack-layout {
  display: grid;
  gap: 20px;
}

.script-base-config-root {
  display: block;
}

.admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  min-height: 112px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 245, 235, 0.92));
  color: var(--text);
  border-radius: 22px;
  padding: 16px 16px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.admin-tab:hover {
  transform: translateY(-3px);
  border-color: rgba(178, 92, 35, 0.24);
  box-shadow: 0 18px 34px rgba(88, 54, 26, 0.1);
}

.admin-tab-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
}

.admin-tab-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-tab-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.admin-tab.is-active {
  background:
    radial-gradient(circle at top right, rgba(255, 234, 209, 0.22), transparent 28%),
    linear-gradient(145deg, rgba(140, 62, 21, 0.98), rgba(107, 43, 12, 0.98));
  color: #fff7f1;
  border-color: rgba(255, 227, 194, 0.14);
  box-shadow: 0 22px 42px rgba(95, 42, 14, 0.24);
}

.admin-tab.is-active .admin-tab-kicker,
.admin-tab.is-active .admin-tab-desc {
  color: rgba(255, 241, 224, 0.9);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.is-active {
  display: block;
}

.admin-stack {
  display: grid;
  gap: 14px;
}

.liblib-visible-input-panel {
  background:
    radial-gradient(circle at 84% 16%, rgba(231, 196, 140, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(251, 244, 235, 0.88));
}

.liblib-visible-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.liblib-visible-input-grid > label,
.liblib-visible-input-grid > section {
  margin: 0;
}

.liblib-visual-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(110, 69, 32, 0.1);
  background: rgba(255, 255, 255, 0.74);
}

.liblib-visual-title {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--brand-deep);
}

.liblib-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.liblib-choice-row-ratios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
}

.liblib-choice-button {
  border: 1px solid rgba(110, 69, 32, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(246, 242, 236, 0.92);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.liblib-choice-button:hover {
  transform: translateY(-1px);
  border-color: rgba(178, 92, 35, 0.28);
}

.liblib-choice-button.is-active {
  background: linear-gradient(135deg, rgba(126, 52, 17, 0.98), rgba(94, 38, 11, 0.96));
  color: #fff6ef;
  border-color: rgba(123, 53, 16, 0.42);
  box-shadow: 0 12px 26px rgba(95, 42, 14, 0.16);
}

.liblib-size-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.liblib-size-lock {
  min-width: 34px;
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(110, 69, 32, 0.08);
  background: rgba(246, 242, 236, 0.92);
  color: var(--brand-deep);
}

.liblib-inline-number {
  max-width: 92px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.admin-summary-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 192px;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-summary-card:hover {
  transform: translateY(-3px);
  border-color: rgba(178, 92, 35, 0.18);
  box-shadow: 0 20px 34px rgba(86, 53, 25, 0.09);
}

.admin-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(157, 79, 29, 0.08);
  color: var(--brand-deep);
}

.admin-badge.is-disabled {
  background: rgba(161, 40, 40, 0.12);
  color: #a12828;
}

.admin-card-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.admin-card-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nested-card {
  background: rgba(255, 253, 248, 0.82);
}

.admin-inline-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.admin-field,
.admin-check {
  display: block;
}

.admin-field-full {
  grid-column: 1 / -1;
}

.admin-check {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding-top: 26px;
}

.danger-btn {
  color: #a12828;
  border-color: rgba(161, 40, 40, 0.2);
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 21, 12, 0.38);
  backdrop-filter: blur(3px);
}

.editor-dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fffaf3;
  box-shadow: 0 24px 70px rgba(47, 36, 24, 0.18);
  padding: 22px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.admin-note-box {
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 14px 16px;
  background: rgba(255, 252, 245, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.admin-note-box strong {
  display: block;
  margin-bottom: 8px;
}

.admin-note-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

.custom-platform-list {
  display: grid;
  gap: 10px;
}

.custom-platform-group {
  padding: 12px 14px;
}

.custom-platform-group .admin-card-controls {
  margin-top: 10px;
}

.default-key-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.readonly-key-input {
  cursor: default;
  background: rgba(250, 246, 239, 0.92);
}

.copy-key-btn {
  margin-top: 8px;
}

.global-settings-intro {
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.95), rgba(255, 255, 255, 0.88));
}

.global-settings-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.global-settings-tab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.global-settings-tab-card {
  height: 100%;
}

.base-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.68fr) minmax(290px, 0.82fr);
  gap: 16px;
}

.base-config-main,
.base-config-side {
  display: grid;
  gap: 14px;
}

.base-config-side {
  align-content: start;
}

.base-config-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(103, 65, 30, 0.1);
  background: rgba(255, 251, 246, 0.78);
  box-shadow: var(--shadow-soft);
}

.base-config-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.base-config-editor {
  padding: 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
}

.base-config-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.base-config-column,
.base-config-wide-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.base-config-wide-stack {
  grid-column: 1 / -1;
}

.base-config-side {
  align-content: start;
  align-self: start;
  position: sticky;
  top: 84px;
}

.rich-prompt-editor {
  min-height: 210px;
  border: 1px solid rgba(89, 58, 31, 0.18);
  background: rgba(255, 253, 250, 0.97);
  color: var(--text);
  border-radius: 18px;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.rich-prompt-editor:focus {
  outline: none;
  border-color: rgba(157, 79, 29, 0.5);
  box-shadow: 0 0 0 4px rgba(223, 185, 122, 0.25);
}

.rich-prompt-editor:empty::before {
  content: attr(data-placeholder);
  color: #9c8a75;
}

.placeholder-inline-chip {
  display: inline-flex;
  align-items: center;
  margin: 1px 3px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(232, 198, 143, 0.44), rgba(243, 224, 197, 0.92));
  border: 1px solid rgba(157, 79, 29, 0.18);
  color: var(--brand-deep);
  font-size: 13px;
  cursor: grab;
  user-select: none;
  vertical-align: baseline;
  box-shadow: 0 6px 14px rgba(115, 67, 26, 0.08);
}

.placeholder-inline-chip.is-dragging {
  opacity: 0.55;
}

.placeholder-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.placeholder-palette-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, max-content));
  justify-content: start;
  gap: 6px 10px;
}

.placeholder-chip {
  border: 1px solid rgba(157, 79, 29, 0.18);
  background: linear-gradient(135deg, rgba(255, 248, 237, 1), rgba(247, 235, 214, 0.95));
  color: var(--brand-deep);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
  cursor: grab;
  user-select: none;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.placeholder-explain-card {
  position: relative;
  padding: 2px 0;
}

.placeholder-explain-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.placeholder-help-btn {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(157, 79, 29, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.placeholder-help-btn[aria-expanded="true"] {
  background: linear-gradient(135deg, rgba(178, 92, 35, 0.94), rgba(123, 53, 16, 0.94));
  color: #fff7f1;
}

.placeholder-explain-body {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 8;
  width: min(320px, calc(100vw - 72px));
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(157, 79, 29, 0.14);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 18px 36px rgba(72, 45, 21, 0.16);
  backdrop-filter: blur(10px);
}

.placeholder-explain-body::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255, 252, 246, 0.98);
  border-left: 1px solid rgba(157, 79, 29, 0.14);
  border-top: 1px solid rgba(157, 79, 29, 0.14);
  transform: rotate(45deg);
}

.placeholder-explain-text,
.placeholder-explain-example {
  margin: 0;
  line-height: 1.7;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

.placeholder-explain-example {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(157, 79, 29, 0.14);
  color: var(--brand-deep);
}

.placeholder-chip:active {
  cursor: grabbing;
}

.placeholder-chip.is-dragging {
  opacity: 0.55;
}

.drop-target.is-over {
  border-color: rgba(157, 79, 29, 0.48);
  box-shadow: 0 0 0 4px rgba(223, 185, 122, 0.18);
}

.version-list {
  display: grid;
  gap: 12px;
}

.version-item {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.version-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.version-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.version-item-copy {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
}

.hidden {
  display: none;
}

.status-success {
  color: var(--success);
}

#admin-status {
  margin: 0 0 14px;
}

.panel-form,
.panel-output {
  height: 100%;
}

@keyframes neo-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes neo-scan {
  0% {
    transform: translate3d(-8%, 0, 0) rotate(0deg);
  }

  100% {
    transform: translate3d(8%, 0, 0) rotate(8deg);
  }
}

html[data-ui-mode="neo"] {
  --bg: #07111f;
  --panel: rgba(10, 18, 33, 0.78);
  --panel-strong: rgba(13, 24, 43, 0.96);
  --line: rgba(107, 224, 255, 0.16);
  --line-strong: rgba(107, 224, 255, 0.32);
  --text: #edf6ff;
  --muted: #93a7c4;
  --brand: #66ecff;
  --brand-deep: #1aa4ff;
  --brand-soft: rgba(41, 179, 255, 0.16);
  --accent: #67f5d1;
  --accent-strong: #245dff;
  --success: #42d8a5;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html[data-ui-mode="neo"] body {
  font-family: "Space Grotesk", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 16%, rgba(53, 177, 255, 0.24), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(103, 245, 209, 0.16), transparent 26%),
    radial-gradient(circle at 78% 78%, rgba(54, 85, 255, 0.2), transparent 24%),
    linear-gradient(180deg, #050b16 0%, #07111f 38%, #091a2d 100%);
}

html[data-ui-mode="neo"] body::before {
  background-image:
    linear-gradient(rgba(117, 212, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 212, 255, 0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 86%);
}

html[data-ui-mode="neo"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(123, 217, 255, 0.06) 46%, transparent 54%),
    radial-gradient(circle at 50% 0%, rgba(70, 145, 255, 0.12), transparent 42%);
  mix-blend-mode: screen;
}

html[data-ui-mode="neo"] .page-shell {
  max-width: 1680px;
  padding-top: 20px;
}

html[data-ui-mode="neo"] .hero {
  align-items: stretch;
  border-color: rgba(107, 224, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(54, 123, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(8, 18, 34, 0.96), rgba(10, 25, 46, 0.92));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

html[data-ui-mode="neo"] .hero::before {
  content: "";
  position: absolute;
  inset: -30% 10% auto auto;
  width: 380px;
  height: 380px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(102, 236, 255, 0.22), transparent 62%);
  filter: blur(4px);
  animation: neo-scan 14s ease-in-out infinite alternate;
}

html[data-ui-mode="neo"] .hero::after {
  right: 4%;
  top: 14%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(26, 164, 255, 0.16), transparent 68%);
}

html[data-ui-mode="neo"] .eyebrow,
html[data-ui-mode="neo"] .workspace-tab-kicker,
html[data-ui-mode="neo"] .hero-signal-label,
html[data-ui-mode="neo"] .workspace-guide-card-kicker,
html[data-ui-mode="neo"] .ui-mode-switch-label {
  color: #7bd9ff;
}

html[data-ui-mode="neo"] .hero h1,
html[data-ui-mode="neo"] .workspace-tab-title,
html[data-ui-mode="neo"] .panel-head h2 {
  font-family: "Space Grotesk", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  letter-spacing: -0.03em;
}

html[data-ui-mode="neo"] .hero h1 {
  max-width: 12ch;
}

html[data-ui-mode="neo"] .hero-copy,
html[data-ui-mode="neo"] .hero-note p,
html[data-ui-mode="neo"] .workspace-tab-desc,
html[data-ui-mode="neo"] .workspace-guide-card-copy p,
html[data-ui-mode="neo"] .workspace-case-summary,
html[data-ui-mode="neo"] .status-text {
  color: #9eb3d1;
}

html[data-ui-mode="neo"] .ui-mode-switch-buttons,
html[data-ui-mode="neo"] .hero-note,
html[data-ui-mode="neo"] .hero-signal-card,
html[data-ui-mode="neo"] .workspace-guide-block,
html[data-ui-mode="neo"] .workspace-guide-card,
html[data-ui-mode="neo"] .workspace-case-card,
html[data-ui-mode="neo"] .request-status,
html[data-ui-mode="neo"] .resource-graph-card,
html[data-ui-mode="neo"] .resource-project-overview,
html[data-ui-mode="neo"] .resource-section,
html[data-ui-mode="neo"] .imagegen-model-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"] .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"] .project-create-card,
html[data-ui-mode="neo"] .project-progress-card,
html[data-ui-mode="neo"] .project-node-panel,
html[data-ui-mode="neo"] .project-image-picker,
html[data-ui-mode="neo"] .project-video-form,
html[data-ui-mode="neo"] .project-video-card,
html[data-ui-mode="neo"] .project-fusion-card,
html[data-ui-mode="neo"] .project-image-card,
html[data-ui-mode="neo"] .project-list-item,
html[data-ui-mode="neo"] .project-version-card,
html[data-ui-mode="neo"] .project-image-picker-card,
html[data-ui-mode="neo"] .project-model-summary-card {
  border-color: rgba(107, 224, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%), rgba(9, 18, 33, 0.82);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.24);
}

html[data-ui-mode="neo"] .workspace-guide,
html[data-ui-mode="neo"] .panel,
html[data-ui-mode="neo"] .workspace-tab,
html[data-ui-mode="neo"] .project-node-button {
  border-color: rgba(107, 224, 255, 0.14);
}

html[data-ui-mode="neo"] .workspace-tabs {
  gap: 16px;
}

html[data-ui-mode="neo"] .workspace-tab {
  min-height: 126px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    linear-gradient(135deg, rgba(11, 23, 41, 0.96), rgba(10, 19, 35, 0.92));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}

html[data-ui-mode="neo"] .workspace-tab::before {
  content: "";
  position: absolute;
  inset: auto -15% -45% 38%;
  height: 120px;
  background: radial-gradient(circle, rgba(102, 236, 255, 0.16), transparent 60%);
  pointer-events: none;
}

html[data-ui-mode="neo"] .workspace-tab:hover,
html[data-ui-mode="neo"] .project-list-item:hover,
html[data-ui-mode="neo"] .project-version-card:hover,
html[data-ui-mode="neo"] .assets-card:hover,
html[data-ui-mode="neo"] .imagegen-model-card:hover {
  border-color: rgba(103, 245, 209, 0.32);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

html[data-ui-mode="neo"] .workspace-tab.is-active,
html[data-ui-mode="neo"] .project-list-item.is-active,
html[data-ui-mode="neo"] .project-version-card.is-active,
html[data-ui-mode="neo"] .assets-card.is-active,
html[data-ui-mode="neo"] .imagegen-model-card.is-active,
html[data-ui-mode="neo"] .project-node-button.is-active,
html[data-ui-mode="neo"] .imagegen-mode-button.is-active {
  color: #ecfbff;
  border-color: rgba(120, 232, 255, 0.4);
  background:
    linear-gradient(135deg, rgba(14, 106, 167, 0.88), rgba(18, 42, 117, 0.92)),
    rgba(9, 18, 33, 0.96);
  box-shadow: 0 24px 52px rgba(5, 104, 180, 0.22);
}

html[data-ui-mode="neo"] .workspace-tab.is-active .workspace-tab-kicker,
html[data-ui-mode="neo"] .workspace-tab.is-active .workspace-tab-desc {
  color: rgba(223, 245, 255, 0.92);
}

html[data-ui-mode="neo"] .panel,
html[data-ui-mode="neo"] .workspace-guide,
html[data-ui-mode="neo"] .workspace-guide-block,
html[data-ui-mode="neo"] .workspace-case-card,
html[data-ui-mode="neo"] .workspace-guide-card {
  border-radius: 28px;
  backdrop-filter: blur(20px);
}

html[data-ui-mode="neo"] .panel::before {
  background: linear-gradient(180deg, rgba(116, 216, 255, 0.08), transparent 24%);
}

html[data-ui-mode="neo"] .workspace-guide-chip {
  border-color: rgba(107, 224, 255, 0.14);
  background: rgba(8, 24, 41, 0.82);
  color: #9ab7d8;
}

html[data-ui-mode="neo"] .workspace-guide-chip.is-strong {
  background: linear-gradient(135deg, rgba(12, 129, 191, 0.96), rgba(32, 83, 255, 0.88));
  color: #f3fdff;
}

html[data-ui-mode="neo"] .request-status::before,
html[data-ui-mode="neo"] .workspace-guide-chip.is-strong,
html[data-ui-mode="neo"] .hero-signal-card:first-child {
  animation: neo-float 5.8s ease-in-out infinite;
}

html[data-ui-mode="neo"] .primary-btn {
  border-color: rgba(120, 232, 255, 0.28);
  background: linear-gradient(135deg, #79f0ff, #44b7ff 58%, #7a7bff 100%);
  color: #04111c;
  box-shadow: 0 18px 32px rgba(26, 164, 255, 0.24);
}

html[data-ui-mode="neo"] .primary-btn:hover {
  box-shadow: 0 22px 44px rgba(26, 164, 255, 0.3);
}

html[data-ui-mode="neo"] .ghost-btn,
html[data-ui-mode="neo"] .ui-mode-button,
html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .project-node-button,
html[data-ui-mode="neo"] .fusion-subtab {
  border-color: rgba(107, 224, 255, 0.16);
  background: rgba(8, 24, 41, 0.7);
  color: var(--text);
}

html[data-ui-mode="neo"] .ghost-btn:hover,
html[data-ui-mode="neo"] .imagegen-mode-button:hover,
html[data-ui-mode="neo"] .project-node-button:hover,
html[data-ui-mode="neo"] .fusion-subtab:hover {
  border-color: rgba(120, 232, 255, 0.3);
  background: rgba(14, 37, 61, 0.92);
}

html[data-ui-mode="neo"] .ui-mode-button.is-active {
  background: linear-gradient(135deg, rgba(103, 245, 209, 0.92), rgba(68, 183, 255, 0.92));
  color: #04111c;
}

html[data-ui-mode="neo"] input,
html[data-ui-mode="neo"] textarea,
html[data-ui-mode="neo"] select,
html[data-ui-mode="neo"] .output-box,
html[data-ui-mode="neo"] pre.output-box,
html[data-ui-mode="neo"] .resource-chain-node,
html[data-ui-mode="neo"] .referencegen-badge,
html[data-ui-mode="neo"] .workspace-case-tag {
  border-color: rgba(107, 224, 255, 0.14);
  background: rgba(7, 18, 32, 0.82);
  color: var(--text);
}

html[data-ui-mode="neo"] input::placeholder,
html[data-ui-mode="neo"] textarea::placeholder {
  color: rgba(147, 167, 196, 0.72);
}

html[data-ui-mode="neo"] input:focus,
html[data-ui-mode="neo"] textarea:focus,
html[data-ui-mode="neo"] select:focus {
  border-color: rgba(103, 245, 209, 0.42);
  box-shadow: 0 0 0 4px rgba(68, 183, 255, 0.12);
}

html[data-ui-mode="neo"] .imagegen-model-badge,
html[data-ui-mode="neo"] .workspace-case-tag,
html[data-ui-mode="neo"] .referencegen-badge-ok,
html[data-ui-mode="neo"] .resource-chain-node.is-complete {
  background: rgba(103, 245, 209, 0.12);
  color: #95ffe2;
  border-color: rgba(103, 245, 209, 0.24);
}

html[data-ui-mode="neo"] .project-progress-track,
html[data-ui-mode="neo"] .assets-detail-preview,
html[data-ui-mode="neo"] .imagegen-asset-preview,
html[data-ui-mode="neo"] .referencegen-image-shell {
  border-color: rgba(107, 224, 255, 0.12);
  background: rgba(7, 18, 32, 0.8);
}

html[data-ui-mode="neo"] .project-progress-fill {
  background: linear-gradient(90deg, #67f5d1, #44b7ff);
}

html[data-ui-mode="neo"] .project-chain-card,
html[data-ui-mode="neo"] .project-chain-group,
html[data-ui-mode="neo"] .project-chain-step,
html[data-ui-mode="neo"] .project-chain-media-step {
  border-color: rgba(107, 224, 255, 0.14);
  background: rgba(9, 18, 33, 0.82);
}

html[data-ui-mode="neo"] .project-chain-thumb {
  border-color: rgba(107, 224, 255, 0.18);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

@media (max-width: 900px) {
  .hero-topline {
    align-items: stretch;
  }

  .ui-mode-switch {
    width: 100%;
    justify-content: space-between;
  }

  .hero-note-console {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .ui-mode-switch {
    gap: 8px;
  }

  .ui-mode-switch-buttons {
    width: 100%;
  }

  .ui-mode-button {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-mode="neo"] .hero::before,
  html[data-ui-mode="neo"] .request-status::before,
  html[data-ui-mode="neo"] .workspace-guide-chip.is-strong,
  html[data-ui-mode="neo"] .hero-signal-card:first-child {
    animation: none;
  }
}

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

  .fusion-layout-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 16px 24px;
  }

  .hero {
    padding: 22px 20px;
    gap: 20px;
  }

  .form-grid,
  .workspace-guide-grid,
  .liblib-quick-grid,
  .admin-grid,
  .inline-fields,
  .admin-inline-card,
  .base-config-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-check {
    padding-top: 6px;
  }
}

@media (max-width: 640px) {
  .hero,
  .workspace-guide-head,
  .admin-toolbar,
  .panel-head,
  .action-row {
    align-items: stretch;
  }

  .hero,
  .workspace-guide-head,
  .admin-toolbar {
    flex-direction: column;
  }

  .action-row,
  .base-config-actions,
  .version-item-actions,
  .admin-card-actions {
    width: 100%;
  }

  .action-row > *,
  .base-config-actions > *,
  .version-item-actions > *,
  .admin-card-actions .ghost-btn,
  .admin-card-actions .primary-btn {
    flex: 1 1 auto;
  }

  .panel,
  .base-config-editor,
  .admin-card,
  .subpanel,
  .workspace-guide-block {
    padding: 14px;
  }

  .admin-tab {
    min-height: 96px;
  }

  .site-footer {
    margin-top: 28px;
    padding-top: 16px;
  }

  .site-footer-record-link {
    font-size: 12px;
  }
}

.status-error {
  color: #a12828;
}

@media (max-width: 1100px) {
  .layout-grid {
    grid-template-columns: 1fr;
  }

  .workspace-tabs {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px;
  }

  .hero {
    padding: 24px 22px;
  }

  .form-grid,
  .toggle-grid,
  .inline-fields,
  .workspace-guide-actions,
  .liblib-visible-input-grid,
  .admin-grid,
  .admin-inline-card,
  .base-config-layout,
  .base-config-columns,
  .admin-card-grid,
  .fusion-group-grid {
    grid-template-columns: 1fr;
  }

  .workspace-guide-card {
    flex-direction: column;
  }

  .base-config-side {
    position: static;
    top: auto;
  }

  .admin-tabs {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    position: static;
  }

  .panel-head {
    flex-direction: column;
    align-items: start;
  }

  .action-row {
    width: 100%;
    flex-direction: column;
  }

  .liblib-size-grid {
    grid-template-columns: 1fr;
  }

  .liblib-size-lock {
    display: none;
  }
}

.workspace-command-deck {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-command-deck .workspace-tabs {
  margin-bottom: 0;
}

.workspace-command-head {
  display: block;
  max-width: 72ch;
}

.workspace-command-head h2,
.workspace-command-metric strong {
  margin: 0;
}

.workspace-command-metrics {
  display: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: min(100%, 560px);
}

.workspace-command-metric {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(116, 74, 35, 0.12);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
}

.workspace-command-metric span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.workspace-command-metric strong {
  font-size: 18px;
  line-height: 1.15;
  color: var(--text);
}

.workspace-command-metric p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

html[data-ui-mode="neo"] .page-shell {
  max-width: 1760px;
  padding: 16px 20px 40px;
}

html[data-ui-mode="neo"] .hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px 16px;
  border-radius: 34px;
  border-color: rgba(92, 218, 255, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(67, 132, 255, 0.16), transparent 30%),
    radial-gradient(circle at 8% 0%, rgba(76, 235, 255, 0.08), transparent 28%),
    linear-gradient(145deg, rgba(6, 13, 24, 0.98), rgba(10, 20, 38, 0.95));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

html[data-ui-mode="neo"] .hero-intro,
html[data-ui-mode="neo"] .hero-note-console {
  min-width: 0;
  padding: 12px 18px 14px;
  border-radius: 26px;
  border: 1px solid rgba(96, 211, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%),
    rgba(8, 16, 28, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-ui-mode="neo"] .hero-topline {
  align-items: center;
  margin-bottom: 8px;
}

html[data-ui-mode="neo"] .hero h1 {
  margin-bottom: 6px;
  font-size: clamp(38px, 5vw, 64px);
  max-width: none;
}

html[data-ui-mode="neo"] .hero-copy {
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.75;
}

html[data-ui-mode="neo"] .hero-links {
  gap: 12px;
  margin-top: 12px;
}

html[data-ui-mode="neo"] .workspace-command-deck {
  padding: 20px 22px 18px;
  border-radius: 30px;
  border-color: rgba(92, 218, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(31, 87, 255, 0.14), transparent 30%),
    linear-gradient(180deg, rgba(8, 17, 30, 0.96), rgba(10, 16, 28, 0.94));
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

html[data-ui-mode="neo"] .workspace-command-head {
  display: block;
  max-width: 72ch;
}

html[data-ui-mode="neo"] .workspace-command-head h2 {
  font-size: 28px;
  line-height: 1.1;
}

html[data-ui-mode="neo"] .workspace-command-metrics {
  min-width: 0;
}

html[data-ui-mode="neo"] .workspace-command-metric {
  padding: 16px 16px 14px;
  border-radius: 20px;
  border-color: rgba(100, 218, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
    rgba(10, 21, 39, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 32px rgba(0, 0, 0, 0.18);
}

html[data-ui-mode="neo"] .workspace-command-metric span {
  color: #7bd9ff;
}

html[data-ui-mode="neo"] .workspace-command-metric strong {
  color: #f4fbff;
  font-size: 20px;
}

html[data-ui-mode="neo"] .workspace-command-metric p {
  color: #8ea8c7;
}

html[data-ui-mode="neo"] .workspace-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(228px, 248px);
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 211, 255, 0.42) rgba(9, 18, 33, 0.68);
  counter-reset: workspace-step;
}

html[data-ui-mode="neo"] .workspace-tabs::-webkit-scrollbar {
  height: 10px;
}

html[data-ui-mode="neo"] .workspace-tabs::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(9, 18, 33, 0.62);
}

html[data-ui-mode="neo"] .workspace-tabs::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(103, 245, 209, 0.66), rgba(68, 183, 255, 0.8));
}

html[data-ui-mode="neo"] .workspace-tab {
  counter-increment: workspace-step;
  scroll-snap-align: start;
  min-height: 156px;
  gap: 10px;
  justify-content: flex-start;
  padding: 18px 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(104, 219, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    linear-gradient(145deg, rgba(10, 20, 36, 0.96), rgba(8, 14, 26, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 30px rgba(0, 0, 0, 0.22);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  isolation: isolate;
}

html[data-ui-mode="neo"] .workspace-tab::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(103, 245, 209, 0.02), rgba(103, 245, 209, 0.74), rgba(68, 183, 255, 0.02));
  opacity: 0.78;
}

html[data-ui-mode="neo"] .workspace-tab::after {
  content: counter(workspace-step, decimal-leading-zero);
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(104, 219, 255, 0.12);
  background: rgba(7, 18, 33, 0.84);
  color: rgba(180, 205, 235, 0.86);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

html[data-ui-mode="neo"] .workspace-tab:hover {
  transform: translateY(-4px);
  border-color: rgba(107, 245, 221, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 26px 44px rgba(0, 0, 0, 0.28);
}

html[data-ui-mode="neo"] .workspace-tab.is-active {
  border-color: rgba(111, 226, 255, 0.34);
  background:
    radial-gradient(circle at top right, rgba(39, 121, 255, 0.28), transparent 34%),
    linear-gradient(145deg, rgba(8, 45, 77, 0.96), rgba(16, 29, 82, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 28px 54px rgba(3, 77, 129, 0.24);
}

html[data-ui-mode="neo"] .workspace-tab.is-active::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(103, 245, 209, 0.08), rgba(103, 245, 209, 1), rgba(68, 183, 255, 0.14));
}

html[data-ui-mode="neo"] .workspace-tab.is-active::after {
  border-color: rgba(103, 245, 209, 0.28);
  background: rgba(6, 23, 41, 0.72);
  color: #effcff;
}

html[data-ui-mode="neo"] .workspace-tab-kicker {
  font-size: 10px;
  letter-spacing: 0.24em;
  color: #7bd9ff;
}

html[data-ui-mode="neo"] .workspace-tab-title {
  max-width: calc(100% - 56px);
  font-size: 22px;
  line-height: 1.1;
}

html[data-ui-mode="neo"] .workspace-tab-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #8ea8c7;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

html[data-ui-mode="neo"] .panel,
html[data-ui-mode="neo"] .workspace-guide,
html[data-ui-mode="neo"] .workspace-case-card,
html[data-ui-mode="neo"] .workspace-guide-card,
html[data-ui-mode="neo"] .workspace-guide-block {
  border-radius: 28px;
  border-color: rgba(92, 218, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
    linear-gradient(160deg, rgba(10, 18, 31, 0.96), rgba(8, 14, 26, 0.92));
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.24);
}

html[data-ui-mode="neo"] .panel-head {
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(92, 218, 255, 0.1);
}

html[data-ui-mode="neo"] .panel-head h2,
html[data-ui-mode="neo"] .subpanel h3,
html[data-ui-mode="neo"] .workspace-guide-head h2 {
  color: #f4fbff;
}

html[data-ui-mode="neo"] .request-status {
  position: relative;
  min-height: 50px;
  padding: 12px 16px 12px 24px;
  border-radius: 18px;
  border-color: rgba(92, 218, 255, 0.12);
  background: rgba(6, 19, 35, 0.86);
  color: #b8cbe4;
}

html[data-ui-mode="neo"] .request-status::before {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 3px;
  height: calc(100% - 20px);
  border-radius: 999px;
  background: rgba(122, 150, 188, 0.42);
  box-shadow: none;
}

html[data-ui-mode="neo"] .request-status.is-running,
html[data-ui-mode="neo"] .request-status.is-slow,
html[data-ui-mode="neo"] .request-status.is-success,
html[data-ui-mode="neo"] .request-status.is-error,
html[data-ui-mode="neo"] .request-status.is-cancelled {
  background: rgba(6, 19, 35, 0.92);
}

html[data-ui-mode="neo"] .request-status.is-running::before,
html[data-ui-mode="neo"] .request-status.is-slow::before {
  background: linear-gradient(180deg, #67f5d1, #44b7ff);
}

html[data-ui-mode="neo"] .request-status.is-success::before {
  background: linear-gradient(180deg, #59ffb0, #2ebf7e);
}

html[data-ui-mode="neo"] .request-status.is-error::before {
  background: linear-gradient(180deg, #ff7c7c, #d24343);
}

html[data-ui-mode="neo"] .request-status.is-cancelled::before {
  background: linear-gradient(180deg, #7a8aa8, #55627a);
}

html[data-ui-mode="neo"] .form-grid {
  gap: 16px;
}

html[data-ui-mode="neo"] label span {
  color: #89a9ca;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[data-ui-mode="neo"] input,
html[data-ui-mode="neo"] textarea,
html[data-ui-mode="neo"] select {
  border-radius: 18px;
  border: 1px solid rgba(92, 218, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    rgba(7, 18, 32, 0.88);
  color: #eff6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-ui-mode="neo"] input:focus,
html[data-ui-mode="neo"] textarea:focus,
html[data-ui-mode="neo"] select:focus {
  transform: none;
  border-color: rgba(103, 245, 209, 0.38);
  box-shadow: 0 0 0 4px rgba(68, 183, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-ui-mode="neo"] .more-inputs,
html[data-ui-mode="neo"] .subpanel,
html[data-ui-mode="neo"] .toggle-card,
html[data-ui-mode="neo"] .liblib-helper-card {
  border-color: rgba(92, 218, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    rgba(8, 20, 35, 0.8);
}

html[data-ui-mode="neo"] .primary-btn,
html[data-ui-mode="neo"] .ghost-btn,
html[data-ui-mode="neo"] .fusion-subtab,
html[data-ui-mode="neo"] .liblib-mode-tab,
html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .project-node-button {
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

html[data-ui-mode="neo"] .primary-btn {
  border: 1px solid rgba(146, 236, 255, 0.3);
  background: linear-gradient(135deg, #8ff7ff, #55c6ff 56%, #7f7dff 100%);
  color: #04111c;
  box-shadow: 0 18px 34px rgba(15, 118, 183, 0.24);
}

html[data-ui-mode="neo"] .ghost-btn,
html[data-ui-mode="neo"] .fusion-subtab,
html[data-ui-mode="neo"] .liblib-mode-tab,
html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .project-node-button {
  border: 1px solid rgba(92, 218, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    rgba(8, 20, 35, 0.86);
  color: #eff6ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-ui-mode="neo"] .primary-btn:hover,
html[data-ui-mode="neo"] .ghost-btn:hover,
html[data-ui-mode="neo"] .fusion-subtab:hover,
html[data-ui-mode="neo"] .liblib-mode-tab:hover,
html[data-ui-mode="neo"] .imagegen-mode-button:hover,
html[data-ui-mode="neo"] .project-node-button:hover {
  transform: translateY(-2px);
}

html[data-ui-mode="neo"] .fusion-subtabs,
html[data-ui-mode="neo"] .liblib-mode-tabs,
html[data-ui-mode="neo"] .imagegen-mode-switch {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(92, 218, 255, 0.12);
  border-radius: 22px;
  background: rgba(7, 18, 32, 0.72);
}

html[data-ui-mode="neo"] .fusion-subtab.is-active,
html[data-ui-mode="neo"] .liblib-mode-tab.is-active,
html[data-ui-mode="neo"] .imagegen-mode-button.is-active,
html[data-ui-mode="neo"] .project-node-button.is-active,
html[data-ui-mode="neo"] .ui-mode-button.is-active {
  border-color: rgba(103, 245, 209, 0.28);
  background: linear-gradient(135deg, rgba(13, 110, 171, 0.96), rgba(28, 52, 139, 0.96));
  color: #f4fbff;
  box-shadow: 0 18px 32px rgba(6, 96, 156, 0.24);
}

html[data-ui-mode="neo"] .output-box,
html[data-ui-mode="neo"] .fusion-group-card,
html[data-ui-mode="neo"] .fusion-empty-state,
html[data-ui-mode="neo"] .liblib-summary-card,
html[data-ui-mode="neo"] .resource-detail-group-card,
html[data-ui-mode="neo"] .storyboard-image-viewer-dialog {
  border-color: rgba(92, 218, 255, 0.12);
  background:
    radial-gradient(circle at top right, rgba(66, 140, 255, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(6, 15, 28, 0.98), rgba(4, 10, 21, 0.98));
  color: #e8f5ff;
}

html[data-ui-mode="neo"] .output-box,
html[data-ui-mode="neo"] .fusion-group-pre,
html[data-ui-mode="neo"] .liblib-summary-card {
  font-family: "JetBrains Mono", "IBM Plex Mono", Consolas, monospace;
}

html[data-ui-mode="neo"] .imagegen-model-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"] .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"] .project-create-card,
html[data-ui-mode="neo"] .project-progress-card,
html[data-ui-mode="neo"] .project-node-panel,
html[data-ui-mode="neo"] .project-image-picker,
html[data-ui-mode="neo"] .project-video-form,
html[data-ui-mode="neo"] .project-video-card,
html[data-ui-mode="neo"] .project-fusion-card,
html[data-ui-mode="neo"] .project-image-card,
html[data-ui-mode="neo"] .project-list-item,
html[data-ui-mode="neo"] .project-version-card,
html[data-ui-mode="neo"] .project-image-picker-card,
html[data-ui-mode="neo"] .project-model-summary-card,
html[data-ui-mode="neo"] .resource-entry-card,
html[data-ui-mode="neo"] .resource-graph-card,
html[data-ui-mode="neo"] .resource-section {
  position: relative;
  overflow: hidden;
  border-color: rgba(92, 218, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 100%),
    linear-gradient(160deg, rgba(10, 18, 32, 0.94), rgba(7, 14, 25, 0.92));
}

html[data-ui-mode="neo"] .imagegen-model-card::before,
html[data-ui-mode="neo"] .project-list-item::before,
html[data-ui-mode="neo"] .project-version-card::before,
html[data-ui-mode="neo"] .resource-entry-card::before,
html[data-ui-mode="neo"] .assets-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(103, 245, 209, 0), rgba(103, 245, 209, 0.82), rgba(68, 183, 255, 0));
  opacity: 0.72;
}

html[data-ui-mode="neo"] .imagegen-model-card.is-active,
html[data-ui-mode="neo"] .project-list-item.is-active,
html[data-ui-mode="neo"] .project-version-card.is-active,
html[data-ui-mode="neo"] .assets-card.is-active,
html[data-ui-mode="neo"] .resource-entry-card:hover,
html[data-ui-mode="neo"] .storyboard-task-item.is-active {
  border-color: rgba(103, 245, 209, 0.26);
  background:
    radial-gradient(circle at top right, rgba(62, 122, 255, 0.18), transparent 26%),
    linear-gradient(160deg, rgba(11, 33, 58, 0.96), rgba(8, 20, 36, 0.96));
}

html[data-ui-mode="neo"] .project-progress-track,
html[data-ui-mode="neo"] .storyboard-image-viewer-canvas,
html[data-ui-mode="neo"] .assets-detail-preview,
html[data-ui-mode="neo"] .imagegen-asset-preview,
html[data-ui-mode="neo"] .referencegen-image-shell {
  border: 1px solid rgba(92, 218, 255, 0.12);
  background: rgba(6, 17, 32, 0.88);
}

html[data-ui-mode="neo"] .project-node-button strong,
html[data-ui-mode="neo"] .project-version-card strong,
html[data-ui-mode="neo"] .resource-entry-title,
html[data-ui-mode="neo"] .storyboard-task-title {
  color: #eff6ff;
}

html[data-ui-mode="neo"] .project-list-meta,
html[data-ui-mode="neo"] .project-list-desc,
html[data-ui-mode="neo"] .project-video-meta,
html[data-ui-mode="neo"] .project-image-meta,
html[data-ui-mode="neo"] .project-fusion-meta,
html[data-ui-mode="neo"] .resource-entry-meta,
html[data-ui-mode="neo"] .resource-entry-summary,
html[data-ui-mode="neo"] .storyboard-task-meta,
html[data-ui-mode="neo"] .storyboard-task-excerpt {
  color: #8ea8c7;
}

html[data-ui-mode="neo"] .storyboard-task-item,
html[data-ui-mode="neo"] .storyboard-project-binding,
html[data-ui-mode="neo"] .resource-project-overview,
html[data-ui-mode="neo"] .resource-detail-chip,
html[data-ui-mode="neo"] .workspace-guide-chip,
html[data-ui-mode="neo"] .workspace-case-tag,
html[data-ui-mode="neo"] .referencegen-badge {
  border-color: rgba(92, 218, 255, 0.12);
  background: rgba(7, 18, 32, 0.78);
  color: #c6dbf5;
}

html[data-ui-mode="neo"] .project-node-bar {
  gap: 12px;
}

html[data-ui-mode="neo"] .site-footer {
  border-top-color: rgba(92, 218, 255, 0.1);
}

html[data-ui-mode="neo"] .site-footer-record-link {
  color: #7f9ec0;
}

@media (max-width: 1280px) {
  .workspace-command-head,
  html[data-ui-mode="neo"] .workspace-command-head,
  html[data-ui-mode="neo"] .hero {
    grid-template-columns: 1fr;
  }

  .workspace-command-metrics,
  html[data-ui-mode="neo"] .workspace-command-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .workspace-command-metrics,
  html[data-ui-mode="neo"] .workspace-command-metrics {
    grid-template-columns: 1fr;
  }

  html[data-ui-mode="neo"] .workspace-tabs {
    grid-auto-columns: minmax(232px, 84vw);
  }
}

@media (max-width: 720px) {
  .workspace-command-deck,
  html[data-ui-mode="neo"] .workspace-command-deck {
    padding: 16px;
  }

  html[data-ui-mode="neo"] .hero-intro,
  html[data-ui-mode="neo"] .hero-note-console {
    padding: 16px;
  }

  html[data-ui-mode="neo"] .workspace-tab {
    min-height: 148px;
  }

  html[data-ui-mode="neo"] .primary-btn,
  html[data-ui-mode="neo"] .ghost-btn,
  html[data-ui-mode="neo"] .fusion-subtab,
  html[data-ui-mode="neo"] .liblib-mode-tab,
  html[data-ui-mode="neo"] .imagegen-mode-button,
  html[data-ui-mode="neo"] .project-node-button {
    clip-path: none;
    border-radius: 16px;
  }
}

html[data-ui-mode="neo"] {
  --bg: #090b10;
  --panel: rgba(20, 24, 30, 0.94);
  --panel-strong: rgba(26, 31, 38, 0.98);
  --line: rgba(126, 137, 153, 0.16);
  --line-strong: rgba(244, 157, 26, 0.34);
  --text: #eef1f5;
  --muted: #9aa6b4;
  --brand: #f49d1a;
  --brand-deep: #b66a09;
  --brand-soft: rgba(244, 157, 26, 0.16);
  --accent: #52d0ff;
  --accent-strong: #0b6f8e;
  --success: #49c28b;
  --shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-ui-mode="neo"] body {
  font-family: "Chakra Petch", "Space Grotesk", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(82, 208, 255, 0.08), transparent 24%),
    radial-gradient(circle at 78% 12%, rgba(244, 157, 26, 0.08), transparent 22%),
    linear-gradient(180deg, #07080b 0%, #0b0e13 42%, #12171d 100%);
}

html[data-ui-mode="neo"] body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244, 157, 26, 0.04), rgba(244, 157, 26, 0));
  background-size: 24px 24px, 24px 24px, 100% 100%;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 88%);
}

html[data-ui-mode="neo"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 5px),
    linear-gradient(90deg, rgba(82, 208, 255, 0.04), transparent 16%, transparent 84%, rgba(244, 157, 26, 0.04));
  mix-blend-mode: normal;
}

html[data-ui-mode="neo"] .hero,
html[data-ui-mode="neo"] .workspace-command-deck,
html[data-ui-mode="neo"] .panel,
html[data-ui-mode="neo"] .workspace-guide,
html[data-ui-mode="neo"] .workspace-case-card,
html[data-ui-mode="neo"] .workspace-guide-card,
html[data-ui-mode="neo"] .workspace-guide-block {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

html[data-ui-mode="neo"] .hero {
  border: 1px solid rgba(244, 157, 26, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    linear-gradient(135deg, rgba(17, 21, 27, 0.98), rgba(12, 15, 20, 0.98));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.4);
}

html[data-ui-mode="neo"] .hero::before,
html[data-ui-mode="neo"] .hero::after {
  animation: none;
  filter: none;
}

html[data-ui-mode="neo"] .hero::before {
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(82, 208, 255, 0), rgba(82, 208, 255, 0.9), rgba(244, 157, 26, 0.9), rgba(244, 157, 26, 0));
}

html[data-ui-mode="neo"] .hero::after {
  inset: auto 0 0 auto;
  width: 38%;
  height: 1px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, rgba(244, 157, 26, 0.72));
}

html[data-ui-mode="neo"] .hero-intro,
html[data-ui-mode="neo"] .hero-note-console,
html[data-ui-mode="neo"] .workspace-command-metric,
html[data-ui-mode="neo"] .more-inputs,
html[data-ui-mode="neo"] .subpanel,
html[data-ui-mode="neo"] .toggle-card,
html[data-ui-mode="neo"] .liblib-helper-card,
html[data-ui-mode="neo"] .request-status,
html[data-ui-mode="neo"] .resource-entry-card,
html[data-ui-mode="neo"] .resource-section,
html[data-ui-mode="neo"] .resource-graph-card,
html[data-ui-mode="neo"] .resource-project-overview,
html[data-ui-mode="neo"] .resource-detail-group-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"] .hero-intro,
html[data-ui-mode="neo"] .hero-note-console {
  border-color: rgba(132, 140, 150, 0.16);
  background:
    radial-gradient(circle at top right, rgba(36, 93, 255, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(7, 24, 43, 0.96), rgba(8, 31, 56, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(102, 236, 255, 0.03);
}

html[data-ui-mode="neo"] .eyebrow,
html[data-ui-mode="neo"] .workspace-tab-kicker,
html[data-ui-mode="neo"] .hero-signal-label,
html[data-ui-mode="neo"] .workspace-guide-card-kicker,
html[data-ui-mode="neo"] .ui-mode-switch-label,
html[data-ui-mode="neo"] .workspace-command-metric span,
html[data-ui-mode="neo"] label span {
  color: #f0a831;
}

html[data-ui-mode="neo"] .hero h1,
html[data-ui-mode="neo"] .workspace-tab-title,
html[data-ui-mode="neo"] .panel-head h2,
html[data-ui-mode="neo"] .workspace-command-head h2 {
  font-family: "Chakra Petch", "Space Grotesk", "Noto Sans SC", sans-serif;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

html[data-ui-mode="neo"] .hero-copy,
html[data-ui-mode="neo"] .hero-note p,
html[data-ui-mode="neo"] .workspace-tab-desc,
html[data-ui-mode="neo"] .workspace-guide-card-copy p,
html[data-ui-mode="neo"] .workspace-case-summary,
html[data-ui-mode="neo"] .status-text,
html[data-ui-mode="neo"] .workspace-command-metric p {
  color: #adc1d8;
}

html[data-ui-mode="neo"] .ui-mode-switch-buttons,
html[data-ui-mode="neo"] .fusion-subtabs,
html[data-ui-mode="neo"] .liblib-mode-tabs,
html[data-ui-mode="neo"] .imagegen-mode-switch {
  padding: 6px;
  border-radius: 0;
  border: 1px solid rgba(126, 137, 153, 0.18);
  background: rgba(20, 24, 30, 0.84);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

html[data-ui-mode="neo"] .ui-mode-button,
html[data-ui-mode="neo"] .primary-btn,
html[data-ui-mode="neo"] .ghost-btn,
html[data-ui-mode="neo"] .fusion-subtab,
html[data-ui-mode="neo"] .liblib-mode-tab,
html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .project-node-button {
  min-height: 42px;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

html[data-ui-mode="neo"] .project-chain-reference-actions .project-chain-icon-btn {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
  clip-path: none;
  letter-spacing: 0;
  text-transform: none;
}

html[data-ui-mode="neo"] .ui-mode-button,
html[data-ui-mode="neo"] .ghost-btn,
html[data-ui-mode="neo"] .fusion-subtab,
html[data-ui-mode="neo"] .liblib-mode-tab,
html[data-ui-mode="neo"] .imagegen-mode-button,
html[data-ui-mode="neo"] .project-node-button {
  border: 1px solid rgba(102, 236, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 28%),
    linear-gradient(145deg, rgba(8, 25, 44, 0.96), rgba(10, 37, 63, 0.96));
  color: #f3fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.16);
}

html[data-ui-mode="neo"] .primary-btn {
  border: 1px solid rgba(244, 157, 26, 0.32);
  background: linear-gradient(180deg, rgba(255, 190, 92, 0.96), rgba(177, 104, 7, 0.98));
  color: #111317;
  box-shadow: 0 12px 22px rgba(131, 74, 0, 0.28);
}

html[data-ui-mode="neo"] .primary-btn:hover,
html[data-ui-mode="neo"] .ghost-btn:hover,
html[data-ui-mode="neo"] .fusion-subtab:hover,
html[data-ui-mode="neo"] .liblib-mode-tab:hover,
html[data-ui-mode="neo"] .imagegen-mode-button:hover,
html[data-ui-mode="neo"] .project-node-button:hover,
html[data-ui-mode="neo"] .ui-mode-button:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 236, 255, 0.3);
}

html[data-ui-mode="neo"] .ui-mode-button.is-active,
html[data-ui-mode="neo"] .fusion-subtab.is-active,
html[data-ui-mode="neo"] .liblib-mode-tab.is-active,
html[data-ui-mode="neo"] .imagegen-mode-button.is-active,
html[data-ui-mode="neo"] .project-node-button.is-active {
  border-color: rgba(244, 157, 26, 0.34);
  background: linear-gradient(180deg, rgba(255, 184, 76, 0.94), rgba(156, 89, 0, 0.98));
  color: #111317;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 20px rgba(131, 74, 0, 0.22);
}

html[data-ui-mode="neo"] .workspace-command-deck {
  border: 1px solid rgba(102, 236, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(36, 93, 255, 0.14), transparent 30%),
    linear-gradient(145deg, rgba(8, 24, 44, 0.98), rgba(7, 18, 32, 0.98));
}

html[data-ui-mode="neo"] .workspace-command-head {
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

html[data-ui-mode="neo"] .workspace-command-metric {
  position: relative;
  border: 1px solid rgba(102, 236, 255, 0.18);
  background:
    radial-gradient(circle at top right, rgba(36, 93, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(8, 27, 49, 0.96), rgba(8, 18, 34, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 22px rgba(0, 0, 0, 0.16);
}

html[data-ui-mode="neo"] .workspace-command-metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(82, 208, 255, 0), rgba(82, 208, 255, 0.7), rgba(244, 157, 26, 0.5), rgba(244, 157, 26, 0));
}

html[data-ui-mode="neo"] .workspace-tabs {
  gap: 10px;
  padding: 6px 0 12px;
  scrollbar-color: rgba(244, 157, 26, 0.52) rgba(26, 31, 38, 0.82);
}

html[data-ui-mode="neo"] .workspace-tab {
  min-height: 148px;
  padding: 18px 18px 16px;
  gap: 10px;
  border-radius: 0;
  border: 1px solid rgba(102, 236, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(36, 93, 255, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(8, 24, 43, 0.98), rgba(7, 18, 33, 0.98));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

html[data-ui-mode="neo"] .workspace-tab::before {
  inset: auto 0 0 0;
  top: auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(82, 208, 255, 0), rgba(82, 208, 255, 0.62), rgba(244, 157, 26, 0.42), rgba(244, 157, 26, 0));
}

html[data-ui-mode="neo"] .workspace-tab::after {
  top: 14px;
  right: 14px;
  min-width: 38px;
  height: 24px;
  border-radius: 0;
  padding: 0 6px;
  border: 1px solid rgba(102, 236, 255, 0.16);
  background: rgba(6, 19, 35, 0.96);
  color: #7bd9ff;
  font-family: "JetBrains Mono", monospace;
}

html[data-ui-mode="neo"] .workspace-tab:hover {
  border-color: rgba(102, 236, 255, 0.28);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24);
}

html[data-ui-mode="neo"] .workspace-tab.is-active {
  border-color: rgba(244, 157, 26, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 205, 112, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(38, 31, 18, 0.98), rgba(20, 21, 24, 0.98));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(244, 157, 26, 0.08);
}

html[data-ui-mode="neo"] .workspace-tab.is-active::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(244, 157, 26, 0), rgba(244, 157, 26, 1), rgba(82, 208, 255, 0.5), rgba(82, 208, 255, 0));
}

html[data-ui-mode="neo"] .workspace-tab.is-active .workspace-tab-kicker,
html[data-ui-mode="neo"] .workspace-tab.is-active .workspace-tab-desc {
  color: #dceeff;
}

html[data-ui-mode="neo"] .workspace-tab-title {
  max-width: calc(100% - 52px);
}

html[data-ui-mode="neo"] .panel,
html[data-ui-mode="neo"] .workspace-guide,
html[data-ui-mode="neo"] .workspace-case-card,
html[data-ui-mode="neo"] .workspace-guide-card,
html[data-ui-mode="neo"] .workspace-guide-block {
  border: 1px solid rgba(102, 236, 255, 0.16);
  background:
    radial-gradient(circle at top right, rgba(36, 93, 255, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(8, 22, 40, 0.98), rgba(7, 17, 31, 0.98));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: none;
}

html[data-ui-mode="neo"] .panel::before {
  background: linear-gradient(90deg, rgba(82, 208, 255, 0), rgba(82, 208, 255, 0.08), rgba(244, 157, 26, 0.08), rgba(244, 157, 26, 0));
}

html[data-ui-mode="neo"] .panel-head {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

html[data-ui-mode="neo"] .request-status {
  min-height: 46px;
  padding: 11px 14px 11px 18px;
  border: 1px solid rgba(102, 236, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 26%),
    linear-gradient(145deg, rgba(8, 26, 46, 0.96), rgba(8, 19, 35, 0.96));
}

html[data-ui-mode="neo"] .request-status::before {
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  border-radius: 0;
  background: rgba(82, 208, 255, 0.42);
}

html[data-ui-mode="neo"] .request-status.is-running::before,
html[data-ui-mode="neo"] .request-status.is-slow::before,
html[data-ui-mode="neo"] .request-status.is-success::before,
html[data-ui-mode="neo"] .request-status.is-error::before,
html[data-ui-mode="neo"] .request-status.is-cancelled::before {
  animation: none;
}

html[data-ui-mode="neo"] .request-status.is-running::before,
html[data-ui-mode="neo"] .request-status.is-slow::before {
  background: #f49d1a;
}

html[data-ui-mode="neo"] .request-status.is-success::before {
  background: #49c28b;
}

html[data-ui-mode="neo"] .request-status.is-error::before {
  background: #e35f5f;
}

html[data-ui-mode="neo"] input,
html[data-ui-mode="neo"] textarea,
html[data-ui-mode="neo"] select,
html[data-ui-mode="neo"] .output-box,
html[data-ui-mode="neo"] pre.output-box,
html[data-ui-mode="neo"] .resource-chain-node,
html[data-ui-mode="neo"] .referencegen-badge,
html[data-ui-mode="neo"] .workspace-case-tag,
html[data-ui-mode="neo"] .storyboard-task-item,
html[data-ui-mode="neo"] .storyboard-project-binding,
html[data-ui-mode="neo"] .resource-detail-chip,
html[data-ui-mode="neo"] .workspace-guide-chip,
html[data-ui-mode="neo"] .project-progress-track,
html[data-ui-mode="neo"] .assets-detail-preview,
html[data-ui-mode="neo"] .imagegen-asset-preview,
html[data-ui-mode="neo"] .referencegen-image-shell,
html[data-ui-mode="neo"] .storyboard-image-viewer-canvas {
  border-color: rgba(126, 137, 153, 0.16);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(32, 38, 46, 0.86), rgba(18, 22, 28, 0.98));
}

html[data-ui-mode="neo"] .output-box,
html[data-ui-mode="neo"] .fusion-group-card,
html[data-ui-mode="neo"] .fusion-empty-state,
html[data-ui-mode="neo"] .liblib-summary-card,
html[data-ui-mode="neo"] .storyboard-image-viewer-dialog {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

html[data-ui-mode="neo"] input:focus,
html[data-ui-mode="neo"] textarea:focus,
html[data-ui-mode="neo"] select:focus {
  border-color: rgba(244, 157, 26, 0.32);
  box-shadow: 0 0 0 3px rgba(244, 157, 26, 0.1);
}

html[data-ui-mode="neo"] .project-progress-fill {
  background: linear-gradient(90deg, #f49d1a, #e7bf6c 46%, #52d0ff 100%);
}

html[data-ui-mode="neo"] .site-footer {
  border-top-color: rgba(126, 137, 153, 0.12);
}

html[data-ui-mode="neo"] .site-footer-record-link {
  color: #8e98a6;
}

@media (max-width: 720px) {
  html[data-ui-mode="neo"] .hero,
  html[data-ui-mode="neo"] .workspace-command-deck,
  html[data-ui-mode="neo"] .panel,
  html[data-ui-mode="neo"] .workspace-guide,
  html[data-ui-mode="neo"] .workspace-case-card,
  html[data-ui-mode="neo"] .workspace-guide-card,
  html[data-ui-mode="neo"] .workspace-guide-block,
  html[data-ui-mode="neo"] .hero-intro,
  html[data-ui-mode="neo"] .hero-note-console,
  html[data-ui-mode="neo"] .workspace-command-metric,
  html[data-ui-mode="neo"] .more-inputs,
  html[data-ui-mode="neo"] .subpanel,
  html[data-ui-mode="neo"] .toggle-card,
  html[data-ui-mode="neo"] .liblib-helper-card,
  html[data-ui-mode="neo"] .request-status,
  html[data-ui-mode="neo"] .resource-entry-card,
  html[data-ui-mode="neo"] .resource-section,
  html[data-ui-mode="neo"] .resource-graph-card,
  html[data-ui-mode="neo"] .resource-project-overview,
  html[data-ui-mode="neo"] .resource-detail-group-card,
  html[data-ui-mode="neo"] .output-box,
  html[data-ui-mode="neo"] .fusion-group-card,
  html[data-ui-mode="neo"] .fusion-empty-state,
  html[data-ui-mode="neo"] .liblib-summary-card,
  html[data-ui-mode="neo"] .storyboard-image-viewer-dialog {
    clip-path: none;
  }
}

.workspace-project-context {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.workspace-project-context-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.workspace-project-context-copy h2,
.workspace-guide-case-head h3 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.18;
}

.workspace-project-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-project-context-actions {
  display: flex;
  align-items: center;
}

.workspace-guide-grid-compact {
  grid-template-columns: minmax(0, 1.22fr) minmax(320px, 0.78fr);
  align-items: start;
}

.workspace-guide-overview-block {
  display: grid;
  gap: 16px;
}

.workspace-guide-actions-compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workspace-guide-actions-compact .workspace-guide-card {
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding: 14px;
}

.workspace-guide-actions-compact .workspace-guide-card .ghost-btn {
  width: 100%;
}

.workspace-guide-case-head {
  margin-bottom: 14px;
}

.workspace-case-library-compact {
  gap: 10px;
}

.workspace-case-library-compact .workspace-case-card {
  min-height: 0;
  padding: 14px;
  gap: 10px;
}

.workspace-guide-actions-compact .workspace-guide-card-copy p,
.workspace-case-library-compact .workspace-case-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.workspace-case-library-compact .workspace-case-actions .ghost-btn {
  min-height: 36px;
  padding: 8px 12px;
}

html[data-ui-mode="neo"] .workspace-project-context {
  border: 1px solid rgba(126, 137, 153, 0.16);
  background:
    linear-gradient(90deg, rgba(244, 157, 26, 0.08), rgba(82, 208, 255, 0.04) 42%, transparent),
    linear-gradient(180deg, rgba(22, 26, 32, 0.98), rgba(14, 17, 22, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

html[data-ui-mode="neo"] .workspace-project-context .workspace-guide-chip {
  color: #d8dfe8;
}

@media (max-width: 1080px) {
  .workspace-guide-grid-compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-project-context {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-project-context-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .workspace-guide-actions-compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-project-context-copy h2,
  .workspace-guide-case-head h3 {
    font-size: 21px;
  }
}
