:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d0f14;
  color: #eef3f6;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.boot-error {
  display: grid;
  place-content: center;
  gap: 12px;
  width: 100vw;
  height: 100vh;
  padding: 24px;
  background: #090a0c;
  color: #eef3f6;
  text-align: center;
}

.boot-error strong {
  font-size: 20px;
}

.boot-error span {
  color: #9ca6ad;
}

.boot-error button {
  justify-self: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  background: #ffffff;
  color: #0b0d10;
  cursor: pointer;
  font-weight: 760;
}

.glyph {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  color: currentColor;
  font-weight: 800;
  line-height: 1;
}

.landing-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background: #111111;
  color: #f4f4f4;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 82px;
  padding: 0 clamp(14px, 2vw, 28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.landing-nav button,
.landing-login,
.landing-search {
  height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  background: #232323;
  color: #d8d8d8;
  cursor: pointer;
  font-weight: 760;
}

.landing-nav button:hover {
  background: #303030;
  color: #ffffff;
}

.landing-login {
  background: #2b2418;
  color: #ffd58b;
}

.landing-banners {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.65fr 1fr;
  gap: 6px;
  padding: 0 6px 58px;
  overflow: hidden;
}

.landing-banner {
  position: relative;
  height: 178px;
  overflow: hidden;
  border-radius: 0 0 10px 10px;
  background: #202020;
}

.landing-banner.featured {
  height: 184px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

.landing-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.04);
}

.landing-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.62), transparent 68%);
}

.landing-banner div {
  position: absolute;
  left: clamp(22px, 4vw, 84px);
  bottom: 26px;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.landing-banner strong {
  font-size: clamp(20px, 2.2vw, 32px);
  letter-spacing: 0;
}

.landing-banner span {
  color: #d3d3d3;
  font-size: 13px;
}

.banner-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.banner-dots i {
  width: 12px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.banner-dots i.active {
  width: 24px;
  background: rgba(255, 255, 255, 0.7);
}

.recent-projects,
.tv-show {
  padding: 0 6px 48px;
}

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

.section-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.section-head button {
  background: transparent;
  color: #a7a7a7;
  cursor: pointer;
}

.project-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 8px;
  color: #dcdcdc;
  cursor: pointer;
}

.project-thumb {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border-radius: 8px;
  background: #222222;
  color: #606060;
}

.project-local-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(30,30,30,0.82);
  color: #aaa;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.create-thumb {
  border: 1px solid rgba(167, 186, 205, 0.44);
  background: linear-gradient(138deg, #343a40, #1e252c);
  color: #ffffff;
}

.create-thumb strong {
  font-size: 15px;
}

.project-model {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  border-radius: 8px;
  background: #30363d;
  color: #ffffff;
  font-size: 14px;
}

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

.project-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-meta button {
  color: #9d9d9d;
}

.project-card > span {
  color: #8f8f8f;
  font-size: 13px;
}

.landing-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(280px, 38vw);
  border: 1px solid #484848;
}

.landing-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3f3f3;
}

.category-row {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.category-row button {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #3e3e3e;
  border-radius: 8px;
  background: #1d1d1d;
  color: #c7c7c7;
  cursor: pointer;
}

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

.show-grid article {
  display: grid;
  gap: 10px;
}

.show-grid img {
  width: 100%;
  aspect-ratio: 1.9;
  object-fit: cover;
  border-radius: 8px;
  background: #222222;
}

.show-grid strong {
  font-size: 14px;
}

.app-shell {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 8%, rgba(73, 154, 255, 0.16), transparent 24%),
    radial-gradient(circle at 76% 14%, rgba(252, 92, 145, 0.14), transparent 22%),
    #090a0c;
}

.left-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 18px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 11, 15, 0.78);
  backdrop-filter: blur(24px);
}

.brand-mark,
.icon-button,
.mini-icon {
  display: inline-grid;
  place-items: center;
  color: #f5fafb;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #5ae2d0, #fe7198 48%, #f2d66d);
  box-shadow: 0 16px 36px rgba(254, 113, 152, 0.25);
}

.tool-stack {
  display: grid;
  gap: 10px;
}

.tool-stack.bottom {
  margin-top: auto;
}

.icon-button,
.mini-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #cbd7dc;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.icon-button:hover,
.mini-icon:hover,
.icon-button.active {
  transform: translateY(-1px);
  background: rgba(90, 226, 208, 0.18);
  color: #ffffff;
}

.workspace {
  display: grid;
  grid-template-rows: 68px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(320px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    rgba(9, 10, 12, 0.84);
  background-size: 24px 24px;
  backdrop-filter: blur(24px);
}

.project-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-title strong,
.project-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title strong {
  font-size: 15px;
}

.project-title small {
  margin-top: 3px;
  color: #81909a;
  font-size: 12px;
}

.tapnow-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 10px 18px rgba(74, 164, 255, 0.28));
}

.tapnow-logo i {
  position: absolute;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  opacity: 0.9;
  mix-blend-mode: screen;
}

.tapnow-logo i:nth-child(1) {
  transform: translate(-5px, -2px);
  background: #50e4d1;
}

.tapnow-logo i:nth-child(2) {
  transform: translate(5px, -2px);
  background: #6d8cff;
}

.tapnow-logo i:nth-child(3) {
  transform: translate(0, 6px);
  background: #ff6d9f;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.main-nav button,
.nav-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: #c9cdd1;
  cursor: pointer;
}

.main-nav button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-link-button {
  color: #b7bbc0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 14px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #7f8e97;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef3f6;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.pill-button,
.generate-wide,
.mode-card,
.chips button,
.layer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  color: #eef3f6;
  cursor: pointer;
}

.pill-button {
  height: 42px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.08);
}

.pill-button.primary,
.generate-wide {
  background: linear-gradient(135deg, #56dcca, #fb7198);
  color: #081012;
  font-weight: 760;
}

.content-grid {
  display: grid;
  grid-template-columns: 326px minmax(420px, 1fr) 304px;
  min-height: 0;
  height: 100%;
}

.prompt-panel,
.inspector {
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  background: rgba(9, 10, 12, 0.72);
  border-color: rgba(255, 255, 255, 0.07);
}

.prompt-panel {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.inspector {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-heading,
.control-row,
.card-meta,
.card-footer,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-heading {
  margin-bottom: 16px;
  font-weight: 760;
}

.home-prompt {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfd4d8;
  font-size: 12px;
}

.home-prompt h1 {
  margin: 0;
  color: #f4f5f5;
  font-size: 29px;
  line-height: 1.08;
}

.panel-heading .mini-icon,
.card-meta .mini-icon {
  width: 30px;
  height: 30px;
}

.prompt-card {
  display: grid;
  gap: 10px;
  margin-bottom: 13px;
}

.prompt-card span,
.control-row span,
.property-list span,
.selected-preview span,
.card-meta span {
  color: #91a0aa;
  font-size: 12px;
}

.prompt-card textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #eef3f6;
  line-height: 1.55;
}

.chips {
  display: grid;
  gap: 8px;
}

.chips button {
  justify-content: flex-start;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce7eb;
  font-size: 12px;
}

.control-block {
  margin: 20px 0;
}

.control-row {
  margin-bottom: 10px;
  font-size: 13px;
}

input[type='range'] {
  width: 100%;
  accent-color: #5ae2d0;
}

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segmented-control,
.tone-row,
.inspector-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented-control {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.segmented-control button,
.tone-row button,
.inspector-actions button {
  min-width: 0;
  border-radius: 7px;
  background: transparent;
  color: #b9c5cb;
  cursor: pointer;
}

.segmented-control button {
  flex: 1;
  height: 31px;
  padding: 0 8px;
  font-size: 12px;
}

.segmented-control.compact button {
  padding: 0 6px;
}

.segmented-control button.active,
.tone-row button.active {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.mode-card {
  min-height: 72px;
  padding: 12px 8px;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
}

.mode-card.selected {
  border-color: rgba(90, 226, 208, 0.55);
  background: rgba(90, 226, 208, 0.12);
}

.tone-row {
  margin: 13px 0 0;
  flex-wrap: wrap;
}

.tone-row button {
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
}

.generate-wide {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
}

.canvas-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.canvas-viewport:active {
  cursor: grabbing;
}

.canvas-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 64% 20%, rgba(254, 113, 152, 0.12), transparent 30%),
    radial-gradient(circle at 32% 80%, rgba(90, 226, 208, 0.1), transparent 28%),
    #0b0d10;
  background-size:
    23px 23px,
    auto,
    auto,
    auto;
}

.canvas-background.grid-hidden {
  background:
    radial-gradient(circle at 64% 20%, rgba(254, 113, 152, 0.14), transparent 30%),
    radial-gradient(circle at 32% 80%, rgba(90, 226, 208, 0.13), transparent 28%),
    #0b0d10;
}

.canvas-stage {
  position: absolute;
  inset: 0;
  width: 1400px;
  height: 980px;
  transform-origin: 0 0;
}

.connector-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.connector-layer path {
  fill: none;
  stroke: rgba(90, 226, 208, 0.58);
  stroke-width: 2.4;
  stroke-dasharray: 8 9;
  filter: drop-shadow(0 0 8px rgba(90, 226, 208, 0.16));
}

.canvas-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(21, 25, 33, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  cursor: grab;
  user-select: none;
}

.canvas-card.connect-mode {
  cursor: crosshair;
}

.canvas-card:active {
  cursor: grabbing;
}

.canvas-card.selected {
  border-color: rgba(90, 226, 208, 0.9);
  box-shadow:
    0 0 0 4px rgba(90, 226, 208, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.35);
}

.canvas-card.link-source {
  border-color: rgba(254, 113, 152, 0.95);
  box-shadow:
    0 0 0 4px rgba(254, 113, 152, 0.14),
    0 24px 70px rgba(0, 0, 0, 0.35);
}

.connection-port {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 2px solid rgba(11, 13, 18, 0.96);
  border-radius: 50%;
  background: #5ae2d0;
  box-shadow: 0 0 0 2px rgba(90, 226, 208, 0.28);
  cursor: crosshair;
  opacity: 0;
  transform: translateY(-50%) scale(0.86);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.connection-port.input {
  left: -9px;
}

.connection-port.output {
  right: -9px;
  background: #fb7198;
  box-shadow: 0 0 0 2px rgba(251, 113, 152, 0.28);
}

.canvas-card:hover .connection-port,
.canvas-card.selected .connection-port,
.canvas-card.connect-mode .connection-port {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.connection-port:hover {
  background: #ffffff;
}

.canvas-card img,
.selected-preview img {
  width: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.canvas-card img {
  height: 48%;
  min-height: 98px;
}

.card-meta {
  margin: 12px 0 7px;
}

.card-meta h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.canvas-card p {
  flex: 1;
  margin: 0;
  color: #c6d2d8;
  font-size: 13px;
  line-height: 1.55;
}

.card-footer {
  margin-top: 10px;
  color: #5ae2d0;
}

.palette-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 72px;
  overflow: hidden;
  border-radius: 6px;
}

.floating-controls,
.view-toolbar,
.mini-map {
  position: absolute;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(11, 13, 18, 0.78);
  backdrop-filter: blur(18px);
}

.view-toolbar {
  left: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 6px 10px;
  border-radius: 18px;
}

.featured-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 78px;
  z-index: 9;
  pointer-events: none;
}

.featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #ffffff;
}

.featured-head span {
  color: #8e969c;
  font-size: 12px;
}

.featured-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.featured-card {
  min-height: 118px;
  padding: 16px 15px;
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
  background: #1d2025;
  box-shadow: inset 0 -58px 80px rgba(0, 0, 0, 0.42);
}

.featured-card.sunset {
  background:
    linear-gradient(135deg, rgba(255, 122, 91, 0.28), rgba(33, 68, 116, 0.62)),
    linear-gradient(45deg, #6a3c4f, #14171d);
}

.featured-card.electric {
  background:
    radial-gradient(circle at 32% 36%, rgba(86, 147, 255, 0.76), transparent 27%),
    linear-gradient(135deg, #101928, #0a0b0e);
}

.featured-card.cinema {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62)),
    linear-gradient(135deg, #2a6f65, #2e2538 58%, #08090b);
}

.featured-card span {
  color: #e7eef2;
  font-size: 12px;
}

.featured-card h2 {
  margin: 8px 0 5px;
  max-width: 280px;
  font-size: 23px;
  line-height: 0.98;
}

.featured-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.view-toolbar .icon-button {
  width: 32px;
  height: 32px;
  background: transparent;
}

.view-toolbar .help-button {
  margin-left: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-weight: 800;
}

.zoom-slider {
  width: 82px;
  height: 4px;
  margin: 0 4px;
}

.floating-controls {
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
}

.floating-controls span {
  min-width: 48px;
  text-align: center;
  color: #c8d2d7;
  font-size: 13px;
}

.mini-map {
  left: 20px;
  bottom: 214px;
  width: 140px;
  height: 104px;
}

.mini-map span {
  position: absolute;
  border: 1px solid rgba(90, 226, 208, 0.65);
  border-radius: 3px;
  background: rgba(90, 226, 208, 0.16);
}

.mini-map span.active {
  background: rgba(254, 113, 152, 0.38);
  border-color: rgba(254, 113, 152, 0.85);
}

.help-popover {
  position: absolute;
  left: 20px;
  top: 76px;
  z-index: 12;
  display: grid;
  gap: 7px;
  width: 236px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(14, 16, 22, 0.92);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
  color: #cbd6db;
  font-size: 12px;
}

.help-popover strong {
  color: #ffffff;
  font-size: 13px;
}

.link-hint {
  position: absolute;
  left: 50%;
  top: 142px;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(90, 226, 208, 0.28);
  border-radius: 999px;
  background: rgba(10, 13, 17, 0.84);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
  color: #e8f7f5;
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.prompt-composer {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 14;
  display: grid;
  grid-template-rows: auto minmax(64px, 1fr) auto;
  width: min(632px, calc(100% - 36px));
  min-height: 196px;
  padding: 12px 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: #1e1f21;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 80px rgba(0, 0, 0, 0.46);
  transform: translateX(-50%);
}

.composer-actions,
.composer-footer,
.composer-send {
  display: flex;
  align-items: center;
}

.composer-actions {
  gap: 8px;
}

.composer-icon,
.composer-expand,
.dock-plus,
.send-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7dde0;
  cursor: pointer;
}

.composer-expand {
  width: 24px;
  height: 24px;
  margin-left: auto;
  background: transparent;
  color: #ffffff;
}

.prompt-composer textarea {
  width: 100%;
  min-height: 72px;
  padding: 18px 0 8px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f0f2f3;
  line-height: 1.5;
}

.prompt-composer textarea::placeholder {
  color: #8b8b8b;
}

.composer-footer {
  justify-content: space-between;
  gap: 12px;
}

.model-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 6px;
  border-radius: 8px;
  background: transparent;
  color: #f5f5f5;
  cursor: pointer;
  font-weight: 740;
}

.composer-send {
  gap: 8px;
}

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 33px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #cfd4d7;
  font-size: 12px;
}

.send-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #a7abae;
  color: #1c1f21;
}

.hidden-file {
  display: none;
}

.right-dock {
  position: absolute;
  right: 0;
  top: 86px;
  z-index: 13;
  width: 34px;
  height: 72%;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: #d9e1e4;
}

.right-dock::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.58), transparent);
}

.dock-plus {
  position: absolute;
  left: -28px;
  top: 46%;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #0d0f14;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #eff5f6;
}

.dock-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: rgba(33, 33, 33, 0.96);
}

