:root {
  color-scheme: dark;
  --bg: #080b0d;
  --rail: #0d1012;
  --panel: #111518;
  --line: #252b2e;
  --green: #0bd09a;
  --bright: #40e9ba;
  --muted: #999fa8;
  --soft: #b9bdc5;
  font:
    14px Inter,
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    sans-serif;
  color: #f0f1f3;
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  color: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  border: 1px solid #34393d;
  background: #222629;
  border-radius: 6px;
  padding: 5px 10px;
  line-height: 1.35;
}
button:hover:not(:disabled) {
  filter: brightness(1.18);
  border-color: #59635f;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #46e0b3;
  outline-offset: 2px;
}
input,
select,
textarea {
  background: #181a1e;
  border: 1px solid #34383e;
  border-radius: 6px;
  color: #eceef0;
  padding: 10px;
  max-width: 100%;
}
textarea {
  resize: vertical;
  line-height: 1.7;
}
svg {
  vertical-align: middle;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 21px;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 14px;
}
.small,
small,
.muted {
  color: var(--muted);
  font-size: 12px;
}
.mono,
.eyebrow {
  font-family: "IBM Plex Mono", Consolas, monospace;
}
.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.035em;
  color: var(--bright);
}
.row,
.spread,
.headerBtns,
.chips,
.navLink,
.brand,
.topRight,
.crumb,
.toolbar,
.boardSelect,
.modalHead,
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spread,
.modalHead {
  justify-content: space-between;
}
.row.wrap,
.chips,
.actions,
.toolbar {
  flex-wrap: wrap;
}
.row > * {
  min-width: 0;
}
.grow {
  flex: 1;
  min-width: 0;
}
.stack {
  display: grid;
  gap: 14px;
}
.sep {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 3px;
}
.strong,
.green,
.cyan,
.red,
.amber,
.tag,
.soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.strong {
  color: #06291e;
  background: #0bc38d;
  border-color: #08cb95;
  font-weight: 650;
}
.green {
  background: #0c3026;
  border-color: #14634c;
  color: #6ef2c8;
}
.cyan {
  background: #0b2c33;
  border-color: #155166;
  color: #60dcf8;
}
.red {
  background: #2b171e;
  border-color: #582534;
  color: #ff9bb1;
}
.amber {
  background: #2a2210;
  border-color: #5b4415;
  color: #edc968;
}
.soft {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.tag {
  padding: 3px 7px;
  border: 1px solid #234c3d;
  border-radius: 5px;
  background: #0c291e;
  color: var(--bright);
  font-size: 11px;
}
.iconBtn {
  display: inline-grid;
  place-items: center;
  padding: 0;
  width: 33px;
  height: 33px;
  border-color: var(--line);
  background: #14171a;
}
.wide {
  width: 100%;
}
.hide {
  display: none !important;
}
.fullBtn {
  padding: 11px 14px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 5px;
}
#shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100dvh;
  min-height: 400px;
}
aside {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--rail);
  border-right: 1px solid var(--line);
}
.brand {
  height: 80px;
  flex: none;
  padding: 10px 16px;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}
.mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #d3c6a1;
  outline: 1px solid #547366;
  outline-offset: -5px;
  background: #dce8d7;
  color: #21655b;
  font:
    bold 27px/1.2 "KaiTi",
    serif;
}
.brand strong {
  font:
    bold 22px KaiTi,
    serif;
  white-space: nowrap;
}
.brand em {
  font:
    700 9px Inter,
    sans-serif;
  padding: 2px 5px;
  border: 1px solid #165540;
  border-radius: 4px;
  color: var(--bright);
  vertical-align: middle;
}
.brand small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.navLabel {
  font-size: 11px;
  color: #acb1b9;
  margin: 16px 12px 8px;
}
nav {
  overflow: auto;
  padding: 0 10px;
  flex: 1;
}
.navLink {
  width: 100%;
  position: relative;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #b0b6c1;
  min-height: 42px;
  padding: 8px 13px;
  gap: 13px;
  margin: 3px 0;
}
.navLink.active {
  background: #0b2521;
  border-color: #075946;
  color: #1bf4ba;
  font-weight: 650;
}
.navLink.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #00cea0;
  box-shadow: 0 0 9px #00a77e;
}
.promo {
  margin: 22px 5px 10px;
  padding: 14px;
  border: 1px solid #164536;
  border-radius: 9px;
  color: #30e2ac;
  background: #0c1716;
  font-size: 12px;
}
.promo small {
  display: block;
  color: #a0aaa8;
  line-height: 1.65;
  margin-top: 6px;
}
.railBottom {
  border-top: 1px solid var(--line);
  padding: 8px 10px;
}
.railBottom .navLink {
  min-height: 33px;
  margin: 0;
}
main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
header {
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: #0b0e10;
}
.crumb {
  font-size: 12px;
  color: #999fa8;
  white-space: nowrap;
}
.crumb span {
  color: #52565c;
}
.crumb b {
  color: #e1e5e8;
}
.topRight {
  margin-left: auto;
}
.avatar {
  border-radius: 50%;
  border: 1px solid #086749;
  color: var(--bright);
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  background: #10211b;
}
.userChip,
.wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  background: #131719;
  padding: 4px 9px;
}
.userChip small {
  display: block;
  font-size: 9px;
}
.wallet {
  color: #ebc354;
  background: #211a0b;
  border-color: #513c10;
  font-size: 12px;
}
.wallet strong {
  font-size: 10px;
  color: #ffd454;
  background: #443305;
  border-radius: 4px;
  padding: 2px 4px;
}
.topRight .green {
  min-height: 34px;
}
#page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
#shell.fold {
  grid-template-columns: 62px 1fr;
}
.fold .brand {
  padding: 7px;
}
.fold .mark {
  width: 45px;
  height: 45px;
}
.fold .brand > div + div,
.fold nav span,
.fold .navLabel,
.fold .promo,
.fold .railBottom span {
  display: none;
}
.fold .navLink {
  justify-content: center;
  padding: 8px;
}
.loading {
  color: var(--muted);
  padding: 20px;
}
.pageScroll {
  flex: 1;
  overflow: auto;
  padding: 32px clamp(16px, 3.7vw, 72px);
}
.panel,
.paper,
.canvasPanel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 14px;
}
.panelHead {
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
  line-height: 1.7;
}
.panelHead small {
  display: block;
}
.paper {
  padding: 20px;
}
.spaced {
  margin-top: 14px;
}
.pageTitle {
  margin-bottom: 20px;
}
.empty {
  padding: 22px;
  border: 1px dashed #353b3f;
  color: var(--muted);
  border-radius: 8px;
  text-align: center;
}
.genPage { scrollbar-gutter: stable; }
.delivery .panelHead { padding-block: 10px; }
.genBanner {
  margin-bottom: 12px;
}
.genBanner .tag {
  font-size: 12px;
}
.genLayout {
  display: grid;
  grid-template-columns: minmax(315px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  min-height: 590px;
  height: calc(100dvh - 116px);
}
.genForm,
.delivery {
  display: flex;
  min-height: 0;
  flex-direction: column;
}
.formScroll,
.deliveryBody {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding: 20px;
}
.fieldGroup {
  margin: 0 0 20px;
}
.label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 8px;
}
.hint {
  display: block;
  margin: 9px 0;
  color: #969fa5;
  font-size: 12px;
  line-height: 1.6;
}
.seg {
  display: flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  background: #17191c;
  border-radius: 8px;
}
.seg button {
  flex: 1;
  border-color: transparent;
  background: transparent;
  color: #aeb2bc;
}
.seg button.on,
.chip.on {
  background: #08b987;
  border-color: #0bc18f;
  color: #06231c;
}
.promptBox {
  background: #17191c;
  border: 1px solid #34373b;
  border-radius: 7px;
}
.promptBox textarea {
  width: 100%;
  min-height: 105px;
  border: 0;
  background: transparent;
}
.promptBox .spread {
  padding: 2px 8px 7px;
}
.promptBox button {
  font-size: 12px;
}
.chip {
  border-radius: 5px;
  font-size: 12px;
}
.modelControl { position: relative; }
.modelControl select { min-height: 48px; padding-inline: 12px 28px; }
.modelControl.withRates select { padding-right: 120px; }
.modelRates { position: absolute; right: 30px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: 12px; }
.genForm .eyebrow { font-size: 12px; }
.genForm .pipelineLabel { color: #43d5e9; }
.genForm .modeSeg { padding: 6px; }
.modeSeg button { min-height: 39px; }
.modeSeg .on { background: linear-gradient(110deg,#04bad5,#00b49a); }
.genForm .promptBox.spaced, .genForm .seg.spaced { margin-top: 7px; }
.genForm .promptBox textarea { min-height: 105px; font-size: 15px; }
.genForm .promptBox .linkBtn { color: var(--bright); }
.genForm .promptBox button { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.subjectRail { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.subjectArrow { display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; background: transparent; }
.subjectArrow.previous svg { transform: rotate(90deg); }
.subjectArrow.next svg { transform: rotate(-90deg); }
.subjectList { flex: 1; min-width: 0; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: thin; }
.subCard, .slot { display: grid; place-content: center; justify-items: center; gap: 3px; border: 1px dashed #3a4145; background: #111517; color: var(--muted); border-radius: 7px; text-align: center; }
.subCard { flex: 0 0 72px; min-width: 0; height: 72px; padding: 4px; }
.subCard img { max-width: 60px; height: 39px; object-fit: cover; border-radius: 3px; }
.subCard span { max-width: 62px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.subCard.active { border: 1px solid #1c9b71; background: #103126; color: #a4f5d8; }
.subjectEmpty { flex: 1 0 104px; justify-content: start; padding: 8px; font-size: 12px; }
.subjectList :focus-visible { outline-offset: -2px; }
.refLabel { color: var(--soft); }
.refPicker, .refEmpty { margin-top: 8px; }
.refEmpty { padding-block: 22px; font-size: 12px; }
.refPicker button { min-height: 39px; }
.slots { display: flex; gap: 8px; margin: 8px 0; }
.slot { width: calc((100% - 24px) / 4); min-width: 0; aspect-ratio: 1; position: relative; overflow: hidden; padding: 0; font-size: 11px; }
.slot:not(:disabled) { border-color: #9aaca5; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slotRemove { position: absolute; top: 2px; right: 2px; background: #111a18e0; color: white; border-radius: 4px; padding: 2px; line-height: 1; }
.fileLink { padding: 2px 0; background: transparent; color: var(--soft); border: 0; text-decoration: underline; text-underline-offset: 2px; }
.deliveryBody.hasResult { justify-content: flex-start; }
.deliveryBody {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.heroIcon {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  margin: 8px auto 23px;
  border-radius: 17px;
  color: var(--green);
  border: 1px solid #105540;
  background: #10261f;
  box-shadow: 0 0 30px #0db57e12;
}
.ideas {
  width: min(680px, 96%);
  margin-top: 28px;
  text-align: left;
}
.ideaGrid,
.assetGrid,
.templateGrid {
  display: grid;
  gap: 12px;
}
.ideaGrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}
.idea {
  position: relative;
  min-height: 134px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  overflow: hidden;
  text-align: left;
  border: 1px solid #293331;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  color: white;
  padding: 10px;
}
.idea:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #040707e8, transparent 70%);
}
.idea > * {
  position: relative;
}
.idea small {
  max-width: 100%;
  color: #cbd0cd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}
.resultGrid {
  display: grid;
  width: 100%;
  gap: 12px;
}
.resultGrid img,
.resultGrid video,
.lightbox {
  display: block;
  width: 100%;
  max-height: 55dvh;
  object-fit: contain;
  background: #080a0b;
  border-radius: 8px;
}
.stage {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  touch-action: none;
  background: #090b0d radial-gradient(#17201e 0.7px, transparent 1px);
  background-size: 21px 21px;
}
.world {
  position: absolute;
  transform-origin: 0 0;
}
.wires {
  width: 1px;
  height: 1px;
  position: absolute;
  overflow: visible;
  pointer-events: none;
}
.wire {
  fill: none;
  stroke: #12cdb0;
  stroke-width: 1.7;
  stroke-dasharray: 3 5;
  pointer-events: none;
}
.wireGroup.selected .wire,
.wire.selected {
  stroke: #ffbd5d;
  stroke-width: 4;
}
.wireGroup:focus-within .wire {
  stroke: #ffcf88;
  stroke-dasharray: none;
}
.hitWire {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  vector-effect: non-scaling-stroke;
  outline: none;
  pointer-events: stroke;
  cursor: pointer;
}
.canvasHud {
  position: absolute;
  z-index: 4;
  top: 15px;
  left: 15px;
  right: 13px;
  pointer-events: none;
}
.canvasHud > * {
  pointer-events: auto;
  width: fit-content;
  max-width: 100%;
}
.toolbar,
.assetTray,
.boardSelect,
.toolsPop,
.cardnote {
  background: #121619;
  border: 1px solid #303538;
  border-radius: 10px;
  box-shadow: 0 4px 15px #0004;
}
.toolbar {
  position: relative;
  padding: 6px 9px;
  gap: 4px;
}
.toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 15px;
  min-height: 29px;
  padding: 4px 9px;
  white-space: nowrap;
}
.toolbar .trayToggle[aria-expanded="true"] {
  background: #0d3229;
  color: #87efd1;
  border-color: #163d32;
}
.sequenceBtn { color: #f2fffa; background: #067b5b; }
.sequenceBtn svg { fill: #ffdf66; stroke: #273923; }
.toolToggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.toolbar .historyBtn { width: 30px; padding-inline: 0; }
.toolAnchor {
  position: relative;
}
.toolsPop {
  position: absolute;
  padding: 11px;
  top: calc(100% + 7px);
  left: 0;
  width: 288px;
  max-height: min(320px, 46vh);
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 7;
}
.toolsPop small {
  display: block;
  margin: 4px 0 6px;
}
.toolsPop .chips { gap: 4px; }
.toolGroup + .toolGroup { margin-top: 10px; }
.toolsPop small { font-size: 11px; font-weight: 600; }
.assetTray > .chips { gap: 4px; margin: 8px 0 6px; }
.assetTray .spread .tiny { min-height: 27px; }
.assetTray .chips button { padding: 4px 7px; }
.assetTray [aria-pressed="true"] { font-weight: 600; }
.assetTray {
  margin-top: 8px;
  width: 420px;
  padding: 8px;
}
.assetTray small {
  font-size: 11px;
}
.trayMedia {
  display: flex;
  gap: 5px;
  max-height: 67px;
  overflow: auto;
}
.trayMedia img {
  height: 39px;
  width: 55px;
  object-fit: cover;
}
.cardnote {
  font-size: 11px;
  padding: 4px 9px;
  margin-top: 7px;
  color: #77e0c3;
  border: 0;
}
.boardSelect {
  margin-top: 8px;
  font-size: 10px;
  gap: 4px;
  padding: 4px 8px;
  background: #101316;
  color: var(--muted);
}
.boardSelect button,
.boardSelect select {
  font-size: 11px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
}
.boardSelect select {
  color: var(--green);
  max-width: 220px;
}
.boardSelect option {
  background: #15191b;
}
.node {
  position: absolute;
  border: 1px solid #353c3d;
  border-radius: 12px;
  background: #131719;
  box-shadow: 0 4px 16px #0004;
  user-select: none;
}
.node.selected,
.node.running {
  border-color: #12a17e;
}
.node.running {
  box-shadow: 0 0 0 3px #1fbf983d;
}
.node header {
  height: 36px;
  padding: 0 10px;
  background: #191d1f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px 12px 0 0;
  gap: 2px;
  cursor: grab;
}
.node header strong {
  color: #61dcb9;
  font-size: 12px;
}
.node header button,
.tiny {
  border: 0;
  padding: 2px 5px;
  font-size: 11px;
  min-height: 18px;
  border-radius: 4px;
}
.node .inner {
  padding: 10px;
}
.node textarea {
  width: 100%;
  padding: 6px;
  resize: none;
  font-size: 13px;
  background: #191b1e;
  line-height: 1.5;
  min-height: 78px;
  border-color: #303437;
}
.node.long textarea {
  height: 162px;
}
.node .caption {
  font-size: 10px;
  color: #a5abb0;
  margin: 3px 0;
}
.node img,
.node video {
  display: block;
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
}
.node.video img,
.node.image img {
  height: 140px;
}
.node .row {
  gap: 4px;
}
.node .ndControls {
  margin-top: 5px;
  display: flex;
  gap: 4px;
  justify-content: space-between;
}
.ndControls button {
  font-size: 10px;
  padding: 4px;
  flex: 1;
}
.node select {
  margin-top: 6px;
  padding: 4px;
  width: 100%;
  font-size: 11px;
}
.port {
  width: 21px;
  height: 25px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
}
.port:after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 100%;
  background: #05b788;
  border: 2px solid #17231f;
  box-shadow: 0 0 0 1px #35463f;
}
.port.out {
  right: -11px;
}
.port.in {
  left: -11px;
}
.port.armed:after {
  background: #ffbd5d;
}
.zoom {
  position: absolute;
  bottom: 18px;
  left: 15px;
  z-index: 3;
  display: grid;
  gap: 1px;
  background: #292e32;
  padding: 1px;
  border-radius: 8px;
  overflow: hidden;
}
.zoom button {
  background: #171b1f;
  padding: 5px;
  border: 0;
  border-radius: 0;
}
.stageStatus {
  position: absolute;
  bottom: 18px;
  right: 18px;
  font-size: 11px;
  color: #9aa9a3;
  background: #0e1416d9;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
}
.assetsLayout,
.listPage {
  display: grid;
  gap: 17px;
}
.assetGrid {
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
}
.assetCard {
  border: 1px solid var(--line);
  background: #15191c;
  padding: 9px;
  border-radius: 9px;
  min-width: 0;
}
.assetCard img {
  width: 100%;
  height: 109px;
  object-fit: cover;
  border-radius: 5px;
}
.assetCard strong {
  display: block;
  padding: 7px 0;
  overflow-wrap: anywhere;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table td,
.table th {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 11px 7px;
}
.table th {
  font-size: 12px;
  color: var(--muted);
}
.products {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(285px, 380px) minmax(0, 1fr);
}
.productForm {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #0c1012;
}
.productForm .panelHead,
.productForm .formScroll {
  padding: 16px 19px;
}
.productForm .panelHead > button { padding: 0; font-size: 12px; }
.productForm .panelHead h2 { margin-top: 3px; }
.footerBtn {
  padding: 15px;
  border-top: 1px solid var(--line);
}
.uploadHero {
  width: 100%;
  height: 176px;
  border: 2px dashed #32383a;
  background: #101416;
  border-radius: 14px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}
.uploadHero img {
  height: 103px;
  max-width: 100%;
  object-fit: contain;
}
.templateGrid {
  max-height: 400px;
  overflow: auto;
  gap: 5px;
}
.templateGrid button {
  position: relative;
  min-height: 54px;
  display: grid;
  text-align: left;
  padding: 9px 12px;
  background: #16191b;
}
.templateGrid button > svg { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); }
.templateGrid small {
  font-size: 11px;
}
.templateGrid .on {
  color: var(--bright);
  background: #0b3328;
  border-color: var(--green);
}
.productPreview {
  position: relative; min-height: 0; min-width: 0; overflow: hidden;
  background: #080a0d radial-gradient(#091c1a 1px, transparent 1px); background-size: 24px 24px;
}
.previewHud { position: absolute; inset: 16px 16px auto; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none; }
.previewHud > * { pointer-events: auto; }
.pOverlay, .previewActions { display: inline-flex; align-items: center; background: #131719; border: 1px solid var(--line); }
.pOverlay { gap: 8px; padding: 7px 10px; font-size: 12px; border-radius: 18px; }
.pOverlay small, .previewActions span { font-variant-numeric: tabular-nums; }
.previewActions { margin-left: auto; gap: 4px; padding: 3px; border-radius: 9px; }
.previewActions button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 28px; padding: 3px 7px; }
#previewScroll { position: absolute; inset: 57px 0 0; display: flex; overflow: auto; overscroll-behavior: contain; }
#previewScroll:focus-visible { outline: 1px solid var(--green); outline-offset: -2px; }
.previewSurface { position: relative; flex: none; margin: auto; overflow: hidden; }
.previewStage { position: absolute; inset: 0 auto auto 0; transform-origin: top left; }
.previewStage > svg { position: absolute; inset: 0; pointer-events: none; }
.previewStage .wire { stroke: #04b99c; stroke-dasharray: 4 4; }
.pnode { position: absolute; display: grid; align-content: center; gap: 6px; padding: 10px 16px; background: #0d202b; border: 1px solid #0686a7; border-radius: 14px; font-size: 15px; }
.pnode small { color: #71d4e9; font-size: 10px; font-weight: 600; }
.pnode.type-product { background: #10251d; border-color: #0a7958; }
.pnode.type-product small { color: #76edc5; }
.pnode.type-copy { background: #2a2313; border-color: #ac850c; }
.pnode.type-copy small { color: #fbd653; }
.pnode.type-image { background: #21192e; border-color: #7c56aa; }
.pnode.type-image small { color: #ba9aff; }
.outputPin { color: #74e1bc; background: #103b30; padding: 1px 5px; border-radius: 8px; font-size: 9px; }
.graphEmpty { position: absolute; left: 50%; top: 55%; transform: translate(-50%,-50%); width: max-content; max-width: 90%; }
.record {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.record img {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 5px;
}
.record .grow {
  overflow-wrap: anywhere;
}
dialog {
  padding: 0;
  border: 1px solid #39413f;
  border-radius: 13px;
  color: #eef3ef;
  background: #15191b;
  width: min(500px, 92vw);
  max-height: 86dvh;
  overflow: auto;
  box-shadow: 0 24px 80px #0009;
}
dialog.wideBox {
  width: min(810px, 94vw);
}
dialog::backdrop {
  background: #030606a8;
}
.modalHead {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modalBody {
  padding: 18px;
}
.modalBody > p {
  line-height: 1.8;
}
.modalBody .assetGrid {
  max-height: 55vh;
  overflow: auto;
}
.modalBody a {
  color: var(--bright);
}
#toast {
  position: fixed;
  z-index: 12;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 88%;
  background: #172d25;
  color: #c7f3e2;
  border: 1px solid #2f6552;
  border-radius: 8px;
  padding: 9px 16px;
  pointer-events: none;
  visibility: hidden;
}
#toast.show {
  visibility: visible;
}
.fail {
  color: #ff9ba8;
}
.good {
  color: var(--bright);
}
.help {
  white-space: pre-line;
  color: #c2c9c6;
  line-height: 1.85;
}
.linkBtn {
  color: var(--bright);
  background: transparent;
  border: 0;
}
.pill {
  font-size: 11px;
  color: #b0bbc1;
  border-radius: 15px;
  padding: 3px 7px;
  background: #242a2b;
}
.inlineLink {
  color: var(--bright);
}
@media (max-width: 1450px) {
  #shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .toolbar button {
    font-size: 12px;
    padding: 4px 7px;
  }
  .genLayout {
    grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  }
  .pageScroll {
    padding: 22px;
  }
  .products {
    grid-template-columns: 310px 1fr;
  }
  .brand {
    height: 72px;
  }
  .brand strong {
    font-size: 19px;
  }
  .navLink {
    min-height: 38px;
  }
}
@media (max-width: 1000px) {
  #shell {
    grid-template-columns: 67px 1fr;
  }
  .brand > div + div,
  .navLink span,
  .navLabel,
  .promo {
    display: none;
  }
  .brand {
    padding: 7px;
  }
  .navLink {
    justify-content: center;
    padding: 8px;
  }
  .topRight .green {
    display: none;
  }
  .genLayout {
    grid-template-columns: minmax(270px, 310px) minmax(0, 1fr);
  }
  .pageScroll {
    padding: 14px;
  }
  .ideaGrid {
    grid-template-columns: 1fr;
  }
  .idea {
    min-height: 62px;
  }
  .toolbar .toolAnchor { position: static; }
  .toolsPop {
    left: 0;
    top: calc(100% + 5px);
    max-width: 100%;
  }
  .toolbar {
    max-width: 95%;
  }
  .canvasHud .assetTray {
    max-width: 320px;
  }
  .products {
    grid-template-columns: 270px 1fr;
  }
}
@media (max-width: 680px) {
  #shell,
  #shell.fold {
    grid-template-columns: 49px minmax(0, 1fr);
  }
  nav,
  .railBottom {
    padding: 0 3px;
  }
  .navLink {
    padding: 7px;
    min-height: 35px;
  }
  .brand {
    height: 53px;
    padding: 5px;
  }
  .mark,
  .fold .mark {
    width: 38px;
    height: 38px;
    font-size: 21px;
  }
  header {
    height: 49px;
    padding: 0 9px;
    gap: 6px;
  }
  .crumb {
    font-size: 11px;
    gap: 4px;
  }
  .topRight {
    gap: 4px;
  }
  .userChip > span,
  .wallet strong,
  .topRight .notice {
    display: none;
  }
  .wallet {
    font-size: 11px;
  }
  .pageScroll {
    padding: 9px;
  }
  .genLayout {
    display: flex;
    height: auto;
    flex-direction: column;
    gap: 12px;
  }
  .genForm .formScroll {
    max-height: 58vh;
  }
  .genBanner .tag {
    font-size: 10px;
  }
  .genBanner .tag + span {
    display: none;
  }
  .deliveryBody {
    padding: 14px;
  }
  .ideaGrid {
    grid-template-columns: repeat(3, 1fr);
  }
  .idea {
    min-height: 76px;
    padding: 5px;
  }
  .idea small {
    display: none;
  }
  .products {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .productForm {
    min-height: 450px;
    flex: 1;
  }
  .productPreview {
    min-height: 240px;
  }
  .toolbar {
    max-width: 100%;
    gap: 3px;
    padding: 4px;
  }
  .toolbar button {
    font-size: 11px;
    padding: 4px;
  }
  .canvasHud {
    left: 5px;
    right: 5px;
    top: 5px;
  }
  .toolbar .sep { display: none; }
  .toolbar .historyBtn { width: 25px; }
  .canvasHud .assetTray { max-width: 100%; }
  .toolGroup + .toolGroup { margin-top: 6px; }
  .stageStatus {
    right: 4px;
    bottom: 4px;
  }
  .boardSelect {
    flex-wrap: wrap;
  }
  .boardSelect select {
    max-width: 150px;
  }
  .assetGrid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .table {
    font-size: 12px;
  }
}
.mediaButton {
  display: block;
  padding: 0;
  width: 100%;
  border: 0;
  background: transparent;
}
.nodeEmpty {
  padding: 13px 6px;
  text-align: center;
  font-size: 11px;
  color: #a1a8af;
  border: 1px dashed #3d4244;
  border-radius: 6px;
}
.clipOrder {
  display: grid;
  gap: 5px;
  margin: 6px 0;
}
.node .linkBtn {
  color: #46ddb2;
  background: transparent;
}
.stage:fullscreen,
.productPreview:fullscreen {
  height: 100vh;
  width: 100vw;
}
.mediaButton img {
  pointer-events: none;
}
.toolbar .toolAnchor {
  z-index: 1;
}
.node header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node.negative textarea {
  height: 78px;
  min-height: 66px;
}
.node.text:has(header) .linkBtn {
  min-height: 19px;
}

.nodePrompt {
  display: flex;
  flex-direction: column;
  background: #191b1e;
  border: 1px solid #303437;
  border-radius: 6px;
}
.nodePrompt:focus-within { border-color: #438b78; }
.node .nodePrompt textarea {
  display: block;
  background: transparent;
  border: 0;
  caret-color: var(--bright);
  scrollbar-width: thin;
  scrollbar-color: #535a58 transparent;
}
.nodePrompt .linkBtn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 3px;
}
.node .caption small { font-size: 10px; font-variant-numeric: tabular-nums; }
.node .mediaButton { position: relative; margin-top: 5px; }
.nodePlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  border-radius: 10px;
  color: white;
  background: #101413d9;
  font-size: 10px;
}
.nodeRefs {
  margin-top: 7px;
  padding: 4px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.nodeRefs .ndControls button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.refThumbs { display: flex; flex-wrap: wrap; gap: 5px; margin: 5px 0; }
.node .refThumb { position: relative; border-radius: 4px; padding: 0; overflow: hidden; }
.node .refThumb img { width: 36px; height: 28px; }
.refThumb > span { position: absolute; right: 0; top: 0; background: #111b18e6; display: grid; place-items: center; }

.imageViewport { max-height: 63dvh; overflow: auto; background: #080a0b; border-radius: 8px; }
.imageViewport img { display: block; width: auto; height: auto; max-width: 100%; max-height: 62dvh; margin-inline: auto; object-fit: contain; }
.imageViewport.actualSize img { max-width: none; max-height: none; }
@media (max-width: 1000px) {
  .subjectArrow { width: 27px; }
  .previewHud { inset: 9px 7px auto; }
  .pOverlay { gap: 3px; }
  #previewScroll { top: 78px; }
}
