:root {
  color-scheme: dark;
  --ink: #f7f7f2;
  --muted: #9a9a90;
  --quiet: #696962;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --panel: #171715;
  --panel-2: #20201d;
  --paper: #f6f1dc;
  --paper-2: #fff9df;
  --brand: #f3d11f;
  --brand-2: #d8ff73;
  --accent: #48d5c4;
  --warn: #ff6f4d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: #0b0b0a;
}

* {
  box-sizing: border-box;
}

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

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 16%, rgba(243, 209, 31, 0.14), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(72, 213, 196, 0.1), transparent 24%),
    linear-gradient(135deg, #080807 0%, #141410 52%, #090907 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-root {
  min-height: 100vh;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  min-height: 100vh;
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    #0b0b09;
  background-size: 56px 56px;
}

.login-visual::before {
  position: absolute;
  inset: 12% 10% auto auto;
  width: min(58vw, 720px);
  height: min(58vw, 720px);
  content: "";
  border: 1px solid rgba(243, 209, 31, 0.28);
  border-radius: 999px;
  transform: rotate(-12deg);
}

.login-visual::after {
  position: absolute;
  right: 13%;
  bottom: 10%;
  width: 360px;
  height: 190px;
  content: "";
  border: 1px solid rgba(72, 213, 196, 0.2);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  box-shadow: var(--shadow);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 252px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--paper-2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}

.login-brand img,
.brand-lockup img,
.sidebar-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.login-copy h1 {
  max-width: 9em;
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 560px;
  margin: 0;
  color: #d8d3bf;
  font-size: 18px;
  line-height: 1.8;
}

.login-card {
  display: flex;
  align-items: center;
  padding: 40px;
  background: rgba(247, 247, 242, 0.96);
  color: #171715;
}

.login-form {
  width: 100%;
}

.login-form h2 {
  margin: 0 0 8px;
  color: #11110f;
  font-size: 26px;
  letter-spacing: 0;
}

.login-form > p {
  margin: 0 0 30px;
  color: #6a675d;
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span {
  color: #47443c;
  font-size: 14px;
  font-weight: 700;
}

.field input,
.prompt-dock textarea {
  width: 100%;
  border: 1px solid rgba(20, 20, 18, 0.18);
  outline: 0;
}

.field input {
  height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fffdf4;
  color: #151512;
}

.field input:focus {
  border-color: #c8aa16;
  box-shadow: 0 0 0 3px rgba(243, 209, 31, 0.24);
}

.primary-btn,
.ghost-btn,
.small-btn,
.nav-item,
.icon-btn,
.round-btn,
.workbench-nav button,
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.primary-btn {
  width: 100%;
  height: 50px;
  margin-top: 8px;
  background: #151512;
  color: #fff;
  font-weight: 800;
}

.primary-btn:hover,
.ghost-btn:hover,
.small-btn:hover,
.icon-btn:hover,
.round-btn:hover,
.workbench-nav button:hover,
.logout-btn:hover {
  transform: translateY(-1px);
}

.login-hint {
  margin-top: 18px;
  color: #777269;
  font-size: 13px;
  line-height: 1.7;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 29vw);
  width: 100vw;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: #050505;
}

.login-video-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #000;
}

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

.login-video-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, transparent 46%, rgba(0, 0, 0, 0.18) 76%, #080808 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.02) 40%, rgba(0, 0, 0, 0.28));
}

.login-floating-logo {
  position: absolute;
  top: 34px;
  left: 42px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: auto;
  height: 78px;
  color: #fff;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.42));
}

.login-brand-mark {
  display: block;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border-radius: 999px;
  flex: 0 0 auto;
}

.login-brand-mark img {
  display: block;
  width: 239px;
  height: 76px;
  max-width: none;
  object-fit: contain;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.login-brand-text strong {
  color: #fff;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}

.login-brand-text span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.login-brand-text span::before,
.login-brand-text span::after {
  display: block;
  width: 34px;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.72);
}

.login-auth-panel {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px;
  background: var(--panel);
}

.login-auth-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 20%, rgba(243, 209, 31, 0.08), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(72, 213, 196, 0.08), transparent 32%),
    linear-gradient(180deg, #191916 0%, #10100f 100%);
}

.login-auth-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 72%);
}

.login-stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.login-stars span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0.22;
  transform: translate(-50%, -50%);
  animation: starPulse 3.6s ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes starPulse {
  0%,
  100% {
    opacity: 0.08;
    transform: translate(-50%, -50%) scale(0.78);
  }

  45% {
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(1);
  }
}

.login-auth-panel .login-form {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  color: #fff;
}

.login-auth-panel .login-form h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: 0;
}

.login-auth-panel .login-subtitle {
  margin: 0 0 38px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 18px;
  font-weight: 700;
}