.dock-handle span {
  position: absolute;
  left: 9px;
  top: 36px;
  width: 6px;
  height: 74px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.dock-panel {
  position: absolute;
  right: 30px;
  bottom: 0;
  display: none;
  width: 218px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(31, 31, 31, 0.96);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.right-dock.open .dock-panel {
  display: grid;
  gap: 10px;
}

.dock-panel p {
  margin: 0;
  color: #9ca6ab;
  font-size: 12px;
  line-height: 1.45;
}

.dock-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  border-radius: 8px;
  background: rgba(90, 226, 208, 0.16);
  color: #ffffff;
  cursor: pointer;
}

.selected-preview {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.workspace-tabs {
  display: flex;
  gap: 22px;
  margin-bottom: 16px;
}

.workspace-tabs button {
  position: relative;
  min-height: 32px;
  padding: 0;
  background: transparent;
  color: #8f969c;
  cursor: pointer;
}

.workspace-tabs button.active {
  color: #ffffff;
}

.workspace-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.stat-grid div {
  display: grid;
  gap: 3px;
  padding: 12px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.stat-grid strong {
  font-size: 18px;
}

.stat-grid span {
  color: #8f9aa2;
  font-size: 11px;
}

.selected-preview img {
  height: 82px;
}

.selected-preview h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.property-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.property-list div,
.history,
.layer-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.property-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
}

.inspector-actions {
  margin-bottom: 20px;
}

.inspector-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 7px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(90, 226, 208, 0.12);
  color: #ffffff;
  font-size: 12px;
}

.layer-panel,
.history {
  padding: 12px;
}

.section-title {
  justify-content: flex-start;
  margin-bottom: 10px;
  color: #dce6eb;
  font-weight: 720;
}

.layer {
  width: 100%;
  justify-content: space-between;
  min-height: 38px;
  margin-top: 7px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #cad4da;
}

.layer span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.layer.active {
  background: rgba(90, 226, 208, 0.14);
  color: #ffffff;
}

.history {
  margin-top: 14px;
}

.history p {
  margin: 8px 0 0;
  color: #aebbc2;
  font-size: 13px;
  line-height: 1.4;
}

.spin {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .content-grid {
    grid-template-columns: 286px minmax(360px, 1fr);
  }

  .inspector {
    display: none;
  }

  .featured-cards {
    grid-template-columns: 1fr 1fr;
  }

  .featured-card:last-child {
    display: none;
  }
}

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

  .left-rail {
    display: none;
  }

  .topbar {
    grid-template-columns: 1fr;
    height: auto;
  }

  .main-nav {
    justify-self: stretch;
    overflow-x: auto;
  }

  .top-actions {
    justify-content: space-between;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .prompt-panel {
    display: none;
  }

  .canvas-viewport {
    min-height: calc(100vh - 178px);
  }

  .prompt-composer {
    min-height: 168px;
    bottom: 14px;
  }

  .featured-strip {
    top: 70px;
  }

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

  .featured-card:not(:first-child) {
    display: none;
  }

  .view-toolbar {
    max-width: calc(100% - 24px);
    overflow: hidden;
  }

  .zoom-slider {
    width: 66px;
  }
}

.flow-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    #020304;
  background-size: 14px 14px;
  color: #f4f4f4;
}

.flow-topbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  pointer-events: none;
}

.flow-project,
.flow-actions,
.flow-actions button,
.assistant-avatar,
.bottom-tools,
.bottom-tools button,
.help-fab,
.flow-rail,
.flow-rail button,
.ask-modes,
.ask-modes button,
.ask-footer,
.ask-footer button,
.suggestions {
  display: flex;
  align-items: center;
}

.flow-project {
  position: relative;
  gap: 10px;
  font-size: 17px;
  pointer-events: auto;
}

.flow-project-trigger,
.flow-home-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  background: rgba(39, 39, 43, 0.96);
  color: #ffffff;
  cursor: pointer;
}

.flow-title-input {
  width: 160px;
  height: 32px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
}

.flow-title-input::placeholder {
  color: #ffffff;
}

.flow-title-input:focus {
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
}

.flow-project-menu {
  position: absolute;
  left: 0;
  top: 40px;
  display: grid;
  min-width: 156px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: #252525;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.flow-project-menu button {
  height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 760;
}

.flow-project-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flow-project-menu button:last-child {
  border-bottom: 0;
}

.flow-project-menu .danger {
  color: #ffb7b7;
}

.flow-project .tapnow-logo {
  width: 28px;
  height: 28px;
}

.flow-actions {
  gap: 8px;
  pointer-events: auto;
}

.canvas-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 170px;
  overflow: hidden;
  color: #aeb0b4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.canvas-sync-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #70e0be;
}

.canvas-sync-status.error {
  color: #ffb8b8;
}

.canvas-sync-status.error::before {
  background: #ff7171;
}

.flow-actions button {
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 13px;
  background: rgba(39, 39, 43, 0.96);
  color: #ffffff;
  cursor: pointer;
  font-weight: 730;
}

.flow-actions button:last-child {
  width: 40px;
  padding: 0;
  border-radius: 50%;
}

.flow-actions .model-key-button {
  width: auto;
  padding: 0 13px;
  border-radius: 13px;
}

.model-key-popover {
  position: absolute;
  right: 16px;
  top: 54px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: 360px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(31, 31, 34, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.model-key-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.model-key-head strong {
  color: #ffffff;
  font-size: 14px;
}

.model-key-head button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  cursor: pointer;
}

.model-key-head button .glyph {
  transform: rotate(45deg);
}

.model-target-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.model-target-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #aeb0b4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.model-target-tabs button .glyph {
  flex: 0 0 auto;
}

.model-target-tabs button.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.model-key-popover label {
  display: grid;
  gap: 6px;
}

.model-key-popover label span {
  color: #a9a9ad;
  font-size: 11px;
  font-weight: 700;
}

.model-key-popover input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.06);
  color: #f2f2f2;
  font-size: 12px;
}

.model-key-popover input::placeholder {
  color: #696b70;
}

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

.model-key-save {
  height: 36px;
  border-radius: 8px;
  background: #ffffff;
  color: #171717;
  cursor: pointer;
  font-weight: 800;
}

.model-key-status {
  color: #b8c7ff;
  font-size: 12px;
  line-height: 1.4;
}

