:root {
  color-scheme: dark;
  --bg: #0c0d0f;
  --panel: #15171a;
  --panel-2: #1c1f23;
  --line: #2b2e33;
  --text: #f3f1eb;
  --muted: #989b9f;
  --accent: #ff5c35;
  --accent-2: #ffb347;
  font-family: Inter, "Microsoft YaHei", sans-serif;
}

.password-field {
  position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  bottom: 9px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  aspect-ratio: 1 / 1;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: rgba(243, 241, 235, .66);
  background: transparent;
  cursor: pointer;
  line-height: 1;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.password-toggle:hover,
.password-toggle.visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.password-toggle:active {
  transform: scale(.94);
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 14%, rgba(102, 126, 234, .20), transparent 28vw),
    radial-gradient(circle at 86% 8%, rgba(255, 179, 71, .13), transparent 24vw),
    radial-gradient(circle at 72% 78%, rgba(255, 92, 53, .12), transparent 30vw),
    linear-gradient(145deg, #090a12 0%, #12111f 48%, #08080d 100%);
  color: var(--text);
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body::before {
  opacity: .42;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.66) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255,179,71,.38) 0 1px, transparent 1.6px);
  background-size: 86px 86px, 132px 132px;
  background-position: 12px 18px, 46px 54px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.78), rgba(0,0,0,.24) 72%, transparent);
}
body::after {
  opacity: .72;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255,255,255,.045) 18.2% 18.7%, transparent 19% 100%),
    linear-gradient(115deg, transparent 0 62%, rgba(255,179,71,.05) 62.2% 62.8%, transparent 63% 100%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.08), transparent 46%);
}
button, input, textarea, select { font: inherit; }
.shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 54px; transition: opacity .45s ease, transform .45s ease; }
.shell::before,
.shell::after {
  display: none;
}
.topbar, .tasks-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 9px; color: var(--accent-2); font-size: 12px; letter-spacing: .2em; font-weight: 700; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 66px); letter-spacing: -.055em; line-height: .98; text-shadow: 0 0 24px rgba(255,92,53,.16); animation: title-glow 4.8s ease-in-out infinite alternate; }
h2 { margin: 0; font-size: 25px; }
.subtitle, .form-head p { color: var(--muted); margin: 12px 0 0; }
.phoenix-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  min-height: 0;
  margin: 28px 0 22px;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.012)),
    radial-gradient(circle at 22% 32%, rgba(255, 179, 71, .14), transparent 30%),
    radial-gradient(circle at 86% 58%, rgba(102, 126, 234, .12), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 24px 80px rgba(0,0,0,.20);
  backdrop-filter: blur(2px);
}
.phoenix-hero::before,
.phoenix-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.phoenix-hero::before {
  display: block;
  right: clamp(18px, 6vw, 74px);
  top: 14%;
  width: clamp(130px, 18vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.22), transparent 12%),
    radial-gradient(circle at 50% 50%, rgba(255,179,71,.16), rgba(255,92,53,.08) 42%, transparent 70%);
  box-shadow: inset -26px -32px 70px rgba(0,0,0,.34), 0 0 90px rgba(255,179,71,.10);
}
.phoenix-hero::after {
  display: block;
  right: 7%;
  bottom: 16%;
  width: clamp(180px, 28vw, 380px);
  height: clamp(58px, 8vw, 110px);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  transform: rotate(-18deg);
  filter: blur(1px);
}
.phoenix-hero-copy { position: relative; z-index: 2; max-width: 680px; }
.phoenix-hero-copy h2 {
  max-width: 720px;
  font-size: clamp(34px, 5.4vw, 68px);
  line-height: .98;
  letter-spacing: -.075em;
  color: #fff;
  text-shadow: 0 0 34px rgba(0,0,0,.32), 0 0 70px rgba(255,255,255,.14);
}
.phoenix-hero-copy > p:not(.eyebrow) {
  max-width: 560px;
  margin: 16px 0 0;
  color: #d8d3df;
  font-size: 16px;
  line-height: 1.85;
}
.phoenix-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-jump { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.status { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; white-space: nowrap; line-height: 1; }
.status.connected { color: #89e6ad; border-color: #326948; }
.status.error { color: #ff9a85; border-color: #773d33; }
.status.ok { color: #89e6ad; border-color: #326948; background: rgba(51, 122, 79, .14); }
.status.bad { color: #ff9a85; border-color: #773d33; background: rgba(119, 61, 51, .16); }
.credit-badge { color: var(--accent-2); background: #111316; border-color: #4a3822; font-weight: 700; }
.session-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.small { padding: 9px 12px; font-size: 12px; }
.tabs { display: flex; gap: 8px; margin: 24px 0 14px; }
.tab, .secondary { border: 1px solid var(--line); color: var(--muted); background: #111316; border-radius: 10px; padding: 11px 16px; cursor: pointer; }
a.secondary { text-decoration: none; display: inline-flex; align-items: center; }
.tab.active { color: var(--text); background: var(--panel-2); border-color: rgba(255,179,71,.45); box-shadow: 0 0 22px rgba(255,179,71,.10); }
.workspace { border: 1px solid rgba(255, 179, 71, .14); background: rgba(16, 18, 23, .94); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.04); }
.generator { display: none; padding: clamp(24px, 5vw, 52px); }
.generator.active { display: block; }
.form-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 34px; }
.number { color: var(--accent); font: 700 13px monospace; padding-top: 6px; }
label { display: flex; flex-direction: column; gap: 9px; color: #c8c8c5; font-size: 13px; }
textarea, input, select { width: 100%; color: var(--text); background: #0f1113; border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px; outline: none; }
textarea { resize: vertical; min-height: 130px; line-height: 1.65; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 92, 53, .1); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 22px 0 28px; }
.model-field { display: flex; align-items: center; gap: 8px; }
.model-field input { flex: 1; min-width: 0; }
.model-field span { flex: 0 0 auto; color: var(--accent-2); background: #111316; border: 1px solid #4a3822; border-radius: 9px; padding: 13px 14px; font-weight: 700; white-space: nowrap; }
.model-field span:first-child { flex: 1; min-width: 0; color: var(--text); border-color: var(--line); overflow: hidden; text-overflow: ellipsis; }
.check { flex-direction: row; align-items: center; align-self: end; min-height: 44px; }
.check input { width: auto; }
.drop { border: 1px dashed #4b4f56; border-radius: 10px; padding: 22px; margin-bottom: 20px; background: #101214; cursor: pointer; }
.drop.drag-over, .generator.drag-over .drop { border-color: var(--accent-2); background: rgba(255, 179, 71, .08); box-shadow: 0 0 0 3px rgba(255, 179, 71, .10), 0 18px 46px rgba(255, 179, 71, .08); }
.drop input { border: 0; padding: 0; background: none; }
.drop span { color: var(--muted); display: grid; gap: 6px; text-align: center; }
.drop strong { color: var(--text); font-size: 13px; }
.drop small { color: #b7aecb; font-size: 13px; line-height: 1.45; }
.primary { border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #e8352e); color: white; padding: 14px 22px; font-weight: 700; cursor: pointer; box-shadow: 0 12px 32px rgba(255, 92, 53, .22); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 42px rgba(255, 92, 53, .32); filter: saturate(1.08); }
.primary:disabled { opacity: .5; cursor: wait; }
.submit-with-cost { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.submit-with-cost .primary { flex: 0 0 auto; }
.generation-credit-cost {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 176, 74, .34);
  border-radius: 999px;
  background: rgba(255, 176, 74, .08);
  color: rgba(255, 245, 226, .82);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.generation-credit-cost b {
  margin: 0 4px;
  color: var(--accent-2);
  font-size: 15px;
}
.tasks { margin-top: 34px; }
.task-load-more {
  display: flex;
  width: fit-content;
  margin: 18px auto 0;
  padding-inline: 22px;
}
.task-load-more.hidden { display: none; }
.site-footer {
  margin: 44px 0 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(24px, 4vw, 42px);
  border-top: 1px solid rgba(255,255,255,.14);
  background:
    linear-gradient(180deg, rgba(10, 11, 16, .20), rgba(10, 11, 16, .76)),
    radial-gradient(ellipse at 18% 18%, rgba(255, 179, 71, .12), transparent 38%);
}
.site-footer h2 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: .98;
  letter-spacing: -.07em;
}
.site-footer p:not(.eyebrow) {
  max-width: 620px;
  margin: 14px 0 0;
  color: #d9d3e4;
  line-height: 1.7;
}
.footer-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.footer-notes span {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,179,71,.20);
  border-radius: 18px;
  color: #fff;
  background: rgba(17, 19, 24, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.tasks-head { margin-bottom: 14px; }
.task-bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.task-bulk-toolbar b { color: var(--accent-2); }
.task-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.task { position: relative; height: 430px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(21, 23, 26, .92); overflow: hidden; display: flex; flex-direction: column; contain: layout paint style; content-visibility: auto; contain-intrinsic-size: 360px 430px; box-shadow: 0 18px 48px rgba(0,0,0,.18); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.task:hover { border-color: rgba(255, 179, 71, .32); transform: translateY(-2px); box-shadow: 0 22px 58px rgba(0,0,0,.28), 0 0 0 1px rgba(255, 179, 71, .06); }
.task-card-tools {
  position: absolute;
  z-index: 6;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-check {
  width: auto;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(8, 9, 12, .72);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.task-check input {
  width: auto;
  accent-color: var(--accent-2);
}
.task-delete {
  border: 1px solid rgba(255, 117, 92, .45);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(28, 13, 10, .76);
  color: #ffb09d;
  cursor: pointer;
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.task-delete:hover { border-color: rgba(255, 117, 92, .82); color: #fff; }
.preview { position: relative; height: 190px; flex: 0 0 190px; background: #08090a; display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(92,140,255,.12), transparent 38%);
  opacity: .78;
  pointer-events: none;
}
.preview span { position: relative; z-index: 1; color: #dbe7ff; text-shadow: 0 0 18px rgba(92,140,255,.42); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-preview { position: relative; width: 100%; height: 100%; }
.video-preview video { display: block; }
.task.ratio-16x9 .preview {
  aspect-ratio: 16 / 9;
  height: auto;
  flex-basis: auto;
}
.task.ratio-1x1 .preview,
.task.ratio-4x3 .preview,
.task.ratio-21x9 .preview {
  height: auto;
  flex-basis: auto;
}
.task.ratio-1x1 .preview { aspect-ratio: 1 / 1; }
.task.ratio-4x3 .preview { aspect-ratio: 4 / 3; }
.task.ratio-21x9 .preview { aspect-ratio: 21 / 9; }
.task.ratio-16x9 .preview img,
.task.ratio-16x9 .preview video,
.task.ratio-1x1 .preview img,
.task.ratio-1x1 .preview video,
.task.ratio-4x3 .preview img,
.task.ratio-4x3 .preview video,
.task.ratio-21x9 .preview img,
.task.ratio-21x9 .preview video {
  object-fit: contain;
}
.task.ratio-9x16 .preview,
.task.ratio-3x4 .preview {
  height: 260px;
  flex-basis: 260px;
}
.task.ratio-9x16 .video-preview,
.task.ratio-9x16 .preview-play,
.task.ratio-9x16 .preview-placeholder,
.task.ratio-3x4 .video-preview,
.task.ratio-3x4 .preview-play,
.task.ratio-3x4 .preview-placeholder {
  width: auto;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
}
.task.ratio-9x16 .video-preview,
.task.ratio-9x16 .preview-play,
.task.ratio-9x16 .preview-placeholder { aspect-ratio: 9 / 16; }
.task.ratio-3x4 .video-preview,
.task.ratio-3x4 .preview-play,
.task.ratio-3x4 .preview-placeholder { aspect-ratio: 3 / 4; }
.task.ratio-9x16 .preview img,
.task.ratio-9x16 .preview video,
.task.ratio-3x4 .preview img,
.task.ratio-3x4 .preview video {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}
.preview-placeholder { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 10px; color: #dbe7ff; text-decoration: none; background: radial-gradient(circle at 50% 42%, rgba(92,140,255,.16), transparent 34%), #08090a; }
.preview-placeholder strong { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; color: white; background: rgba(255, 92, 53, .72); box-shadow: 0 0 32px rgba(255, 92, 53, .32); }
.preview-placeholder span { animation: none; }
.preview-play { position: relative; width: 100%; height: 100%; display: grid; place-items: center; border: 0; padding: 0; background: #08090a; color: #fff; cursor: pointer; overflow: hidden; }
.preview-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-play strong { position: relative; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 999px; color: white; background: rgba(255, 92, 53, .78); box-shadow: 0 0 36px rgba(255, 92, 53, .36); transition: transform .18s ease, background .18s ease; }
.preview-play span { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 13px; }
.preview-play:hover strong { transform: scale(1.08); background: rgba(255, 92, 53, .92); }
.task-body { min-height: 0; padding: 16px; display: flex; flex: 1; flex-direction: column; }
.task-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.task-prompt { min-height: 4.5em; max-height: 4.5em; margin: 12px 0 0; line-height: 1.5; overflow: hidden; overflow-wrap: anywhere; }
.task.prompt-expanded .task-prompt { max-height: 8.9em; overflow: auto; scrollbar-width: thin; }
.task-error {
  margin: 8px 0 0;
  color: #ff9a85;
  font-size: 12px;
  line-height: 1.5;
  max-height: 7.5em;
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  scrollbar-width: thin;
}
.prompt-toggle { align-self: flex-start; margin-top: 8px; border: 0; background: transparent; color: var(--accent-2); padding: 0; cursor: pointer; font-size: 12px; }
.pill { color: var(--accent-2); }
.task-actions { margin-top: auto; padding-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.download { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 9px 13px; color: #fff; background: #272b31; border: 1px solid #3a3f47; text-decoration: none; font-size: 13px; cursor: pointer; }
.download:disabled { opacity: .62; cursor: wait; }
.download:hover { border-color: var(--accent); color: #fff; }
.message { margin-bottom: 16px; padding: 13px 15px; border-radius: 9px; background: #241713; color: #ffb09d; border: 1px solid #59352d; }
.message.ok { background: #132219; color: #91e5af; border-color: #2f5a3e; }
.hidden { display: none; }
.empty { color: var(--muted); }
.auth-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(520px, 100%); border: 1px solid rgba(255, 179, 71, .16); background: rgba(21, 23, 26, .94); border-radius: 18px; padding: clamp(28px, 6vw, 48px); box-shadow: 0 24px 80px rgba(0,0,0,.3); }
.auth-card h1 { margin-bottom: 8px; }
.auth-tabs { display: flex; gap: 8px; margin: 30px 0 20px; }
.auth-form { display: none; gap: 18px; flex-direction: column; }
.auth-form.active { display: flex; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 42px 0 22px; }
.admin-shell { width: min(1560px, calc(100% - 32px)); }
.metric, .panel { border: 1px solid rgba(255, 179, 71, .12); background: rgba(21, 23, 26, .94); border-radius: 16px; padding: 22px; box-shadow: 0 18px 52px rgba(0,0,0,.22); }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin-top: 10px; font-size: 38px; letter-spacing: -.04em; }
.panel { margin-top: 18px; }
.runtime-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.runtime-grid > div { padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: rgba(0,0,0,.18); }
.runtime-grid span { display: block; color: var(--muted); font-size: 12px; }
.runtime-grid strong { display: block; margin-top: 8px; color: var(--accent-2); font-size: 18px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }
.reference-list { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.reference-chip { display: inline-flex; align-items: center; gap: 6px; width: 292px; max-width: 100%; border: 1px solid #3a3f47; background: #111316; color: var(--accent-2); border-radius: 999px; padding: 6px; font-size: 13px; overflow: hidden; }
.reference-chip-main { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex: 1; border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; text-align: left; overflow: hidden; }
.reference-remove { width: 24px; height: 24px; flex: 0 0 24px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.10); border-radius: 999px; background: rgba(255,255,255,.06); color: #d7d7d4; cursor: pointer; font-size: 17px; line-height: 1; padding: 0 0 2px; }
.reference-remove:hover { color: #fff; background: rgba(255, 92, 53, .28); border-color: rgba(255, 92, 53, .52); }
.reference-thumb { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 999px; object-fit: cover; border: 1px solid rgba(255,255,255,.12); background: #08090a; color: var(--accent-2); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.reference-chip-text { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; overflow: hidden; }
.reference-chip-text strong, .reference-chip-text small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-chip-text strong { flex: 0 1 auto; max-width: 58%; color: var(--accent-2); }
.reference-chip-text small { flex: 1 1 auto; color: var(--muted); font-size: 13px; }
.prompt-wrap { position: relative; }
.prompt-editor { position: relative; }
.prompt-restore {
  position: absolute;
  z-index: 5;
  top: 4px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 179, 71, .38);
  background: rgba(255, 179, 71, .08);
  color: var(--accent-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.prompt-restore:hover { background: rgba(255, 179, 71, .2); border-color: rgba(255, 179, 71, .72); transform: rotate(-18deg); }
.prompt-restore:disabled { opacity: .55; cursor: wait; transform: none; }
.prompt-editor textarea { position: relative; z-index: 2; background: #0f1113; color: var(--text); caret-color: var(--text); }
.prompt-editor textarea::placeholder { color: #858178; }
.prompt-highlight-layer { position: absolute; z-index: 3; inset: 0; overflow: auto; pointer-events: none; color: transparent; background: transparent; border: 1px solid transparent; border-radius: 9px; padding: 13px 14px; min-height: 130px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: break-word; scrollbar-width: none; }
.prompt-highlight-layer::-webkit-scrollbar { display: none; }
.prompt-mention { color: var(--accent-2); background: rgba(255, 179, 71, .18); border-radius: 4px; box-shadow: 0 0 18px rgba(255, 179, 71, .08); }
.mention-menu { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% - 2px); display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #101214; box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.mention-menu.hidden { display: none; }
.mention-menu button { display: flex; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); padding: 8px 10px; cursor: pointer; text-align: left; }
.mention-menu button:hover { background: var(--panel-2); border-color: #3a3f47; }
.mention-menu button.active, .mention-menu button[aria-selected="true"] { background: rgba(255, 179, 71, .13); border-color: rgba(255, 179, 71, .48); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 0 24px rgba(255, 179, 71, .08); }
.mention-thumb { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 8px; }
.mention-text { display: grid; gap: 4px; min-width: 0; }
.mention-text strong { color: var(--accent-2); }
.mention-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; margin: 18px 0 8px; align-items: end; }
.password-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; margin: 18px 0 8px; align-items: end; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.disabled-user { opacity: .72; }
.danger { border-color: #65372f; color: #ff9a85; }
.table-wrap { overflow-x: auto; margin-top: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px 10px; vertical-align: top; }
th { color: var(--accent-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
td { color: #d8d8d5; font-size: 13px; }
td a { color: #fff; }
.members-table { min-width: 0; table-layout: fixed; }
.members-table th, .members-table td { padding: 12px 8px; vertical-align: middle; }
.members-table th:nth-child(1), .members-table td:nth-child(1) { width: 15%; overflow-wrap: anywhere; }
.members-table th:nth-child(2), .members-table td:nth-child(2) { width: 7%; white-space: nowrap; }
.members-table th:nth-child(3), .members-table td:nth-child(3) { width: 8%; white-space: nowrap; }
.members-table th:nth-child(4), .members-table td:nth-child(4) { width: 7%; white-space: nowrap; }
.members-table th:nth-child(5), .members-table td:nth-child(5) { width: 22%; }
.members-table th:nth-child(6), .members-table td:nth-child(6) { width: 24%; }
.members-table th:nth-child(7), .members-table td:nth-child(7) { width: 10%; }
.members-table th:nth-child(8), .members-table td:nth-child(8) { width: 7%; }
.members-table .status { min-width: 62px; padding: 8px 10px; }
.members-table .row-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.members-table .row-actions .secondary { width: 100%; padding-inline: 8px; }
.credit-form { display: grid; grid-template-columns: minmax(56px, 1fr) 64px 72px; gap: 8px; align-items: center; min-width: 0; }
.credit-form input { padding: 9px 10px; }
.credit-form .secondary, .user-note-form .secondary { padding: 9px 8px; white-space: nowrap; }
.user-note-form { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 8px; align-items: center; min-width: 0; }
.user-note-form input { padding: 9px 10px; }
.canvas-shell { width: min(1480px, calc(100% - 32px)); }
.canvas-page { margin-top: 42px; }
.canvas-toolbar { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(260px, .55fr); gap: 14px; align-items: stretch; margin-bottom: 16px; }
.canvas-upload { min-height: 118px; justify-content: center; border: 1px dashed rgba(255,179,71,.32); border-radius: 18px; padding: 22px; background: rgba(16,18,23,.86); cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.canvas-upload.drag-over { border-color: var(--accent-2); background: rgba(255,179,71,.11); box-shadow: 0 0 0 3px rgba(255,179,71,.11), 0 20px 54px rgba(255,179,71,.10); }
.canvas-upload input { border: 0; padding: 0; background: transparent; }
.canvas-upload span { color: #fff; font-size: 16px; font-weight: 700; }
.canvas-upload small { color: #c7bed8; line-height: 1.6; }
.canvas-tips { display: grid; align-content: center; gap: 9px; border: 1px solid rgba(255,255,255,.10); border-radius: 18px; padding: 22px; background: rgba(21,23,26,.82); color: var(--muted); line-height: 1.65; }
.canvas-tips strong { color: var(--accent-2); }
.canvas-tips b { color: var(--accent-2); }
.canvas-tips .secondary { justify-self: start; }
.canvas-layout { display: grid; grid-template-columns: minmax(560px, 1fr) minmax(360px, 430px); gap: 16px; align-items: stretch; }
.canvas-board { position: relative; min-height: 660px; overflow: hidden; border: 1px solid rgba(255,179,71,.18); border-radius: 22px; background:
  radial-gradient(circle at 20% 18%, rgba(255,179,71,.13), transparent 26%),
  radial-gradient(circle at 78% 70%, rgba(255,92,53,.10), transparent 30%),
  linear-gradient(135deg, rgba(15,17,22,.95), rgba(8,9,13,.90)); box-shadow: 0 26px 80px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05); }
.canvas-board-wide { min-height: 980px; }
.canvas-board-form { position: absolute; inset: 0; z-index: 4; pointer-events: none; transform-origin: 0 0; will-change: transform; }
.canvas-board::before { content: ""; position: absolute; inset: 0; background-image:
  linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000 0 62%, transparent 88%); pointer-events: none; }
.canvas-board.drag-over { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(255,179,71,.10), 0 26px 80px rgba(0,0,0,.28); }
.canvas-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; overflow: visible; }
.canvas-line { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 1.5; stroke-dasharray: 7 9; transition: stroke .18s ease, stroke-width .18s ease, opacity .18s ease; }
.canvas-line.active { stroke: rgba(255,179,71,.96); stroke-width: 3.2; stroke-dasharray: none; filter: drop-shadow(0 0 13px rgba(255,179,71,.58)); }
.canvas-line.preview { stroke-dasharray: 10 8; opacity: .88; animation: connection-flow 1s linear infinite; }
.canvas-line.line-tone-1 { stroke: rgba(125, 185, 255, .96); filter: drop-shadow(0 0 13px rgba(125,185,255,.48)); }
.canvas-line.line-tone-2 { stroke: rgba(150, 235, 176, .96); filter: drop-shadow(0 0 13px rgba(150,235,176,.42)); }
.canvas-line.line-tone-3 { stroke: rgba(255, 132, 210, .94); filter: drop-shadow(0 0 13px rgba(255,132,210,.42)); }
.canvas-line-dot { fill: var(--accent-2); stroke: rgba(8,9,13,.92); stroke-width: 2; filter: drop-shadow(0 0 9px rgba(255,179,71,.72)); }
.canvas-line-dot.line-tone-1 { fill: #7db9ff; filter: drop-shadow(0 0 9px rgba(125,185,255,.65)); }
.canvas-line-dot.line-tone-2 { fill: #96ebb0; filter: drop-shadow(0 0 9px rgba(150,235,176,.58)); }
.canvas-line-dot.line-tone-3 { fill: #ff84d2; filter: drop-shadow(0 0 9px rgba(255,132,210,.58)); }
.canvas-line-label { dominant-baseline: middle; text-anchor: middle; paint-order: stroke; stroke: rgba(8,9,13,.92); stroke-width: 5px; fill: #ffdca0; font-size: 12px; font-weight: 800; letter-spacing: .02em; pointer-events: none; }
.canvas-line-label.line-tone-1 { fill: #b8d9ff; }
.canvas-line-label.line-tone-2 { fill: #c7ffd7; }
.canvas-line-label.line-tone-3 { fill: #ffc4eb; }
.prompt-hub { position: absolute; right: 36px; top: 36px; z-index: 2; width: 112px; height: 112px; display: grid; place-items: center; border: 1px solid rgba(255,179,71,.34); border-radius: 999px; color: var(--accent-2); background: radial-gradient(circle at 50% 35%, rgba(255,179,71,.16), rgba(17,19,24,.82)); box-shadow: 0 0 40px rgba(255,179,71,.10), inset 0 1px 0 rgba(255,255,255,.08); font-weight: 800; letter-spacing: .08em; }
.canvas-empty { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; pointer-events: none; }
.canvas-empty strong { color: #fff; font-size: 24px; }
.canvas-create-hint { position: absolute; left: 50%; top: 42px; z-index: 4; transform: translateX(-50%); padding: 12px 16px; border: 1px solid rgba(245,248,255,.18); border-radius: 999px; color: #dce4f7; background: rgba(8,9,12,.82); box-shadow: 0 18px 46px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.06); pointer-events: none; }
.canvas-node { position: absolute; z-index: 3; width: 168px; min-height: 146px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; background: rgba(17,19,24,.92); box-shadow: 0 18px 46px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05); cursor: grab; user-select: none; touch-action: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.canvas-node:hover { border-color: rgba(255,179,71,.34); transform: translateY(-1px); }
.canvas-node.dragging { cursor: grabbing; transform: scale(1.02); border-color: rgba(255,179,71,.75); box-shadow: 0 24px 68px rgba(0,0,0,.42), 0 0 0 1px rgba(255,179,71,.20); }
.canvas-node.connection-source { border-color: rgba(255,179,71,.88); box-shadow: 0 24px 70px rgba(0,0,0,.40), 0 0 0 1px rgba(255,179,71,.32), 0 0 34px rgba(255,179,71,.18); }
.canvas-node.is-mentioned { border-color: rgba(255,179,71,.74); box-shadow: 0 20px 60px rgba(0,0,0,.34), 0 0 30px rgba(255,179,71,.12); }
.canvas-node-preview { height: 92px; background: #08090a; display: grid; place-items: center; overflow: hidden; }
.canvas-node-preview img, .canvas-node-preview video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.canvas-audio-thumb { color: var(--accent-2); font-weight: 800; letter-spacing: .08em; }
.canvas-node-body { display: grid; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.canvas-node-alias { justify-self: start; max-width: 100%; border: 0; padding: 0; background: transparent; color: var(--accent-2); font-weight: 800; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-node-body small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canvas-node-remove { position: absolute; right: 7px; top: 7px; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(8,9,10,.66); color: #fff; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 0 2px; }
.canvas-node-remove:hover { background: rgba(255,92,53,.70); border-color: rgba(255,92,53,.92); }
.canvas-connect-handle { position: absolute; right: -11px; top: 50%; z-index: 4; width: 24px; height: 24px; padding: 0; border: 2px solid rgba(8,9,13,.95); border-radius: 999px; background: radial-gradient(circle at 35% 35%, #fff6dc, var(--accent-2) 48%, #ff6b35 100%); box-shadow: 0 0 0 1px rgba(255,179,71,.52), 0 0 18px rgba(255,179,71,.42); cursor: crosshair; transform: translateY(-50%); touch-action: none; }
.canvas-connect-handle::after { content: ""; position: absolute; inset: 7px; border-radius: inherit; background: rgba(8,9,13,.78); box-shadow: inset 0 0 0 1px rgba(255,255,255,.20); }
.canvas-connect-handle:hover { box-shadow: 0 0 0 2px rgba(255,179,71,.46), 0 0 26px rgba(255,179,71,.62); transform: translateY(-50%) scale(1.08); }
.canvas-control-node { position: absolute; z-index: 5; width: min(430px, calc(100% - 24px)); border: 1px solid rgba(255,179,71,.18); border-radius: 18px; padding: 16px; background: rgba(16,18,23,.94); box-shadow: 0 26px 80px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.05); pointer-events: auto; }
.canvas-control-node.active { border-color: rgba(255,179,71,.58); box-shadow: 0 26px 80px rgba(0,0,0,.30), 0 0 0 1px rgba(255,179,71,.16), inset 0 1px 0 rgba(255,255,255,.05); }
.canvas-control-node.connection-target { border-color: rgba(255,179,71,.88); box-shadow: 0 30px 88px rgba(0,0,0,.40), 0 0 0 2px rgba(255,179,71,.24), 0 0 44px rgba(255,179,71,.18); }
.canvas-control-node.dragging { border-color: rgba(255,179,71,.70); box-shadow: 0 30px 88px rgba(0,0,0,.42), 0 0 0 1px rgba(255,179,71,.18); }
.canvas-node-handle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px -4px 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: linear-gradient(135deg, rgba(255,179,71,.12), rgba(255,92,53,.05)); color: #fff; cursor: grab; user-select: none; touch-action: none; }
.canvas-node-handle:active { cursor: grabbing; }
.canvas-node-handle span { color: var(--accent-2); font-weight: 800; letter-spacing: .04em; }
.canvas-node-handle small { color: var(--muted); }
.canvas-node-tools { display: flex; align-items: center; gap: 8px; }
.canvas-node-tools button { border: 1px solid rgba(255,179,71,.24); border-radius: 999px; background: rgba(255,179,71,.08); color: var(--accent-2); padding: 6px 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.canvas-node-tools button:hover, .canvas-node-tools button.active { background: rgba(255,179,71,.18); border-color: rgba(255,179,71,.60); color: #fff; box-shadow: 0 0 22px rgba(255,179,71,.12); }
.canvas-node-tools [data-remove-prompt-node] { color: #ff9a85; border-color: rgba(255,92,53,.28); background: rgba(255,92,53,.08); }
.canvas-node-tools [data-remove-prompt-node]:hover { border-color: rgba(255,92,53,.72); background: rgba(255,92,53,.20); }
.canvas-inline-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 14px; padding: 12px; border: 1px solid rgba(255,179,71,.14); border-radius: 14px; background: rgba(8,9,13,.42); }
.canvas-inline-panel.hidden { display: none; }
.canvas-inline-panel .check { margin: 0; align-self: end; }
.canvas-prompt-node textarea { min-height: 230px; }
.canvas-prompt-node .prompt-highlight-layer { min-height: 230px; }
.canvas-param-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.canvas-param-grid label { min-width: 0; }
.canvas-param-grid .model-field span:first-child { flex: 0 0 auto; }
.canvas-prompt-node .primary { width: 100%; margin-top: 16px; }
.canvas-prompt-node .message { margin: 14px 0 0; }
.canvas-panel { border: 1px solid rgba(255,179,71,.14); border-radius: 22px; padding: 24px; background: rgba(16,18,23,.94); box-shadow: 0 26px 80px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04); }
.canvas-form { display: grid; gap: 18px; }
.canvas-grid { grid-template-columns: 1fr; margin: 0; }
.canvas-panel .message { margin: 18px 0 0; }
.mention-thumb img, .mention-thumb video { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.mention-thumb .canvas-audio-thumb { width: 100%; height: 100%; display: grid; place-items: center; border-radius: inherit; background: #08090a; font-size: 12px; }

#add-prompt-node { display: none !important; }
.canvas-page { margin-top: 24px; }
.canvas-toolbar { grid-template-columns: minmax(320px, .72fr) minmax(260px, .45fr); gap: 12px; margin-bottom: 14px; opacity: .92; }
.canvas-upload { min-height: 82px; padding: 16px 20px; }
.canvas-upload small { line-height: 1.45; }
.canvas-tips { padding: 16px 20px; line-height: 1.45; }
.canvas-board {
  min-height: 900px;
  border-color: rgba(155,165,185,.32);
  border-radius: 18px;
  background: #030405;
  box-shadow: 0 28px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05);
}
.canvas-board-wide { min-height: 980px; }
.canvas-board::before {
  background-image: radial-gradient(circle, rgba(245,248,255,.45) 1px, transparent 1.5px);
  background-size: 24px 24px;
  mask-image: none;
  opacity: .34;
}
.canvas-lines { z-index: 6; }
.canvas-line.active {
  stroke: rgba(245,248,255,.96);
  stroke-width: 2.2;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.34));
}
.canvas-line.line-tone-1,
.canvas-line.line-tone-2,
.canvas-line.line-tone-3 { stroke: rgba(245,248,255,.96); filter: drop-shadow(0 0 10px rgba(255,255,255,.34)); }
.canvas-line-dot,
.canvas-line-dot.line-tone-1,
.canvas-line-dot.line-tone-2,
.canvas-line-dot.line-tone-3 {
  fill: #f7f8ff;
  stroke: #07080b;
  filter: drop-shadow(0 0 8px rgba(255,255,255,.48));
}
.canvas-line-label { display: none; }
.canvas-node {
  z-index: 5;
  width: 210px;
  min-height: 238px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.canvas-node:hover,
.canvas-node.dragging,
.canvas-node.connection-source,
.canvas-node.is-mentioned {
  border-color: transparent;
  box-shadow: none;
}
.canvas-node-preview {
  height: 190px;
  border: 1px solid rgba(190,200,220,.34);
  border-radius: 14px;
  background: #0c0d10;
  box-shadow: 0 18px 45px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.05);
}
.canvas-node-body { padding: 7px 2px 0; gap: 2px; }
.canvas-node-alias { color: #f5f7ff; font-size: 13px; text-shadow: 0 0 12px rgba(255,255,255,.18); }
.canvas-node-body small { color: #8e96a8; font-size: 12px; }
.canvas-node-remove {
  right: -10px;
  top: -10px;
  width: 24px;
  height: 24px;
  border-color: rgba(255,255,255,.26);
  background: rgba(11,12,16,.82);
}
.canvas-connect-handle {
  right: -13px;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(226,232,245,.92);
  background: rgba(8,9,12,.86);
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 18px rgba(255,255,255,.28);
}
.canvas-connect-handle::before,
.canvas-output-port::before {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f5f7ff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.canvas-connect-handle::after { display: none; }
.canvas-control-node {
  z-index: 7;
  width: min(720px, calc(100% - 36px));
  border-color: rgba(165,175,195,.34);
  border-radius: 14px;
  padding: 14px;
  background: rgba(18,19,23,.98);
  box-shadow: 0 28px 80px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.05);
}
.canvas-control-node.active,
.canvas-control-node.connection-target,
.canvas-control-node.dragging {
  border-color: rgba(210,218,238,.72);
  box-shadow: 0 30px 86px rgba(0,0,0,.50), 0 0 0 1px rgba(255,255,255,.12);
}
.canvas-output-node {
  position: absolute;
  left: 206px;
  top: -158px;
  width: 300px;
  height: 152px;
  border: 1px solid rgba(185,196,218,.78);
  border-radius: 14px;
  background: rgba(20,21,25,.98);
  box-shadow: 0 22px 60px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: visible;
}
.canvas-output-title {
  position: absolute;
  left: 12px;
  top: 10px;
  z-index: 2;
  color: #dce4f7;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 1px 8px rgba(0,0,0,.72);
}
.canvas-output-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: inherit;
  color: #b9c3d7;
  background: #101115;
}
.canvas-output-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #0d1118;
  background: #9aa6bd;
  font-size: 22px;
}
.canvas-output-running { color: #dce4f7; font-weight: 800; }
.canvas-output-failed { color: #ff9a85; font-weight: 800; }
.canvas-output-player,
.canvas-output-image,
.canvas-output-image img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
.canvas-output-image,
.canvas-output-image img { object-fit: cover; }
.canvas-output-player { object-fit: contain; background: #000; }
.canvas-output-stage .video-preview { height: 100%; border-radius: inherit; overflow: hidden; }
.canvas-output-stage .preview-play { border-radius: inherit; }
.canvas-output-stage .preview-play span { bottom: 14px; }
.canvas-output-node.ratio-16x9 {
  width: 300px;
  height: 169px;
  top: -176px;
}
.canvas-output-node.ratio-21x9 {
  width: 320px;
  height: 137px;
  top: -144px;
}
.canvas-output-node.ratio-4x3 {
  width: 260px;
  height: 195px;
  top: -202px;
}
.canvas-output-node.ratio-1x1 {
  width: 220px;
  height: 220px;
  left: 242px;
  top: -228px;
}
.canvas-output-node.ratio-9x16 {
  width: 154px;
  height: 274px;
  left: 270px;
  top: -282px;
}
.canvas-output-node.ratio-3x4 {
  width: 194px;
  height: 259px;
  left: 252px;
  top: -267px;
}
.canvas-output-node.ratio-9x16 .video-preview,
.canvas-output-node.ratio-9x16 .preview-play,
.canvas-output-node.ratio-9x16 .preview-placeholder,
.canvas-output-node.ratio-3x4 .video-preview,
.canvas-output-node.ratio-3x4 .preview-play,
.canvas-output-node.ratio-3x4 .preview-placeholder {
  width: auto;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
}
.canvas-output-node.ratio-9x16 .video-preview,
.canvas-output-node.ratio-9x16 .preview-play,
.canvas-output-node.ratio-9x16 .preview-placeholder { aspect-ratio: 9 / 16; }
.canvas-output-node.ratio-3x4 .video-preview,
.canvas-output-node.ratio-3x4 .preview-play,
.canvas-output-node.ratio-3x4 .preview-placeholder { aspect-ratio: 3 / 4; }
.canvas-output-node.ratio-9x16 .canvas-output-player,
.canvas-output-node.ratio-9x16 .canvas-output-image img,
.canvas-output-node.ratio-3x4 .canvas-output-player,
.canvas-output-node.ratio-3x4 .canvas-output-image img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
}
.canvas-output-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 9px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #aeb7c9;
  font-size: 12px;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,.86);
}
.canvas-output-actions {
  position: absolute;
  right: 0;
  bottom: -82px;
  display: flex;
  gap: 8px;
}
.canvas-output-download { padding: 8px 12px; }
.canvas-node-handle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  min-width: 0;
}
.canvas-node-handle span {
  color: #aeb7c9;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.28;
}
.canvas-node-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 250px;
  flex-wrap: wrap;
}
.canvas-node-tools button {
  min-width: 48px;
  height: 30px;
  padding: 0 12px;
  border-color: rgba(155,165,185,.28);
  background: rgba(8,9,12,.72);
  color: #dce4f7;
  white-space: nowrap;
  line-height: 1;
}
.canvas-node-tools small { display: none; }
.canvas-mode-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}
.canvas-mode-tabs span,
.canvas-mode-tabs button {
  color: #81889a;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.canvas-mode-tabs .active,
.canvas-mode-tabs button:hover {
  color: #fff;
  background: #030405;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 18px rgba(255,255,255,.08);
}
.canvas-node-assets {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 50px;
  margin: 0 0 8px;
  padding: 0 0 4px;
  overflow-x: auto;
}
.canvas-node-assets > button {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: rgba(255,255,255,.72);
  background: rgba(0,0,0,.72);
  cursor: pointer;
  overflow: hidden;
}
.canvas-node-assets > button:first-child {
  color: rgba(255,255,255,.58);
  font-size: 24px;
}
.canvas-node-assets > button:first-child span {
  display: block;
  color: rgba(255,255,255,.50);
  font-size: 12px;
}
.canvas-node-assets p {
  margin: 0 0 8px;
  color: rgba(255,255,255,.42);
  font-size: 13px;
}
.canvas-asset-slot {
  box-shadow: 0 12px 34px rgba(0,0,0,.36), inset 0 0 0 1px rgba(255,179,71,.18);
}
.asset-slot-preview,
.asset-slot-preview img,
.asset-slot-preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.asset-slot-preview .canvas-audio-thumb {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  background: #090a0e;
}
.canvas-asset-slot strong {
  position: absolute;
  left: 6px;
  bottom: 5px;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,.80);
}
.canvas-asset-slot em {
  position: absolute;
  right: 5px;
  top: 4px;
  z-index: 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #050507;
  background: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.canvas-prompt-node textarea,
.canvas-prompt-node .prompt-highlight-layer {
  min-height: 86px;
  height: 92px;
  border-radius: 12px;
  background: #030405;
  font-size: 14px;
  line-height: 1.55;
}
.canvas-prompt-node .prompt-editor {
  min-height: 92px;
  pointer-events: auto;
  user-select: text;
  touch-action: auto;
}
.canvas-prompt-node .canvas-prompt-input {
  pointer-events: auto;
  user-select: text;
  touch-action: auto;
  cursor: text;
  resize: vertical;
}
.canvas-prompt-node .prompt-highlight-layer {
  pointer-events: none;
}
.canvas-prompt-node .primary {
  width: auto;
  min-width: 126px;
  justify-self: end;
  margin-top: 10px;
}
.canvas-prompt-node {
  cursor: grab;
}
.canvas-prompt-node.dragging {
  cursor: grabbing;
}
.canvas-prompt-node button,
.canvas-prompt-node input,
.canvas-prompt-node select,
.canvas-prompt-node textarea,
.canvas-prompt-node .prompt-editor,
.canvas-prompt-node .canvas-node-assets,
.canvas-prompt-node .canvas-output-stage {
  cursor: auto;
}
.canvas-submit {
  background: #f5f7ff;
  color: #08090d;
  border-color: rgba(255,255,255,.92);
}
.canvas-inline-panel {
  border-color: rgba(155,165,185,.18);
  background: rgba(4,5,7,.68);
}
.canvas-context-menu {
  position: absolute;
  z-index: 20;
  min-width: 156px;
  padding: 8px;
  border: 1px solid rgba(210,218,238,.42);
  border-radius: 14px;
  background: rgba(13,14,18,.96);
  box-shadow: 0 22px 56px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.06);
}
.canvas-context-menu button {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #f5f7ff;
  background: transparent;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.canvas-context-menu button:hover {
  background: rgba(255,179,71,.16);
  color: var(--accent-2);
}
.canvas-context-menu button:disabled {
  opacity: .38;
  cursor: not-allowed;
}
.canvas-context-menu button:disabled:hover {
  color: #f5f7ff;
  background: transparent;
}
.storyboard-shell { width: min(1680px, calc(100% - 28px)); }
.storyboard-topbar { margin-bottom: 18px; }
.storyboard-page {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.storyboard-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}
.storyboard-main { min-width: 0; display: grid; gap: 14px; }
.storyboard-card,
.storyboard-timeline {
  border: 1px solid rgba(210,218,238,.14);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(18,19,25,.94), rgba(11,12,17,.92));
  box-shadow: 0 24px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.05);
}
.storyboard-card { padding: 18px; }
.storyboard-project-card h2 { margin: 4px 0 8px; color: #fff; font-size: 22px; }
.storyboard-project-card p { color: #aeb7c9; line-height: 1.65; }
.storyboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.storyboard-stats span {
  display: grid;
  gap: 2px;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  color: #98a2b8;
  background: rgba(3,4,5,.42);
  text-align: center;
  font-size: 12px;
}
.storyboard-stats b { color: #fff; font-size: 22px; line-height: 1; }
.storyboard-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.storyboard-card-head span { color: #fff; font-weight: 900; letter-spacing: .02em; }
.storyboard-card-head small { color: #7f8798; }
.storyboard-script {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 14px;
  color: #eef2ff;
  background: rgba(3,4,5,.62);
  line-height: 1.65;
}
.storyboard-script:focus {
  outline: none;
  border-color: rgba(255,179,71,.46);
  box-shadow: 0 0 0 3px rgba(255,179,71,.10);
}
.storyboard-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.storyboard-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: #98a2b8;
  line-height: 1.45;
}
.storyboard-steps li::before {
  counter-increment: storyboard-step;
  content: counter(storyboard-step);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #08090d;
  background: #f5f7ff;
  font-weight: 900;
}
.storyboard-steps { counter-reset: storyboard-step; }
.storyboard-steps strong { color: #fff; }
.storyboard-steps span { display: block; margin-top: 2px; }
.storyboard-toolbar {
  grid-template-columns: minmax(320px, .68fr) minmax(300px, .42fr);
  margin: 0;
}
.storyboard-upload,
.storyboard-tips { min-height: 104px; }
.storyboard-tips #add-prompt-node {
  display: inline-flex !important;
  justify-self: start;
}
.storyboard-board {
  min-height: 780px;
  border-radius: 22px;
}
.storyboard-board::after {
  content: "ASSET BOARD  /  SHOT CANVAS";
  position: absolute;
  left: 22px;
  top: 18px;
  z-index: 3;
  color: rgba(245,248,255,.40);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  pointer-events: none;
}
.storyboard-timeline {
  padding: 16px;
  overflow: hidden;
}
.storyboard-timeline-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.storyboard-timeline-item {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  background: rgba(3,4,5,.54);
}
.storyboard-timeline-preview {
  height: 112px;
  display: grid;
  place-items: center;
  background: #06070a;
  color: #aeb7c9;
}
.storyboard-timeline-item.ratio-9x16 .storyboard-timeline-preview,
.storyboard-timeline-item.ratio-3x4 .storyboard-timeline-preview { height: 150px; }
.storyboard-timeline-preview img,
.storyboard-timeline-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.storyboard-timeline-item.ratio-9x16 .storyboard-timeline-preview img,
.storyboard-timeline-item.ratio-9x16 .storyboard-timeline-preview video,
.storyboard-timeline-item.ratio-3x4 .storyboard-timeline-preview img,
.storyboard-timeline-item.ratio-3x4 .storyboard-timeline-preview video,
.storyboard-timeline-item.ratio-1x1 .storyboard-timeline-preview img,
.storyboard-timeline-item.ratio-1x1 .storyboard-timeline-preview video,
.storyboard-timeline-item.ratio-4x3 .storyboard-timeline-preview img,
.storyboard-timeline-item.ratio-4x3 .storyboard-timeline-preview video,
.storyboard-timeline-item.ratio-21x9 .storyboard-timeline-preview img,
.storyboard-timeline-item.ratio-21x9 .storyboard-timeline-preview video {
  width: auto;
  max-width: 100%;
  object-fit: contain;
  background: #000;
}
.storyboard-timeline-empty { color: #dce4f7; font-weight: 800; }
.storyboard-timeline-body { padding: 12px; display: grid; gap: 5px; }
.storyboard-timeline-body strong { color: #fff; }
.storyboard-timeline-body span { color: var(--accent-2); font-size: 12px; font-weight: 800; }
.storyboard-timeline-body p {
  margin: 0;
  color: #b7c0d4;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@keyframes connection-flow {
  to { stroke-dashoffset: -36; }
}
@keyframes title-glow {
  0% { text-shadow: 0 0 18px rgba(255,92,53,.14), 0 0 0 rgba(255,179,71,0); }
  100% { text-shadow: 0 0 30px rgba(255,92,53,.22), 0 0 42px rgba(255,179,71,.14); }
}
@keyframes preview-sweep {
  0%, 38% { transform: translateX(-130%); opacity: 0; }
  50% { opacity: 1; }
  82%, 100% { transform: translateX(130%); opacity: 0; }
}
@keyframes processing-pulse {
  0% { opacity: .72; transform: scale(.99); }
  100% { opacity: 1; transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .phoenix-hero::before,
  .phoenix-hero::after,
  h1,
  .preview::before,
  .preview span,
  .primary,
  .task {
    animation: none;
    transition: none;
  }
}
@media (max-width: 1100px) {
  .storyboard-page { grid-template-columns: 1fr; }
  .storyboard-side { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .storyboard-project-card { grid-column: span 1; }
  .storyboard-script { min-height: 150px; }
  .canvas-prompt-node { left: 18px !important; top: 24px !important; }
  .canvas-board-wide { min-height: 820px; }
}
@media (max-width: 900px) {
  .members-table { min-width: 1120px; }
}
@media (max-width: 800px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .session-box { justify-content: flex-start; }
  .phoenix-hero { grid-template-columns: 1fr; min-height: auto; padding: 26px; }
  .phoenix-hero-copy h2 { font-size: clamp(38px, 13vw, 68px); }
  .grid, .task-list, .admin-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-notes { grid-template-columns: 1fr; }
  .account-form { grid-template-columns: 1fr; }
  .task { height: 460px; }
  .preview { height: 220px; flex-basis: 220px; }
  .task.ratio-16x9 .preview,
  .task.ratio-1x1 .preview,
  .task.ratio-4x3 .preview,
  .task.ratio-21x9 .preview { height: auto; flex-basis: auto; }
  .task.ratio-9x16 .preview,
  .task.ratio-3x4 .preview { height: 300px; flex-basis: 300px; }
  .credit-form { grid-template-columns: 1fr; min-width: 0; }
  .tabs { overflow-x: auto; }
  .storyboard-shell { width: min(100% - 18px, 1680px); }
  .storyboard-side { grid-template-columns: 1fr; }
  .storyboard-toolbar { grid-template-columns: 1fr; }
  .storyboard-stats { grid-template-columns: repeat(3, 1fr); }
  .storyboard-timeline-list { grid-auto-columns: minmax(210px, 76vw); }
  .canvas-toolbar, .canvas-layout { grid-template-columns: 1fr; }
  .canvas-board { min-height: 560px; }
  .canvas-board-wide { min-height: 900px; }
  .canvas-node { width: 148px; }
  .canvas-control-node { width: calc(100% - 24px); }
  .canvas-prompt-node { left: 12px !important; top: 18px !important; }
  .canvas-param-grid { grid-template-columns: 1fr; }
  .canvas-inline-panel { grid-template-columns: 1fr; }
  .canvas-node-handle { align-items: flex-start; flex-direction: column; }
  .prompt-hub { right: 20px; top: 20px; width: 92px; height: 92px; font-size: 12px; }
}

/* Titan canvas workspace, rebuilt as a compact flow-style editor. */
.titan-canvas-page {
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

.titan-canvas-page::before,
.titan-canvas-page::after {
  opacity: .18;
}

.pixflow-shell {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.pixflow-page {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
  margin: 0;
}

.pixflow-sidebar {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 24px 18px 22px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.10);
  border-radius: 0;
  background: rgba(10, 11, 14, .96);
  box-shadow: 22px 0 70px rgba(0,0,0,.35);
}

.pixflow-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pixflow-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,179,71,.35);
  border-radius: 12px;
  color: #111;
  background: linear-gradient(135deg, #fff0bc, #ffb347 48%, #ff5c35);
  box-shadow: 0 0 30px rgba(255,179,71,.20);
  text-decoration: none;
  font-weight: 900;
}

.pixflow-brand h1 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1;
}

.pixflow-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.42);
}

.pixflow-tabs button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: rgba(255,255,255,.64);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.pixflow-tabs button.active {
  color: #fff;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.pixflow-search {
  display: grid;
  gap: 8px;
  color: rgba(255,255,255,.52);
  font-size: 12px;
}

.pixflow-search input {
  height: 44px;
  border-radius: 14px;
  background: #050607;
}

.pixflow-sidebar .canvas-upload,
.pixflow-sidebar .canvas-tips {
  min-height: auto;
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  background: rgba(18,19,23,.86);
}

.pixflow-sidebar .canvas-upload {
  display: grid;
  gap: 8px;
}

.pixflow-sidebar .canvas-upload span {
  font-size: 15px;
}

.pixflow-sidebar .canvas-upload small,
.pixflow-sidebar .canvas-tips span {
  color: rgba(255,255,255,.56);
  font-size: 12px;
}

.pixflow-sidebar #add-prompt-node {
  display: inline-flex !important;
  justify-self: start;
}

.pixflow-folder {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.pixflow-folder button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.06);
  text-align: left;
}

.pixflow-folder small {
  color: rgba(255,255,255,.46);
}

.pixflow-board {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.pixflow-board::before {
  background-image: radial-gradient(circle, rgba(255,255,255,.34) 1px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: .42;
}

.pixflow-board::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 74% 18%, rgba(255,179,71,.09), transparent 24vw),
    radial-gradient(circle at 34% 70%, rgba(98,118,255,.08), transparent 28vw),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 38%);
}

.pixflow-top-left,
.pixflow-session,
.pixflow-left-tools,
.pixflow-minimap,
.pixflow-zoom-bar {
  position: absolute;
  z-index: 32;
}

.pixflow-top-left {
  left: 18px;
  top: 16px;
  display: flex;
  gap: 10px;
}

.pixflow-session {
  right: 18px;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
}

.pixflow-session .status,
.pixflow-session .secondary {
  height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: rgba(20,20,22,.88);
  border-color: rgba(255,255,255,.14);
}

.pixflow-left-tools {
  left: 18px;
  top: 50%;
  display: grid;
  gap: 10px;
  transform: translateY(-50%);
}

.pixflow-left-tools button,
.pixflow-zoom-bar button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  color: #fff;
  background: rgba(20,20,22,.90);
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0,0,0,.34);
}

.pixflow-left-tools button:hover,
.pixflow-zoom-bar button:hover {
  border-color: rgba(255,179,71,.50);
  color: var(--accent-2);
}

.pixflow-zoom-bar button:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.pixflow-zoom-bar button:disabled:hover {
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.pixflow-board .canvas-empty {
  z-index: 8;
  width: min(560px, calc(100% - 48px));
  height: auto;
  inset: 50% auto auto 50%;
  padding: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(12,13,16,.76);
  box-shadow: 0 30px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.pixflow-board .canvas-empty.hidden,
.pixflow-board .canvas-create-hint.hidden {
  display: none;
}

.pixflow-board .canvas-empty strong {
  font-size: 30px;
}

.pixflow-board .canvas-empty span {
  color: rgba(255,255,255,.58);
}

.pixflow-quick-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.pixflow-quick-actions button {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 10px 16px;
  color: rgba(255,255,255,.86);
  background: rgba(0,0,0,.72);
  cursor: pointer;
  font-weight: 800;
}

.pixflow-quick-actions button:hover {
  border-color: rgba(255,179,71,.52);
  color: var(--accent-2);
}

.pixflow-minimap {
  right: 18px;
  bottom: 74px;
  width: 302px;
  height: 162px;
  border: 1px solid rgb(49,49,54);
  border-radius: 12px;
  overflow: hidden;
  background: rgb(20,20,22);
  box-shadow: 0 22px 60px rgba(0,0,0,.42);
}

.pixflow-minimap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pixflow-minimap .minimap-bg {
  fill: #141416;
}

.pixflow-minimap .minimap-viewport {
  fill: rgba(255,255,255,.025);
  stroke: rgba(255,255,255,.18);
  stroke-width: 1;
}

.pixflow-minimap .minimap-asset {
  fill: rgba(255,255,255,.18);
  stroke: rgba(255,255,255,.28);
  stroke-width: 1;
}

.pixflow-minimap .minimap-prompt {
  fill: rgba(255,179,71,.22);
  stroke: rgba(255,179,71,.72);
  stroke-width: 1.2;
}

.pixflow-zoom-bar {
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}

.pixflow-zoom-bar span {
  min-width: 60px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  color: rgba(255,255,255,.82);
  background: rgba(20,20,22,.90);
  font-weight: 800;
  white-space: nowrap;
}

.pixflow-board .canvas-create-hint {
  top: 70px;
  background: rgba(20,20,22,.88);
}

.pixflow-global-message {
  position: absolute;
  left: 50%;
  top: 72px;
  z-index: 40;
  width: min(720px, calc(100% - 48px));
  margin: 0;
  transform: translateX(-50%);
  box-shadow: 0 18px 50px rgba(0,0,0,.36);
}

.pixflow-board .canvas-node {
  width: 190px;
  min-height: 218px;
}

.pixflow-board .canvas-node-preview {
  height: 166px;
  border-color: rgba(255,255,255,.20);
}

.pixflow-board .canvas-control-node {
  width: min(560px, calc(100% - 120px));
  padding: 14px;
  border-radius: 16px;
  background: rgba(18,18,21,.98);
  font-stretch: normal;
  text-rendering: geometricPrecision;
}

.pixflow-board .canvas-control-node::before {
  content: "";
  position: absolute;
  right: 13px;
  top: 13px;
  width: 18px;
  height: 18px;
  border-top: 2px solid rgba(255,255,255,.44);
  border-right: 2px solid rgba(255,255,255,.44);
  opacity: .75;
}

.pixflow-board .canvas-output-node {
  border-color: rgba(210,218,238,.72);
}

.pixflow-board .canvas-lines {
  z-index: 6;
}

.pixflow-board .canvas-board-form {
  z-index: 10;
}

@media (max-width: 980px) {
  .titan-canvas-page {
    overflow: auto;
  }
  .pixflow-page {
    grid-template-columns: 1fr;
  }
  .pixflow-sidebar {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  .pixflow-board {
    min-height: 900px;
  }
  .pixflow-session,
  .pixflow-top-left {
    position: relative;
    inset: auto;
    margin: 12px;
  }
  .pixflow-left-tools,
  .pixflow-minimap,
  .pixflow-zoom-bar {
    display: none;
  }
  .pixflow-board .canvas-control-node {
    width: calc(100% - 24px);
  }
}

/* Infinite Canvas remake for Taitan canvas */
.titan-infinite-page {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: #f8fafc;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 179, 71, .16), transparent 30%),
    radial-gradient(circle at 78% 18%, rgba(130, 96, 255, .18), transparent 32%),
    linear-gradient(135deg, #08090d 0%, #10131b 58%, #07080b 100%);
}
.ic-shell { position: relative; width: 100vw; height: 100vh; overflow: hidden; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; }
.ic-topbar { position: fixed; z-index: 40; top: 18px; left: 22px; right: 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; pointer-events: none; }
.ic-title, .ic-session, .ic-toolbar, .ic-zoom, .ic-minimap { pointer-events: auto; border: 1px solid rgba(255,255,255,.12); background: rgba(11, 13, 18, .72); box-shadow: 0 22px 70px rgba(0,0,0,.34); backdrop-filter: blur(18px); }
.ic-title { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 22px; }
.ic-logo { width: 42px; height: 42px; border-radius: 15px; display: grid; place-items: center; text-decoration: none; font-size: 22px; font-weight: 900; color: #111318; background: linear-gradient(135deg, #ffcc72, #ff8f35); box-shadow: 0 12px 34px rgba(255, 179, 71, .28); }
.ic-title .eyebrow { margin: 0 0 3px; font-size: 10px; letter-spacing: .22em; color: #ffbd62; font-weight: 900; }
.ic-title h1 { margin: 0; font-size: 18px; line-height: 1.15; color: #fff; letter-spacing: -.03em; }
.ic-session { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 20px; }
.ic-session .status, .ic-session .secondary { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 0 13px; font-size: 12px; white-space: nowrap; }
.ic-board { position: absolute; inset: 0; overflow: hidden; cursor: grab; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 24px 24px; }
.ic-board::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 18%, rgba(255, 179, 71, .05)); }
.ic-board.panning { cursor: grabbing; }
.ic-world, .ic-links { position: absolute; left: 0; top: 0; width: 6000px; height: 4200px; transform-origin: 0 0; will-change: transform; }
.ic-links { z-index: 4; overflow: visible; pointer-events: none; }
.ic-link { fill: none; stroke: rgba(255, 217, 139, .86); stroke-width: 2.4; filter: drop-shadow(0 0 8px rgba(255, 179, 71, .24)); }
.ic-link.temp { stroke-dasharray: 7 7; opacity: .85; }
.ic-link-dot { fill: #ffbd62; stroke: rgba(10,10,14,.88); stroke-width: 2; }
.ic-toolbar { position: fixed; z-index: 42; left: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 22px; }
.ic-toolbar button, .ic-zoom button { width: 42px; height: 42px; border-radius: 15px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: #fff; font-weight: 900; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.ic-toolbar button:hover, .ic-zoom button:hover { transform: translateY(-1px); border-color: rgba(255, 179, 71, .56); background: rgba(255, 179, 71, .16); }
.ic-node { position: absolute; z-index: 8; border: 1px solid rgba(255,255,255,.14); background: rgba(16, 18, 24, .86); box-shadow: 0 22px 70px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(16px); user-select: none; }
.ic-node.dragging { opacity: .92; box-shadow: 0 28px 86px rgba(0,0,0,.46), 0 0 0 2px rgba(255,179,71,.24); }
.ic-asset-node { width: 230px; min-height: 260px; border-radius: 20px; overflow: visible; }
.ic-asset-node.selected { border-color: rgba(255,179,71,.72); }
.ic-node-preview { height: 176px; border-radius: 19px 19px 0 0; overflow: hidden; background: #050608; display: grid; place-items: center; position: relative; }
.ic-node-preview img, .ic-node-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ic-play-dot { position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,179,71,.9); color: #111318; font-weight: 900; }
.ic-audio-card { width: 100%; height: 100%; display: grid; place-items: center; gap: 6px; color: #ffcf87; text-align: center; padding: 18px; }
.ic-audio-card span { font-size: 42px; }
.ic-audio-card small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.72); }
.ic-node-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px 14px; min-width: 0; }
.ic-node-body span { color: rgba(255,255,255,.62); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-alias { align-self: flex-start; max-width: 100%; border: 1px solid rgba(255,179,71,.32); background: rgba(255,179,71,.12); color: #ffc76d; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ic-node-remove { position: absolute; top: 9px; right: 9px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.46); color: #fff; cursor: pointer; }
.ic-port { position: absolute; z-index: 12; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: #08090d; color: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; cursor: crosshair; }
.ic-port.out { right: -15px; top: 50%; transform: translateY(-50%); }
.ic-port.in { left: -15px; top: 50%; transform: translateY(-50%); }
.ic-prompt-node { width: 560px; border-radius: 22px; padding: 0; overflow: visible; }
.ic-prompt-node.active { border-color: rgba(255,179,71,.58); }
.ic-node-head { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px; border-bottom: 1px solid rgba(255,255,255,.1); cursor: move; }
.ic-node-head strong { color: #f8fafc; font-size: 14px; }
.ic-node-actions { display: flex; align-items: center; gap: 6px; }
.ic-node-actions button, .ic-mode-tabs button { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: rgba(255,255,255,.76); border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.ic-node-actions button:hover, .ic-mode-tabs button:hover, .ic-mode-tabs button.active { color: #fff; border-color: rgba(255,179,71,.45); background: rgba(255,179,71,.14); }
.ic-output { min-height: 170px; display: grid; place-items: center; background: #050608; border-bottom: 1px solid rgba(255,255,255,.1); color: #dbeafe; overflow: hidden; }
.ic-output video { width: 100%; max-height: 280px; display: block; background: #000; }
.ic-output small { color: rgba(255,255,255,.58); }
.ic-output-wait, .ic-output-idle, .ic-output-failed { font-weight: 900; color: #cbd5e1; }
.ic-output-failed { color: #fca5a5; }
.ic-downloads { display: flex; align-items: center; gap: 8px; padding: 10px; }
.ic-downloads a { color: #111318; background: #fff; border-radius: 12px; padding: 8px 11px; text-decoration: none; font-size: 12px; font-weight: 900; }
.ic-mode-tabs { display: flex; gap: 8px; padding: 14px 14px 0; }
.ic-connected { margin: 12px 14px 0; min-height: 54px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px dashed rgba(255,255,255,.14); border-radius: 14px; padding: 10px; color: rgba(255,255,255,.58); font-size: 12px; }
.ic-connected p { margin: 0; }
.ic-linked-asset { display: inline-flex; align-items: center; gap: 7px; max-width: 170px; border: 1px solid rgba(255,179,71,.25); background: rgba(255,179,71,.1); color: #ffd58f; border-radius: 999px; padding: 5px 9px; }
.ic-linked-asset b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-linked-asset small { color: rgba(255,255,255,.55); }
.ic-panel { margin: 12px 14px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ic-panel label { display: flex; flex-direction: column; gap: 6px; color: rgba(255,255,255,.7); font-size: 12px; }
.ic-panel select { height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.34); color: #fff; padding: 0 10px; }
.ic-panel .check { justify-content: end; flex-direction: row; align-items: center; }
.ic-prompt-wrap { display: block; padding: 12px 14px 0; color: rgba(255,255,255,.74); font-size: 12px; }
.ic-editor { position: relative; margin-top: 7px; }
.ic-editor textarea { width: 100%; min-height: 132px; resize: vertical; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(0,0,0,.46); color: #fff; outline: none; padding: 12px; line-height: 1.65; font: inherit; }
.ic-editor textarea:focus { border-color: rgba(255,179,71,.54); box-shadow: 0 0 0 3px rgba(255,179,71,.08); }
.ic-mention { position: absolute; z-index: 50; left: 10px; right: 10px; bottom: 12px; max-height: 180px; overflow: auto; padding: 8px; border-radius: 14px; border: 1px solid rgba(255,179,71,.22); background: rgba(8,9,13,.96); box-shadow: 0 20px 60px rgba(0,0,0,.42); }
.ic-mention button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: #fff; text-align: left; border-radius: 12px; padding: 8px; cursor: pointer; }
.ic-mention button:hover { background: rgba(255,179,71,.12); }
.mention-thumb { width: 46px; height: 38px; border-radius: 9px; overflow: hidden; background: #050608; flex: 0 0 auto; display: grid; place-items: center; }
.mention-thumb img, .mention-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mention-thumb .ic-audio-card { padding: 0; }
.mention-thumb .ic-audio-card span { font-size: 18px; }
.mention-thumb .ic-audio-card small { display: none; }
.ic-mention small { display: block; color: rgba(255,255,255,.52); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-submit { margin: 14px; width: calc(100% - 28px); min-height: 44px; }
.ic-empty { position: fixed; z-index: 10; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 48px)); padding: 28px; border-radius: 26px; border: 1px solid rgba(255,255,255,.12); background: rgba(11,13,18,.72); box-shadow: 0 28px 80px rgba(0,0,0,.36); text-align: center; backdrop-filter: blur(18px); }
.ic-empty strong { display: block; font-size: 24px; margin-bottom: 10px; }
.ic-empty span { color: rgba(255,255,255,.66); line-height: 1.7; }
.ic-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.ic-empty-actions button { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; border-radius: 999px; padding: 10px 15px; cursor: pointer; }
.ic-message { position: fixed; z-index: 55; left: 50%; top: 92px; transform: translateX(-50%); max-width: min(720px, calc(100vw - 40px)); border-radius: 14px; padding: 12px 15px; border: 1px solid rgba(248, 113, 113, .32); background: rgba(76, 29, 29, .88); color: #fecaca; }
.ic-message.ok { border-color: rgba(74, 222, 128, .32); background: rgba(20, 83, 45, .86); color: #bbf7d0; }
.ic-context-menu { position: fixed; z-index: 80; display: grid; gap: 6px; min-width: 150px; padding: 8px; border-radius: 14px; border: 1px solid rgba(255,255,255,.12); background: rgba(8,9,13,.96); box-shadow: 0 22px 60px rgba(0,0,0,.42); }
.ic-context-menu button { border: 0; border-radius: 10px; background: transparent; color: #fff; text-align: left; padding: 10px 12px; cursor: pointer; }
.ic-context-menu button:hover { background: rgba(255,179,71,.14); }
.ic-zoom { position: fixed; z-index: 42; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 18px; }
.ic-zoom span { min-width: 52px; text-align: center; color: #fff; font-size: 12px; font-weight: 900; }
.ic-minimap { position: fixed; z-index: 42; right: 22px; bottom: 92px; width: 240px; height: 140px; border-radius: 18px; overflow: hidden; }
.ic-minimap svg { width: 100%; height: 100%; display: block; }
.mini-bg { fill: rgba(0,0,0,.26); }
.mini-asset { fill: rgba(255,255,255,.42); }
.mini-prompt { fill: rgba(255,179,71,.78); }
.ic-drop-overlay { position: fixed; z-index: 70; inset: 0; display: none; place-items: center; color: #fff; font-size: 24px; font-weight: 900; background: rgba(0,0,0,.34); border: 2px dashed rgba(255,179,71,.5); pointer-events: none; }
.ic-drop-overlay.show { display: grid; }
.hidden { display: none !important; }
@media (max-width: 900px) {
  .ic-topbar { left: 12px; right: 12px; top: 12px; flex-direction: column; }
  .ic-session { flex-wrap: wrap; }
  .ic-toolbar { left: 12px; bottom: 16px; top: auto; transform: none; flex-direction: row; }
  .ic-minimap { display: none; }
  .ic-prompt-node { width: min(520px, calc(100vw - 36px)); }
}