.login-tabs {
  display: flex;
  align-items: center;
  height: 34px;
  margin-bottom: 24px;
}

.login-tabs span {
  position: relative;
  display: inline-flex;
  height: 34px;
  align-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

.login-tabs span::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: var(--brand);
}

.login-auth-panel .field {
  margin-bottom: 22px;
}

.login-auth-panel .field span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.login-auth-panel .field input {
  height: 54px;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-shadow: inset 0 0 0 1px transparent;
}

.login-auth-panel .field input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.login-auth-panel .field input:focus {
  border-color: rgba(243, 209, 31, 0.7);
  box-shadow: 0 0 0 3px rgba(243, 209, 31, 0.12);
}

.login-error {
  margin-top: -6px;
  color: #ffb19f;
  font-size: 13px;
  line-height: 1.6;
}

.login-error[hidden] {
  display: none;
}

.login-auth-panel .primary-btn {
  height: 54px;
  margin-top: 18px;
  background: #f5f0dc;
  color: #11110f;
  font-size: 16px;
}

.login-auth-panel .primary-btn:hover {
  background: #fff7cf;
}

.login-agreement {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  line-height: 1.8;
}

.login-auth-panel .login-hint {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.38);
}

.product-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  background: #f8f5ea;
  color: #141410;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid rgba(20, 20, 18, 0.1);
  background: #fffaf0;
}

.sidebar-logo {
  display: flex;
  width: 180px;
  height: 58px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  justify-content: flex-start;
  height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #4f4a3e;
  font-weight: 800;
}

.nav-item svg,
.icon-btn svg,
.round-btn svg,
.small-btn svg,
.logout-btn svg,
.workbench-nav svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-item.is-active {
  border-color: rgba(20, 20, 18, 0.12);
  background: #151512;
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  color: #777269;
  font-size: 12px;
  line-height: 1.6;
}

.logout-btn {
  justify-content: flex-start;
  width: 100%;
  height: 40px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid rgba(20, 20, 18, 0.1);
  background: #fff;
  color: #4f4a3e;
  font-weight: 700;
}

.main-view {
  min-width: 0;
  padding: 32px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #897f64;
  font-size: 13px;
  font-weight: 900;
}

.section-head h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0;
}

.section-head p {
  max-width: 660px;
  margin: 10px 0 0;
  color: #6b675d;
  line-height: 1.7;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(20, 20, 18, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #847d70;
}

.search-box svg {
  width: 17px;
  height: 17px;
}

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

.ghost-btn,
.small-btn {
  border: 1px solid rgba(20, 20, 18, 0.12);
  background: #fff;
  color: #1a1915;
  font-weight: 800;
}

.ghost-btn {
  height: 42px;
  padding: 0 16px;
}

.small-btn {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

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

.project-card,
.skill-card {
  min-width: 0;
  border: 1px solid rgba(20, 20, 18, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(25, 22, 10, 0.07);
}

.project-card {
  overflow: hidden;
}

.project-thumb {
  position: relative;
  height: 158px;
  overflow: hidden;
  background:
    linear-gradient(rgba(20, 20, 18, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 18, 0.13) 1px, transparent 1px),
    #151512;
  background-size: 28px 28px;
}

.project-thumb::before {
  position: absolute;
  top: 34px;
  left: 36px;
  width: 180px;
  height: 72px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.project-thumb::after {
  position: absolute;
  top: 52px;
  right: 38px;
  width: 84px;
  height: 84px;
  content: "";
  border: 1px solid rgba(72, 213, 196, 0.34);
  border-radius: 999px;
  background: rgba(72, 213, 196, 0.1);
}

.project-card:nth-child(2) .project-thumb::after {
  border-radius: 8px;
  border-color: rgba(243, 209, 31, 0.4);
  background: rgba(243, 209, 31, 0.14);
}

.project-body,
.skill-card {
  padding: 18px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #efe7bf;
  color: #766000;
  font-size: 12px;
  font-weight: 900;
}

.project-body h2,
.skill-card h2 {
  margin: 0 0 10px;
  font-size: 19px;
  letter-spacing: 0;
}

.project-body p,
.skill-card p {
  margin: 0 0 18px;
  color: #676256;
  line-height: 1.65;
}

/* 项目库采用沉浸式深色工作区，和生成工作台保持同一视觉语言。 */
.projects-shell {
  background: #090909;
  color: #f3f3ef;
}

.projects-shell .sidebar {
  border-color: rgba(255, 255, 255, 0.09);
  background: #0d0d0d;
}

.projects-shell .sidebar-logo {
  background: transparent;
}

.projects-shell .nav-item {
  color: #aaa9a4;
}

.projects-shell .nav-item.is-active {
  border-color: rgba(255, 255, 255, 0.08);
  background: #292929;
  color: #fff;
}

.projects-shell .sidebar-footer {
  color: #777772;
}

.projects-shell .logout-btn {
  border-color: rgba(255, 255, 255, 0.12);
  background: #191919;
  color: #d8d8d2;
}

.projects-shell .main-view {
  background: #090909;
}

.projects-shell .eyebrow {
  color: #b9a34a;
}

.projects-shell .section-head p {
  color: #a4a39d;
}

.projects-shell .search-box,
.projects-shell .ghost-btn,
.projects-shell .small-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: #1b1b1b;
  color: #efefe9;
}

.projects-shell .search-box {
  color: #96958f;
}

.projects-shell .search-box input {
  color: #f3f3ef;
}

.projects-shell .search-box input::placeholder {
  color: #777772;
}

.projects-shell .ghost-btn:hover,
.projects-shell .small-btn:hover,
.projects-shell .logout-btn:hover {
  border-color: rgba(243, 209, 31, 0.5);
  background: #26251f;
}

.projects-shell .project-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: #181818;
  box-shadow: none;
}

.projects-shell .project-thumb {
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #222220;
  background-size: 28px 28px;
}

.projects-shell .tag {
  background: rgba(243, 209, 31, 0.14);
  color: #eed775;
}

.projects-shell .project-body p {
  color: #a4a39d;
}

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

.skill-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
}

.skill-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #151512;
  color: var(--brand);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-card .small-btn {
  width: fit-content;
  margin-top: auto;
}

.workbench-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #070707;
}