.saved-model-list {
  display: grid;
  gap: 5px;
  max-height: 126px;
  overflow-y: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.saved-model-list button {
  display: grid;
  grid-template-columns: 20px minmax(0, 82px) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 7px;
  background: transparent;
  color: #e8e8e8;
  cursor: pointer;
  text-align: left;
}

.saved-model-list button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.saved-model-list span,
.saved-model-list em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-model-list span {
  font-size: 12px;
  font-weight: 700;
}

.saved-model-list em {
  color: #8d8f94;
  font-size: 10px;
  font-style: normal;
}

.flow-rail {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 22;
  flex-direction: column;
  gap: 10px;
  width: 54px;
  padding: 8px 0;
  border-radius: 0 18px 18px 0;
  background: rgba(12, 13, 15, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 0;
}

.flow-rail button {
  position: relative;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
}

.flow-rail button.active,
.ask-modes button.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.flow-rail .rail-plus {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f3f3;
  color: #191919;
}

.flow-rail .rail-plus.active {
  background: #d7d7d7;
}

.flow-rail button::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #26aee9;
  opacity: 0;
}

.flow-rail button.active::after {
  opacity: 1;
}

.flow-rail .avatar-button {
  margin-top: 4px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(45deg, #4d2d35, #c7a98a);
}

.asset-rail-button.active {
  background: rgba(255, 255, 255, 0.13);
}

.history-rail-button {
  margin-top: 8px;
}

.history-rail-button::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -9px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.tutorial-rail-button.active {
  background: rgba(255, 255, 255, 0.13);
}

.tutorial-panel {
  position: absolute;
  left: 54px;
  top: 118px;
  z-index: 42;
  width: min(360px, calc(100vw - 72px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  background: #242424;
  color: #f4f4f4;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

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

.tutorial-panel header strong {
  font-size: 15px;
}

.tutorial-panel header button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  cursor: pointer;
}

.tutorial-panel header button .glyph {
  transform: rotate(45deg);
}

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

.tutorial-list section {
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.tutorial-list b {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.tutorial-list p {
  margin: 0;
  color: rgba(235, 235, 235, 0.64);
  font-size: 12px;
  line-height: 1.55;
}

.asset-panel {
  position: absolute;
  left: 54px;
  top: 62px;
  z-index: 42;
  display: flex;
  flex-direction: column;
  width: min(620px, calc(100vw - 72px));
  height: min(680px, calc(100vh - 86px));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 0;
  border-radius: 0 10px 10px 0;
  overflow: hidden;
  background: #202123;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  color: #f4f4f4;
}

.asset-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 52px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.asset-panel-head div {
  display: flex;
  align-items: center;
  gap: 16px;
}

.asset-panel-head button,
.asset-tabs button {
  background: transparent;
  color: #8f8f93;
  cursor: pointer;
}

.asset-panel-head button.active {
  color: #ffffff;
  font-size: 15px;
  font-weight: 850;
}

.asset-panel-head > button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.asset-panel-head > button .glyph {
  transform: rotate(45deg);
}

.asset-panel-head > button:hover,
.asset-tabs button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.asset-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 12px 16px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.asset-tabs button {
  flex: 0 0 auto;
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
}

.asset-tabs button.active {
  border-color: rgba(38, 214, 222, 0.38);
  background: rgba(38, 214, 222, 0.14);
  color: #ffffff;
}

.asset-empty {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  padding: 18px;
  color: #96969a;
  font-size: 13px;
  text-align: center;
}

.asset-toolbar {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 8px;
  flex: 0 0 auto;
  padding: 0 16px 12px;
}

.asset-toolbar button,
.asset-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f3f3f3;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.asset-upload-primary {
  border-color: rgba(38, 214, 222, 0.32);
  background: rgba(38, 214, 222, 0.14);
  color: #e9feff;
  font-weight: 750;
}

.asset-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.asset-toolbar button:not(:disabled):hover,
.asset-upload-button:hover {
  border-color: rgba(38, 214, 222, 0.45);
  background: rgba(38, 214, 222, 0.12);
}

.asset-upload-button input {
  display: none;
}

.asset-content {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 12px;
  flex: 1;
  min-height: 0;
  padding: 0 16px 16px;
}

.asset-folder-pane,
.asset-file-pane {
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.asset-folder-pane {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  overflow-y: auto;
}

.asset-file-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.asset-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  color: rgba(245, 245, 245, 0.74);
  font-size: 12px;
  font-weight: 800;
}

.asset-file-pane > .asset-section-title {
  flex: 0 0 40px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.asset-section-title small {
  color: rgba(245, 245, 245, 0.46);
  font-size: 11px;
  font-weight: 600;
}

.asset-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #f2f2f2;
  text-align: left;
  cursor: pointer;
}

.asset-folder.active {
  border-color: rgba(38, 214, 222, 0.62);
  background: rgba(38, 214, 222, 0.13);
}

.asset-folder span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-folder small {
  color: rgba(245, 245, 245, 0.55);
  font-size: 11px;
  white-space: nowrap;
}

.asset-status {
  flex: 0 0 auto;
  margin: 10px 12px 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(38, 214, 222, 0.1);
  color: #d8fbff;
  font-size: 12px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
}

.asset-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.asset-card:hover {
  border-color: rgba(38, 214, 222, 0.3);
  background: rgba(255, 255, 255, 0.075);
}

.asset-card-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.asset-card-preview img,
.asset-card-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-card-preview audio {
  width: calc(100% - 14px);
  height: 34px;
}

.asset-card-meta {
  display: grid;
  gap: 4px;
  padding: 8px 9px 9px;
}

.asset-card-meta strong,
.asset-card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-card-meta strong {
  color: #f7f7f7;
  font-size: 13px;
}

.asset-card-meta span {
  color: rgba(247, 247, 247, 0.56);
  font-size: 11px;
}

.add-node-menu,
.node-generate-menu {
  position: absolute;
  z-index: 40;
  display: grid;
  gap: 7px;
  width: 224px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background:
    radial-gradient(circle at 92% 82%, rgba(90, 226, 208, 0.08), transparent 42%),
    rgba(31, 31, 34, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.add-node-menu {
  left: 54px;
  top: 8px;
}

.add-node-menu section {
  display: grid;
  gap: 3px;
}

.add-node-menu p,
.node-generate-menu p {
  margin: 2px 0 4px;
  color: #8f8f95;
  font-size: 12px;
}

.flow-rail .add-node-menu .menu-node-option,
.node-generate-menu .menu-node-option {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 41px;
  padding: 6px 8px;
  border-radius: 9px;
  background: transparent;
  color: #f5f5f5;
  text-align: left;
}

.flow-rail .add-node-menu .menu-node-option:hover,
.node-generate-menu .menu-node-option:hover,
.node-generate-menu .menu-node-option:first-of-type {
  background: rgba(255, 255, 255, 0.09);
}

.flow-rail .add-node-menu .menu-node-option::after {
  display: none;
}

.menu-option-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dddddd;
}

.menu-node-option strong,
.menu-node-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-node-option strong {
  font-size: 13px;
}

.menu-node-option small {
  margin-top: 2px;
  color: #909096;
  font-size: 11px;
}

.menu-node-option em {
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
}

.flow-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: default;
}

/* 按住空格或拖拽空白处时显示抓手光标 */
.flow-canvas.space-pan {
  cursor: grab;
}

.flow-canvas.panning,
.flow-canvas.space-pan:active {
  cursor: grabbing;
}

.flow-stage {
  position: absolute;
  inset: 0;
  width: 1280px;
  height: 820px;
  transform-origin: 0 0;
}

.flow-selection-box {
  position: absolute;
  z-index: 18;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.flow-connectors {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.flow-connectors path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.flow-edge .edge-base {
  stroke: rgba(190, 195, 200, 0.74);
  stroke-width: 1.45;
}

.flow-edge .edge-glow {
  stroke: #52b9ff;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-dasharray: 58 260;
  filter: drop-shadow(0 0 5px rgba(82, 185, 255, 0.95));
  opacity: 0.92;
  animation: edge-flow 2.4s linear infinite;
}

.flow-edge .edge-glow-b {
  stroke-width: 2.6;
  stroke: #9edbff;
  stroke-dasharray: 30 292;
  animation-delay: -1.15s;
  opacity: 0.78;
}

.flow-edge.selected .edge-base {
  stroke: #a78bfa;
  stroke-width: 3.2;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
}

.flow-edge.selected .edge-glow,
.flow-edge.selected .edge-glow-b {
  stroke: #c4b5fd;
  filter: drop-shadow(0 0 8px rgba(196, 181, 253, 0.9));
}

@keyframes edge-flow {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -318;
  }
}

.flow-node {
  position: absolute;
  border-radius: 8px;
  background: #222;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  color: #f2f2f2;
  cursor: grab;
  user-select: none;
}

.flow-node:active {
  cursor: grabbing;
}

.flow-node.selected {
  outline: 1px solid rgba(255, 255, 255, 0.26);
}

.node-drag-frame {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.node-drag-frame span {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
}

.node-drag-frame span:active {
  cursor: grabbing;
}

.node-drag-frame .top {
  left: 0;
  right: 0;
  top: 0;
  height: 10px;
}

.node-drag-frame .right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 10px;
}

.node-drag-frame .bottom {
  left: 0;
  right: 0;
  bottom: 0;
  height: 10px;
}

.node-drag-frame .left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 10px;
}

.flow-node.script-gen {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: #252525;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 20px 44px rgba(0, 0, 0, 0.34);
}

.flow-node.script {
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.flow-node.script-card {
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.flow-node.linking {
  outline: 2px solid rgba(255, 255, 255, 0.76);
}

.node-label {
  position: absolute;
  left: 0;
  top: -23px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.node-label span {
  height: 17px;
  padding: 1px 6px 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 10px;
}

.node-upload-float {
  position: absolute;
  top: -52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(28, 28, 28, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.node-upload-float input {
  display: none;
}

.node-upload-float:hover {
  background: rgba(52, 52, 52, 0.96);
  color: #fff;
}

.text-node-body {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 34px 26px 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: inherit;
  background: #252525;
}

.text-node-body.compact {
  padding: 14px 16px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #161616;
}

.text-node-body.compact .text-node-empty-icon {
  display: none;
}

.text-editor-node {
  position: relative;
  height: 100%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  border-radius: inherit;
  background: #151515;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.text-editor-toolbar {
  position: absolute;
  left: 76px;
  top: -108px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: #252525;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

.text-editor-toolbar button {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 30px;
  padding: 0 6px;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.text-editor-toolbar button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.text-editor-node textarea {
  width: 100%;
  height: 100%;
  padding: 24px 28px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f4f4f4;
  font: inherit;
  font-size: 30px;
  line-height: 1.45;
}

.text-editor-node textarea::placeholder {
  color: rgba(255, 255, 255, 0.18);
}

.text-node-empty-icon {
  display: grid;
  gap: 5px;
  justify-items: center;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.25);
}

.text-node-empty-icon span {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.text-node-empty-icon span:nth-child(1),
.text-node-empty-icon span:nth-child(2) {
  width: 42px;
}

.text-node-empty-icon span:nth-child(3) {
  width: 34px;
}

.text-node-empty-icon span:nth-child(4) {
  width: 24px;
}

.text-node-try {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.text-node-actions {
  display: grid;
  gap: 13px;
}

.text-node-actions button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 0;
  background: transparent;
  color: #f3f3f3;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.text-node-actions button:hover {
  color: #ffffff;
}

.text-node-preview {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.text-node-preview strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.text-node-preview p {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.65;
}

.text-composer {
  position: absolute;
  z-index: 25;
  width: min(640px, calc(100vw - 96px));
  min-height: 138px;
  padding: 14px 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: #252525;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
  color: #f4f4f4;
}

.text-composer.has-reference {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  column-gap: 10px;
  width: min(640px, calc(100vw - 96px));
}

.text-composer-reference {
  grid-row: span 2;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  background: #151515;
}

.text-composer-reference img,
.text-composer-reference .image-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.text-composer-input {
  width: 100%;
  min-height: 78px;
  padding: 0 0 12px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #ececec;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.text-composer-input::placeholder {
  color: #8f8f8f;
}

.text-composer-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-model-picker {
  position: relative;
}

.text-chip,
.text-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: transparent;
  color: #eeeeee;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.text-chip:hover,
.text-icon-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.text-composer-spacer {
  flex: 1;
}

.text-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.text-send-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #bfc1c4;
  color: #171717;
  cursor: pointer;
}

.text-model-menu {
  position: absolute;
  left: 0;
  bottom: 40px;
  z-index: 42;
  display: grid;
  gap: 6px;
  width: 320px;
  max-height: 260px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(38, 38, 38, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.text-model-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: #f4f4f4;
  cursor: pointer;
  text-align: left;
}

.text-model-menu button.active,
.text-model-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.text-model-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.text-model-menu strong,
.text-model-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-model-menu strong {
  font-size: 13px;
}

.text-model-menu small {
  margin-top: 2px;
  color: #9b9b9b;
  font-size: 11px;
}

.text-model-menu em {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #bdbdbd;
  font-size: 11px;
  font-style: normal;
}

.node-resize-handle {
  position: absolute;
  z-index: 10;
  right: 4px;
  bottom: 4px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 5px 0 5px 0;
  background:
    linear-gradient(135deg, transparent 0 45%, rgba(255, 255, 255, 0.2) 46% 52%, transparent 53%),
    linear-gradient(135deg, transparent 0 62%, rgba(255, 255, 255, 0.36) 63% 69%, transparent 70%);
  cursor: nwse-resize;
}

.node-resize-handle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.script-node-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 10px 12px;
  overflow: hidden;
}

.script-card-body {
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.script-card-scroll {
  height: 100%;
  padding: 12px 14px;
  overflow-y: auto;
  scrollbar-color: rgba(184, 193, 202, 0.8) transparent;
}

.script-card-scroll strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 13px;
}

.script-card-scroll p {
  margin: 0 0 7px;
  color: #f0f0f0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.script-card-scroll b {
  color: #ffffff;
}

.script-card-scroll .script-card-section {
  margin-top: 12px;
}

.script-card-scroll pre {
  margin: 0;
  color: #e5e5e5;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.script-card-editor,
.script-edit-textarea {
  width: 100%;
  border: 0;
  resize: none;
  outline: none;
  background: transparent;
  color: #e5e5e5;
  font-family: inherit;
  line-height: 1.5;
}

.script-card-editor {
  min-height: 100px;
  font-size: 11px;
  font-weight: 600;
}

.script-edit-textarea {
  min-height: 92px;
  font-size: 12px;
}

.script-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.script-field {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.script-field.scene-no {
  background: rgba(254, 113, 152, 0.22);
  color: #fb7198;
}

.script-field.shot-type {
  background: rgba(90, 226, 208, 0.18);
  color: #5ae2d0;
}

.script-field.duration {
  background: rgba(255, 255, 255, 0.08);
  color: #bcc4c8;
  margin-left: auto;
}

.script-description {
  margin: 4px 0 2px;
  color: #e8ebed;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.script-dialogue {
  margin: 2px 0;
  padding: 4px 8px;
  border-left: 2px solid rgba(254, 209, 102, 0.55);
  background: rgba(254, 209, 102, 0.08);
  border-radius: 0 5px 5px 0;
  color: #fde184;
  font-size: 11px;
  line-height: 1.45;
}

.script-sfx {
  margin-top: auto;
  color: #7d848a;
  font-size: 10px;
}

.script-gen-body {
  display: grid;
  grid-template-rows: auto auto auto minmax(56px, 1fr) auto auto;
  gap: 7px;
  height: 100%;
  padding: 24px 20px 14px;
  overflow: hidden;
}

.script-gen-empty {
  display: grid;
  place-items: center;
  height: 78px;
  color: rgba(255, 255, 255, 0.24);
}

.script-gen-empty .glyph {
  font-size: 42px !important;
  line-height: 1;
}

.script-gen-try {
  color: #8c8c8c;
  font-size: 12px;
}

.script-gen-suggestions {
  display: grid;
  gap: 5px;
}

.script-gen-suggestions button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 27px;
  padding: 0 4px;
  border-radius: 5px;
  background: transparent;
  color: #f1f1f1;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.script-gen-suggestions button:hover,
.script-gen-suggestions button.active {
  background: rgba(255, 255, 255, 0.08);
}

.script-gen-suggestions span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gen-prompt-input {
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  outline: 0;
  resize: none;
  background: rgba(255, 255, 255, 0.04);
  color: #eef3f6;
  font-size: 12px;
  line-height: 1.5;
}

.gen-prompt-input::placeholder {
  color: #5d6268;
}

.gen-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-style-chips,
.gen-count-chips {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gen-style-chips button,
.gen-count-chips button {
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #9ca4a9;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: background 120ms ease, color 120ms ease;
}

.gen-style-chips button:hover,
.gen-count-chips button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.gen-style-chips button.active,
.gen-count-chips button.active {
  background: rgba(90, 226, 208, 0.18);
  color: #5ae2d0;
}

.gen-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gen-count-row span {
  color: #7d848a;
  font-size: 11px;
}

.gen-count-chips button {
  width: 24px;
  height: 22px;
  padding: 0;
  text-align: center;
}

.gen-run-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(90, 226, 208, 0.25), rgba(254, 113, 152, 0.25));
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: opacity 140ms ease;
}

.gen-run-btn:hover {
  opacity: 0.85;
}

.gen-run-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gen-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 140px;
  overflow-y: auto;
}

.script-table-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.script-table-title {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f2f2f2;
  font-size: 13px;
  font-weight: 700;
  cursor: grab;
}

.script-table-title:active {
  cursor: grabbing;
}

.script-table-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-table-title span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  color: #d5d5d5;
  font-size: 11px;
  font-weight: 700;
}

.script-table-title button {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: transparent;
  color: #bdbdbd;
  cursor: pointer;
}

.script-table-title button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.script-table {
  flex: 1;
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.45) transparent;
}

.script-table-row {
  display: grid;
  grid-template-columns: 42px 56px 200px 100px 150px 72px 72px 116px;
  min-width: 808px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.script-table-row > span,
.script-table-row input,
.script-table-row textarea {
  min-width: 0;
  min-height: 47px;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  outline: 0;
  background: transparent;
  color: #dfe3e5;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}

.script-table-row textarea {
  resize: none;
}

.script-table-row input:focus,
.script-table-row textarea:focus {
  background: rgba(255, 255, 255, 0.06);
}

.script-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #202020;
}

.script-table-head > span {
  min-height: 31px;
  padding-top: 8px;
  padding-bottom: 8px;
  color: #999;
  font-size: 10px;
  font-weight: 700;
}

.script-ref-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #858585 !important;
  font-size: 10px !important;
}

.script-thumb-cell {
  display: grid !important;
  place-items: center;
}

.script-thumb-cell span {
  display: block;
  width: 48px;
  height: 42px;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, 0.2), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(90deg, #46301f 0 7px, #241c17 7px 14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.gen-result-item {
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}

.gen-result-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.gen-result-item .script-description {
  font-size: 11px;
  -webkit-line-clamp: 2;
}

.gen-result-item .script-dialogue {
  font-size: 10px;
  margin-top: 3px;
}

.gen-result-item .script-sfx {
  font-size: 9px;
}

.gen-add-child-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  margin-top: 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #bcc4c8;
  cursor: pointer;
  font-size: 11px;
  transition: background 120ms ease, color 120ms ease;
}

.gen-add-child-btn:hover {
  background: rgba(90, 226, 208, 0.14);
  color: #5ae2d0;
}

.node-add-port {
  position: absolute;
  top: 50%;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  padding: 0;
  border: 2px solid #222;
  border-radius: 50%;
  background: #303033;
  color: #ffffff;
  cursor: crosshair;
  opacity: 0;
  transform: translateY(-50%);
}

.node-add-port.in {
  left: -10px;
}

.node-add-port.out {
  right: -10px;
}

.node-add-port:hover {
  background: #f2f2f2;
  color: #1d1d1f;
}

.flow-node:hover .node-add-port,
.flow-node.selected .node-add-port,
.flow-node.linking .node-add-port {
  opacity: 1;
}

.node-generate-menu {
  pointer-events: auto;
}

.media-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  color: rgba(255, 255, 255, 0.42);
}

.node-loading-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  height: 100%;
  padding: 16px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  color: #f4f4f4;
  text-align: center;
}

.node-loading-preview strong {
  font-size: 13px;
}

.node-loading-preview span {
  color: #aeb0b4;
  font-size: 11px;
  font-weight: 800;
}

.node-loading-bar {
  width: min(168px, 76%);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.node-loading-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 220ms ease;
}

/* ── Image action toolbar (floats above the image node) ── */
.image-action-bar,
.video-action-bar {
  position: absolute;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(20, 20, 24, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45);
  white-space: nowrap;
}

.video-action-bar button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ddd;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.video-action-bar button:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.img-act-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ddd;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.img-act-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }

.img-new-badge {
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

.img-hd-badge {
  font-size: 9px;
  font-weight: 800;
  font-style: normal;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1.5px solid rgba(255,255,255,0.5);
  line-height: 1.4;
}

.img-act-dropdown { position: relative; }

.img-act-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 70;
  display: grid;
  min-width: 120px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 9px;
  background: rgba(26,26,30,0.98);
  box-shadow: 0 10px 32px rgba(0,0,0,0.55);
}
.img-act-menu button {
  padding: 7px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ddd;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}
.img-act-menu button:hover { background: rgba(255,255,255,0.1); }

.img-act-sep {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: rgba(255,255,255,0.14);
  margin: 0 5px;
}

.img-act-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.img-act-icon:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Resolution badge inside image node */
.image-dim-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  pointer-events: none;
  z-index: 2;
}

.image-node-preview {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #242424;
}

.image-node-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.flow-node img {
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.image-art {
  height: 100%;
  background:
    radial-gradient(circle at 57% 24%, #ffe0a5 0 5%, transparent 13%),
    radial-gradient(circle at 62% 40%, #b8452f 0 11%, transparent 18%),
    radial-gradient(circle at 55% 58%, #efc27b 0 8%, transparent 15%),
    linear-gradient(140deg, transparent 0 42%, rgba(168, 31, 31, 0.95) 43% 54%, transparent 55%),
    radial-gradient(circle at 30% 36%, rgba(244, 227, 181, 0.95), transparent 34%),
    linear-gradient(135deg, #d8e7dc, #f5e8c6 45%, #aebfb2);
  filter: saturate(1.08);
}

.image-empty-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  background: #242424;
  color: rgba(255, 255, 255, 0.22);
}

.image-empty-canvas.target {
  color: rgba(255, 255, 255, 0.25);
}

.image-empty-canvas small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
}

.image-node-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  justify-items: start;
  gap: 8px;
  padding: 16px 14px 0;
  background: transparent;
  color: #f2f2f2;
}

.image-node-empty > span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
  font-weight: 700;
}

.image-node-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  padding: 0;
  background: transparent;
  color: #f3f3f3;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.image-node-action input {
  display: none;
}

.image-node-action:hover {
  color: #ffffff;
}

.image-node-upload {
  position: absolute;
  right: 9px;
  top: 9px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(10, 10, 10, 0.68);
  color: #ffffff;
  cursor: pointer;
}

.image-node-upload input {
  display: none;
}

.hd-badge {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0;
}

.image-art.frame-first {
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 230, 150, 0.75), transparent 11%),
    linear-gradient(130deg, transparent 0 58%, rgba(170, 32, 31, 0.92) 59% 70%, transparent 71%),
    radial-gradient(circle at 24% 44%, rgba(236, 224, 176, 0.95), transparent 25%),
    linear-gradient(135deg, #d8e6d8, #f5e6bd 42%, #9fb9b3);
}

.image-art.frame-current {
  background:
    radial-gradient(circle at 55% 28%, #ffe0a5 0 5%, transparent 13%),
    linear-gradient(130deg, transparent 0 34%, rgba(170, 32, 31, 0.94) 35% 48%, transparent 49%),
    radial-gradient(circle at 48% 68%, rgba(245, 239, 222, 0.9), transparent 24%),
    linear-gradient(135deg, #d8e6d8, #f5e6bd 42%, #9fb9b3);
}

.image-art.frame-last {
  background:
    radial-gradient(circle at 38% 34%, #ffe0a5 0 5%, transparent 12%),
    linear-gradient(130deg, transparent 0 22%, rgba(170, 32, 31, 0.9) 23% 38%, transparent 39%),
    radial-gradient(circle at 62% 66%, rgba(245, 239, 222, 0.9), transparent 26%),
    linear-gradient(135deg, #c7ddd6, #f3ddb0 40%, #859f98);
}

.image-error {
  padding: 8px 10px;
  border: 1px solid rgba(255, 113, 113, 0.28);
  border-radius: 8px;
  background: rgba(255, 113, 113, 0.08);
  color: #ffb8b8;
  font-size: 12px;
  line-height: 1.45;
}

.generation-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 3px 2px 1px;
}

.generation-progress div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.generation-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 220ms ease;
}

.generation-progress span {
  min-width: 34px;
  color: #bfc1c5;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.image-node-meta {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.76));
}

.image-node-meta strong,
.image-node-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-node-meta strong {
  color: #fff;
  font-size: 11px;
}

.image-node-meta span {
  color: #c9c9c9;
  font-size: 10px;
}

.image-composer {
  position: absolute;
  z-index: 34;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 640px;
  min-height: 214px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(31, 31, 31, 0.97);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
  color: #f4f4f4;
  backdrop-filter: blur(18px);
}

.image-upscale-composer {
  position: absolute;
  z-index: 34;
  display: grid;
  gap: 14px;
  width: 420px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(31, 31, 31, 0.98);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
  color: #f4f4f4;
}

.image-upscale-composer > strong {
  font-size: 16px;
}

.image-upscale-composer label,
.upscale-scale-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: #f0f0f0;
  font-size: 13px;
}

.image-upscale-composer label button,
.upscale-scale-row button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f1f1;
  cursor: pointer;
  font-weight: 700;
}

.upscale-scale-row {
  grid-template-columns: 112px repeat(3, 1fr);
}

.upscale-scale-row button {
  justify-content: center;
}

.upscale-scale-row button.active {
  background: rgba(255, 255, 255, 0.2);
}

.image-upscale-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.image-upscale-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.image-upscale-footer button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #ffffff;
  color: #171717;
  cursor: pointer;
}

.image-composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-composer-tools button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 11px;
}

.image-composer-tools button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.image-composer-tools em {
  position: absolute;
  right: 5px;
  top: -3px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #272727;
  color: #fff;
  font-size: 10px;
  font-style: normal;
}

.image-composer-tools .image-composer-expand {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 0;
}

.image-reference-preview {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.image-reference-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.image-reference-content img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.image-reference-text {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #bbb;
  font-size: 13px;
  line-height: 1.5;
}

.image-reference-text span {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.image-reference-icon {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #bbb;
  font-size: 13px;
}

.image-reference-remove {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #999;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.image-reference-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.image-composer-input {
  width: 100%;
  min-height: 74px;
  padding: 4px 2px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f1f1f1;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.image-composer-input::placeholder {
  color: #f1f1f1;
}

.image-composer-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
}

.image-model-picker {
  position: relative;
}

.image-model-trigger,
.image-chip,
.image-icon-btn,
.image-credit,
.image-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  border-radius: 8px;
  background: transparent;
  color: #ededed;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.image-model-trigger {
  padding: 0 9px;
}

.image-model-trigger:hover,
.image-chip:hover,
.image-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.image-chip {
  padding: 0 8px;
}

.image-chip.count {
  margin-left: auto;
}

.image-chip.active {
  background: rgba(255, 255, 255, 0.12);
}

/* ── 生成尺寸选择弹框 ── */
.image-size-picker {
  position: relative;
  display: inline-flex;
}

.image-size-backdrop {
  position: fixed;
  inset: 0;
  z-index: 41;
}

.image-size-menu {
  position: absolute;
  left: 0;
  bottom: 40px;
  z-index: 42;
  width: 268px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(34, 34, 36, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.image-size-title {
  margin: 0 2px 8px;
  color: rgba(225, 228, 233, 0.6);
  font-size: 12px;
  font-weight: 600;
}

.image-size-res {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.image-size-res button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e8eaed;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.image-size-res button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.image-size-res button.active {
  border-color: #f3f3f3;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.image-size-ratios {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.image-size-ratios button {
  display: grid;
  place-items: center;
  gap: 6px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(225, 228, 233, 0.62);
  cursor: pointer;
}

.image-size-ratios button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eaed;
}

.image-size-ratios button.active {
  border-color: #f3f3f3;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.image-size-ratios button em {
  font-size: 11px;
  font-style: normal;
}

.ratio-shape {
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.ratio-shape.free {
  border-style: dashed;
}

.image-icon-btn {
  width: 31px;
  padding: 0;
}

.image-credit {
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9d0a5;
}

.image-send-btn {
  width: 31px;
  border-radius: 50%;
  background: #ffffff;
  color: #171717;
}

.image-model-menu {
  position: absolute;
  left: 0;
  bottom: 40px;
  z-index: 42;
  display: grid;
  gap: 6px;
  width: 370px;
  max-height: 300px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(38, 38, 38, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.image-model-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: #f4f4f4;
  cursor: pointer;
  text-align: left;
}

.image-model-menu button.active,
.image-model-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.image-model-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.image-model-menu strong,
.image-model-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-model-menu strong {
  font-size: 13px;
}

.image-model-menu small {
  margin-top: 2px;
  color: #9b9b9b;
  font-size: 11px;
}

.image-model-menu em {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #bdbdbd;
  font-size: 11px;
  font-style: normal;
}

.image-key-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}

.image-key-panel strong,
.image-key-panel small {
  display: block;
}

.image-key-panel strong {
  font-size: 12px;
}

.image-key-panel small {
  margin-top: 3px;
  color: #9fa0a2;
  font-size: 11px;
}

.image-key-panel input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  outline: 0;
  background: rgba(0, 0, 0, 0.2);
  color: #f0f0f0;
}

.image-key-panel button {
  height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: #ffffff;
  color: #181818;
  cursor: pointer;
  font-weight: 800;
}

.video-node-preview {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #111;
}

.video-empty-node,
/* ── Audio node body ── */
.audio-node-body {
  position: relative;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  background: #1a1a1a;
  overflow: hidden;
}

.audio-node-empty-inner {
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.audio-node-try {
  color: rgba(255,255,255,0.38);
  font-size: 10px;
  font-weight: 700;
}

.audio-node-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f0f0f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.audio-node-action-btn input { display: none; }

/* Waveform visualization */
.audio-waveform-preview {
  position: relative;
  width: 100%;
  height: 100%;
  background: #343434;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-waveform-bars {
  position: absolute;
  left: 24px;
  right: 14px;
  top: 16px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 1px;
  overflow: hidden;
}

.audio-waveform-bar {
  flex: 1 1 0;
  min-width: 1px;
  max-width: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
}

.audio-waveform-progress {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 999px;
  background: #ff4e57;
  transform: translateX(-1px);
}

.audio-waveform-controls {
  position: absolute;
  bottom: 5px;
  left: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.audio-waveform-time {
  position: absolute;
  left: 0;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  font-variant-numeric: tabular-nums;
}

.audio-waveform-play {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.34);
  color: #fff;
  cursor: pointer;
}

.audio-waveform-download {
  position: absolute;
  right: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.08);
  color: #fff;
  text-decoration: none;
}

.audio-node-error {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  overflow: hidden;
  color: #ff8f8f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Upload badge above audio node */
.audio-upload-badge {
  position: absolute;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24,24,28,0.94);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ddd;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.audio-upload-badge input { display: none; }
.audio-upload-badge:hover { background: rgba(40,40,48,0.97); color: #fff; }

.world-node-body {
  display: grid;
  gap: 10px;
  height: calc(100% - 30px);
  padding: 10px;
}

.world-node-body .media-placeholder {
  min-height: 56px;
}

.world-node-body textarea {
  min-height: 64px;
  resize: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(0,0,0,0.22);
  color: #f4f4f5;
  padding: 8px;
}

.world-node-body a {
  color: #67e8f9;
  font-size: 12px;
}

.world-node-body button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f5f5f5;
  color: #111;
  font-weight: 700;
}

/* TTS Composer additions */
.tts-quick-btns {
  display: flex;
  gap: 8px;
}

.tts-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #bbb;
  font-size: 12px;
  cursor: pointer;
}
.tts-quick-btn span { color: rgba(255,255,255,0.45); }
.tts-quick-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.tts-voice-section {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}

.tts-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: #ccc;
  font-weight: 600;
}

.tts-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
}
.tts-reset-btn:hover { color: #bbb; }

.tts-voice-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tts-voice-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #e0e0e0;
  font-size: 13px;
}

.tts-copy-btn {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #777;
  cursor: pointer;
}

.tts-lang-chip {
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #bbb;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.tts-switch-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #bbb;
  cursor: pointer;
}

.tts-adj-section { }

.tts-adj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: transparent;
  color: #bbb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.tts-sliders {
  display: grid;
  gap: 10px;
  padding-bottom: 6px;
}

.tts-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tts-slider-label {
  width: 30px;
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
}

.tts-slider {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.tts-slider-val {
  width: 38px;
  text-align: right;
  font-size: 12px;
  color: #ccc;
  font-variant-numeric: tabular-nums;
}

.tts-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  color: #aaa;
  font-size: 13px;
}

.tts-switch-row input {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

.audio-empty-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: inherit;
  background: #252525;
  color: rgba(255, 255, 255, 0.28);
}

.video-node-empty-actions {
  position: absolute;
  left: 16px;
  top: 16px;
  display: grid;
  gap: 10px;
  justify-items: start;
  color: #f3f3f3;
}

.video-node-empty-actions > span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  font-weight: 700;
}

.video-node-empty-actions label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  color: #f3f3f3;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.video-node-empty-actions input {
  display: none;
}

.audio-empty-node {
  border-color: rgba(255, 255, 255, 0.36);
}

.video-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 42%, rgba(236, 224, 176, 0.95), transparent 25%),
    radial-gradient(circle at 68% 30%, rgba(255, 230, 150, 0.75), transparent 15%),
    linear-gradient(135deg, #d8e6d8, #f5e6bd 42%, #9fb9b3);
}