.workbench-project-header {
  position: absolute;
  top: 20px;
  left: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 13px;
}

.workbench-quick-actions {
  position: absolute;
  top: 20px;
  right: 18px;
  z-index: 20;
}

.quick-chat-button {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(21, 21, 20, 0.88);
  color: #efefe9;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.quick-chat-button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(38, 38, 36, 0.96);
}

.quick-chat-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.workbench-logo-button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f4ef;
  cursor: pointer;
}

.workbench-logo-button > svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.workbench-logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #1b1b1a, #30302d);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
}

.workbench-logo-mark img {
  display: block;
  width: 111px;
  max-width: none;
  height: 36px;
  object-fit: contain;
}

.workbench-title {
  min-width: 0;
}

.workbench-title strong {
  display: block;
  overflow: hidden;
  max-width: 35vw;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f7f7f2;
  font-size: 20px;
  font-weight: 800;
}

.workbench-title span {
  display: block;
  margin-top: 2px;
  color: #9e9e94;
  font-size: 12px;
}

.round-btn,
.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #efefe7;
}

.round-btn {
  border-radius: 999px;
}

.canvas-area {
  --dot-x: 0px;
  --dot-y: 0px;
  --dot-size: 48px;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.18) 1.3px, transparent 1.5px) var(--dot-x) var(--dot-y) / var(--dot-size) var(--dot-size),
    #080808;
  user-select: none;
  touch-action: none;
}

.canvas-area.workbench-pan-mode,
.canvas-area.workbench-dragging {
  cursor: grab;
}

.canvas-area.workbench-dragging {
  cursor: grabbing;
}

.canvas-world {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1800px;
  height: 1520px;
  transform-origin: 0 0;
}

.canvas-node,
.node-output {
  position: absolute;
  min-width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(30, 30, 28, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
}

.canvas-node {
  padding: 14px;
}

.node-output {
  padding: 16px;
  color: #a8a8a0;
}

.node-handle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  cursor: grab;
}

.workbench-dragging-node .node-handle,
.workbench-dragging-node {
  cursor: grabbing;
}

.node-dot {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.node-avatar {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #151512;
  font-weight: 900;
}

.node-avatar img {
  display: block;
  width: 70px;
  max-width: none;
  height: 100%;
  object-fit: contain;
}

.node-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 900;
}

.node-status {
  color: #9b9b92;
  font-size: 13px;
  font-weight: 800;
}

.node-inner {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.node-inner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.node-inner p,
.node-output p {
  margin: 0;
  color: #9c9c94;
  line-height: 1.6;
}

.node-inner [data-result-copy] {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.node-inner .node-model-note {
  margin-top: 8px;
  color: #f1cc49;
  font-size: 12px;
  line-height: 1.45;
}

.creative-run-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(243, 209, 31, 0.3);
  border-radius: 9px;
  background: linear-gradient(120deg, rgba(243, 209, 31, 0.1), rgba(255, 255, 255, 0.025));
}

.creative-run-progress[hidden] {
  display: none;
}

.creative-run-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.creative-run-progress-head strong {
  color: #f0efe7;
  font-size: 13px;
}

.creative-run-progress-head span {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(243, 209, 31, 0.14);
  color: #efd75f;
  font-size: 11px;
  font-weight: 800;
}

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

.creative-run-progress-bar > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e4bd31, #f4db63);
  box-shadow: 0 0 12px rgba(243, 209, 31, 0.44);
  transition: width 340ms ease;
}

.creative-run-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.creative-run-steps li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  color: #8b8b83;
  font-size: 11px;
}

.creative-run-steps i,
.node-execution-state i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f6f69;
}

.creative-run-steps span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
}

.creative-run-steps b {
  color: inherit;
  font-size: 11px;
}

.creative-run-steps small {
  overflow: hidden;
  color: #73736c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.creative-run-steps em {
  color: inherit;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.creative-run-steps li[data-step-status="running"] {
  color: #f0d056;
}

.creative-run-steps li[data-step-status="running"] i,
.node-execution-state[data-status="running"] i {
  background: #f0d056;
  box-shadow: 0 0 0 4px rgba(240, 208, 86, 0.12);
  animation: run-pulse 1.25s ease-in-out infinite;
}

.creative-run-steps li[data-step-status="completed"] {
  color: #70d8cb;
}

.creative-run-steps li[data-step-status="completed"] i,
.node-execution-state[data-status="completed"] i,
.node-execution-state[data-status="ready"] i {
  background: #48d5c4;
}

.creative-run-steps li[data-step-status="failed"] {
  color: #ff967e;
}

.creative-run-steps li[data-step-status="failed"] i,
.node-execution-state[data-status="failed"] i {
  background: #ff6f4d;
}

.creative-run-progress-detail,
.creative-run-progress-meta {
  margin: 0;
}

.creative-run-progress-detail {
  color: #d4d3c7;
  font-size: 11px;
  line-height: 1.45;
}

.creative-run-progress-meta {
  color: #7f7f78;
  font-size: 10px;
}

.creative-run-progress[data-status="completed"] {
  border-color: rgba(72, 213, 196, 0.38);
  background: linear-gradient(120deg, rgba(72, 213, 196, 0.11), rgba(255, 255, 255, 0.025));
}

.creative-run-progress[data-status="completed"] .creative-run-progress-head span,
.creative-run-progress[data-status="completed"] .creative-run-progress-bar > span {
  background: #48d5c4;
  color: #103d37;
}

.creative-run-progress[data-status="failed"] {
  border-color: rgba(255, 111, 77, 0.44);
  background: rgba(255, 111, 77, 0.07);
}

@keyframes run-pulse {
  50% {
    opacity: 0.42;
  }
}

.node-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.node-chips span {
  display: inline-flex;
  height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #d8d8ce;
  font-size: 12px;
}

.node-output h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #e7e7dd;
  font-size: 18px;
}

.node-execution-state {
  display: flex;
  min-height: 23px;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  color: #a8a89f;
  font-size: 11px;
  line-height: 1.3;
}

.node-execution-state[hidden] {
  display: none;
}

.node-execution-state[data-status="running"] {
  border-color: rgba(243, 209, 31, 0.3);
  background: rgba(243, 209, 31, 0.07);
  color: #ebd061;
}

.node-execution-state[data-status="completed"],
.node-execution-state[data-status="ready"] {
  border-color: rgba(72, 213, 196, 0.3);
  background: rgba(72, 213, 196, 0.07);
  color: #82ded3;
}

.node-execution-state[data-status="failed"] {
  border-color: rgba(255, 111, 77, 0.35);
  background: rgba(255, 111, 77, 0.08);
  color: #ff9a83;
}

.node-output .output-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(243, 209, 31, 0.16);
  color: var(--brand);
}

.node-output .ghost-box {
  display: grid;
  min-height: 120px;
  place-items: center;
  margin-top: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #74746d;
  text-align: center;
}

.node-output.has-story-output .ghost-box {
  display: block;
  height: calc(100% - 115px);
  min-height: 0;
  margin-top: 10px;
  overflow: auto;
  border: 0;
  background: transparent;
  color: #d8d8cf;
  text-align: left;
}

.node-output.has-story-output.is-complete .ghost-box {
  height: 74px;
}

.node-output.is-warm .ghost-box {
  border-color: rgba(243, 209, 31, 0.36);
  color: #d4c67f;
  background: rgba(243, 209, 31, 0.05);
}

.node-output.is-running {
  border-color: rgba(243, 209, 31, 0.56);
  box-shadow: 0 0 0 3px rgba(243, 209, 31, 0.09), 0 24px 70px rgba(0, 0, 0, 0.3);
}

.node-output.is-failed {
  border-color: rgba(255, 111, 77, 0.64);
}

.node-output.is-ready {
  border-color: rgba(72, 213, 196, 0.46);
}

.node-output.has-story-output.is-warm .ghost-box {
  border: 0;
  background: transparent;
}

.story-output {
  color: #d8d8cf;
  font-size: 13px;
  line-height: 1.5;
}