.video-node-preview video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, transparent 0 34%, rgba(170, 32, 31, 0.92) 35% 48%, transparent 49%),
    radial-gradient(circle at 30% 66%, rgba(235, 241, 236, 0.82), transparent 24%);
  animation: video-pan 4s ease-in-out infinite alternate;
}

.video-character {
  position: absolute;
  left: 46%;
  top: 18%;
  width: 62px;
  height: 78px;
  border-radius: 48% 48% 38% 38%;
  background: linear-gradient(160deg, #f3c45f, #9c3029 48%, #4b221b);
  box-shadow: 0 0 0 8px rgba(168, 52, 38, 0.22);
  animation: video-float 1.8s ease-in-out infinite alternate;
}

.video-cloud {
  position: absolute;
  left: 36%;
  bottom: 14%;
  width: 126px;
  height: 28px;
  border-radius: 999px;
  background: rgba(245, 239, 222, 0.9);
  filter: blur(1px);
}

.video-toolbar {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.flow-node.selected .video-toolbar,
.video-node-preview:hover .video-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.video-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #ddd;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.video-toolbar button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.video-top-meta {
  position: absolute;
  right: 10px;
  top: 7px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 10px;
}

.video-controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 11px;
  background: rgba(0,0,0,0.38);
  border-radius: 6px;
  padding: 4px 6px;
}

.video-play-btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  border: none;
}
.video-play-btn:hover { background: rgba(255,255,255,0.3); }

.video-cur-time,
.video-dur-time {
  flex-shrink: 0;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

.video-progress {
  flex: 1;
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.video-progress:hover { height: 5px; }

.video-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 0.1s linear;
}

.video-progress i::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.video-vol-btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255,255,255,0.75);
  cursor: pointer;
}
.video-vol-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }

.video-frame-btn-wrap {
  position: relative;
  flex-shrink: 0;
}

.video-frame-actions {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  gap: 2px;
  padding: 5px;
  border-radius: 9px;
  background: rgba(18, 18, 18, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  z-index: 20;
  white-space: nowrap;
}

/* 桥接按钮与菜单之间的 6px 间隙，防止鼠标经过时菜单消失 */
.video-frame-actions::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.video-frame-btn-wrap:hover .video-frame-actions {
  display: grid;
}

.video-frame-actions button {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: #f0f0f0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  border: none;
  width: 100%;
}

.video-frame-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.video-camera-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  cursor: pointer;
}

.video-composer {
  position: absolute;
  z-index: 34;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 560px;
  min-height: 198px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(31, 31, 31, 0.97);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
  color: #f4f4f4;
  backdrop-filter: blur(18px);
}

.audio-composer {
  position: absolute;
  z-index: 34;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 640px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(31, 31, 31, 0.97);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.52);
  color: #f4f4f4;
  backdrop-filter: blur(18px);
}

.audio-composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-composer-tools button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 11px;
}

.audio-composer-tools button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.audio-composer-tools em {
  position: absolute;
  right: 5px;
  top: -3px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #272727;
  color: #fff;
  font-size: 10px;
  font-style: normal;
}

.audio-composer-tools .audio-expand {
  width: 32px;
  height: 32px;
  margin-left: auto;
  border: 0;
}

.audio-composer-input {
  width: 100%;
  min-height: 68px;
  padding: 2px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f1f1f1;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
}

.audio-composer-input::placeholder {
  color: #8f8f8f;
}

.audio-composer-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.audio-chip,
.audio-icon-btn,
.audio-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 31px;
  border-radius: 8px;
  background: transparent;
  color: #ededed;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.audio-chip {
  padding: 0 9px;
}

.audio-icon-btn {
  width: 31px;
  padding: 0;
}

.audio-chip:hover,
.audio-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.audio-composer-spacer {
  flex: 1;
}

.audio-model-picker {
  position: relative;
  min-width: 0;
}

.audio-model-picker .audio-chip.model {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-model-menu {
  position: absolute;
  left: 0;
  bottom: 38px;
  z-index: 42;
  display: grid;
  gap: 6px;
  width: 360px;
  max-height: 280px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(38, 38, 38, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.audio-model-menu button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: #f4f4f4;
  cursor: pointer;
  text-align: left;
}

.audio-model-menu button.empty {
  grid-template-columns: 1fr;
  cursor: default;
}

.audio-model-menu button.active,
.audio-model-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.audio-model-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.audio-model-menu strong,
.audio-model-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-model-menu strong {
  font-size: 13px;
}

.audio-model-menu small {
  margin-top: 2px;
  color: #9b9b9b;
  font-size: 11px;
}

.audio-model-menu em {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #bdbdbd;
  font-size: 11px;
  font-style: normal;
}

.audio-credit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.audio-send-btn {
  width: 31px;
  border-radius: 50%;
  background: #ffffff;
  color: #171717;
}

/* ── Voice Picker Modal ── */
.voice-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-picker-modal {
  display: flex;
  flex-direction: column;
  width: 780px;
  max-width: 94vw;
  max-height: 88vh;
  border-radius: 14px;
  background: #1e1e22;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  overflow: hidden;
}

.voice-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  font-size: 16px;
  font-weight: 700;
  color: #f0f0f0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.voice-picker-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  color: #999;
  cursor: pointer;
}
.voice-picker-close:hover { background: rgba(255,255,255,0.14); color: #fff; }

.voice-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.voice-picker-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 3px;
}

.voice-picker-tabs button {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.voice-picker-tabs button.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 600;
}

.voice-picker-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #888;
}

.voice-picker-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: #e0e0e0;
  font-size: 13px;
  outline: none;
}
.voice-picker-search input::placeholder { color: #666; }

.voice-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: transparent;
  color: #bbb;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.voice-filter-btn:hover { background: rgba(255,255,255,0.07); }

.voice-picker-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.voice-picker-item {
  display: grid;
  grid-template-columns: 38px minmax(150px, 1fr) minmax(130px, 1.2fr) 48px 64px 30px 28px;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}
.voice-picker-item:hover { background: rgba(255,255,255,0.03); }
.voice-picker-item.selected { background: rgba(59,130,246,0.07); }

.voice-item-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.38);
  border-radius: 999px;
  background: transparent;
  color: #ddd;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.voice-item-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 18px;
}

.voice-item-bars span {
  width: 3px;
  border-radius: 2px;
  background: #60a5fa;
  animation: waveBar 0.7s ease-in-out infinite alternate;
}
.voice-item-bars span:nth-child(1) { height: 8px; }
.voice-item-bars span:nth-child(2) { height: 16px; }
.voice-item-bars span:nth-child(3) { height: 12px; }
.voice-item-bars span:nth-child(4) { height: 6px; }

.voice-item-name {
  overflow: hidden;
  font-size: 14px;
  color: #e0e0e0;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-item-lang {
  overflow: hidden;
  font-size: 12px;
  color: #777;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-item-gender {
  font-size: 12px;
  color: #5b9bd5;
  min-width: 42px;
}
.voice-item-gender.female { color: #c084fc; }

.voice-select-btn {
  padding: 5px 16px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: transparent;
  color: #ddd;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.voice-select-btn:hover { background: rgba(255,255,255,0.1); }
.voice-select-btn.selected {
  border-color: rgba(96,165,250,0.4);
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
}

.voice-fav-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #555;
  cursor: pointer;
  font-size: 14px;
}
.voice-fav-btn:hover { color: #f59e0b; }
.voice-fav-btn.active { color: #f59e0b; }

.voice-more-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #555;
  cursor: pointer;
  font-size: 16px;
  letter-spacing: 1px;
}
.voice-more-btn:hover { color: #aaa; }

.voice-picker-empty {
  text-align: center;
  padding: 40px;
  color: #555;
  font-size: 13px;
}

.voice-picker-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: #888;
}

.vp-page-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
}
.vp-page-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.vp-page-arrow:not(:disabled):hover { background: rgba(255,255,255,0.08); }

.liblib-voice-overlay {
  background: transparent;
  align-items: flex-start;
  justify-content: flex-start;
  pointer-events: auto;
}

.liblib-voice-dropdown {
  position: fixed;
  width: 292px;
  max-width: 292px;
  max-height: none;
  border-radius: 12px;
  background: #252525;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 48px rgba(0,0,0,0.42);
}

.liblib-voice-list {
  max-height: 326px;
  padding: 0;
}

.liblib-voice-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px 24px;
  gap: 8px;
  min-height: 62px;
  padding: 8px 10px;
  border-bottom: 0;
}

.liblib-voice-item .voice-item-icon {
  width: 34px;
  height: 34px;
  color: #ddd;
}

.liblib-voice-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.liblib-voice-main strong {
  overflow: hidden;
  color: #f0f0f0;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liblib-voice-main span {
  overflow: hidden;
  color: #8d8d8d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.liblib-voice-item > em {
  align-self: start;
  color: #858585;
  font-size: 11px;
  font-style: normal;
}

.voice-current-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  width: calc(100% - 4px);
  height: 40px;
  margin: 0 2px;
  padding: 0 10px 0 18px;
  border-radius: 10px;
  background: #424242;
  color: #f3f3f3;
  cursor: pointer;
  text-align: left;
}

.voice-current-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-current-row em {
  color: #9a9a9a;
  font-size: 11px;
  font-style: normal;
}

.voice-stability-panel {
  display: grid;
  gap: 12px;
  padding: 18px 2px 2px;
}

.voice-stability-panel > span {
  color: #e6e6e6;
  font-size: 14px;
}

.voice-stability-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  height: 38px;
  border-radius: 12px;
  background: #383838;
}

.voice-stability-tabs button {
  color: #969696;
  background: transparent;
  cursor: pointer;
}

.voice-stability-tabs button.active {
  color: #fff;
  background: #5f5f5f;
}

/* 音频节点 ElevenLabs 展开「高级设置」内联面板 */
.tts-eleven-advanced {
  display: grid;
  gap: 10px;
  padding: 14px 2px 4px;
}

.tts-eleven-title {
  color: #8a8a8a;
  font-size: 13px;
}

.tts-eleven-field {
  display: grid;
  gap: 8px;
}

.tts-eleven-label {
  color: #9a9a9a;
  font-size: 13px;
}

.tts-eleven-voice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #2b2b2b;
  color: #f3f3f3;
  cursor: pointer;
  text-align: left;
}

.tts-eleven-voice-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tts-eleven-voice em {
  color: #8f8f8f;
  font-size: 11px;
  font-style: normal;
}

.tts-eleven-stability {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  height: 40px;
  padding: 3px;
  border-radius: 10px;
  background: #2f2f2f;
}

.tts-eleven-stability button {
  color: #8f8f8f;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}

.tts-eleven-stability button.active {
  color: #fff;
  background: #565656;
}

.vp-page-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #bbb;
  cursor: pointer;
  font-size: 13px;
}
.vp-page-num:hover { background: rgba(255,255,255,0.07); }
.vp-page-num.active {
  background: rgba(59,130,246,0.2);
  border-color: rgba(59,130,246,0.4);
  color: #93c5fd;
}