.story-characters,
.story-shots {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.story-characters section,
.story-shots li {
  list-style: none;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.story-characters section:last-child,
.story-shots li:last-child {
  border-bottom: 0;
}

.story-output strong {
  color: #f2f2ea;
  font-size: 14px;
}

.story-output span {
  margin-left: 7px;
  color: #d8bd44;
  font-size: 12px;
}

.story-output p {
  margin: 4px 0 0;
  color: #aaa9a1;
}

.story-storyboards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.storyboard-frame {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
}

.storyboard-frame img,
.storyboard-placeholder {
  display: block;
  width: 100%;
  height: 82px;
  background: #10100f;
  object-fit: cover;
}

.storyboard-placeholder {
  display: grid;
  place-items: center;
  color: #86867d;
  font-size: 12px;
}

.storyboard-frame figcaption {
  overflow: hidden;
  padding: 5px 6px;
  color: #b8b7ad;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-action {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 34px;
  margin-top: 2px;
  border: 1px solid rgba(243, 209, 31, 0.36);
  border-radius: 6px;
  background: rgba(243, 209, 31, 0.1);
  color: #f2d954;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.node-action svg {
  width: 16px;
  height: 16px;
}

.node-action:disabled {
  cursor: wait;
  opacity: 0.52;
}

.story-video {
  display: grid;
  align-content: start;
  gap: 8px;
}

.story-video .node-action {
  margin-top: 2px;
}

.story-error {
  color: #f2ae91 !important;
}

.storyboard-item-error {
  display: block;
  margin-top: 4px;
  color: #f2ae91;
  font-size: 11px;
  line-height: 1.35;
}

.story-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 100%;
  color: #d8bd44;
  font-weight: 800;
  text-align: center;
}

.story-loading span {
  width: 9px;
  height: 9px;
  margin: 0;
  border-radius: 50%;
  background: #f3d11f;
  box-shadow: 0 0 0 5px rgba(243, 209, 31, 0.12);
}

.workbench-selected {
  border-color: rgba(243, 209, 31, 0.66);
  box-shadow: 0 0 0 3px rgba(243, 209, 31, 0.16), 0 24px 70px rgba(0, 0, 0, 0.32);
}

.canvas-node.is-configuring {
  border-color: rgba(243, 209, 31, 0.82);
  box-shadow: 0 0 0 4px rgba(243, 209, 31, 0.18), 0 24px 70px rgba(0, 0, 0, 0.36);
}

.node-composer-panel {
  position: absolute;
  top: 24px;
  bottom: 18px;
  z-index: 24;
  display: flex;
  width: min(424px, calc(100vw - 44px));
  flex-direction: column;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(28, 28, 27, 0.98);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.46), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  scrollbar-width: thin;
  touch-action: auto;
}

.node-composer-panel[hidden] {
  display: none;
}