.vp-ellipsis { color: #555; padding: 0 2px; }

.vp-per-page {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #aaa;
}

.vp-total { color: #666; white-space: nowrap; }

.video-mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-mode-tabs button {
  height: 27px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #8f8f8f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.video-mode-tabs button.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.video-mode-tabs .video-expand {
  width: 28px;
  padding: 0;
  margin-left: auto;
  background: transparent;
}

.video-reference-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-reference-row button,
.video-reference-row .video-ref-thumb {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: transparent;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 11px;
}

.video-reference-row .video-frame-thumb {
  position: relative;
  display: block;
  width: 48px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.video-reference-row .video-frame-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-reference-row .video-frame-thumb em {
  position: absolute;
  right: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 9px;
  font-style: normal;
}

.video-reference-row .video-frame-thumb button {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: none;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  transform: rotate(45deg);
}

.video-reference-row .video-frame-thumb:hover button {
  display: grid;
  place-items: center;
}

.video-reference-row .video-ref-thumb {
  position: relative;
  overflow: hidden;
}

.video-reference-row .video-ref-thumb.has-image {
  width: 54px;
}

.video-reference-row .video-ref-thumb img,
.video-reference-row .video-ref-thumb > .glyph {
  width: 34px;
  height: 34px;
  border-radius: 5px;
}

.video-reference-row .video-ref-thumb img {
  display: block;
  object-fit: cover;
}

.video-reference-row .video-ref-thumb > .glyph {
  display: grid;
  place-items: center;
  background:
    linear-gradient(130deg, transparent 0 34%, rgba(170, 32, 31, 0.92) 35% 48%, transparent 49%),
    linear-gradient(135deg, #d8e6d8, #f5e6bd 42%, #9fb9b3);
}

.video-reference-row .video-ref-thumb span {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 2px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.56);
  color: #ffffff;
  font-size: 9px;
  line-height: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-reference-row .video-ref-thumb input {
  display: none;
}

.video-composer-input {
  width: 100%;
  min-height: 56px;
  padding: 2px 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f1f1f1;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
}

.video-composer-input::placeholder {
  color: #f1f1f1;
}

.video-composer-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-model-picker {
  position: relative;
}

.video-chip,
.video-icon-btn,
.video-credit,
.video-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: #ededed;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.video-error {
  padding: 8px 10px;
  border: 1px solid rgba(255, 113, 113, 0.28);
  border-radius: 8px;
  background: rgba(255, 113, 113, 0.08);
  color: #ffb8b8;
  font-size: 12px;
  line-height: 1.45;
}

.video-chip {
  padding: 0 8px;
}

.video-chip:hover,
.video-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.video-icon-btn {
  width: 30px;
  padding: 0;
}

/* Translate & scale buttons shared styles */
.translate-btn.loading {
  opacity: 0.6;
  pointer-events: none;
  animation: translatePulse 0.8s ease-in-out infinite alternate;
}
@keyframes translatePulse {
  from { opacity: 0.4; }
  to   { opacity: 0.9; }
}

.scale-btn.active {
  background: rgba(99,179,237,0.15);
  color: #63b3ed;
}
.scale-btn:hover { background: rgba(255,255,255,0.08); }

/* Languages glyph override: smaller font so '文A' fits */
.translate-btn .glyph {
  font-size: 10px !important;
  letter-spacing: -0.5px;
}
/* Scaling glyph override */
.scale-btn .glyph {
  font-size: 13px !important;
}

.video-chip.count {
  margin-left: auto;
}

.video-credit {
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9d0a5;
}

.video-send-btn {
  width: 31px;
  border-radius: 50%;
  background: #ffffff;
  color: #171717;
}

.video-model-menu {
  position: absolute;
  left: 0;
  bottom: 38px;
  z-index: 42;
  display: grid;
  gap: 6px;
  width: 360px;
  max-height: 280px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(38, 38, 38, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.video-model-menu button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: #f4f4f4;
  cursor: pointer;
  text-align: left;
}

.video-model-menu button.active,
.video-model-menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.video-model-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.video-model-menu strong,
.video-model-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-model-menu strong {
  font-size: 13px;
}

.video-model-menu small {
  margin-top: 2px;
  color: #9b9b9b;
  font-size: 11px;
}

.video-model-menu em {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #bdbdbd;
  font-size: 11px;
  font-style: normal;
}

@keyframes video-pan {
  from { transform: translateX(-2%) scale(1.02); }
  to { transform: translateX(3%) scale(1.08); }
}

@keyframes video-float {
  from { transform: translateY(0) rotate(-2deg); }
  to { transform: translateY(-8px) rotate(3deg); }
}

.bottom-tools {
  position: absolute;
  left: 0;
  bottom: 8px;
  z-index: 36;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: 0 18px 18px 0;
  background: rgba(44, 44, 48, 0.94);
}

.flow-minimap {
  position: absolute;
  left: 14px;
  bottom: 60px;
  z-index: 24;
  width: 192px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(31, 31, 34, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  color: #ffffff;
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.flow-minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  margin-bottom: 6px;
  color: #bfc1c5;
  font-size: 11px;
  font-weight: 800;
}

.flow-minimap-head button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: transparent;
  color: #aeb0b4;
  cursor: pointer;
}

.flow-minimap-head button .glyph {
  transform: rotate(45deg);
}

.flow-minimap-stage {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #141416;
  background-size: 12px 12px;
  cursor: grab;
  touch-action: none;
}

.flow-minimap-stage:active {
  cursor: grabbing;
}

.flow-minimap-edge {
  position: absolute;
  height: 1px;
  transform-origin: 0 50%;
  background: rgba(120, 128, 136, 0.55);
  pointer-events: none;
}

.flow-minimap-node {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 5px;
  min-height: 4px;
  padding: 0;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
  color: rgba(10, 12, 16, 0.82);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.flow-minimap-node.script-gen {
  background: rgba(255, 255, 255, 0.7);
}

.flow-minimap-node.image {
  background: rgba(90, 226, 208, 0.7);
}

.flow-minimap-node.video {
  background: rgba(254, 113, 152, 0.7);
}

.flow-minimap-node.script,
.flow-minimap-node.script-card {
  background: rgba(254, 209, 102, 0.72);
}

.flow-minimap-node.active {
  outline: 1px solid #ffffff;
  outline-offset: 1px;
}

.flow-minimap-viewport {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  background: rgba(82, 185, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(82, 185, 255, 0.35), 0 0 12px rgba(82, 185, 255, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.flow-minimap-viewport:active {
  cursor: grabbing;
}

.bottom-tools button,
.help-fab {
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.bottom-tools button.active {
  background: rgba(255, 255, 255, 0.14);
}

.bottom-tools input {
  width: 96px;
  accent-color: #f3f3f3;
}

.zoom-menu-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.arrange-menu-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.arrange-confirm-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  z-index: 4;
  width: 164px;
  padding: 10px 10px 8px;
  transform: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(35, 35, 37, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.44);
  color: #f4f4f5;
  backdrop-filter: blur(18px);
}

.arrange-confirm-popover p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.45;
}

.arrange-confirm-popover div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.bottom-tools .arrange-confirm-popover button {
  width: auto;
  min-width: 42px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
}

.bottom-tools .arrange-confirm-popover button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.bottom-tools .arrange-confirm-popover button.primary {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.bottom-tools-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.16);
}

.bottom-tools button.zoom-pct {
  width: auto;
  min-width: 46px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
}

.bottom-tools button.zoom-pct:hover {
  background: rgba(255, 255, 255, 0.14);
}

.zoom-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  width: 188px;
  padding: 8px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(35, 35, 37, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
  color: #f4f4f5;
  backdrop-filter: blur(18px);
}

.zoom-menu-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 33px;
  padding: 0 9px;
  margin-bottom: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 650;
}

.zoom-menu-input input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
}

.zoom-menu button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 100%;
  height: 31px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: #f2f2f3;
  font-size: 13px;
  font-weight: 520;
  text-align: left;
}

.zoom-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.zoom-menu kbd {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  font: inherit;
}

.zoom-menu-sep {
  display: block;
  height: 1px;
  margin: 7px 2px 6px;
  background: rgba(255, 255, 255, 0.1);
}

.help-fab {
  position: absolute;
  left: 216px;
  bottom: 9px;
  z-index: 23;
  border-radius: 50%;
  background: rgba(44, 44, 48, 0.94);
  font-weight: 800;
}

.tapnow-composer {
  position: absolute;
  left: 50%;
  bottom: 64px;
  z-index: 26;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(720px, calc(100vw - 90px));
  padding: 8px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(28, 29, 31, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  color: #f4f4f4;
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.tapnow-composer-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 0;
}

.composer-head-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfd2d5;
  cursor: pointer;
}

.composer-head-btn.primary {
  background: linear-gradient(135deg, rgba(127, 174, 255, 0.4), rgba(255, 138, 211, 0.4));
  color: #ffffff;
}

.composer-head-expand {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 8px;
  background: transparent;
  color: #c2c5c8;
  cursor: pointer;
}

.composer-head-expand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tapnow-composer-input {
  width: 100%;
  min-height: 96px;
  padding: 6px 10px 6px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #ececec;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
}

.tapnow-composer-input::placeholder {
  color: #898b8e;
}

.tapnow-composer-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 2px;
}

.composer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  background: transparent;
  color: #d6d8da;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.composer-chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

.composer-chip.icon-only {
  width: 32px;
  padding: 0;
  justify-content: center;
}

.composer-chip.model {
  color: #f3f3f3;
}

.composer-chip.variations {
  min-width: 36px;
  justify-content: center;
}

.composer-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  margin: 0 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e7e0bd;
  font-size: 12px;
  font-weight: 600;
}

.composer-spacer {
  flex: 1;
}

.composer-send-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
}

.composer-send-btn:hover {
  background: #ececec;
}

.tapnow-composer-panel {
  margin-top: 6px;
  padding: 14px 10px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.composer-section + .composer-section {
  margin-top: 4px;
}

.composer-section-title {
  margin-bottom: 12px;
  color: #a4a7aa;
  font-size: 12px;
  font-weight: 600;
}

.reference-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.reference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
}

.reference-item span {
  color: #dcdee0;
  font-size: 13px;
  font-weight: 600;
}

.reference-item em {
  color: #8c8e91;
  font-style: normal;
  font-size: 12px;
}

.composer-divider {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.06);
}

.personalisation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 10px;
}

.personalisation-row span {
  color: #dcdee0;
  font-size: 13px;
  font-weight: 600;
}

.personalisation-row input {
  width: 200px;
  height: 32px;
  padding: 0 12px;
  border: 0;
  outline: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #dcdee0;
  font-size: 12px;
}

.personalisation-row input::placeholder {
  color: #6e7073;
}

.composer-section.sliders {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.composer-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dcdee0;
  font-size: 13px;
  font-weight: 600;
}

.slider-row-head strong {
  color: #f3f3f3;
  font-weight: 600;
}

.composer-slider-row input[type='range'] {
  width: 100%;
  height: 4px;
  accent-color: #ffffff;
}

.hint-mark {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-left: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #a4a7aa;
  font-size: 10px;
  font-style: normal;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .tapnow-composer {
    width: calc(100vw - 24px);
    bottom: 60px;
  }
}

.node-dialog-panel {
  position: absolute;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 420px;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(24, 25, 28, 0.97);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 32px 90px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px);
  overflow: hidden;
  pointer-events: auto;
}

.node-dialog-panel.collapsed {
  width: 280px;
  min-height: auto;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.dialog-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dialog-node-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
}

.dialog-header-info strong {
  display: block;
  color: #f5f5f5;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.dialog-header-info small {
  display: block;
  margin-top: 2px;
  color: #8f9398;
  font-size: 11px;
}

.dialog-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dialog-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  color: #c5c9cc;
  cursor: pointer;
}

.dialog-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 480px;
  overflow: hidden;
}

.dialog-node-preview {
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dialog-text-preview p {
  margin: 0;
  color: #d6dadc;
  font-size: 13px;
  line-height: 1.55;
}

.dialog-media-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
}

.dialog-media-preview span {
  color: #9ca0a5;
  font-size: 12px;
}

.dialog-node-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.dialog-node-meta span {
  color: #8f9398;
  font-size: 11px;
}

.dialog-node-meta em {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
}

.dialog-conversation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  max-height: 200px;
  overflow-y: auto;
}

.dialog-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.dialog-msg-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dialog-msg.agent .dialog-msg-avatar {
  background: rgba(254, 113, 152, 0.2);
  color: #fb7198;
}

.dialog-msg.user .dialog-msg-avatar {
  background: rgba(90, 226, 208, 0.2);
  color: #5ae2d0;
}

.dialog-msg p {
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.dialog-msg.agent p {
  background: rgba(255, 255, 255, 0.06);
  color: #e0e3e5;
}

.dialog-msg.user p {
  background: rgba(90, 226, 208, 0.12);
  color: #ddf6f2;
}

.dialog-input-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dialog-input-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 80px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: 0;
  resize: none;
  background: rgba(255, 255, 255, 0.05);
  color: #eef3f6;
  font-size: 13px;
  line-height: 1.45;
}

.dialog-input-row textarea::placeholder {
  color: #6e7277;
}

.dialog-send-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(90, 226, 208, 0.2);
  color: #5ae2d0;
  cursor: pointer;
  flex-shrink: 0;
}

.dialog-send-btn:hover {
  background: rgba(90, 226, 208, 0.35);
  color: #ffffff;
}

@media (max-width: 640px) {
  .landing-header {
    gap: 12px;
    height: 66px;
  }

  .landing-nav {
    display: none;
  }

  .landing-banners {
    grid-template-columns: 1fr;
    padding-bottom: 34px;
  }

  .landing-banner {
    height: 150px;
  }

  .project-row,
  .show-grid {
    grid-template-columns: 1fr;
  }

  .landing-search {
    width: 100%;
  }

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

  .flow-title-input {
    width: 118px;
  }
}

/* ── Video filmstrip trim strip ── */
.video-trim-strip {
  position: absolute;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 56px;
  padding: 0 4px;
  border-radius: 10px;
  background: rgba(14, 14, 18, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  user-select: none;
}

.trim-strip-side-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: #bbb;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.trim-strip-side-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.trim-strip-side-btn.confirm {
  border-color: rgba(167,139,250,0.5);
  background: rgba(167,139,250,0.15);
  color: #c4b5fd;
}
.trim-strip-side-btn.confirm:hover { background: rgba(167,139,250,0.28); color: #fff; }

.trim-filmstrip-wrap {
  position: relative;
  flex: 1;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: #0a0a0a;
}

.trim-filmstrip {
  display: flex;
  width: 100%;
  height: 100%;
}

.trim-filmstrip img,
.trim-frame-empty {
  flex: 1;
  height: 100%;
  object-fit: cover;
  display: block;
}
.trim-frame-empty {
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.04);
}

.trim-dark-left,
.trim-dark-right {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0,0,0,0.58);
  pointer-events: none;
}
.trim-dark-left { left: 0; }
.trim-dark-right { right: 0; }

.trim-sel-box {
  position: absolute;
  top: 0;
  bottom: 0;
  border: 2px solid #fff;
  border-radius: 4px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 4px;
}

.trim-sel-dur {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0,0,0,0.45);
  padding: 1px 5px;
  border-radius: 3px;
  pointer-events: none;
  white-space: nowrap;
}

.trim-sel-handle {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 10px;
  background: #fff;
  border-radius: 3px;
  cursor: col-resize;
  pointer-events: all;
}
.trim-sel-handle.left { left: -2px; }
.trim-sel-handle.right { right: -2px; }

/* Aetheric Synthesis home */
.aetheric-home {
  min-height: 100vh;
  background: #0e0e10;
  color: #e5e1e4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.aetheric-home button,
.aetheric-home input {
  font: inherit;
}

.aetheric-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 288px;
  padding: 30px 18px 28px;
  border-right: 1px solid rgba(152, 141, 159, 0.12);
  background: #0e0e10;
}

.aetheric-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 14px 58px;
}