.node-composer-panel.is-overlay {
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.node-composer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.node-composer-header > div {
  min-width: 0;
}

.node-composer-header span {
  display: block;
  margin-bottom: 5px;
  color: #d9b934;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.node-composer-header strong {
  display: block;
  overflow: hidden;
  color: #f2f2ed;
  font-size: 19px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-composer-header p {
  margin: 7px 0 0;
  color: #92928c;
  font-size: 13px;
  line-height: 1.5;
}

.node-composer-close {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9d9d96;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.node-composer-close:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.node-composer-form {
  display: grid;
  gap: 20px;
  padding: 20px 22px 18px;
}

.node-material-section,
.node-prompt-section {
  display: grid;
  gap: 11px;
}

.node-section-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.node-section-label > div {
  display: grid;
  gap: 4px;
}

.node-section-label strong {
  color: #ecece7;
  font-size: 14px;
}

.node-section-label span {
  color: #85857f;
  font-size: 12px;
  line-height: 1.4;
}

.node-asset-count {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #b9b9b2 !important;
  font-weight: 700;
}

.node-material-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.node-material-types button {
  display: grid;
  min-height: 68px;
  place-items: center;
  gap: 5px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  color: #b6b6b0;
  cursor: pointer;
  font-size: 12px;
}

.node-material-types button:hover {
  border-color: rgba(243, 209, 31, 0.46);
  background: rgba(243, 209, 31, 0.08);
  color: #f1d55b;
}

.node-material-types svg,
.node-dropzone-icon svg,
.node-asset-list i svg,
.node-optimize-button svg,
.node-optimization > div > span svg,
.node-generate-button svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.node-material-types svg {
  width: 22px;
  height: 22px;
}

.node-dropzone {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.13);
  color: #c9c9c2;
  cursor: pointer;
  outline: 0;
}

.node-dropzone:hover,
.node-dropzone:focus-visible,
.node-dropzone.is-dragging {
  border-color: rgba(243, 209, 31, 0.64);
  background: rgba(243, 209, 31, 0.08);
}

.node-dropzone-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: rgba(243, 209, 31, 0.13);
  color: #ebcf4d;
}

.node-dropzone-icon svg {
  width: 19px;
  height: 19px;
}

.node-dropzone div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

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

.node-dropzone strong {
  color: #d9d9d3;
  font-size: 12px;
}

.node-dropzone span {
  color: #787872;
  font-size: 11px;
}

.node-asset-list {
  display: grid;
  gap: 6px;
  max-height: 118px;
  overflow: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.node-asset-list[hidden] {
  display: none;
}

.node-asset-list > span {
  display: flex;
  min-width: 0;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.node-asset-list i {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  color: #d8bd44;
}

.node-asset-list i svg {
  width: 15px;
  height: 15px;
}

.node-asset-list b {
  min-width: 0;
  overflow: hidden;
  color: #d6d6d0;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-asset-list small {
  flex: 0 0 auto;
  color: #85857f;
  font-size: 11px;
}

.node-asset-list button {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #c4c4be;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.node-asset-list button:hover {
  background: rgba(255, 111, 77, 0.26);
  color: #fff;
}

.node-optimize-button {
  display: inline-flex;
  height: 30px;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(243, 209, 31, 0.34);
  border-radius: 999px;
  background: rgba(243, 209, 31, 0.08);
  color: #efd251;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.node-optimize-button:hover {
  border-color: rgba(243, 209, 31, 0.68);
  background: rgba(243, 209, 31, 0.14);
}

.node-optimize-button svg {
  width: 15px;
  height: 15px;
}

.node-prompt-section textarea {
  width: 100%;
  min-height: 142px;
  padding: 12px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  outline: 0;
  background: #191918;
  color: #eee;
  font-size: 13px;
  line-height: 1.65;
}

.node-prompt-section textarea::placeholder {
  color: #70706b;
}

.node-prompt-section textarea:focus {
  border-color: rgba(243, 209, 31, 0.62);
  box-shadow: 0 0 0 3px rgba(243, 209, 31, 0.1);
}

.node-optimization {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(243, 209, 31, 0.25);
  border-radius: 12px;
  background: rgba(243, 209, 31, 0.06);
}

.node-optimization[hidden] {
  display: none;
}

.node-optimization > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-optimization > div > span {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #e7ca44;
}

.node-optimization > div > span svg {
  width: 15px;
  height: 15px;
}

.node-optimization strong {
  color: #eed256;
  font-size: 12px;
}

.node-optimization small {
  margin-left: auto;
  color: #96917d;
  font-size: 10px;
  text-align: right;
}

.node-optimization p {
  max-height: 110px;
  margin: 0;
  overflow: auto;
  color: #d7d3bf;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  scrollbar-width: thin;
}

.node-optimization footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.node-optimization footer button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: transparent;
  color: #cecec7;
  cursor: pointer;
  font-size: 11px;
}

.node-optimization footer button:last-child {
  border-color: rgba(243, 209, 31, 0.48);
  color: #f1d45a;
}

.node-rights-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #898983;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.5;
}

.node-rights-check input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: #e2c33f;
}

.node-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.node-composer-footer > span {
  color: #74746e;
  font-size: 11px;
}

.node-generate-button {
  display: inline-flex;
  height: 40px;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: #f0d03a;
  color: #242216;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.node-generate-button:hover {
  background: #ffe15b;
}

.node-generate-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.node-generate-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.output-lines {
  position: absolute;
  overflow: visible;
  pointer-events: none;
}

.output-lines path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 3;
  stroke-dasharray: 10 9;
}

.canvas-area.lines-hidden .output-lines {
  display: none;
}

.left-toolbar {
  position: absolute;
  top: 50%;
  left: 22px;
  z-index: 12;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(24, 24, 22, 0.9);
  transform: translateY(-50%);
  box-shadow: var(--shadow);
}

.bottom-toolbar {
  position: absolute;
  right: 50%;
  bottom: 22px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 58px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(24, 24, 22, 0.92);
  box-shadow: var(--shadow);
  transform: translateX(50%);
}

.divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.12);
}

.icon-btn.is-active,
.round-btn.is-active,
.bottom-toolbar .is-active {
  background: #f2f0e5;
  color: #151512;
}

.zoom-label {
  min-width: 72px;
  color: #e8e8df;
  font-weight: 900;
}