.aetheric-brand .glyph { color: #ddb7ff; }

.aetheric-brand strong {
  display: block;
  color: #f4eff6;
  font-size: 31px;
  font-weight: 760;
  letter-spacing: 0;
}

.aetheric-brand span {
  display: block;
  margin-top: 6px;
  color: rgba(207, 194, 214, 0.58);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.aetheric-nav {
  display: grid;
  gap: 10px;
}

.aetheric-nav button,
.aetheric-sidebar-foot button {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 18px;
  color: #cfc2d6;
  background: transparent;
  cursor: pointer;
  font-weight: 720;
  text-align: left;
}

.aetheric-nav button:hover,
.aetheric-sidebar-foot button:hover,
.aetheric-nav button.active {
  background: rgba(53, 52, 55, 0.42);
  color: #f6f1f7;
}

.aetheric-nav button.active .glyph { color: #ddb7ff; }

.aetheric-new-project {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: calc(100% - 10px);
  min-height: 84px;
  margin: auto 5px 48px;
  border-radius: 18px;
  background: #efc200;
  color: #111;
  cursor: pointer;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow: 0 22px 48px rgba(239, 194, 0, 0.16);
}

.aetheric-sidebar-foot {
  display: grid;
  gap: 2px;
}

.aetheric-sidebar-foot button {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  color: #cfc2d6;
  font-size: 13px;
}

.aetheric-studio {
  min-height: 100vh;
  padding-left: 288px;
  background: linear-gradient(135deg, rgba(221, 183, 255, 0.06), transparent 35%), linear-gradient(180deg, #131315 0%, #111113 100%);
}

.aetheric-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 98px;
  padding: 0 40px;
  border-bottom: 1px solid rgba(152, 141, 159, 0.12);
  background: rgba(19, 19, 21, 0.84);
  backdrop-filter: blur(18px);
}

.aetheric-topbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 58px;
  min-width: 0;
  flex: 1;
}

.aetheric-topbar h1 {
  margin: 0;
  color: #f8f5fa;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 780;
  letter-spacing: 0;
}

.aetheric-tabs {
  display: flex;
  gap: 34px;
}

.aetheric-tabs button {
  position: relative;
  min-height: 56px;
  color: #cfc2d6;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  font-weight: 780;
}

.aetheric-tabs button.active { color: #ddb7ff; }

.aetheric-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: #ddb7ff;
}

.aetheric-search {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 min(360px, 28vw);
  height: 58px;
  padding: 0 22px;
  border: 1px solid rgba(152, 141, 159, 0.22);
  border-radius: 30px;
  background: rgba(32, 31, 33, 0.88);
  color: #988d9f;
}

.aetheric-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e5e1e4;
  font-size: 17px;
}

.aetheric-icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: transparent;
  color: #cfc2d6;
  cursor: pointer;
}

.aetheric-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid #ddb7ff;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(68, 226, 205, 0.28), rgba(221, 183, 255, 0.26)), url("/src/assets/character.svg") center/cover;
}

.aetheric-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 30px;
  padding: 50px 48px 80px;
}

.aetheric-main {
  display: grid;
  gap: 36px;
}

.aetheric-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 520px;
  border-radius: 20px;
  overflow: hidden;
}

.aetheric-model-column {
  padding: 18px;
  border-right: 1px solid rgba(152, 141, 159, 0.12);
  background: rgba(20, 20, 22, 0.92);
}

.aetheric-panel-head,
.aetheric-recents,
.aetheric-kicker,
.asset-body,
.asset-actions,
.aetheric-activity article {
  display: flex;
  align-items: center;
}

.aetheric-panel-head {
  justify-content: space-between;
  padding: 0 8px 14px;
}

.aetheric-panel-head strong {
  color: #fff;
  font-size: 18px;
}

.aetheric-panel-head button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: #efc200;
  color: #111;
  cursor: pointer;
  font-weight: 820;
}

.aetheric-recents {
  gap: 8px;
  padding: 0 0 28px;
}

.aetheric-recents button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 34px;
  border-radius: 9px;
  background: #353437;
  color: #e5e1e4;
  cursor: pointer;
  font-weight: 700;
}

.aetheric-recents button:first-child { flex: 1; }
.aetheric-recents button:last-child { width: 42px; }

.aetheric-kicker {
  justify-content: space-between;
  margin-bottom: 16px;
  color: #988d9f;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aetheric-kicker span {
  padding: 4px 8px;
  border-radius: 5px;
  background: rgba(221, 183, 255, 0.25);
  color: #ddb7ff;
  letter-spacing: 0;
  text-transform: none;
}

.aetheric-model-list {
  display: grid;
  gap: 10px;
}

.aetheric-model-list article {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(152, 141, 159, 0.24);
  border-radius: 12px;
  background: rgba(42, 42, 44, 0.42);
}

.aetheric-model-list article.active {
  border-color: rgba(221, 183, 255, 0.78);
  box-shadow: 0 0 26px rgba(221, 183, 255, 0.12);
}

.model-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: #353437;
  color: #ddb7ff;
}

.aetheric-model-list strong,
.aetheric-asset-card strong,
.aetheric-activity strong {
  display: block;
  color: #f7f2f8;
  font-weight: 820;
}

.aetheric-model-list small {
  display: block;
  margin-top: 4px;
  color: #988d9f;
  font-size: 11px;
  font-weight: 800;
}

.aetheric-model-list small.ready { color: #44e2cd; }

.aetheric-model-list p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #cfc2d6;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aetheric-model-list em {
  align-self: start;
  padding: 4px 6px;
  border-radius: 5px;
  background: rgba(239, 194, 0, 0.16);
  color: #efc200;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.aetheric-workspace {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 54px;
  background: #111113;
  text-align: center;
}

.workspace-glow { display: none; }

.aetheric-workspace h2 {
  margin: 0;
  color: #fff;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
}

.aetheric-workspace h2 span { color: #efc200; }

.aetheric-workspace p {
  max-width: 720px;
  margin: 18px 0 30px;
  color: #cfc2d6;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.7;
}

.workspace-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 280px));
  gap: 18px;
  width: min(100%, 596px);
}

.workspace-cards article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 106px;
  padding: 22px;
  border: 1px solid rgba(152, 141, 159, 0.22);
  border-radius: 12px;
  background: rgba(32, 31, 33, 0.7);
  text-align: left;
}

.workspace-cards .glyph {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(221, 183, 255, 0.18);
  color: #ddb7ff;
}

.workspace-cards strong {
  display: block;
  color: #fff;
}

.workspace-cards span {
  display: block;
  margin-top: 4px;
  color: #cfc2d6;
  font-size: 13px;
  line-height: 1.35;
}

.aetheric-prompt {
  width: min(100%, 630px);
  margin-top: 56px;
  padding: 24px 28px;
  border: 1px solid rgba(221, 183, 255, 0.42);
  border-radius: 12px;
  background: rgba(27, 27, 29, 0.92);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42);
  color: #e5e1e4;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.aetheric-filter-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 28px;
  border: 1px solid rgba(152, 141, 159, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
}

.aetheric-filter-panel > span {
  margin-right: 8px;
  color: #cfc2d6;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aetheric-filter-panel button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(152, 141, 159, 0.18);
  border-radius: 12px;
  background: rgba(42, 42, 44, 0.56);
  color: #f1edf3;
  cursor: pointer;
  font-weight: 720;
}

.view-switch {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.view-switch button {
  width: 52px;
  padding: 0;
  justify-content: center;
}

.view-switch button.active {
  background: #ddb7ff;
  color: #2c0051;
}

.aetheric-assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 30px;
}

.aetheric-asset-card,
.aetheric-create-asset,
.aetheric-activity,
.aetheric-storage {
  border: 1px solid rgba(152, 141, 159, 0.18);
  border-radius: 18px;
  background: rgba(32, 31, 33, 0.78);
}

.aetheric-asset-card {
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease;
}

.aetheric-asset-card:hover {
  transform: translateY(-3px);
  border-color: rgba(221, 183, 255, 0.52);
}

.asset-media {
  position: relative;
  height: 136px;
  overflow: hidden;
  background: #18181a;
}

.asset-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asset-media span {
  position: absolute;
  top: 20px;
  left: 22px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(21, 21, 23, 0.78);
  color: #44e2cd;
  font-size: 12px;
  font-weight: 820;
}

.asset-body {
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 8px;
}

.asset-body strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-body button {
  color: #988d9f;
  background: transparent;
  cursor: pointer;
}

.aetheric-asset-card p {
  margin: 0;
  padding: 0 24px;
  color: #cfc2d6;
  font-size: 14px;
  line-height: 1.5;
}

.asset-actions {
  gap: 14px;
  padding: 24px;
}

.asset-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 54px;
  border-radius: 12px;
  background: rgba(53, 52, 55, 0.62);
  color: #f5f0f7;
  cursor: pointer;
  font-weight: 780;
}

.asset-actions button:first-child { flex: 1; }

.asset-actions button:last-child {
  width: 58px;
  border: 1px solid rgba(221, 183, 255, 0.28);
  background: rgba(221, 183, 255, 0.12);
  color: #ddb7ff;
}

.aetheric-asset-card.loading {
  padding: 22px;
}

.aetheric-asset-card.loading div {
  height: 126px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(90deg, #1b1b1d, #2a2a2c, #1b1b1d);
}

.aetheric-create-asset {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 342px;
  border-style: dashed;
  background: transparent;
  color: #e5e1e4;
  cursor: pointer;
  text-align: center;
}

.aetheric-create-asset div {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 28px;
  border-radius: 999px;
  background: #2a2a2c;
}

.aetheric-create-asset strong {
  max-width: 150px;
  font-size: 24px;
  line-height: 1.25;
}

.aetheric-create-asset span {
  max-width: 150px;
  margin-top: 18px;
  color: #cfc2d6;
  line-height: 1.35;
}

.aetheric-side-panels {
  display: grid;
  align-content: start;
  gap: 30px;
}

.aetheric-activity,
.aetheric-storage {
  padding: 40px;
}

.aetheric-activity h2 {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 34px;
  color: #f4eff6;
  font-size: 20px;
}

.aetheric-activity h2 .glyph { color: #ddb7ff; }

.aetheric-activity article {
  gap: 20px;
  margin-bottom: 28px;
}

.aetheric-activity img,
.activity-icon {
  width: 62px;
  height: 62px;
  border-radius: 13px;
  background: #353437;
  object-fit: cover;
}

.activity-icon {
  display: grid;
  place-items: center;
  color: #ddb7ff;
}

.aetheric-activity span {
  display: block;
  margin-top: 8px;
  color: #cfc2d6;
}

.aetheric-activity small {
  display: block;
  margin-top: 10px;
  color: #44e2cd;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aetheric-activity i {
  display: block;
  width: 210px;
  height: 7px;
  margin-top: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ddb7ff 65%, rgba(255, 255, 255, 0.1) 65%);
}

.aetheric-activity > button {
  width: 100%;
  height: 64px;
  border: 1px solid rgba(152, 141, 159, 0.18);
  border-radius: 12px;
  background: transparent;
  color: #f5f0f7;
  cursor: pointer;
  font-size: 16px;
  font-weight: 820;
}

.aetheric-storage > span {
  color: #cfc2d6;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.aetheric-storage strong {
  display: inline-block;
  margin-top: 32px;
  color: #fff;
  font-size: 44px;
  letter-spacing: 0;
}

.aetheric-storage small {
  color: #cfc2d6;
  font-size: 16px;
}

.aetheric-storage p {
  float: right;
  margin: 52px 0 0;
  color: #cfc2d6;
}

.aetheric-storage div {
  clear: both;
  height: 12px;
  margin: 18px 0 30px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.aetheric-storage div i {
  display: block;
  width: 43%;
  height: 100%;
  background: linear-gradient(90deg, #ddb7ff, #44e2cd);
}

.aetheric-storage em {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(221, 183, 255, 0.22);
  border-radius: 12px;
  background: rgba(221, 183, 255, 0.08);
  color: #ddb7ff;
  font-style: normal;
  font-weight: 720;
  line-height: 1.35;
}

.aetheric-floating-add {
  position: fixed;
  right: 48px;
  bottom: 38px;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 18px;
  background: #ddb7ff;
  color: #2c0051;
  cursor: pointer;
  box-shadow: 0 22px 58px rgba(221, 183, 255, 0.24);
}

@media (max-width: 1240px) {
  .aetheric-layout { grid-template-columns: 1fr; }
  .aetheric-side-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .aetheric-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
  }

  .aetheric-studio { padding-left: 0; }

  .aetheric-topbar,
  .aetheric-topbar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .aetheric-topbar { padding: 24px; }
  .aetheric-search { flex: none; width: 100%; }
  .aetheric-layout { padding: 24px; }
  .aetheric-hero { grid-template-columns: 1fr; }
  .aetheric-assets,
  .aetheric-side-panels { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .aetheric-topbar h1,
  .aetheric-workspace h2 {
    font-size: 32px;
  }

  .aetheric-tabs {
    gap: 18px;
    overflow-x: auto;
    width: 100%;
  }

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

  .aetheric-filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch { margin-left: 0; }
}

/* Star Engine AIGC home */
.engine-home {
  min-height: 100vh;
  background: #07080a;
  color: #f4f5f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.engine-home button,
.engine-home input,
.engine-home textarea {
  font: inherit;
}

.engine-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 270px;
  overflow: hidden;
  transition: width 0.22s ease;
  border-right: 1px solid rgba(255,255,255,0.1);
  background:
    linear-gradient(180deg, rgba(15, 36, 45, 0.72), rgba(11, 11, 14, 0.96) 22%),
    #0b0c0f;
  box-shadow: 22px 0 60px rgba(0, 0, 0, 0.35);
}

.engine-brand {
  display: grid;
  grid-template-columns: 44px 1fr 36px;
  gap: 10px;
  align-items: center;
  min-height: 88px;
  padding: 16px 14px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.engine-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 221, 255, 0.75);
  border-radius: 999px;
  background: radial-gradient(circle at 35% 25%, #28e8ff, #123c9f 58%, #051018);
  color: #7ff7ff;
  box-shadow: 0 0 24px rgba(0, 221, 255, 0.35);
}

.engine-brand strong {
  display: block;
  color: #22d9ff;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0;
}

.engine-brand span {
  display: block;
  margin-top: 5px;
  color: rgba(210, 224, 231, 0.55);
  font-size: 12px;
}

.engine-brand > button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #b9c1c8;
  cursor: pointer;
}

.engine-brand > button:hover {
  color: #fff;
  background: rgba(255,255,255,0.16);
}

.engine-mode-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.engine-mode-row button {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 64px;
  border-radius: 8px;
  background: transparent;
  color: #bfc6ce;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.engine-mode-row button.active {
  background: rgba(0, 211, 232, 0.16);
  color: #18e8ff;
  box-shadow: inset 0 0 0 1px rgba(0, 221, 255, 0.12);
}

.engine-mode-row button.gold {
  color: #f2c400;
}

.engine-filter-tabs {
  display: flex;
  gap: 7px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.engine-filter-tabs button {
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: #c5c8cf;
  cursor: pointer;
  font-size: 12px;
}

.engine-filter-tabs button.active {
  background: #12d7ea;
  color: #061013;
  font-weight: 850;
  box-shadow: 0 0 20px rgba(18, 215, 234, 0.32);
}

.engine-side-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  margin: 10px;
  padding: 0 11px;
  border: 1px solid rgba(230, 183, 0, 0.55);
  border-radius: 6px;
  background: rgba(30, 24, 7, 0.54);
  color: #d6b300;
}

.engine-side-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d9dee5;
  font-size: 12px;
}

.engine-model-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.engine-model-list article {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px 8px;
  border-radius: 8px;
}

.engine-model-list article.active {
  background: linear-gradient(90deg, rgba(0, 226, 255, 0.22), rgba(17, 34, 36, 0.72));
  box-shadow: inset 3px 0 #00e4ff, 0 0 28px rgba(0, 228, 255, 0.14);
}

.model-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #f7f9ff;
  font-weight: 900;
}

.engine-model-list strong {
  display: block;
  color: #f5f7fa;
  font-size: 13px;
  font-weight: 820;
}

.engine-model-list p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: rgba(217, 224, 232, 0.68);
  font-size: 11px;
  line-height: 1.38;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.engine-model-list article > span {
  align-self: start;
  padding: 3px 6px;
  border: 1px solid rgba(0, 230, 255, 0.4);
  border-radius: 4px;
  color: #00e4ff;
  background: rgba(0, 230, 255, 0.1);
  font-size: 10px;
}

.engine-user {
  display: grid;
  grid-template-columns: 40px 1fr 52px;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.32);
}

.engine-user[role="button"] {
  cursor: pointer;
}

.engine-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: url("/src/assets/character.svg") center/cover;
}

.engine-user strong {
  display: block;
  font-size: 13px;
}

.engine-wallet-inline + div {
  display: none;
}

.engine-user span {
  display: block;
  margin-top: 4px;
  color: #00dfe8;
  font-size: 11px;
}