.assistant-panel {
  position: absolute;
  top: 24px;
  right: 22px;
  bottom: 18px;
  z-index: 16;
  display: flex;
  width: min(338px, calc(100vw - 44px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  background: rgba(25, 25, 25, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.025) inset;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  touch-action: auto;
}

.assistant-panel.is-expanded {
  width: clamp(420px, 32vw, 580px);
}

.assistant-panel.is-hidden,
.workbench-quick-actions .is-hidden {
  display: none;
}

.assistant-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 20px 0 34px;
}

.assistant-heading {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #f2f2ed;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.assistant-header-actions button {
  display: grid;
  width: 22px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #aaa9a6;
  cursor: pointer;
}

.assistant-header-actions button:hover,
.assistant-heading:hover,
.assistant-add:hover,
.assistant-ask:hover {
  color: #fff;
}

.assistant-header-actions svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.assistant-welcome {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: clamp(38px, 10vh, 134px) 24px 0;
  text-align: center;
}

.assistant-welcome h2 {
  margin: 0 0 12px;
  color: #eeeeea;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.assistant-welcome p {
  max-width: 400px;
  margin: 0;
  color: #858580;
  font-size: 17px;
  line-height: 1.7;
}

.assistant-persona-button {
  height: 50px;
  margin-top: 60px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #ecece8;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}

.assistant-persona-button:hover {
  border-color: rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.09);
}

.assistant-composer-wrap {
  display: flex;
  margin-top: auto;
  flex-direction: column;
  padding: 0 16px 16px;
}

.assistant-suggestions {
  padding: 0 0 15px;
}

.assistant-suggestions p {
  margin: 0 0 9px;
  color: #858580;
  font-size: 15px;
}

.assistant-suggestions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-suggestions button {
  height: 45px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: #deded9;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
}

.assistant-suggestions button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.assistant-sources {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 3px 0 15px;
  color: #858580;
  font-size: 15px;
}

.assistant-composer {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 18px;
  background: #2a2a2a;
}

.assistant-composer textarea {
  display: block;
  width: 100%;
  height: 124px;
  padding: 16px 16px 0;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eee;
  font-size: 16px;
  line-height: 1.55;
}

.assistant-composer textarea::placeholder {
  color: #8a8a85;
}

.assistant-composer-actions {
  display: flex;
  height: 54px;
  align-items: center;
  gap: 18px;
  padding: 0 12px 12px 16px;
}

.assistant-add,
.assistant-ask {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d2d2cc;
  cursor: pointer;
  font-size: 16px;
}

.assistant-add svg,
.assistant-ask svg,
.assistant-send svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.assistant-ask span:last-child {
  color: #8d8d88;
  font-size: 14px;
}

.assistant-send {
  display: grid;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #f0f0ed;
  color: #1d1d1c;
  cursor: pointer;
}

.assistant-send svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.assistant-send:disabled {
  cursor: wait;
  opacity: 0.48;
}

.assistant-file-input {
  display: none;
}

.assistant-attachments {
  display: flex;
  max-height: 68px;
  gap: 6px;
  overflow: auto;
  padding: 0 12px 8px;
  scrollbar-width: thin;
}

.assistant-attachments[hidden] {
  display: none;
}

.assistant-attachments span {
  display: inline-flex;
  max-width: 160px;
  height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #d9d9d4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-attachments button {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #efefeb;
  cursor: pointer;
}

.assistant-command-menu {
  position: absolute;
  right: 12px;
  bottom: calc(100% + 8px);
  left: 12px;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(35, 35, 35, 0.98);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.assistant-command-menu[hidden] {
  display: none;
}

.assistant-command-menu > span {
  padding: 4px 8px 2px;
  color: #94948e;
  font-size: 12px;
}

.assistant-command-menu button {
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e7e7e1;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

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

.assistant-popover {
  position: absolute;
  top: 60px;
  right: 22px;
  z-index: 4;
  width: min(270px, calc(100% - 44px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(34, 34, 34, 0.98);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
}

.assistant-popover[hidden] {
  display: none;
}

.assistant-popover strong {
  display: block;
  color: #f1f1ec;
  font-size: 14px;
}

.assistant-popover p {
  margin: 8px 0 0;
  color: #989893;
  font-size: 13px;
  line-height: 1.55;
}

.assistant-popover > button {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 7px 8px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d7d7d1;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-popover > button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.assistant-mode-popover {
  display: grid;
  gap: 3px;
  width: 138px;
  padding: 6px;
}

.assistant-mode-popover button {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #e6e6e0;
  cursor: pointer;
  font-size: 13px;
}

.assistant-mode-popover button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.assistant-mode-popover svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.assistant-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.assistant-modal[hidden] {
  display: none;
}

.assistant-modal-card {
  width: min(420px, 100%);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: #252523;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.48);
}

.assistant-modal-card header,
.assistant-modal-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-modal-card header strong {
  font-size: 17px;
}

.assistant-modal-card header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #adada7;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.assistant-modal-card label {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  color: #c7c7c1;
  font-size: 13px;
}

.assistant-modal-card input,
.assistant-modal-card textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  outline: 0;
  background: #181817;
  color: #f1f1ed;
  resize: vertical;
}

.assistant-modal-card input:focus,
.assistant-modal-card textarea:focus {
  border-color: rgba(255, 255, 255, 0.5);
}

.assistant-modal-card footer {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.assistant-modal-card footer button {
  height: 34px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: #e8e8e2;
  cursor: pointer;
}

.assistant-modal-card footer button[type="submit"] {
  border-color: #efefea;
  background: #efefea;
  color: #1d1d1b;
  font-weight: 700;
}

.node-output.is-complete {
  border-color: rgba(72, 213, 196, 0.66);
}

.video-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.video-preview[hidden] {
  display: none;
}

.video-preview video {
  display: block;
  width: 100%;
  height: 168px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #060606;
  object-fit: cover;
}

.video-preview a {
  width: fit-content;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.minimap {
  position: absolute;
  left: 20px;
  bottom: 22px;
  z-index: 12;
  width: 202px;
  height: 150px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(25, 25, 23, 0.92);
}

.minimap.is-hidden,
.minimap-toggle.is-hidden {
  display: none;
}

.minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 12px;
  color: #92928b;
  font-size: 13px;
  font-weight: 900;
}

.minimap-head button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #92928b;
  cursor: pointer;
}

.minimap-head button:hover {
  color: #f1f1eb;
}

.minimap-head button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.minimap-toggle {
  position: absolute;
  left: 20px;
  bottom: 22px;
  z-index: 12;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(24, 24, 22, 0.9);
  color: #bdbdb5;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.minimap-toggle:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #f2f2ec;
}

.minimap-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.minimap-body {
  display: block;
  width: 200px;
  height: 120px;
  border-top: 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),
    #30302d;
  background-size: 18px 18px;
}

.mini-node {
  fill: rgba(243, 209, 31, 0.54);
}

.mini-node-1,
.mini-node-2,
.mini-node-3,
.mini-node-4 {
  fill: rgba(72, 213, 196, 0.38);
}

.minimap-body [data-minimap-viewport] {
  fill: rgba(255, 255, 255, 0.11);
  stroke: #fff7cc;
  stroke-width: 1.5;
  cursor: grab;
}

@media (max-height: 820px) {
  .assistant-panel {
    top: 18px;
    bottom: 14px;
  }

  .node-composer-panel {
    top: 18px;
    bottom: 14px;
  }

  .assistant-header {
    min-height: 56px;
  }

  .assistant-welcome {
    padding-top: 34px;
  }

  .assistant-welcome h2 {
    margin: 16px 0 8px;
    font-size: 18px;
  }

  .assistant-welcome p {
    font-size: 14px;
    line-height: 1.55;
  }

  .assistant-persona-button {
    height: 40px;
    margin-top: 26px;
    padding: 0 18px;
    font-size: 15px;
  }

  .assistant-suggestions {
    padding-bottom: 9px;
  }

  .assistant-suggestions p,
  .assistant-sources {
    font-size: 13px;
  }

  .assistant-suggestions button {
    height: 37px;
    padding: 0 13px;
    font-size: 13px;
  }

  .assistant-sources {
    padding-bottom: 9px;
  }

  .assistant-composer {
    min-height: 128px;
  }

  .assistant-composer textarea {
    height: 82px;
    padding-top: 13px;
    font-size: 14px;
  }

  .assistant-composer-actions {
    height: 46px;
  }

  .assistant-send {
    width: 36px;
    height: 36px;
  }
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(20, 20, 18, 0.94);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 46vh;
    padding: 32px;
  }

  .login-card {
    padding: 32px;
  }

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

  .prompt-dock {
    width: calc(100vw - 40px);
  }
}

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

  .sidebar {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 14px;
  }

  .sidebar-logo {
    width: 132px;
    height: 44px;
  }

  .sidebar nav {
    grid-auto-flow: column;
    margin-left: auto;
  }

  .sidebar-footer {
    display: none;
  }

  .main-view {
    padding: 22px 16px 32px;
  }

  .section-head,
  .toolbar-row {
    align-items: stretch;
    flex-direction: column;
  }

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

  .workbench-topbar {
    gap: 10px;
    padding: 10px;
  }

  .workbench-title span {
    display: none;
  }

  .workbench-nav {
    display: none;
  }

  .left-toolbar {
    left: 12px;
  }

  .bottom-toolbar {
    max-width: calc(100vw - 24px);
    overflow-x: auto;
  }

  .prompt-dock {
    bottom: 92px;
    grid-template-columns: 1fr;
    min-height: 140px;
  }

  .send-btn {
    justify-self: end;
  }

  .minimap {
    display: none;
  }

  .node-composer-panel {
    top: 10px;
    right: 10px !important;
    bottom: 10px;
    width: calc(100vw - 20px);
    border-radius: 16px;
  }

  .node-composer-header,
  .node-composer-form {
    padding-right: 16px;
    padding-left: 16px;
  }
}