.engine-user button {
  height: 44px;
  border: 1px solid rgba(255, 80, 48, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, #ff9a24, #d82431);
  color: #fff5d2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.engine-content {
  min-height: 100vh;
  margin-left: 270px;
  position: relative;
  overflow: hidden;
  transition: margin-left 0.22s ease;
  padding: 14px 28px 28px;
  background:
    radial-gradient(circle at 64% 0%, rgba(255, 210, 0, 0.08), transparent 35%),
    linear-gradient(180deg, #0b0b0c, #07080a 72%);
}

/* ── 侧栏收缩为窄条：仅保留收缩/展开按钮 ── */
.engine-home.sidebar-collapsed .engine-sidebar {
  width: 56px;
}

.engine-home.sidebar-collapsed .engine-content {
  margin-left: 56px;
}

/* 工作台浮层（绝对/固定定位）跟随侧栏宽度移动 */
.engine-home.sidebar-collapsed .model-composer,
.engine-home.sidebar-collapsed .model-chat {
  left: 86px;
}

.engine-home.sidebar-collapsed .engine-brand {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 14px 8px;
}

.engine-home.sidebar-collapsed .engine-brand > div,
.engine-home.sidebar-collapsed .engine-mode-row,
.engine-home.sidebar-collapsed .engine-filter-tabs,
.engine-home.sidebar-collapsed .engine-side-search,
.engine-home.sidebar-collapsed .engine-model-list,
.engine-home.sidebar-collapsed .engine-user {
  display: none;
}

.engine-account-actions {
  position: absolute;
  top: 18px;
  right: 28px;
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 10px;
}

.engine-language-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.82);
  color: #f3f5f8;
  box-shadow: inset 0 0 18px rgba(0, 221, 255, 0.06);
  backdrop-filter: blur(14px);
}

.engine-language-select span {
  font-size: 12px;
  color: #b8c0c8;
}

.engine-language-select select {
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3f5f8;
  font-size: 12px;
  font-weight: 800;
}

.engine-language-select option {
  color: #17191d;
  background: #ffffff;
}

.engine-home.is-rtl {
  direction: rtl;
}

.engine-home.is-rtl .engine-account-actions {
  right: auto;
  left: 28px;
}

.engine-home.is-rtl .engine-sidebar,
.engine-home.is-rtl .engine-content,
.engine-home.is-rtl .model-chat,
.engine-home.is-rtl .model-composer {
  direction: rtl;
}

.engine-home.is-rtl .engine-account-button strong {
  padding-left: 0;
  padding-right: 10px;
  border-left: 0;
  border-right: 1px solid rgba(255,255,255,0.12);
}

.engine-account-button {
  display: inline-grid;
  grid-template-columns: 34px auto auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.86);
  color: #f3f5f8;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,0.24), inset 0 0 18px rgba(0, 221, 255, 0.08);
  backdrop-filter: blur(14px);
}

.engine-account-button:hover {
  border-color: rgba(0, 226, 255, 0.42);
  background: rgba(29, 34, 42, 0.94);
}

.engine-account-button strong {
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,0.12);
  color: #12d7ea;
  font-size: 12px;
  font-weight: 850;
}

.redeem-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0,0,0,0.58);
  backdrop-filter: blur(10px);
}

.redeem-modal {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: #15171c;
  color: #f4f6f8;
  box-shadow: 0 30px 80px rgba(0,0,0,0.42);
}

.redeem-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.redeem-modal header strong {
  display: block;
  font-size: 18px;
}

.redeem-modal header span {
  display: block;
  margin-top: 5px;
  color: rgba(235,240,246,0.58);
  font-size: 13px;
}

.redeem-modal header button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.72);
  cursor: pointer;
}

.redeem-modal label {
  display: grid;
  gap: 8px;
  color: rgba(235,240,246,0.72);
  font-size: 13px;
}

.redeem-modal input {
  height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  outline: 0;
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.redeem-modal input:focus {
  border-color: rgba(18, 215, 234, 0.68);
  box-shadow: 0 0 0 3px rgba(18, 215, 234, 0.12);
}

.redeem-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #ffcf32;
  font-size: 13px;
}

.redeem-submit {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border-radius: 10px;
  background: #ffbf00;
  color: #171100;
  cursor: pointer;
  font-weight: 850;
}

.redeem-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.engine-account-button.logged-in strong {
  color: #ffca2f;
}

.engine-account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #12d7ea, #d6a7ff);
  color: #061013;
  font-size: 13px;
  font-weight: 900;
}

.model-workspace {
  position: relative;
  min-height: calc(100vh - 42px);
  padding: 1px 18px 260px;
}

.home-ad-carousel {
  position: relative;
  height: 276px;
  margin: -14px -28px 28px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 60%),
    #101114;
}

.home-ad-track {
  position: absolute;
  inset: 0;
}

.home-ad-card {
  position: absolute;
  top: 8px;
  width: min(500px, 38vw);
  height: 264px;
  overflow: hidden;
  border-radius: 12px;
  background: #1d1d20;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform-origin: center;
  transition: left 0.42s ease, transform 0.42s ease, opacity 0.28s ease, filter 0.42s ease;
}

.home-ad-card.active {
  left: 50%;
  z-index: 3;
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.home-ad-card.prev {
  left: 17%;
  z-index: 2;
  opacity: 0.9;
  transform: translateX(-50%) scale(0.96);
  filter: saturate(0.8) brightness(0.78);
}

.home-ad-card.next {
  left: 83%;
  z-index: 2;
  opacity: 0.9;
  transform: translateX(-50%) scale(0.96);
  filter: saturate(0.95) brightness(0.82);
}

.home-ad-card.hidden {
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%) scale(0.9);
}

.home-ad-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: contrast(1.18) saturate(1.12);
}

.home-ad-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(180deg, transparent 0 32%, rgba(0, 0, 0, 0.62) 100%);
}

.home-ad-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.92;
}

.home-ad-card.noir::after {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(20, 20, 22, 0.38)),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 52px);
  filter: grayscale(1);
}

.home-ad-card.warm::after {
  background:
    radial-gradient(circle at 54% 26%, rgba(255, 205, 128, 0.48), transparent 28%),
    linear-gradient(135deg, rgba(21, 34, 54, 0.82), rgba(174, 72, 34, 0.58));
}

.home-ad-card.amber::after {
  background:
    linear-gradient(90deg, rgba(10, 13, 18, 0.18), rgba(160, 77, 0, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 181, 66, 0.1) 0 1px, transparent 1px 48px);
}

.home-ad-card.blue::after {
  background:
    radial-gradient(circle at 22% 30%, rgba(62, 194, 255, 0.42), transparent 26%),
    linear-gradient(135deg, rgba(7, 29, 45, 0.85), rgba(15, 57, 82, 0.62));
}

.home-ad-card.violet::after {
  background:
    radial-gradient(circle at 72% 24%, rgba(239, 162, 255, 0.36), transparent 24%),
    linear-gradient(135deg, rgba(29, 22, 52, 0.86), rgba(91, 36, 116, 0.52));
}

.home-ad-copy {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 20px;
  z-index: 2;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.68);
}

.home-ad-copy strong {
  display: block;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-ad-copy span {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-ad-arrow {
  position: absolute;
  top: 112px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(47, 51, 58, 0.78);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.home-ad-arrow:hover {
  background: rgba(86, 92, 102, 0.86);
}

.home-ad-arrow.left {
  left: 6px;
}

.home-ad-arrow.right {
  right: 6px;
}

.home-ad-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.home-ad-dots button {
  width: 12px;
  height: 4px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.home-ad-dots button.active {
  width: 26px;
  background: rgba(255, 255, 255, 0.72);
}

.model-floating-menu {
  position: absolute;
  top: 8px;
  right: 188px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(34, 37, 44, 0.75);
  color: #f4cc46;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(255, 207, 0, 0.18), inset 0 0 18px rgba(14, 221, 236, 0.12);
}

.model-floating-menu .glyph {
  color: #34e6ff;
  font-size: 26px;
}

.model-showcase {
  display: grid;
  justify-items: center;
  max-width: 720px;
  margin: 70px auto 0;
}

.model-orbit-mark {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 52px;
  border-radius: 999px;
  color: #fff;
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 26px rgba(255,255,255,0.9);
  background:
    conic-gradient(from 35deg, transparent 0 9%, #fff 10% 20%, transparent 21% 54%, #fff 55% 73%, transparent 74%),
    radial-gradient(circle, transparent 0 43%, #fff 44% 50%, transparent 51%);
}

.model-description {
  width: min(586px, 78vw);
  padding: 18px 20px;
  border: 1px solid rgba(0, 231, 255, 0.28);
  border-radius: 8px;
  background: rgba(27, 30, 36, 0.88);
  box-shadow: 0 0 24px rgba(0, 230, 255, 0.08);
}

.model-description p {
  margin: 0;
  color: rgba(248, 250, 255, 0.9);
  font-size: 14px;
  line-height: 1.9;
}

.model-composer {
  position: fixed;
  right: 28px;
  bottom: 0;
  left: 300px;
  z-index: 11;
  min-height: 220px;
  padding: 0 42px 12px 52px;
}

.model-kind-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(22, 23, 28, 0.82);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
}

.model-kind-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(220, 225, 232, 0.66);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.model-kind-tabs button.active {
  background: #16d9ef;
  color: #031014;
}

.model-kind-tabs button em {
  display: grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  font-size: 10px;
  font-style: normal;
}

.model-kind-tabs button:not(.active) em {
  background: rgba(255, 255, 255, 0.12);
}

.model-avatar-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 260px);
  height: 52px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(22, 23, 28, 0.82);
  box-shadow: 0 10px 30px rgba(0,0,0,0.32);
  vertical-align: top;
}

.model-avatar-strip button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  background: radial-gradient(circle at 28% 22%, #5ff8ff, #6452e8 48%, #16171d);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
  box-shadow: inset 0 0 14px rgba(255,255,255,0.12);
}

.model-avatar-strip button.active {
  outline: 2px solid #fff;
  box-shadow: 0 0 24px rgba(0, 221, 255, 0.36);
}

.model-avatar-strip button.add {
  border-style: dashed;
  background: rgba(255,255,255,0.06);
  color: #aeb6bf;
  font-size: 22px;
}

.model-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(520px, 100%);
  height: 30px;
  margin: 0 0 10px 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(18, 20, 24, 0.72);
  color: rgba(232, 236, 242, 0.68);
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

.model-price strong {
  color: #ffca26;
  font-weight: 820;
}

.model-input-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 150px;
  margin-top: 2px;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px 16px 0 0;
  background: rgba(25, 27, 32, 0.97);
  box-shadow: 0 -18px 60px rgba(0,0,0,0.44);
}

.model-ref-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.model-ref-thumb {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
}

.model-ref-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-ref-thumb em {
  position: absolute;
  left: 3px;
  top: 3px;
  display: grid;
  place-items: center;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgba(10,12,16,0.78);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.model-ref-thumb button {
  position: absolute;
  right: 2px;
  top: 2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: rgba(10,12,16,0.82);
  color: #fff;
  cursor: pointer;
}

.model-ref-thumb .model-ref-preview {
  right: auto;
  left: 2px;
  bottom: 2px;
  top: auto;
  background: rgba(10, 12, 16, 0.7);
}

.model-ref-thumb .model-ref-remove {
  right: 2px;
  top: 2px;
}

.model-ref-add {
  display: grid;
  place-items: center;
  gap: 2px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: #9aa1ab;
  cursor: pointer;
}

.model-ref-add:hover {
  border-color: rgba(0, 229, 255, 0.5);
  color: #cdd3db;
}

.model-ref-add span {
  font-size: 11px;
}

.model-ref-add input[type="file"] {
  display: none;
}

.model-input-textarea {
  width: 100%;
  min-height: 78px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #eff3f8;
  font-size: 15px;
  line-height: 1.7;
}

.model-input-textarea::placeholder {
  color: rgba(230, 235, 242, 0.36);
}

.model-input-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.model-input-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.model-input-chips button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: #cdd3db;
  cursor: pointer;
  font-size: 12px;
}

.model-input-footer .model-send {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #16d9ef;
  color: #031014;
  cursor: pointer;
}

.model-input-card.image-type {
  min-height: 176px;
  padding: 14px 14px 12px;
  border-radius: 0 0 8px 8px;
  background: #171a20;
}

.model-input-card.image-type .model-ref-strip {
  position: relative;
  left: auto;
  top: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 44px 10px 2px;
  scrollbar-width: none;
}

.model-input-card.image-type .model-ref-strip::-webkit-scrollbar {
  display: none;
}

.model-input-card.image-type .model-ref-add {
  width: 62px;
  height: 74px;
  border-style: dashed;
  transform: rotate(-6deg);
  flex: 0 0 auto;
}

.model-input-card.image-type .model-ref-thumb {
  width: 62px;
  height: 74px;
  transform: rotate(-2deg);
  flex: 0 0 auto;
}

.model-input-card.image-type .model-input-textarea {
  min-height: 72px;
  padding-right: 46px;
  font-size: 14px;
}

.model-input-card.image-type .model-input-footer {
  align-items: center;
  margin-top: auto;
}

.model-input-card.image-type .model-input-chips button {
  height: 30px;
  border-radius: 7px;
  background: #242832;
}

.model-input-card.image-type .model-input-chips button:nth-child(1),
.model-input-card.image-type .model-input-chips button:nth-child(2) {
  color: #ffd85a;
}

.model-reference-card {
  display: grid;
  place-items: center;
  align-self: start;
  width: 72px;
  height: 76px;
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 6px;
  background: rgba(255,255,255,0.045);
  color: #858b95;
  cursor: pointer;
  transform: rotate(-8deg);
}

.model-reference-card span {
  font-size: 12px;
}

.model-reference-card input[type="file"] {
  display: none;
}

.model-reference-card.has-image {
  border-style: solid;
  overflow: hidden;
  padding: 0;
}

.model-reference-card.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.model-reference-remove {
  align-self: start;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 22, 28, 0.92);
  color: #fff;
  cursor: pointer;
}

.model-empty-hint {
  display: grid;
  place-items: center;
  height: 36px;
  padding: 0 12px;
  font-size: 12px;
  color: rgba(230, 235, 242, 0.5);
}

.model-error {
  margin: 4px 2px 0;
  padding: 7px 10px;
  border-radius: 7px;
  background: rgba(255, 86, 86, 0.12);
  color: #ff9a9a;
  font-size: 12px;
}

.model-send:disabled {
  cursor: wait;
  opacity: 0.6;
}

/* ── 大模型工作台对话记录 ── */
.model-chat {
  position: absolute;
  left: 50px;
  right: 28px;
  top: 64px;
  bottom: 288px;
  overflow-y: auto;
  padding: 8px 52px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.model-chat-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px;
  background: linear-gradient(180deg, rgba(12,13,16,0.96), rgba(12,13,16,0.6));
  color: rgba(220, 225, 232, 0.6);
  font-size: 12px;
  z-index: 1;
}

.model-chat-head button {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: transparent;
  color: rgba(220, 225, 232, 0.7);
  cursor: pointer;
  font-size: 12px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 760px;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg.assistant {
  align-self: flex-start;
}

.chat-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 22%, #5ff8ff, #6452e8 52%, #16171d);
  color: #fff;
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 32, 38, 0.96);
  border: 1px solid rgba(255,255,255,0.08);
  color: #eef1f6;
  font-size: 14px;
  line-height: 1.7;
}

.chat-msg.user .chat-bubble {
  background: rgba(22, 217, 239, 0.14);
  border-color: rgba(22, 217, 239, 0.3);
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-user-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chat-image-thumb {
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
}

.chat-user-images img,
.chat-image-thumb img {
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.chat-image-result {
  display: grid;
  gap: 10px;
}

.chat-image-result > strong {
  color: rgba(245, 247, 252, 0.94);
  font-size: 14px;
  font-weight: 720;
}

.chat-image-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-image-tags span {
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(230, 235, 242, 0.64);
  font-size: 12px;
  line-height: 22px;
}

.chat-media-button {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-in;
}

.chat-media {
  display: block;
  max-width: 420px;
  max-height: 420px;
  width: 100%;
  border-radius: 10px;
  background: #000;
}

.chat-audio {
  width: 320px;
  max-width: 100%;
}

.chat-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(220, 225, 232, 0.78);
  font-size: 13px;
}

.chat-error {
  color: #ff9a9a;
  font-size: 13px;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chat-actions button,
.chat-actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  color: #cdd3db;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

.chat-actions button:hover,
.chat-actions a:hover {
  color: #fff;
  border-color: rgba(22, 217, 239, 0.5);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
}

.image-lightbox-panel {
  width: min(920px, 94vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #15171d;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.image-lightbox-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 0 12px 0 16px;
  color: #f4f7fb;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.image-lightbox-panel header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.image-lightbox-panel header button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  cursor: pointer;
}

.image-lightbox-panel img {
  max-width: 100%;
  max-height: calc(92vh - 45px);
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0c10;
}

.model-input-card textarea {
  width: 100%;
  min-height: 80px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #eff3f8;
  font-size: 14px;
  line-height: 1.7;
}

.model-input-card textarea::placeholder {
  color: rgba(230, 235, 242, 0.36);
}

.model-side-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.model-side-actions button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: #87909b;
  cursor: pointer;
}

.model-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0 0;
}

.model-option-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: #d8dce2;
  cursor: pointer;
  font-size: 12px;
}

.model-option-row button.active-info {
  border: 1px solid rgba(0, 229, 255, 0.55);
  background: rgba(0, 229, 255, 0.08);
  color: #38f0ff;
}

.model-option-row span {
  flex: 1;
}

.model-option-row .model-send {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: #16d9ef;
  color: #031014;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 52% 0%, rgba(255, 205, 0, 0.12), transparent 38%),
    radial-gradient(circle at 18% 28%, rgba(0, 221, 255, 0.12), transparent 30%),
    #07080a;
  color: #f4f6f8;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-panel {
  width: min(430px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(18, 20, 25, 0.94);
  box-shadow: 0 28px 80px rgba(0,0,0,0.42);
}

.auth-brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.auth-brand strong {
  display: block;
  color: #22d9ff;
  font-size: 22px;
  font-weight: 880;
}

.auth-brand span {
  display: block;
  margin-top: 6px;
  color: rgba(230, 235, 242, 0.58);
  font-size: 13px;
}

.auth-language {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: #e9eef5;
}

.auth-language span {
  color: rgba(230, 235, 242, 0.7);
  font-size: 12px;
}

.auth-language select {
  margin-left: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 800;
}

.auth-language option {
  color: #17191d;
  background: #ffffff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 28px 0 22px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}

.auth-tabs button {
  height: 40px;
  border-radius: 8px;
  background: transparent;
  color: #aeb6bf;
  cursor: pointer;
  font-weight: 760;
}

.auth-tabs button.active {
  background: #ffbf00;
  color: #171000;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: rgba(238, 242, 248, 0.78);
  font-size: 13px;
  font-weight: 760;
}

.auth-form input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  outline: 0;
  background: rgba(255,255,255,0.055);
  color: #fff;
}

.auth-form input:focus {
  border-color: rgba(0, 221, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 221, 255, 0.1);
}

.auth-message {
  margin: 0;
  color: #ff8585;
  font-size: 13px;
}

.auth-submit {
  height: 46px;
  border-radius: 8px;
  background: #16d9ef;
  color: #031014;
  cursor: pointer;
  font-weight: 880;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.64;
}

.auth-skip {
  height: 40px;
  margin-top: 2px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-weight: 600;
}

.auth-skip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.auth-skip:disabled {
  cursor: wait;
  opacity: 0.5;
}

.engine-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.engine-new-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: #ffbf00;
  color: #1a1300;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 0 28px rgba(255, 191, 0, 0.24);
}

.engine-history {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #b9c1c9;
  cursor: pointer;
}

.engine-hero {
  display: grid;
  justify-items: center;
  max-width: 850px;
  margin: 94px auto 0;
  text-align: center;
}

.engine-hero-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 28px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: #f2f4f7;
}

.engine-hero h1 {
  margin: 0;
  color: #fff;
  font-size: 38px;
  font-weight: 880;
  letter-spacing: 0;
}

.engine-hero h1 span {
  color: #ffc000;
}

.engine-hero p {
  margin: 18px 0 52px;
  color: rgba(230, 232, 238, 0.58);
  font-size: 17px;
}

.engine-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  width: 100%;
}

.engine-feature-grid article {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 18px;
  align-items: center;
  min-height: 96px;
  padding: 20px 24px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.025));
  box-shadow: 0 20px 42px rgba(0,0,0,0.18);
  text-align: left;
}

.engine-feature-grid article > div {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0, 221, 255, 0.12);
  color: #12dff5;
}

.engine-feature-grid strong {
  display: block;
  color: #f7f7f9;
  font-size: 16px;
}

.engine-feature-grid span {
  display: block;
  margin-top: 8px;
  color: rgba(230, 232, 238, 0.56);
  font-size: 14px;
}

.engine-quick-start {
  max-width: 850px;
  margin: 48px auto 0;
}

.engine-quick-start > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ddd8c7;
  font-size: 15px;
}

.engine-quick-start > strong .glyph {
  color: #ffcf00;
}

.engine-quick-start > div {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.engine-quick-start button {
  min-width: 132px;
  height: 54px;
  border-radius: 999px 999px 0 0;
  background: rgba(255,255,255,0.06);
  color: #c6cbd2;
  cursor: pointer;
}

.engine-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 20px;
  left: 452px;
  z-index: 10;
  min-height: 206px;
  padding: 22px 18px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px 16px 0 0;
  background: rgba(24, 26, 31, 0.96);
  box-shadow: 0 -16px 60px rgba(0,0,0,0.42);
}

.engine-upload-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 214, 0, 0.42);
  border-radius: 999px;
  color: #ffdf3a;
  background: rgba(255, 214, 0, 0.08);
  font-size: 12px;
  font-weight: 760;
}

.engine-chat-panel textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  margin-top: 18px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #f0f3f8;
}

.engine-chat-panel textarea::placeholder {
  color: rgba(220, 225, 232, 0.36);
}

.engine-chat-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.engine-chat-tools button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: #d5d9df;
  cursor: pointer;
  font-size: 12px;
}

.engine-chat-tools button:nth-child(2) {
  color: #00e6ff;
}

.engine-chat-tools span {
  flex: 1;
}

.engine-chat-tools button:last-child {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: #15d6ea;
  color: #031014;
}

.agent-liblib-view {
  min-height: calc(100vh - 28px);
  padding: 0 0 52px;
  color: #f4f4f4;
}

.agent-banner-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 8px;
  margin: 0 0 48px;
}

.agent-banner-row article {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
  background: #202020;
}

.agent-banner-row article.featured {
  min-height: 188px;
  box-shadow: 0 18px 38px rgba(0,0,0,0.36);
}

.agent-banner-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.agent-banner-row article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.72), rgba(0,0,0,0.1));
}

.agent-banner-row strong,
.agent-banner-row span {
  position: absolute;
  z-index: 1;
  left: 26px;
}

.agent-banner-row strong {
  bottom: 46px;
  font-size: 24px;
}

.agent-banner-row span {
  bottom: 24px;
  color: #d3d3d3;
  font-size: 13px;
}

.agent-project-section,
.agent-tv-show {
  padding: 0 18px 42px;
}

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

.agent-section-head h2 {
  margin: 0;
  font-size: 20px;
}

.agent-section-head button {
  background: transparent;
  color: #9da3aa;
  cursor: pointer;
}

.agent-project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
}

.agent-create-project,
.agent-project-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: #e7e7e7;
  cursor: pointer;
}

.agent-create-project {
  min-height: 202px;
}

.agent-create-project > svg,
.agent-create-project > .glyph {
  margin: auto;
}

.agent-create-project {
  place-items: center;
  border: 1px solid rgba(167, 186, 205, 0.44);
  border-radius: 8px;
  background: linear-gradient(138deg, #343a40, #1e252c);
}

.agent-create-project span {
  width: 100%;
  padding: 12px;
  border-radius: 0 0 8px 8px;
  background: #30363d;
  text-align: center;
}

.agent-project-card > div {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  overflow: hidden;
  border-radius: 8px;
  background: #222;
  color: rgba(255, 255, 255, 0.15);
}

.agent-project-placeholder-icon {
  color: #a8a8a8;
  opacity: 0.34;
}

.agent-project-card img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.agent-project-card em {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(0,0,0,0.7);
  color: #bfc6ce;
  font-size: 11px;
  font-style: normal;
}

.agent-project-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-project-card span {
  color: #93989f;
  font-size: 13px;
}

.agent-section-head label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(300px, 40vw);
  height: 38px;
  padding: 0 12px;
  border: 1px solid #444;
  border-radius: 999px;
  background: #17181a;
}

.agent-section-head input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f2f3f5;
}

.agent-category-row {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
}

.agent-category-row button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #3e3e3e;
  border-radius: 8px;
  background: #1d1d1d;
  color: #c7c7c7;
  cursor: pointer;
}

.agent-show-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
}

.agent-show-grid article {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 158px;
  overflow: hidden;
  border-radius: 6px;
  background: #080b16;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

.agent-show-grid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: contrast(1.16) saturate(1.12);
}

.agent-show-card::before,
.agent-show-card::after,
.agent-show-cover-art {
  content: "";
  position: absolute;
  inset: 0;
}

.agent-show-card::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 4, 12, 0.06), rgba(4, 6, 16, 0.22) 44%, rgba(4, 7, 18, 0.96) 100%),
    radial-gradient(circle at 84% 8%, rgba(255, 255, 255, 0.16), transparent 24%);
}

.agent-show-card::after {
  z-index: 2;
  opacity: 0.92;
}

.agent-show-card.neon::after {
  background:
    radial-gradient(circle at 26% 28%, rgba(16, 226, 255, 0.42), transparent 20%),
    radial-gradient(circle at 72% 26%, rgba(255, 45, 199, 0.34), transparent 21%),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(54, 219, 255, 0.16) 29px 31px),
    linear-gradient(135deg, rgba(29, 19, 98, 0.68), rgba(8, 11, 28, 0.26));
}

.agent-show-card.space::after {
  background:
    radial-gradient(circle at 78% 18%, rgba(189, 224, 255, 0.5), transparent 22%),
    radial-gradient(circle at 48% 38%, rgba(60, 107, 145, 0.38), transparent 24%),
    linear-gradient(135deg, rgba(9, 18, 31, 0.78), rgba(27, 46, 66, 0.3));
}

.agent-show-card.warm::after {
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 208, 168, 0.54), transparent 24%),
    radial-gradient(circle at 28% 34%, rgba(96, 57, 78, 0.4), transparent 22%),
    linear-gradient(135deg, rgba(42, 22, 33, 0.66), rgba(143, 85, 56, 0.26));
}

.agent-show-card.robot::after {
  background:
    radial-gradient(circle at 55% 28%, rgba(137, 221, 255, 0.44), transparent 21%),
    linear-gradient(135deg, rgba(17, 26, 33, 0.76), rgba(60, 85, 101, 0.24));
}

.agent-show-cover-art {
  z-index: 3;
  pointer-events: none;
}

.agent-show-card.neon .agent-show-cover-art {
  background:
    linear-gradient(180deg, transparent 0 36%, rgba(11, 5, 22, 0.18) 36%),
    radial-gradient(ellipse at 46% 34%, rgba(0, 0, 0, 0.72) 0 4%, transparent 5%),
    linear-gradient(90deg, transparent 0 42%, rgba(10, 12, 28, 0.7) 43% 47%, transparent 48%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 1px, transparent 1px 44px);
}

.agent-show-card.space .agent-show-cover-art {
  background:
    radial-gradient(circle at 44% 46%, rgba(8, 12, 19, 0.9) 0 7%, transparent 8%),
    linear-gradient(90deg, transparent 0 39%, rgba(13, 18, 26, 0.84) 40% 46%, transparent 47%),
    radial-gradient(circle at 74% 24%, rgba(231, 243, 255, 0.42), transparent 16%);
}

.agent-show-card.warm .agent-show-cover-art {
  background:
    radial-gradient(circle at 51% 30%, rgba(26, 16, 20, 0.6) 0 10%, transparent 11%),
    radial-gradient(ellipse at 46% 50%, rgba(21, 13, 20, 0.48) 0 18%, transparent 19%),
    repeating-linear-gradient(125deg, rgba(255, 221, 177, 0.2) 0 2px, transparent 2px 28px);
}

.agent-show-card.robot .agent-show-cover-art {
  background:
    radial-gradient(circle at 52% 42%, rgba(8, 15, 18, 0.72) 0 8%, transparent 9%),
    linear-gradient(90deg, transparent 0 45%, rgba(15, 26, 32, 0.7) 46% 51%, transparent 52%);
}

.agent-show-info {
  position: absolute;
  left: 13px;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  color: #eef3ff;
}

.agent-show-info strong {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-show-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(222, 231, 248, 0.76);
  font-size: 11px;
}

.agent-show-info em {
  color: rgba(222, 231, 248, 0.82);
  font-style: normal;
  font-weight: 700;
}

.agent-show-info time {
  display: block;
  margin-top: 7px;
  color: rgba(147, 163, 188, 0.86);
  font-size: 11px;
}

/* 桌面端默认隐藏移动端抽屉控件 */
.engine-drawer-toggle,
.engine-drawer-backdrop {
  display: none;
}

@media (max-width: 980px) {
  /* ── 侧栏改为覆盖式抽屉，从左侧滑入/滑出 ── */
  .engine-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    transform: translateX(0);
    transition: transform 0.26s ease;
    z-index: 60;
  }

  /* 收起态：抽屉滑出屏幕（保持抽屉宽度，避免变成 56px 窄条） */
  .engine-home.sidebar-collapsed .engine-sidebar {
    width: min(86vw, 320px);
    transform: translateX(-100%);
    box-shadow: none;
  }

  /* 内容区占满整屏（覆盖桌面的 margin-left:270/56px） */
  .engine-content,
  .engine-home.sidebar-collapsed .engine-content {
    margin-left: 0;
    padding: 14px 14px 24px;
  }

  /* 抽屉遮罩：仅抽屉打开（非收起）时显示，点击收起 */
  .engine-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .engine-home.sidebar-collapsed .engine-drawer-backdrop {
    display: none;
  }

  /* 打开抽屉的悬浮按钮：仅收起时显示（截图中的「>」） */
  .engine-drawer-toggle {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 40;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(20, 28, 34, 0.82);
    color: #22d9ff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
  }
  .engine-home:not(.sidebar-collapsed) .engine-drawer-toggle {
    display: none;
  }

  /* ── 工作台：对话/输入区全宽贴底 ── */
  .model-workspace {
    padding: 1px 2px 250px;
  }
  .model-composer,
  .engine-home.sidebar-collapsed .model-composer {
    left: 0;
    right: 0;
    padding: 0 12px 10px;
  }
  .model-chat,
  .engine-home.sidebar-collapsed .model-chat {
    left: 0;
    right: 0;
    padding: 8px 12px;
  }
  .model-showcase {
    margin-top: 40px;
  }
  .model-orbit-mark {
    width: 104px;
    height: 104px;
    margin-bottom: 36px;
    font-size: 46px;
  }
  .model-description {
    width: min(92vw, 586px);
  }
  .model-input-chips {
    flex-wrap: wrap;
  }

  /* 顶部右上角按钮位置收紧 */
  .engine-account-actions {
    position: absolute;
    top: 10px;
    right: 12px;
  }
  .model-floating-menu {
    top: 6px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  /* AI动漫制作：栅格收窄 */
  .agent-banner-row,
  .agent-show-grid,
  .engine-feature-grid {
    grid-template-columns: 1fr;
  }
  .agent-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .agent-project-section,
  .agent-tv-show {
    padding: 0 12px 32px;
  }
  /* 顶部广告轮播：贴合移动端边距与高度 */
  .home-ad-carousel {
    height: 190px;
    margin: -14px -14px 20px;
  }
  .home-ad-card {
    width: min(86vw, 460px);
    height: 178px;
  }
  /* 分类标签横向滚动，避免换行挤压 */
  .agent-category-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .agent-category-row button {
    flex: 0 0 auto;
  }
  .engine-chat-panel {
    position: static;
    margin-top: 32px;
  }
}

/* ===== 画布编辑器（CanvasPage / .flow-shell）移动端适配 =====
   置于文件末尾以确保覆盖前面的 .flow-* 基础规则；
   Composer 面板使用内联 left/top 定位，故用 !important 覆盖为贴底全宽抽屉。 */
@media (max-width: 980px) {
  /* 顶栏：紧凑、允许换行 */
  .flow-topbar {
    height: auto;
    min-height: 48px;
    padding: 6px 10px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .flow-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .flow-title-input {
    width: 88px;
  }
  /* 自动保存状态文字在移动端隐藏，腾出空间给操作按钮 */
  .canvas-sync-status {
    display: none;
  }

  /* 左侧 rail 间距收紧 */
  .flow-rail {
    gap: 8px;
  }

  /* 浮动 Composer 面板 → 贴底全宽抽屉（覆盖内联 left/top/width） */
  .image-composer,
  .video-composer,
  .audio-composer,
  .image-upscale-composer,
  .text-model-picker {
    left: 8px !important;
    right: 8px !important;
    top: auto !important;
    bottom: 64px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 68vh;
    overflow-y: auto;
  }

  /* 弹出菜单/面板不超出视口 */
  .flow-project-menu,
  .add-node-menu,
  .model-key-popover {
    max-width: calc(100vw - 24px);
  }
  .asset-panel {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
  }

  /* 小地图在移动端隐藏，节省空间 */
  .flow-minimap {
    display: none;
  }

  /* 登录页：收紧内边距（卡片本身已是 min(430px,100%) 自适应） */
  .auth-shell {
    padding: 16px;
  }
  .auth-panel {
    padding: 22px 18px;
  }
}
