:root {
  --bg: #06080d;
  --panel: rgba(10, 15, 25, 0.86);
  --panel-2: rgba(16, 25, 43, 0.9);
  --panel-3: rgba(22, 35, 63, 0.86);
  --line: rgba(230, 199, 143, 0.22);
  --line-strong: rgba(230, 199, 143, 0.48);
  --text: #f3efe6;
  --soft: #d9d2c5;
  --muted: #a7adba;
  --teal: #e6c78f;
  --teal-dark: #b48a4d;
  --amber: #e6c78f;
  --coral: #df6e5d;
  --blue: #8db8ff;
  --green: #4fc38a;
  --violet: #9a83dd;
  --abyss: #06080d;
  --deep-blue: #16233f;
  --nebula-white: #f3efe6;
  --ruyi-gold: #e6c78f;
  --flow-blue: #8db8ff;
  --mountain-gray: #5e6470;
  --sand-brown: #886a45;
  --glass: rgba(8, 12, 20, 0.72);
  --glass-strong: rgba(10, 15, 25, 0.92);
  --gold-glow: 0 0 18px rgba(230, 199, 143, 0.22), 0 0 42px rgba(230, 199, 143, 0.12);
  --blue-glow: 0 0 20px rgba(141, 184, 255, 0.2), 0 0 56px rgba(141, 184, 255, 0.12);
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  color: #07110f;
  font-weight: 900;
}

.brand-link strong,
.brand-link small {
  display: block;
}

.brand-link small,
.eyebrow,
.mini-label,
.node-meta,
.task-meta,
.asset-meta {
  color: var(--muted);
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 0 28px;
  background: rgba(16, 17, 20, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--soft);
  font-size: 14px;
}

.nav-cta {
  justify-self: end;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--teal);
  color: #07110f;
  font-weight: 800;
}

.landing-page main {
  background: #101114;
}

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 88vh;
  padding: 120px 7vw 78px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(16, 17, 20, 0.96) 0%, rgba(16, 17, 20, 0.82) 42%, rgba(16, 17, 20, 0.28) 100%),
    url("./canvas-v2.png");
  background-size: cover;
  background-position: center right;
  opacity: 0.92;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1.02;
}

.hero p {
  max-width: 690px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.top-actions,
.button-row,
.canvas-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-link,
.secondary-link,
.primary-button,
.ghost-button,
.icon-button,
.text-button,
.tool-button,
.chip {
  min-height: 40px;
  border-radius: 8px;
  font-weight: 850;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.hero-actions {
  margin-top: 32px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.primary-link,
.primary-button {
  background: var(--teal);
  color: #07110f;
}

.primary-link:hover,
.primary-button:hover,
.nav-cta:hover {
  background: #63d1c4;
  transform: translateY(-1px);
}

.secondary-link,
.ghost-button,
.chip {
  border: 1px solid var(--line);
  background: rgba(24, 26, 31, 0.82);
  color: var(--soft);
}

.secondary-link:hover,
.ghost-button:hover,
.chip:hover,
.tool-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.intro-strip,
.module-section,
.roadmap-section {
  padding: 72px 7vw;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-strip {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  background: #14161a;
}

.intro-strip > div:first-child span {
  color: var(--teal);
  font-weight: 900;
}

.intro-strip h2,
.section-title h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 48px);
}

.intro-strip p,
.module-grid p,
.roadmap {
  color: var(--muted);
  line-height: 1.75;
}

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

.logic-grid article,
.module-grid article {
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.logic-grid b,
.module-grid h3 {
  display: block;
  margin: 0 0 12px;
  font-size: 20px;
}

.module-section {
  background: #101114;
}

.section-title {
  margin-bottom: 28px;
}

.module-grid article span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.roadmap-section {
  display: grid;
  gap: 26px;
  background: #16191f;
}

.roadmap {
  display: grid;
  gap: 14px;
  max-width: 880px;
  margin: 0;
  padding-left: 22px;
}

.canvas-body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0d0f12;
}

.canvas-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.canvas-startup-block {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #f5f8ff;
  background: rgba(2, 8, 17, 0.9);
  backdrop-filter: blur(10px);
}

.canvas-startup-block > div {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(126, 211, 255, 0.32);
  border-radius: 8px;
  background: #071321;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.canvas-startup-block h1 {
  margin: 0 0 12px;
  font-size: 22px;
  letter-spacing: 0;
}

.canvas-startup-block p {
  margin: 0;
  color: #a8b6c8;
  line-height: 1.7;
}

.canvas-startup-block div > div {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.canvas-startup-block button,
.canvas-startup-block a {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(250, 205, 112, 0.42);
  border-radius: 6px;
  color: #f9d985;
  background: rgba(250, 205, 112, 0.08);
  font: inherit;
  line-height: 38px;
  text-decoration: none;
  cursor: pointer;
}

.canvas-topbar {
  position: absolute;
  z-index: 12;
  top: 14px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.canvas-topbar > * {
  pointer-events: auto;
}

.project-title-input {
  width: min(520px, 100%);
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 26, 31, 0.9);
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.publish-share-wrap {
  position: relative;
  display: inline-flex;
}

.top-icon-button,
.member-chip,
.account-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 26, 31, 0.86);
  color: var(--text);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.top-icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 17px;
  font-weight: 900;
}

.publish-share-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 42px));
  padding: 14px;
  border: 1px solid rgba(230, 199, 143, 0.2);
  border-radius: 14px;
  background: rgba(29, 28, 25, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  backdrop-filter: blur(18px);
}

.publish-share-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.publish-share-menu button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc";
  align-items: center;
  gap: 2px 12px;
  min-height: 70px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.publish-share-menu button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.publish-share-menu button span {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ruyi-gold);
  font-size: 18px;
  font-weight: 900;
}

.publish-share-menu button b {
  grid-area: title;
  font-size: 15px;
}

.publish-share-menu button small {
  grid-area: desc;
  color: rgba(243, 239, 230, 0.62);
  font-size: 12px;
  line-height: 1.5;
}

.member-chip {
  position: relative;
  min-height: 42px;
  gap: 7px;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
}

.member-chip span {
  position: absolute;
  left: 10px;
  top: -16px;
  padding: 2px 7px;
  border-radius: 7px 7px 7px 0;
  background: #ffd17b;
  color: #211609;
  font-size: 11px;
  font-weight: 900;
}

.member-chip b {
  font-size: 13px;
}

.member-chip::before {
  content: "◆";
  color: var(--ruyi-gold);
  font-size: 13px;
}

.member-chip i {
  color: #ffe0a2;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.account-chip {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
}

.account-chip span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef3ff, #8db8ff);
  color: #17213a;
  font-size: 15px;
  font-weight: 950;
}

.account-chip i {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ff5454;
}

.canvas-viewport {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: clip;
  cursor: grab;
  user-select: none;
  touch-action: none;
  background-color: #0d0f12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: var(--grid-size, 32px) var(--grid-size, 32px);
  background-position: var(--grid-x, 0) var(--grid-y, 0);
}

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

.canvas-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
}

.edge-layer {
  position: absolute;
  z-index: 1;
  left: -6000px;
  top: -6000px;
  width: 12000px;
  height: 12000px;
  overflow: visible;
  pointer-events: none;
}

.edge-group {
  pointer-events: visibleStroke;
}

.edge-hit {
  stroke: transparent;
  stroke-width: 18;
  pointer-events: stroke;
}

.edge-path {
  pointer-events: none;
  transition: stroke 140ms ease, stroke-width 140ms ease;
}

.edge-base {
  pointer-events: none;
}

.edge-group:not(.preview):hover .edge-path {
  stroke: url("#ruyiEdgeGradient");
  stroke-width: 3.1;
  filter:
    drop-shadow(0 0 7px rgba(54, 191, 255, 0.44))
    drop-shadow(0 0 12px rgba(247, 200, 90, 0.36));
}

.edge-cut-button {
  cursor: pointer;
  opacity: 0;
  pointer-events: all;
  transform-box: fill-box;
  transition: opacity 140ms ease, transform 140ms ease;
}

.edge-group:not(.preview):hover .edge-cut-button,
.edge-cut-button:hover {
  opacity: 1;
}

.edge-cut-button circle {
  fill: rgba(6, 8, 13, 0.96);
  stroke: rgba(230, 199, 143, 0.58);
  stroke-width: 1.5;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.42));
}

.edge-cut-button:hover circle {
  fill: var(--ruyi-gold);
  stroke: var(--ruyi-gold);
}

.edge-cut-button text {
  fill: var(--soft);
  font-size: 14px;
  pointer-events: none;
  user-select: none;
}

.edge-cut-button:hover text {
  fill: #130f08;
}

.node-layer {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}

.floating-panel,
.tool-dock,
.task-tray,
.asset-drawer,
.zoom-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(24, 26, 31, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tool-dock {
  position: absolute;
  z-index: 10;
  left: 16px;
  top: 94px;
  display: grid;
  gap: 7px;
  width: 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tool-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 48px;
  padding: 5px 3px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--soft);
}

.tool-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(56, 183, 167, 0.15);
  color: var(--teal);
  font-weight: 900;
}

.tool-button small {
  font-size: 10px;
  color: var(--muted);
}

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

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.field-label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
  color: var(--text);
  outline: none;
}

input,
select {
  min-height: 40px;
  padding: 0 11px;
}

textarea {
  min-height: 128px;
  padding: 11px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101216;
}

.segmented button {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.segmented button.active {
  background: var(--panel-3);
  color: var(--text);
}

.primary-button,
.ghost-button,
.text-button,
.icon-button,
.chip {
  padding: 0 14px;
}

.ghost-button,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(32, 35, 42, 0.9);
  color: var(--soft);
}

.text-button {
  background: transparent;
  color: var(--teal);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.button-row {
  margin-bottom: 12px;
}

.button-row .primary-button {
  flex: 1;
}

.node-card {
  position: absolute;
  z-index: 1;
  width: 360px;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 33, 40, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  user-select: none;
  cursor: grab;
}

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

.node-card.selected {
  z-index: 20;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(56, 183, 167, 0.18), 0 18px 46px rgba(0, 0, 0, 0.38);
}

.node-card.connecting {
  z-index: 21;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 161, 58, 0.18), 0 18px 46px rgba(0, 0, 0, 0.36);
}

.node-card.visual-node {
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.node-card.visual-node.selected,
.node-card.visual-node.connecting {
  border-color: transparent;
  box-shadow: none;
}

.node-card.visual-node:not(.visual-expanded) {
  width: 360px;
}

.node-card.visual-expanded {
  width: min(760px, calc(100vw - 148px));
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.node-card.visual-expanded.selected {
  border-color: transparent;
  box-shadow: none;
}

.node-card.visual-expanded .node-port {
  pointer-events: auto;
}

.node-card.visual-expanded.node-panel-open .node-port {
  opacity: 0;
  pointer-events: none;
}

.node-card.visual-expanded .node-result-shell {
  margin: 0;
}

.node-card.script-expanded {
  width: min(760px, calc(100vw - 148px));
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.node-card.script-expanded > .node-top {
  display: none;
}

.node-card.script-text-video {
  width: min(1180px, calc(100vw - 148px));
}

.node-card.script-workflow {
  width: min(1180px, calc(100vw - 148px));
}

.text-node-editor {
  display: grid;
  gap: 18px;
  cursor: default;
}

.text-node-choice-card {
  display: grid;
  gap: 16px;
  width: min(370px, 100%);
  min-height: 360px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(34, 35, 34, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.text-node-title-input {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  box-shadow: none;
}

.text-node-symbol {
  display: grid;
  justify-content: center;
  gap: 7px;
  padding: 22px 0 10px;
}

.text-node-symbol span {
  display: block;
  width: 58px;
  height: 6px;
  border-radius: 999px;
  background: rgba(243, 239, 230, 0.28);
}

.text-preset-list-label {
  color: var(--muted);
  font-size: 12px;
}

.text-preset-list {
  display: grid;
  gap: 8px;
}

.text-preset-list.compact {
  grid-template-columns: repeat(4, minmax(0, auto));
  align-items: center;
  gap: 6px;
}

.text-preset-choice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc";
  align-items: center;
  gap: 2px 9px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.text-preset-choice:hover,
.text-preset-choice.active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.text-preset-choice span {
  grid-area: icon;
  color: var(--soft);
  font-size: 15px;
}

.text-preset-choice b {
  grid-area: title;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-preset-choice small {
  grid-area: desc;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-preset-list.compact .text-preset-choice {
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 34px;
  padding: 5px 8px;
}

.text-preset-list.compact .text-preset-choice small {
  display: none;
}

.text-node-composer {
  display: grid;
  gap: 12px;
  min-height: 158px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(32, 35, 42, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.text-node-composer .prompt-rich-editor {
  min-height: 82px;
  max-height: 210px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.script-prompt-head,
.script-result-head,
.script-result-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.script-prompt-head,
.script-result-label {
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.script-result-label {
  justify-content: flex-start;
}

.script-prompt-head span,
.script-result-label span {
  color: var(--ruyi-gold);
}

.script-result-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(32, 35, 42, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.script-result-head {
  justify-content: space-between;
}

.script-result-head .node-title-input {
  flex: 1 1 auto;
  min-width: 0;
}

.script-result-head b {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-result-editor .prompt-rich-editor {
  min-height: 230px;
  max-height: 360px;
}

.script-result-generating {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 230px;
  border: 1px solid rgba(230, 199, 143, 0.18);
  border-radius: 10px;
  background: rgba(9, 10, 12, 0.86);
  color: var(--text);
  text-align: center;
}

.script-result-generating span {
  font-size: 18px;
  font-weight: 900;
}

.script-result-generating small {
  color: rgba(243, 239, 230, 0.52);
}

.script-result-generating em {
  color: rgba(243, 239, 230, 0.54);
  font-style: normal;
  font-size: 10px;
  font-weight: 850;
}

.script-generator-card {
  display: grid;
  gap: 12px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(32, 35, 42, 0.96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.script-generator-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.script-generator-head .node-title-input {
  flex: 1 1 auto;
  min-width: 0;
}

.script-generator-head b {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.script-generator-card .prompt-rich-editor {
  min-height: 180px;
  max-height: 320px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(9, 10, 12, 0.86);
}

.script-generator-footer {
  align-items: center;
  flex-wrap: wrap;
}

.script-mode-tabs {
  flex: 1 1 360px;
  min-width: 260px;
}

.image-reverse-simple-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.48fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.image-reverse-simple-grid .script-image-upload-card {
  min-height: 220px;
}

.text-node-footer,
.text-video-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.text-to-video-editor {
  gap: 10px;
}

.text-video-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.script-workflow-status {
  color: rgba(243, 239, 230, 0.62);
  font-size: 12px;
  font-weight: 850;
}

.text-video-combo {
  display: grid;
  grid-template-columns: minmax(260px, 0.62fr) minmax(420px, 1fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(37, 38, 38, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.image-reverse-combo {
  grid-template-columns: minmax(260px, 0.58fr) 34px minmax(420px, 1fr);
  align-items: stretch;
}

.image-reverse-flow {
  display: grid;
  place-items: center;
  min-height: 100%;
}

.image-reverse-flow span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(230, 199, 143, 0.4);
  border-radius: 999px;
  background: rgba(230, 199, 143, 0.12);
  color: var(--ruyi-gold);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(230, 199, 143, 0.14);
}

.text-video-source,
.text-video-result {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.text-video-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.text-video-source .prompt-rich-editor {
  min-height: 208px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(9, 10, 12, 0.86);
  color: var(--text);
  font-weight: 850;
}

.script-video-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 45%),
    rgba(34, 34, 33, 0.96);
  overflow: hidden;
}

.script-video-preview small {
  color: var(--muted);
  font-size: 12px;
}

.text-video-result .result-stage {
  margin: 0;
}

.text-video-result .result-stage header {
  display: none;
}

.text-video-result .result-frame {
  width: 100% !important;
  max-width: none;
}

.script-video-play {
  color: rgba(243, 239, 230, 0.3);
  font-size: 54px;
}

.script-image-upload-card {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 250px;
  padding: 18px;
  border: 1px dashed rgba(230, 199, 143, 0.34);
  border-radius: 12px;
  background: rgba(9, 10, 12, 0.74);
  color: var(--soft);
  text-align: center;
}

.script-image-upload-card:hover {
  border-color: rgba(230, 199, 143, 0.68);
  background: rgba(230, 199, 143, 0.08);
}

.script-image-upload-card span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(230, 199, 143, 0.12);
  color: var(--ruyi-gold);
  font-size: 26px;
  font-weight: 900;
}

.script-image-upload-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 9px;
  object-fit: cover;
}

.script-image-upload-card b {
  color: var(--text);
  font-size: 14px;
}

.script-image-upload-card small,
.script-audio-preview small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.script-audio-preview {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 250px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 18%, rgba(230, 199, 143, 0.14), transparent 34%),
    rgba(9, 10, 12, 0.76);
  text-align: center;
}

.script-audio-preview > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(230, 199, 143, 0.12);
  color: var(--ruyi-gold);
  font-size: 30px;
}

.script-audio-preview b {
  color: var(--text);
  font-size: 15px;
}

.script-audio-preview div {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 34px;
}

.script-audio-preview i {
  display: block;
  width: 7px;
  height: 14px;
  border-radius: 999px;
  background: rgba(230, 199, 143, 0.56);
}

.script-audio-preview i:nth-child(2) {
  height: 26px;
}

.script-audio-preview i:nth-child(3) {
  height: 19px;
}

.script-audio-preview i:nth-child(4) {
  height: 31px;
}

.script-audio-preview i:nth-child(5) {
  height: 22px;
}

.text-video-footer {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(32, 35, 42, 0.96);
}

.node-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.node-type-label {
  color: var(--soft);
  font-size: 13px;
  font-weight: 850;
}

.node-top .node-status {
  margin-left: auto;
}

.node-type {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #07110f;
  font-weight: 900;
}

.node-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.node-card p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.node-model-summary {
  display: inline-flex;
  max-width: calc(100% - 24px);
  margin-top: 10px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.node-status {
  color: var(--muted);
  font-size: 12px;
}

.node-port {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 16px;
  height: 16px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: #0d0f12;
  cursor: crosshair;
  box-shadow: 0 0 0 5px rgba(56, 183, 167, 0.08);
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease, opacity 120ms ease;
  transform: translateY(-50%);
}

.node-port-in {
  left: -9px;
  right: auto;
  border-color: var(--blue);
  box-shadow: 0 0 0 5px rgba(110, 158, 234, 0.08);
}

.node-port-out {
  left: auto;
  right: -9px;
}

.node-port:hover {
  background: var(--teal);
  box-shadow: 0 0 0 7px rgba(56, 183, 167, 0.16);
  transform: translateY(-50%) scale(1.08);
}

.node-port-in:hover {
  background: var(--blue);
  box-shadow: 0 0 0 7px rgba(110, 158, 234, 0.16);
}

.node-editor {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 180px);
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  user-select: text;
  cursor: default;
}

.node-card.script-expanded .node-editor {
  max-height: none;
  padding-right: 0;
  overflow: visible;
}

.visual-node-editor {
  gap: 10px;
  max-height: none;
  padding-right: 0;
  overflow: visible;
  pointer-events: none;
}

.node-result-shell {
  display: grid;
  gap: 7px;
  width: min(360px, 100%);
  margin: 0 auto;
  user-select: text;
  pointer-events: auto;
}

.visual-title-label {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.visual-title-input {
  min-height: 28px;
  padding: 0 6px;
  border-color: transparent;
  background: transparent !important;
  color: var(--soft);
  text-align: center;
}

.visual-title-input:focus {
  border-color: var(--line);
  background: rgba(17, 19, 24, 0.86) !important;
}

.node-control-drawer {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 35, 42, 0.98);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  pointer-events: auto;
}

.drawer-prompt-field textarea {
  min-height: 86px;
  max-height: 120px;
  resize: none;
}

.drawer-bottom-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(170px, 230px);
  align-items: end;
  gap: 8px;
}

.drawer-bottom-bar.image-bottom-bar {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px);
}

.drawer-mode-row {
  display: flex;
  align-items: end;
  gap: 8px;
  min-width: 0;
}

.compact-select-pill,
.reference-mode-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--soft);
}

.compact-select-pill {
  flex: 1 1 170px;
  min-width: 150px;
  padding: 0 8px;
}

.compact-pill-icon,
.reference-mode-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.compact-select-pill select {
  min-height: 28px;
  padding: 0 20px 0 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.reference-mode-compact {
  position: relative;
  flex: 0 0 auto;
}

.reference-mode-button {
  padding: 0 10px 0 8px;
  white-space: nowrap;
}

.reference-mode-button b {
  font-size: 13px;
}

.reference-mode-button:hover,
.reference-mode-compact.open .reference-mode-button {
  border-color: var(--teal);
  color: var(--text);
}

.reference-mode-popover {
  position: absolute;
  z-index: 96;
  left: 0;
  bottom: calc(100% + 10px);
  display: none;
  width: 210px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
}

.reference-mode-compact.open .reference-mode-popover {
  display: grid;
  gap: 4px;
}

.reference-mode-choice {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 7px 8px;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.reference-mode-choice:hover,
.reference-mode-choice.active {
  background: rgba(255, 255, 255, 0.07);
}

.reference-mode-choice span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--teal);
  font-weight: 900;
}

.reference-mode-choice b,
.reference-mode-choice small {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-mode-choice b {
  font-size: 12px;
}

.reference-mode-choice small {
  color: var(--muted);
  font-size: 10px;
}

.image-preset-popover {
  width: min(760px, calc(100vw - 40px));
  max-height: min(650px, calc(100vh - 86px));
  padding: 10px;
  overflow: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 165, 179, 0.34) transparent;
}

.image-preset-section {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(230, 199, 143, 0.22);
  border-radius: 9px;
  background: rgba(7, 10, 17, 0.42);
}

.image-preset-section h4 {
  margin: 0 0 2px;
  color: rgba(243, 239, 230, 0.76);
  font-size: 12px;
  font-weight: 900;
}

.image-preset-popover .reference-mode-choice {
  min-height: 62px;
  padding: 9px 10px;
}

.image-preset-button {
  position: relative;
}

.image-preset-button.has-preset {
  padding-right: 28px;
}

.image-preset-active-dot {
  position: absolute;
  right: 18px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #55d8ff;
  box-shadow: 0 0 8px rgba(85, 216, 255, 0.72);
}

.image-preset-clear {
  position: absolute;
  z-index: 3;
  right: -7px;
  top: -7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 117, 117, 0.46);
  border-radius: 999px;
  background: rgba(7, 10, 17, 0.96);
  color: #ff7a7a;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.image-preset-clear:hover {
  border-color: #ff8585;
  background: rgba(255, 117, 117, 0.14);
}

.node-parameter-compact {
  position: relative;
  align-self: end;
}

.parameter-summary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-3);
  color: var(--soft);
  white-space: nowrap;
}

.parameter-summary-button:hover,
.node-parameter-compact.open .parameter-summary-button {
  border-color: var(--teal);
  color: var(--text);
}

.parameter-summary-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--teal);
}

.parameter-summary-icon i {
  display: block;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.parameter-summary-button b {
  font-size: 13px;
}

.parameter-summary-caret {
  color: var(--muted);
  font-size: 12px;
}

.parameter-popover {
  position: absolute;
  z-index: 95;
  left: 50%;
  bottom: calc(100% + 10px);
  display: none;
  width: min(470px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: visible;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
  transform: translateX(-50%);
}

.node-parameter-compact.open .parameter-popover {
  display: grid;
  gap: 13px;
}

.parameter-section {
  display: grid;
  gap: 8px;
}

.parameter-section-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ratio-choice-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.ratio-choice {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 62px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.ratio-choice:hover,
.ratio-choice.active {
  border-color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.ratio-choice-icon {
  display: block;
  width: 22px;
  max-height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.ratio-choice-icon.auto::after {
  content: "A";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 9px;
  font-weight: 900;
}

.ratio-choice b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.resolution-choice-row,
.audio-toggle-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

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

.resolution-choice,
.audio-toggle {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.resolution-choice:hover,
.audio-toggle:hover,
.resolution-choice.active,
.audio-toggle.active {
  border-color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.duration-slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.duration-slider-row input {
  --range-progress: 0%;
  appearance: none;
  width: 100%;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.duration-slider-row input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal) 0 var(--range-progress), rgba(244, 246, 248, 0.72) var(--range-progress) 100%);
}

.duration-slider-row input::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(56, 183, 167, 0.16);
}

.duration-slider-row input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(244, 246, 248, 0.72);
}

.duration-slider-row input::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--teal);
}

.duration-slider-row input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(56, 183, 167, 0.16);
}

.duration-slider-row span {
  color: var(--soft);
  font-size: 12px;
  text-align: right;
}

.seedance-duration-control {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.duration-auto-choice {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.duration-auto-choice:hover,
.duration-auto-choice.active {
  border-color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.seedance2-mode-popover {
  width: min(300px, calc(100vw - 24px));
}

.visual-node-editor .node-actions {
  position: static;
  grid-template-columns: minmax(0, 1fr) 38px;
  padding-top: 0;
  background: none;
}

.visual-node-editor .reference-panel {
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
}

.visual-node-editor .reference-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 74px;
  padding: 2px 4px 6px;
  overflow: visible;
}

.visual-node-editor .reference-item {
  flex: 0 0 72px;
}

.visual-node-editor .reference-add-card {
  flex: 0 0 72px;
}

.visual-node-editor .reference-preview small {
  display: none;
}

.visual-node-editor .reference-frame-slot .reference-preview small,
.visual-node-editor .reference-frame-slot.reference-add-card b,
.visual-node-editor .reference-frame-slot.reference-add-card small {
  display: block;
}

.visual-node-editor .reference-empty {
  flex: 1 1 auto;
  padding: 9px;
  text-align: left;
}

.node-card.visual-expanded .result-stage:not(.compact) .result-frame.ratio-9-16 {
  width: min(54%, 186px);
}

.node-card.visual-expanded .result-stage:not(.compact) .result-frame.ratio-4-5 {
  width: 72%;
}

.node-card.visual-expanded .result-stage:not(.compact) .result-frame.ratio-1-1 {
  width: 78%;
}

.node-editor::-webkit-scrollbar {
  width: 6px;
}

.node-editor::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.node-editor input,
.node-editor select,
.node-editor textarea {
  border-radius: 6px;
  background: #111318;
  font-size: 12px;
}

.node-editor textarea {
  min-height: 168px;
  resize: vertical;
}

.prompt-rich-editor {
  width: 100%;
  min-height: 168px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111318;
  color: var(--text);
  font-size: 12px;
  line-height: 1.65;
  outline: none;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}

.prompt-rich-editor:focus {
  border-color: var(--teal);
}

.prompt-rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}

.drawer-prompt-field .prompt-rich-editor {
  min-height: 86px;
  max-height: 120px;
}

.prompt-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 220px;
  min-height: 22px;
  margin: 0 8px 2px 0;
  padding: 2px 7px 2px 4px;
  border: 1px solid rgba(230, 199, 143, 0.34);
  border-radius: 6px;
  background: rgba(230, 199, 143, 0.12);
  color: var(--text);
  vertical-align: -5px;
  white-space: nowrap;
}

.prompt-preset-chip i {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  background: rgba(230, 199, 143, 0.18);
  color: var(--ruyi-gold);
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.prompt-preset-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 900;
}

.prompt-preset-ghost {
  color: rgba(243, 239, 230, 0.42);
  pointer-events: none;
}

.prompt-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 160px;
  min-height: 20px;
  margin: 0 2px;
  padding: 1px 5px 1px 2px;
  border: 1px solid rgba(56, 183, 167, 0.26);
  border-radius: 5px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--text);
  vertical-align: -4px;
  white-space: nowrap;
}

.prompt-mention-media,
.prompt-mention-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(13, 15, 18, 0.86);
  color: var(--teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.prompt-mention-media img,
.prompt-mention-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prompt-mention-media.is-audio {
  background: linear-gradient(135deg, rgba(75, 166, 204, 0.26), rgba(104, 87, 190, 0.24));
}

.reference-audio-zoom {
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 16px;
  background: radial-gradient(circle, rgba(75, 166, 204, 0.2), rgba(3, 10, 18, 0.96));
}

.reference-audio-zoom span {
  color: #8fd8ef;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.reference-audio-zoom audio { width: 100%; }

.prompt-mention-media .prompt-mention-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(2, 6, 10, 0.78);
  color: #fff;
  font-size: 6px;
  font-style: normal;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.prompt-mention-chip b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 850;
}

.prompt-field {
  position: relative;
  display: grid;
  gap: 6px;
}

.prompt-field-head,
.reference-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.prompt-label-tools {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.prompt-expand-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--soft);
  font-size: 16px;
}

.prompt-expand-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.camera-control {
  position: relative;
}

.camera-summary-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.camera-summary-button:hover,
.camera-control.open .camera-summary-button {
  border-color: var(--teal);
  color: var(--text);
}

.camera-summary-icon {
  position: relative;
  width: 16px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.camera-summary-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: -4px;
  width: 7px;
  height: 3px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.camera-summary-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 3px;
  width: 4px;
  height: 4px;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.camera-popover {
  position: absolute;
  z-index: 100;
  left: 0;
  top: calc(100% + 8px);
  display: none;
  width: min(520px, calc(100vw - 48px));
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.camera-control.open .camera-popover {
  display: grid;
  gap: 12px;
}

.camera-section {
  display: grid;
  gap: 8px;
}

.camera-section-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.camera-section-title {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.camera-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 8px;
}

.camera-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.camera-field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.camera-field select {
  min-height: 36px;
  font-size: 12px;
}

.camera-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.42);
}

.camera-meta b,
.camera-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.camera-meta b {
  color: var(--text);
}

.camera-meta span {
  color: var(--muted);
}

.camera-chip-grid,
.camera-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.camera-chip {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.camera-chip:hover,
.camera-chip.active {
  border-color: var(--teal);
  background: rgba(56, 183, 167, 0.1);
  color: var(--text);
}

.camera-iso-field {
  max-width: 160px;
}

.camera-prompt-preview {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(56, 183, 167, 0.22);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.55);
  color: var(--soft);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.camera-action-row {
  display: flex;
  justify-content: flex-end;
}

.camera-apply-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--teal);
  color: #07110f;
  font-size: 12px;
  font-weight: 900;
}

.camera-apply-button:hover {
  background: #63d1c4;
}

.character-library-control {
  position: relative;
}

.character-library-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.character-library-button:hover,
.character-library-control.open .character-library-button {
  border-color: var(--teal);
  color: var(--text);
}

.character-library-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
}

.character-library-popover {
  position: absolute;
  z-index: 102;
  left: 0;
  top: calc(100% + 8px);
  display: none;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.character-library-control.open .character-library-popover {
  display: grid;
  gap: 10px;
}

.character-library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.character-library-head div {
  display: grid;
  gap: 3px;
}

.character-library-head b {
  font-size: 14px;
}

.character-library-head span {
  color: var(--muted);
  font-size: 11px;
}

.character-library-upload-button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(56, 183, 167, 0.34);
  border-radius: 7px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.character-library-upload-button:hover {
  border-color: var(--teal);
  background: rgba(56, 183, 167, 0.2);
}

.character-library-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 18, 0.38);
}

.character-library-tab {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.character-library-tab:hover,
.character-library-tab.active {
  background: var(--panel-3);
  color: var(--text);
}

.character-library-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 165, 179, 0.34) transparent;
}

.character-library-list::-webkit-scrollbar {
  width: 6px;
}

.character-library-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(154, 165, 179, 0.34);
}

.node-card .material-library-popover {
  width: min(640px, calc(100vw - 32px));
}

.node-card .material-library-popover .character-library-head {
  align-items: start;
}

.node-card .material-library-popover .character-library-list {
  max-height: min(330px, calc(100vh - 260px));
  padding: 8px;
  border: 1px dashed rgba(154, 165, 179, 0.18);
  border-radius: 8px;
  background: rgba(7, 10, 17, 0.24);
}

.node-card .material-library-popover .character-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.node-card .material-library-popover .character-card-main {
  gap: 5px;
  padding: 5px;
}

.node-card .material-library-popover .character-card-main span {
  min-height: 34px;
}

.node-card .material-library-popover .character-card-main b {
  font-size: 11px;
}

.node-card .material-library-popover .character-card-main small {
  font-size: 10px;
}

.character-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 9px;
}

.character-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 18, 0.34);
  color: var(--soft);
  text-align: left;
  overflow: visible;
}

.character-card-main {
  display: grid;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 7px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.character-card:hover {
  border-color: var(--teal);
  background: rgba(56, 183, 167, 0.1);
  color: var(--text);
}

.character-card img,
.character-card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: #fff;
  object-fit: cover;
}

.character-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 20px;
  font-weight: 950;
}

.character-card span {
  display: grid;
  gap: 2px;
}

.character-card b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
}

.character-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.character-card-zoom {
  position: absolute;
  z-index: 80;
  left: 50%;
  top: calc(100% + 12px);
  display: grid;
  gap: 7px;
  width: min(520px, 78vw);
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(24, 26, 31, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.94);
  transform-origin: 50% 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.character-card:hover .character-card-zoom {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.character-card-zoom img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: #fff;
  object-fit: cover;
}

.character-card-zoom b {
  color: var(--text);
  font-size: 12px;
  text-align: center;
}

.character-favorite-button {
  position: absolute;
  z-index: 5;
  top: 7px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #16c7b7;
  font-size: 18px;
  line-height: 1;
  text-shadow:
    0 1px 0 #07110f,
    0 0 4px rgba(7, 9, 13, 0.98),
    0 2px 10px rgba(0, 0, 0, 0.86);
}

.character-favorite-button:hover,
.character-favorite-button.active {
  color: #ffb238;
}

.material-card .character-favorite-button {
  color: #e0a13a;
  text-shadow:
    0 0 5px rgba(4, 5, 8, 0.95),
    0 2px 9px rgba(0, 0, 0, 0.88);
}

.material-card .character-favorite-button:hover,
.material-card .character-favorite-button.active {
  color: #ffd077;
}

.floating-character-zoom {
  position: fixed;
  z-index: 500;
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(24, 26, 31, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  transform-origin: 50% 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.floating-character-zoom.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.floating-character-zoom img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: #fff;
  object-fit: cover;
}

.floating-character-zoom span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.floating-character-zoom b {
  color: var(--text);
  font-size: 13px;
}

.floating-character-zoom small {
  color: var(--muted);
  font-size: 11px;
}

.character-empty-state {
  display: grid;
  place-items: center;
  min-height: 170px;
  padding: 22px;
  border: 1px dashed rgba(154, 165, 179, 0.25);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.motion-control {
  position: relative;
}

.motion-summary-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
}

.motion-summary-button:hover,
.motion-control.open .motion-summary-button {
  border-color: var(--teal);
  color: var(--text);
}

.motion-summary-icon {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: rgba(56, 183, 167, 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.motion-popover {
  position: absolute;
  z-index: 101;
  left: -96px;
  top: calc(100% + 8px);
  display: none;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.motion-control.open .motion-popover {
  display: grid;
  gap: 10px;
}

.motion-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.motion-popover-head b {
  font-size: 14px;
}

.motion-popover-head span {
  color: var(--muted);
  font-size: 11px;
}

.motion-group-list,
.motion-group {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.motion-group-list {
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 165, 179, 0.34) transparent;
}

.motion-group-list::-webkit-scrollbar {
  width: 6px;
}

.motion-group-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(154, 165, 179, 0.34);
}

.motion-group-list::-webkit-scrollbar-track {
  background: transparent;
}

.motion-category-tabs {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 18, 0.38);
}

.motion-category-tab {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.motion-category-tab:hover,
.motion-category-tab.active {
  background: var(--panel-3);
  color: var(--text);
}

.motion-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
}

.motion-card {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 18, 0.34);
  color: var(--soft);
  text-align: center;
  overflow: visible;
}

.motion-card-main {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 6px;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: center;
}

.motion-card:hover,
.motion-card.active {
  border-color: var(--teal);
  background: rgba(56, 183, 167, 0.1);
  color: var(--text);
}

.motion-card b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.motion-favorite-button {
  position: absolute;
  z-index: 5;
  top: 5px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(244, 246, 248, 0.86);
  font-size: 17px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.motion-favorite-button:hover,
.motion-favorite-button.active {
  color: #e0a13a;
}

.motion-empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(154, 165, 179, 0.25);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.motion-preview-wrap {
  position: relative;
  display: block;
}

.motion-preview-float {
  position: absolute;
  z-index: 130;
  left: 50%;
  bottom: calc(100% + 12px);
  display: block;
  width: min(340px, 72vw);
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(24, 26, 31, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.94);
  transform-origin: 50% 100%;
  transition: opacity 140ms ease, transform 140ms ease;
}

.motion-card:hover .motion-preview-float {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.motion-preview-caption {
  display: block;
  padding-top: 7px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.motion-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  overflow: hidden;
  background: #0a0d11;
}

.motion-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.motion-preview::before {
  background:
    radial-gradient(circle at 50% 42%, transparent 0 46%, rgba(2, 4, 7, 0.2) 78%, rgba(2, 4, 7, 0.44) 100%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.13), transparent 24%, transparent 72%, rgba(56, 183, 167, 0.12));
  mix-blend-mode: screen;
  opacity: 0.26;
}

.motion-preview-large {
  aspect-ratio: 16 / 9;
}

.motion-preview-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.motion-scene-layer {
  position: absolute;
  inset: -18%;
  display: block;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.02), rgba(7, 9, 13, 0.18)),
    var(--motion-bg, url("assets/motion-preview-urban-person.png")) center / cover no-repeat;
  filter: blur(var(--motion-blur-a));
  transform-origin: var(--motion-origin, 50% 55%);
  animation: motionScene var(--motion-speed) cubic-bezier(0.22, 0.72, 0.18, 1) infinite both;
}

.motion-scene-start {
  --motion-bg: var(--motion-bg-start, url("assets/motion-preview-urban-person.png"));
  animation:
    motionScene var(--motion-speed) cubic-bezier(0.22, 0.72, 0.18, 1) infinite both,
    motionStartPlate var(--motion-speed) linear infinite both;
}

.motion-scene-end {
  --motion-bg: var(--motion-bg-end, var(--motion-bg-start, url("assets/motion-preview-urban-person.png")));
  opacity: 0;
  animation:
    motionScene var(--motion-speed) cubic-bezier(0.22, 0.72, 0.18, 1) infinite both,
    motionEndPlate var(--motion-speed) linear infinite both;
}

.motion-scene-layer .motion-sky,
.motion-scene-layer .motion-city,
.motion-scene-layer .motion-neon,
.motion-scene-layer .motion-street,
.motion-scene-layer .motion-person {
  display: none !important;
}

.motion-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(210, 230, 255, 0.24), transparent 24%),
    radial-gradient(circle at 20% 44%, rgba(56, 183, 167, 0.18), transparent 22%),
    linear-gradient(180deg, #263545 0%, #121922 60%, #080a0d 100%);
}

.motion-city {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 26%;
  height: 56%;
}

.motion-city i {
  position: absolute;
  bottom: 0;
  width: 16%;
  border-radius: 5px 5px 0 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 9px, rgba(56, 183, 167, 0.28) 10px 12px, transparent 13px 18px),
    linear-gradient(90deg, transparent 42%, rgba(224, 161, 58, 0.45) 44% 48%, transparent 50%),
    linear-gradient(180deg, #344558, #111820);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.motion-city i:nth-child(1) {
  left: 0;
  height: 60%;
}

.motion-city i:nth-child(2) {
  left: 18%;
  height: 86%;
}

.motion-city i:nth-child(3) {
  left: 42%;
  height: 72%;
}

.motion-city i:nth-child(4) {
  right: 18%;
  height: 92%;
}

.motion-city i:nth-child(5) {
  right: 0;
  height: 64%;
}

.motion-street {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(90deg, transparent 0 46%, rgba(244, 246, 248, 0.22) 47% 53%, transparent 54%),
    linear-gradient(160deg, rgba(56, 183, 167, 0.22), transparent 34%),
    linear-gradient(180deg, #1c222b, #050608);
}

.motion-neon {
  position: absolute;
  bottom: 42%;
  width: 8px;
  height: 46px;
  border-radius: 999px;
  background: #df6e5d;
  box-shadow: 0 0 16px rgba(223, 110, 93, 0.72);
}

.motion-neon-left {
  left: 20%;
}

.motion-neon-right {
  right: 18%;
  background: #38b7a7;
  box-shadow: 0 0 16px rgba(56, 183, 167, 0.68);
}

.motion-rain {
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 10px);
  animation: motionRain 900ms linear infinite;
}

.motion-person {
  position: absolute;
  left: 50%;
  bottom: 17%;
  display: block;
  width: 50px;
  height: 92px;
  transform-origin: 50% 100%;
  animation: motionPerson var(--motion-speed) ease-in-out infinite alternate;
}

.motion-person::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 46px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(3px);
  transform: translateX(-50%);
}

.motion-head,
.motion-hair,
.motion-neck,
.motion-body,
.motion-arm,
.motion-leg {
  position: absolute;
  display: block;
  left: 50%;
  transform: translateX(-50%);
}

.motion-hair {
  top: 0;
  width: 29px;
  height: 31px;
  border-radius: 48% 48% 44% 44%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.75), transparent 18%),
    linear-gradient(180deg, #eef1f7, #b7bfcb 54%, #687381);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.motion-head {
  top: 9px;
  width: 19px;
  height: 22px;
  border-radius: 46% 46% 52% 52%;
  background: linear-gradient(180deg, #e8c5aa, #b77964);
}

.motion-head::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 9px;
  height: 3px;
  border-radius: 999px;
  background: rgba(13, 15, 18, 0.7);
}

.motion-head::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 15px;
  width: 5px;
  height: 2px;
  border-radius: 999px;
  background: rgba(80, 42, 38, 0.45);
  transform: translateX(-50%);
}

.motion-neck {
  top: 29px;
  width: 8px;
  height: 9px;
  border-radius: 999px;
  background: #b77964;
}

.motion-body {
  top: 35px;
  width: 34px;
  height: 40px;
  border-radius: 12px 12px 8px 8px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 30%),
    linear-gradient(135deg, #dce4ee, #747f8e 44%, #171b21);
  box-shadow: inset 0 -10px 0 rgba(13, 15, 18, 0.25);
}

.motion-body::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.motion-body::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background: rgba(7, 8, 10, 0.45);
}

.motion-arm {
  top: 39px;
  width: 6px;
  height: 31px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d5dce6, #707987);
}

.motion-arm-left {
  margin-left: -22px;
  transform: translateX(-50%) rotate(10deg);
}

.motion-arm-right {
  margin-left: 22px;
  transform: translateX(-50%) rotate(-10deg);
}

.motion-leg {
  top: 73px;
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8b96a3, #343a45);
}

.motion-leg-left {
  margin-left: -8px;
}

.motion-leg-right {
  margin-left: 8px;
}

.motion-direction {
  position: absolute;
  right: 8px;
  bottom: 7px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(9, 10, 13, 0.72);
  color: var(--teal);
  font-weight: 900;
}

.motion-apply-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(13, 15, 18, 0.38);
}

.motion-apply-section > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.motion-prompt-preview {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(56, 183, 167, 0.22);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.58);
  color: var(--soft);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.motion-apply-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--teal);
  color: #07110f;
  font-size: 12px;
  font-weight: 900;
}

.motion-apply-button:hover {
  background: #63d1c4;
}

@keyframes motionScene {
  0%,
  9% {
    filter: blur(var(--motion-blur-a));
    transform: translate(var(--motion-scene-x-a), var(--motion-scene-y-a)) scale(var(--motion-scene-scale-a)) rotate(var(--motion-scene-rotate-a));
  }
  84%,
  100% {
    filter: blur(var(--motion-blur-b));
    transform: translate(var(--motion-scene-x-b), var(--motion-scene-y-b)) scale(var(--motion-scene-scale-b)) rotate(var(--motion-scene-rotate-b));
  }
}

@keyframes motionStartPlate {
  0%,
  56% {
    opacity: 1;
  }
  82%,
  100% {
    opacity: 0;
  }
}

@keyframes motionEndPlate {
  0%,
  52% {
    opacity: 0;
  }
  82%,
  100% {
    opacity: 1;
  }
}

@keyframes motionFrameTexture {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(4px);
  }
}

@keyframes motionPerson {
  from {
    transform: translate(var(--motion-person-x-a), var(--motion-person-y-a)) translateX(-50%) scale(var(--motion-person-scale-a));
  }
  to {
    transform: translate(var(--motion-person-x-b), var(--motion-person-y-b)) translateX(-50%) scale(var(--motion-person-scale-b));
  }
}

@keyframes motionRain {
  from {
    transform: translateY(-10px);
  }
  to {
    transform: translateY(10px);
  }
}

.result-stage {
  display: grid;
  gap: 7px;
}

.result-stage > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  justify-self: center;
  gap: 10px;
  width: var(--result-frame-width, 100%);
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
}

.result-stage > header span {
  color: var(--soft);
  font-weight: 850;
}

.result-frame {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #090a0d;
}

.result-frame.ratio-9-16 {
  width: min(62%, 210px);
  aspect-ratio: 9 / 16;
}

.result-frame.ratio-1-1 {
  aspect-ratio: 1;
}

.result-frame.ratio-4-5 {
  width: 82%;
  aspect-ratio: 4 / 5;
}

.result-frame img,
.result-frame video,
.mock-result {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node-card img,
.node-card video {
  -webkit-user-drag: none;
  user-select: none;
}

.result-empty,
.mock-result {
  display: grid;
  place-content: center;
  gap: 6px;
  text-align: center;
}

.result-empty {
  color: var(--soft);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
}

.result-empty small,
.mock-result small {
  color: var(--muted);
  font-size: 10px;
  max-width: min(92%, 520px);
  overflow-wrap: anywhere;
  text-align: center;
}

.mock-result {
  background: linear-gradient(135deg, var(--result-a), var(--result-b));
  color: #fff;
}

.mock-result span {
  font-size: 24px;
  font-weight: 900;
}

.result-play {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(9, 10, 13, 0.74);
  color: #fff;
}

.result-stage.compact .result-frame {
  max-height: 150px;
}

.result-stage.compact .result-frame.ratio-9-16 {
  width: 38%;
  max-height: 190px;
}

.mention-menu {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  max-height: 240px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow-y: auto;
  background: rgba(24, 26, 31, 0.99);
  box-shadow: var(--shadow);
}

.mention-menu.open {
  display: grid;
  gap: 4px;
}

.mention-menu button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.mention-menu button.active,
.mention-menu button:hover {
  background: var(--panel-3);
}

.mention-menu img,
.mention-menu button > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 5px;
  object-fit: cover;
  background: rgba(56, 183, 167, 0.14);
  color: var(--teal);
}

.mention-menu b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.source-media {
  display: grid;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #090a0d;
}

.source-media.compact {
  min-height: 112px;
  margin-bottom: 10px;
}

.source-media img,
.source-media video {
  width: 100%;
  height: 210px;
  object-fit: contain;
}

.source-media.compact img,
.source-media.compact video {
  height: 140px;
}

.audio-source {
  align-content: center;
  gap: 10px;
  padding: 14px;
  color: var(--muted);
  font-size: 12px;
}

.audio-source audio {
  width: 100%;
}

.source-media-missing {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.reference-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.55);
}

.reference-head b {
  color: var(--teal);
}

.reference-head small {
  max-width: 62%;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.seedance-reference-head {
  flex-wrap: wrap;
  gap: 7px 12px;
}

.seedance-reference-head > span {
  flex: 0 0 auto;
  color: var(--soft);
  font-size: 12px;
  font-weight: 850;
}

.seedance-reference-counts {
  display: flex;
  flex: 1 1 210px;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.seedance-reference-counts b {
  padding: 4px 7px;
  border: 1px solid rgba(56, 183, 167, 0.22);
  border-radius: 999px;
  background: rgba(56, 183, 167, 0.08);
  color: var(--soft);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.visual-node-editor .seedance-reference-grid {
  min-height: 82px;
  padding-inline: 0;
}

.visual-node-editor .seedance-reference-item,
.visual-node-editor .seedance-upload-card {
  flex-basis: 76px;
}

.seedance-reference-kind {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.86);
  color: rgba(245, 247, 251, 0.92);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  pointer-events: none;
}

.seedance-reference-kind.is-image { box-shadow: inset 0 0 0 1px rgba(96, 208, 255, 0.48); }
.seedance-reference-kind.is-video { box-shadow: inset 0 0 0 1px rgba(244, 193, 92, 0.55); }
.seedance-reference-kind.is-audio { box-shadow: inset 0 0 0 1px rgba(161, 130, 255, 0.58); }

.seedance-reference-hint {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.seedance-mode-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 70px;
  padding: 11px 12px;
  border: 1px dashed rgba(56, 183, 167, 0.28);
  border-radius: 8px;
  background: rgba(56, 183, 167, 0.045);
}

.seedance-mode-empty > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(56, 183, 167, 0.36);
  border-radius: 8px;
  color: var(--teal);
  font-weight: 900;
}

.seedance-mode-empty > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.seedance-mode-empty b {
  color: var(--soft);
  font-size: 12px;
}

.seedance-mode-empty small,
.seedance-4k-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.seedance-saved-references {
  display: grid;
  gap: 9px;
  min-width: 0;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 193, 92, 0.34);
  border-radius: 8px;
  background: rgba(244, 193, 92, 0.06);
}

.seedance-saved-references > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.seedance-saved-references b {
  color: rgba(255, 229, 176, 0.94);
  font-size: 11px;
}

.seedance-saved-references small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.seedance-saved-reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.seedance-saved-reference-actions button {
  max-width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid rgba(244, 193, 92, 0.38);
  border-radius: 7px;
  background: rgba(244, 193, 92, 0.08);
  color: rgba(255, 235, 194, 0.94);
  font: inherit;
  font-size: 10px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.seedance-saved-reference-actions button:hover {
  border-color: rgba(244, 193, 92, 0.72);
  background: rgba(244, 193, 92, 0.14);
}

.seedance-4k-note {
  display: block;
  margin-top: 7px;
  color: rgba(244, 193, 92, 0.86);
}

.visual-node-editor .seedance-first-frame-grid {
  flex-wrap: nowrap;
}

.reference-grid-first-last,
.reference-grid-smart-multi {
  align-items: center;
}

.reference-grid-first-last {
  gap: 12px;
}

.reference-grid-smart-multi {
  gap: 8px;
}

.reference-item {
  position: relative;
  min-width: 0;
}

.reference-item:hover {
  z-index: 80;
}

.reference-preview {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #111318;
  color: var(--muted);
}

.reference-add-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: rgba(13, 15, 18, 0.34);
  color: var(--muted);
  text-align: center;
}

.reference-add-card:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(56, 183, 167, 0.08);
}

.reference-add-card:disabled {
  opacity: 0.45;
}

.reference-add-card span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(56, 183, 167, 0.12);
  font-size: 20px;
  font-weight: 900;
}

.reference-add-card b {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.reference-add-card small {
  color: var(--muted);
  font-size: 9px;
}

.reference-frame-slot {
  flex: 0 0 76px !important;
}

.reference-frame-slot .reference-preview {
  min-height: 76px;
}

.reference-frame-slot .reference-preview small {
  display: block;
  padding: 4px 3px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.reference-frame-slot.reference-add-card {
  min-height: 76px;
}

.reference-flow-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 28px;
  border: 1px solid rgba(56, 183, 167, 0.3);
  border-radius: 999px;
  background: rgba(56, 183, 167, 0.08);
  color: var(--teal);
  font-size: 18px;
  font-weight: 900;
}

.reference-flow-arrow-bidirectional {
  flex-basis: 44px;
  width: 44px;
}

.reference-flow-arrow-single {
  font-size: 16px;
}

.reference-preview img,
.reference-preview video,
.reference-placeholder {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.reference-zoom-preview {
  position: absolute;
  z-index: 90;
  left: 50%;
  bottom: calc(100% + 10px);
  display: grid;
  place-items: center;
  width: var(--reference-zoom-width, 190px);
  max-width: 46vw;
  max-height: 320px;
  aspect-ratio: var(--reference-aspect, 1 / 1);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: #090a0d;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.94);
  transform-origin: 50% 100%;
  transition: opacity 140ms ease, transform 140ms ease;
}

.reference-item:hover .reference-zoom-preview {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.reference-zoom-preview img,
.reference-zoom-preview video,
.reference-zoom-preview .reference-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-zoom-preview .reference-video-badge {
  top: 50%;
}

.reference-video-badge {
  position: absolute;
  left: 50%;
  top: 34%;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(9, 10, 13, 0.78);
  color: #fff;
  font-size: 10px;
  transform: translate(-50%, -50%);
}

.reference-placeholder {
  display: grid;
  place-items: center;
  background: rgba(56, 183, 167, 0.14);
  color: var(--teal);
  font-weight: 900;
}

.reference-preview small {
  display: block;
  padding: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.reference-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(9, 10, 13, 0.86);
  color: #ff9184;
}

.reference-empty {
  grid-column: 1 / -1;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.node-title-input {
  min-height: 36px;
  color: var(--text);
  font-size: 15px !important;
  font-weight: 850;
}

.node-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.node-field > span,
.asset-file-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.node-parameter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.node-actions {
  position: sticky;
  z-index: 12;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(30, 33, 40, 0), rgba(30, 33, 40, 0.98) 32%);
}

.node-actions button {
  min-height: 36px;
  border-radius: 6px;
  font-weight: 850;
}

.node-generate,
.node-upload-button {
  background: var(--teal);
  color: #07110f;
}

.node-icon-action {
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--soft);
  font-size: 18px;
}

.node-icon-action.danger {
  color: #ff9184;
}

.local-upload {
  position: relative;
  display: grid;
  min-height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  background: #111318;
  cursor: pointer;
}

.local-upload:hover {
  border-color: var(--teal);
}

.local-upload img,
.local-upload video {
  width: 100%;
  height: 176px;
  object-fit: contain;
  background: #090a0d;
}

.node-file-input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-placeholder {
  display: grid;
  place-content: center;
  gap: 7px;
  text-align: center;
}

.upload-placeholder strong {
  font-size: 14px;
}

.upload-placeholder span,
.audio-preview span {
  color: var(--muted);
  font-size: 12px;
}

.audio-preview {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 16px;
}

.audio-preview audio {
  width: 100%;
}

.context-menu {
  position: fixed;
  z-index: 30;
  display: none;
  grid-template-columns: 1fr;
  gap: 4px;
  width: 176px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(24, 26, 31, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.context-menu.open {
  display: grid;
}

.context-menu button {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.context-menu button:hover {
  background: var(--panel-3);
}

.context-menu button span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(56, 183, 167, 0.15);
  color: var(--teal);
  font-weight: 900;
}

.script .node-type {
  background: var(--amber);
}

.image .node-type {
  background: var(--teal);
}

.video .node-type {
  background: var(--coral);
}

.audio .node-type {
  background: var(--green);
}

.character .node-type {
  background: var(--blue);
}

.review .node-type {
  background: var(--violet);
}

.asset .node-type {
  background: #f4f6f8;
}

.zoom-panel {
  position: absolute;
  z-index: 10;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}

.canvas-utility-dock {
  position: absolute;
  z-index: 14;
  left: 50%;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(24, 26, 31, 0.92);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

.utility-button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 48px;
  min-height: 42px;
  padding: 5px 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--soft);
}

.utility-button span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: var(--soft);
  font-size: 16px;
  font-weight: 900;
}

.utility-button small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.utility-button:hover,
.utility-button.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.utility-button.active span {
  color: var(--teal);
}

.canvas-bottom-panel {
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: 76px;
  display: none;
  width: min(860px, calc(100vw - 64px));
  max-height: min(620px, calc(100vh - 128px));
  transform: translateX(-50%);
}

.canvas-bottom-panel.open {
  display: block;
}

.canvas-bottom-panel.history-panel {
  left: 102px;
  bottom: 110px;
  width: min(560px, calc(100vw - 140px));
  transform: none;
}

.canvas-bottom-panel .character-library-popover {
  position: static;
  display: grid;
  gap: 10px;
  width: 100%;
  max-height: inherit;
}

.canvas-bottom-panel .character-library-list {
  max-height: min(430px, calc(100vh - 276px));
}

.canvas-info-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(32, 35, 42, 0.99);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48);
}

.canvas-info-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.canvas-info-panel h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.canvas-info-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  font-weight: 900;
}

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

.canvas-info-item {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(13, 15, 18, 0.34);
}

.canvas-info-item b {
  color: var(--text);
  font-size: 13px;
}

.canvas-info-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.generation-history-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(137, 157, 185, 0.38);
  border-radius: 16px;
  color: #f4efe6;
  background:
    radial-gradient(circle at 12% 10%, rgba(79, 151, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(9, 20, 34, 0.98), rgba(3, 7, 13, 0.98));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.48),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.generation-history-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generation-history-panel h3 {
  margin: 0;
  font: 900 17px / 1.2 var(--font-sans);
}

.generation-history-panel header span {
  display: block;
  margin-top: 5px;
  color: rgba(235, 243, 255, 0.62);
  font: 600 12px / 1.35 var(--font-sans);
}

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

.generation-history-tabs button {
  height: 34px;
  border: 1px solid rgba(137, 157, 185, 0.32);
  border-radius: 10px;
  color: rgba(244, 239, 230, 0.76);
  background: rgba(255, 255, 255, 0.035);
  font: 800 13px / 1 var(--font-sans);
  cursor: pointer;
}

.generation-history-tabs button.active,
.generation-history-tabs button:hover {
  border-color: rgba(247, 200, 90, 0.58);
  color: #fff4cc;
  background: rgba(247, 200, 90, 0.12);
}

.generation-history-list {
  display: grid;
  gap: 10px;
  max-height: min(440px, calc(100vh - 280px));
  overflow: auto;
  padding-right: 3px;
}

.generation-history-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(137, 157, 185, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.generation-history-preview {
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(137, 157, 185, 0.24);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.26);
}

.generation-history-preview img,
.generation-history-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02060a;
}

.generation-history-preview span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247, 200, 90, 0.46);
  border-radius: 10px;
  color: #ffe5a8;
  font-weight: 900;
}

.generation-history-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.generation-history-meta b,
.generation-history-meta span,
.generation-history-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-history-meta b {
  color: #fff7df;
  font: 900 14px / 1.25 var(--font-sans);
}

.generation-history-meta span,
.generation-history-meta small {
  color: rgba(226, 238, 255, 0.62);
  font: 700 12px / 1.3 var(--font-sans);
}

.generation-history-actions {
  display: grid;
  gap: 8px;
}

.generation-history-actions button {
  min-width: 58px;
  height: 30px;
  border: 1px solid rgba(137, 157, 185, 0.32);
  border-radius: 9px;
  color: rgba(244, 239, 230, 0.86);
  background: rgba(255, 255, 255, 0.04);
  font: 800 12px / 1 var(--font-sans);
  cursor: pointer;
}

.generation-history-actions button:hover {
  border-color: rgba(247, 200, 90, 0.58);
  color: #fff4cc;
}

.generation-history-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.generation-history-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 20px;
  border: 1px dashed rgba(137, 157, 185, 0.3);
  border-radius: 14px;
  color: rgba(226, 238, 255, 0.68);
  text-align: center;
}

.generation-history-empty b {
  color: #fff7df;
  font-size: 15px;
}

.zoom-value {
  min-width: 58px;
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.task-tray {
  display: none;
  position: absolute;
  z-index: 10;
  left: auto;
  right: 16px;
  width: min(380px, calc(100vw - 128px));
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
}

.task-tray.empty {
  display: none;
}

.task-card {
  min-width: 210px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 18, 22, 0.88);
}

.task-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: #08090b;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--coral));
}

.task-meta,
.asset-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 12px;
}

.asset-drawer {
  position: absolute;
  z-index: 9;
  right: 16px;
  bottom: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 220px;
  padding: 12px;
  border-radius: 8px;
  overflow: auto;
}

.asset-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
}

.asset-row + .asset-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.asset-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--thumb-a), var(--thumb-b));
}

.asset-row b,
.asset-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  max-width: 340px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f4f6f8;
  color: #101114;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.visually-hidden {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.prompt-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(5, 6, 8, 0.76);
  backdrop-filter: blur(10px);
}

.prompt-modal.open {
  display: grid;
}

.prompt-modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 14px;
  width: min(1040px, 100%);
  height: min(760px, calc(100vh - 56px));
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #181a1f;
  box-shadow: var(--shadow);
}

.prompt-modal-toolbar,
.prompt-modal-footer {
  display: flex;
  align-items: end;
  gap: 10px;
}

.prompt-modal-toolbar {
  justify-content: space-between;
}

.prompt-modal-tabs {
  display: flex;
  gap: 6px;
}

.prompt-modal-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.prompt-modal-tabs button.active {
  border-color: var(--line-strong);
  background: var(--panel-3);
  color: var(--text);
}

.prompt-modal-footer {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.modal-field {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

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

.modal-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.prompt-modal-generate {
  min-width: 150px;
  min-height: 40px;
  margin-left: auto;
  border-radius: 8px;
  background: var(--teal);
  color: #07110f;
  font-weight: 900;
}

.prompt-modal-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.prompt-modal-panel h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.prompt-modal-rich-editor {
  min-height: 0;
  height: 100%;
  padding: 18px;
  font-size: 16px;
  line-height: 1.8;
  box-sizing: border-box;
}

.prompt-modal-references {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 92px;
  padding: 2px 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
}

.prompt-modal-references:empty {
  min-height: 0;
}

.prompt-modal.script-only .prompt-modal-toolbar,
.prompt-modal.script-only .prompt-modal-references,
.prompt-modal.script-only .modal-mention-menu {
  display: none;
}

.prompt-modal.script-only .prompt-modal-panel {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.prompt-modal.script-only .prompt-modal-rich-editor {
  min-height: min(58vh, 560px);
}

.prompt-modal-reference {
  position: relative;
  display: grid;
  grid-template-rows: 64px 16px;
  gap: 4px;
  flex: 0 0 76px;
  width: 76px;
  height: 90px;
  min-width: 76px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--soft);
  font-size: 12px;
  text-align: left;
  box-sizing: border-box;
}

.prompt-modal-reference:hover,
.prompt-modal-reference:focus-visible {
  z-index: 2;
  border-color: var(--line-strong);
  background: rgba(230, 199, 143, 0.12);
}

.prompt-modal-reference-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(56, 183, 167, 0.15);
  color: var(--teal);
  font-weight: 900;
}

.prompt-modal-reference-preview img,
.prompt-modal-reference-preview video,
.prompt-modal-reference-preview .reference-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.prompt-modal-reference-preview .reference-video-badge {
  top: 50%;
}

.prompt-modal-reference > b {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--soft);
  font-size: 11px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-modal-reference-zoom {
  position: absolute;
  z-index: 20;
  display: grid;
  place-items: center;
  max-width: min(46vw, 190px);
  max-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #090a0d;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.52);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.94);
  transition: opacity 140ms ease, transform 140ms ease;
}

.prompt-modal-reference-zoom.open {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.prompt-modal-reference-zoom img,
.prompt-modal-reference-zoom video,
.prompt-modal-reference-zoom .reference-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prompt-modal-reference-zoom .reference-video-badge {
  top: 50%;
}

.modal-reference-empty {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.modal-mention-menu {
  top: 172px;
  left: 18px;
  right: 18px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .logic-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-tray {
    right: 16px;
  }

  .asset-drawer {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .site-nav {
    display: none;
  }

  .nav-cta {
    padding: 10px 12px;
  }

  .hero {
    min-height: 92vh;
    padding: 104px 18px 58px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .intro-strip,
  .module-section,
  .roadmap-section {
    padding: 48px 18px;
  }

  .intro-strip,
  .logic-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .canvas-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    left: 10px;
    right: 10px;
    top: 10px;
  }

  .canvas-topbar .brand-link {
    display: none;
  }

  .project-title-input {
    min-width: 0;
  }

  .tool-dock {
    left: 10px;
    top: 70px;
    width: 48px;
  }

  .tool-button {
    min-height: 44px;
  }

  .zoom-panel {
    left: 10px;
    bottom: 10px;
  }

  .canvas-utility-dock {
    bottom: 10px;
    max-width: calc(100vw - 112px);
    overflow-x: auto;
  }

  .utility-button {
    min-width: 40px;
  }

  .canvas-bottom-panel {
    bottom: 66px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 96px);
  }

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

  .node-card.visual-expanded {
    width: min(430px, calc(100vw - 28px));
  }

  .node-card.script-expanded,
  .node-card.script-workflow,
  .node-card.script-text-video {
    width: min(430px, calc(100vw - 28px));
  }

  .text-video-combo {
    grid-template-columns: 1fr;
  }

  .image-reverse-flow {
    min-height: 34px;
  }

  .image-reverse-flow span {
    transform: rotate(90deg);
  }

  .text-preset-list.compact {
    grid-template-columns: 1fr 1fr;
  }

  .text-node-footer,
  .text-video-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .drawer-bottom-bar {
    grid-template-columns: 1fr;
  }

  .drawer-mode-row {
    flex-wrap: wrap;
  }

  .compact-select-pill {
    flex: 1 1 100%;
  }

  .prompt-modal {
    padding: 10px;
  }

  .prompt-modal-panel {
    height: calc(100vh - 20px);
    padding: 13px;
  }


  .prompt-modal-toolbar,
  .prompt-modal-footer {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .modal-field {
    flex: 1 1 120px;
    min-width: 0;
  }

  .prompt-modal-generate {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .parameter-popover {
    width: min(470px, calc(100vw - 24px));
    max-height: min(72vh, 560px);
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .seedance-reference-counts {
    flex-basis: 100%;
    justify-content: flex-start;
    overflow: hidden;
  }

  .seedance-duration-control {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 8px;
  }
}

.ruyi-site,
.ruyi-canvas {
  background:
    radial-gradient(circle at 72% 14%, rgba(141, 184, 255, 0.18), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(230, 199, 143, 0.16), transparent 30%),
    #06080d;
  color: var(--text);
}

.ruyi-site {
  position: relative;
  min-height: 100vh;
}

.ruyi-site::before,
.ruyi-canvas .canvas-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(243, 239, 230, 0.92) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(141, 184, 255, 0.72) 0 1px, transparent 1.6px),
    linear-gradient(115deg, transparent 0 58%, rgba(230, 199, 143, 0.06) 59%, transparent 72%);
  background-size: 170px 170px, 260px 260px, 100% 100%;
  background-position: 18px 36px, 90px 120px, center;
  opacity: 0.38;
}

.ruyi-site::after,
.ruyi-canvas .canvas-app::after {
  content: "";
  position: fixed;
  left: -18vw;
  right: -18vw;
  bottom: -22vh;
  z-index: 0;
  height: 42vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(141, 184, 255, 0.18), transparent 58%),
    repeating-radial-gradient(ellipse at 50% 100%, transparent 0 22px, rgba(230, 199, 143, 0.13) 23px 24px, transparent 25px 52px);
  transform: rotate(-3deg);
  opacity: 0.7;
}

.ruyi-site main {
  position: relative;
  z-index: 1;
}

.brand-link {
  gap: 13px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 42px;
  border-radius: 0;
  background: transparent;
  color: transparent;
  isolation: isolate;
}

.brand-mark::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 32px;
  height: 25px;
  border: 7px solid transparent;
  border-top-color: var(--ruyi-gold);
  border-left-color: var(--ruyi-gold);
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(230, 199, 143, 0.4));
  transform: rotate(-28deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 5px;
  width: 40px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--ruyi-gold) 24%, #f5dfb6 56%, transparent);
  box-shadow: 0 0 14px rgba(230, 199, 143, 0.38);
  transform: skewX(-18deg);
}

.brand-link strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.05;
}

.brand-link small {
  margin-top: 4px;
  color: rgba(243, 239, 230, 0.72);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-header {
  min-height: 78px;
  padding: 0 48px;
  border-bottom: 1px solid rgba(230, 199, 143, 0.18);
  background:
    linear-gradient(180deg, rgba(6, 8, 13, 0.92), rgba(6, 8, 13, 0.66)),
    rgba(6, 8, 13, 0.78);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.28);
}

.site-nav {
  gap: 32px;
  color: rgba(243, 239, 230, 0.76);
}

.site-nav a {
  position: relative;
  padding: 8px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ruyi-gold), transparent);
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.site-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 999px;
  color: var(--soft);
  font-weight: 800;
}

.nav-cta,
.primary-link,
.primary-button,
.node-generate,
.node-upload-button,
.prompt-modal-generate,
.camera-apply-button,
.motion-apply-button {
  border: 1px solid rgba(255, 235, 192, 0.55);
  background:
    linear-gradient(180deg, #ffe2ab 0%, var(--ruyi-gold) 46%, #b98745 100%);
  color: #13100b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 24px rgba(230, 199, 143, 0.28);
}

.nav-cta {
  border-radius: 999px;
}

.nav-cta:hover,
.primary-link:hover,
.primary-button:hover,
.node-generate:hover,
.node-upload-button:hover,
.prompt-modal-generate:hover,
.camera-apply-button:hover,
.motion-apply-button:hover {
  background:
    linear-gradient(180deg, #fff0cb 0%, #eecf96 48%, #c19251 100%);
  transform: translateY(-1px);
}

.secondary-link,
.ghost-button,
.chip,
.icon-button,
.text-button {
  border-color: rgba(230, 199, 143, 0.2);
  background:
    linear-gradient(180deg, rgba(22, 35, 63, 0.78), rgba(8, 12, 20, 0.82));
  color: var(--soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.secondary-link:hover,
.ghost-button:hover,
.chip:hover,
.icon-button:hover,
.text-button:hover {
  border-color: rgba(230, 199, 143, 0.52);
  color: var(--text);
}

.landing-page main {
  background: transparent;
}

.ruyi-hero {
  min-height: 94vh;
  padding: 126px 7vw 120px;
}

.hero-media {
  background:
    linear-gradient(90deg, rgba(6, 8, 13, 0.98) 0%, rgba(6, 8, 13, 0.88) 42%, rgba(6, 8, 13, 0.42) 100%),
    radial-gradient(circle at 76% 26%, rgba(141, 184, 255, 0.34), transparent 22%),
    radial-gradient(circle at 65% 62%, rgba(230, 199, 143, 0.18), transparent 26%),
    linear-gradient(160deg, #06080d, #10192d 58%, #06080d);
  opacity: 1;
}

.ruyi-orbit {
  position: absolute;
  right: -10vw;
  top: 15vh;
  width: min(720px, 58vw);
  aspect-ratio: 1;
  border: 1px solid rgba(230, 199, 143, 0.12);
  border-radius: 50%;
  box-shadow:
    inset 0 0 60px rgba(141, 184, 255, 0.1),
    0 0 80px rgba(230, 199, 143, 0.08);
  pointer-events: none;
  transform: rotate(-18deg);
}

.ruyi-orbit::before,
.ruyi-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border-top: 3px solid rgba(230, 199, 143, 0.72);
  border-right: 1px solid rgba(141, 184, 255, 0.32);
  filter: drop-shadow(0 0 16px rgba(230, 199, 143, 0.5));
}

.ruyi-orbit::after {
  inset: 24%;
  border-top-color: rgba(141, 184, 255, 0.78);
  border-right-color: rgba(230, 199, 143, 0.28);
  transform: rotate(34deg);
}

.hero-copy {
  width: min(840px, 100%);
}

.eyebrow,
.mini-label {
  color: var(--ruyi-gold);
  letter-spacing: 0.08em;
}

.hero h1 {
  max-width: 760px;
  color: var(--text);
  font-size: 70px;
  line-height: 1.05;
  text-shadow: 0 0 28px rgba(243, 239, 230, 0.12);
}

.hero p {
  max-width: 650px;
  color: rgba(243, 239, 230, 0.76);
  font-size: 18px;
  line-height: 1.85;
}

.hero-prompt-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  width: min(760px, 100%);
  margin-top: 34px;
  padding: 18px;
  border: 1px solid rgba(230, 199, 143, 0.45);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(16, 25, 43, 0.82), rgba(6, 8, 13, 0.82)),
    rgba(6, 8, 13, 0.78);
  box-shadow:
    0 0 0 1px rgba(243, 239, 230, 0.03),
    0 22px 90px rgba(0, 0, 0, 0.5),
    0 0 46px rgba(230, 199, 143, 0.12);
  backdrop-filter: blur(18px);
}

.prompt-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(230, 199, 143, 0.45);
  border-radius: 50%;
  color: var(--ruyi-gold);
  box-shadow: var(--gold-glow);
}

.hero-prompt-card textarea {
  min-height: 96px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(243, 239, 230, 0.82);
  resize: none;
}

.prompt-card-footer {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(243, 239, 230, 0.42);
  font-size: 12px;
}

.hero-feature-row {
  position: absolute;
  left: 7vw;
  right: 7vw;
  bottom: 34px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-feature-row a,
.logic-grid article,
.module-grid article,
.roadmap-section,
.intro-strip {
  border: 1px solid rgba(230, 199, 143, 0.18);
  background:
    linear-gradient(180deg, rgba(22, 35, 63, 0.5), rgba(6, 8, 13, 0.7)),
    rgba(6, 8, 13, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.hero-feature-row a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 74px;
  padding: 12px;
  border-radius: 14px;
}

.hero-feature-row span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(230, 199, 143, 0.12);
  color: var(--ruyi-gold);
  font-size: 12px;
  font-weight: 900;
}

.hero-feature-row b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-feature-row a:hover,
.logic-grid article:hover,
.module-grid article:hover {
  border-color: rgba(230, 199, 143, 0.48);
  box-shadow: var(--gold-glow);
}

.ruyi-section {
  position: relative;
  border-top: 1px solid rgba(230, 199, 143, 0.16);
  background: transparent;
}

.intro-strip {
  margin: 0 7vw 54px;
  padding: 42px;
  border-radius: 20px;
}

.intro-strip > div:first-child span,
.module-grid article span {
  color: var(--ruyi-gold);
}

.intro-strip h2,
.section-title h2 {
  color: var(--text);
  font-size: 42px;
  line-height: 1.16;
}

.module-section,
.roadmap-section {
  padding: 72px 7vw;
}

.module-grid article {
  border-radius: 16px;
}

.module-grid h3,
.logic-grid b {
  color: var(--text);
}

.roadmap-section {
  margin: 0 7vw 88px;
  border-radius: 20px;
}

.roadmap {
  color: rgba(243, 239, 230, 0.72);
}

.roadmap b {
  color: var(--ruyi-gold);
}

.roadmap-cta {
  width: fit-content;
}

.canvas-body {
  background: #06080d;
}

.canvas-viewport {
  background-color: #06080d;
  background-image:
    radial-gradient(circle at 70% 18%, rgba(141, 184, 255, 0.14), transparent 22%),
    radial-gradient(circle at 24% 76%, rgba(230, 199, 143, 0.1), transparent 26%),
    radial-gradient(circle, rgba(243, 239, 230, 0.26) 0 1px, transparent 1.6px),
    linear-gradient(rgba(230, 199, 143, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 184, 255, 0.055) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    190px 190px,
    var(--grid-size, 32px) var(--grid-size, 32px),
    var(--grid-size, 32px) var(--grid-size, 32px);
  background-position:
    center,
    center,
    20px 30px,
    var(--grid-x, 0) var(--grid-y, 0),
    var(--grid-x, 0) var(--grid-y, 0);
}

.canvas-topbar {
  top: 14px;
  left: 18px;
  right: 18px;
  min-height: 50px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.canvas-topbar .brand-link {
  min-width: 178px;
}

.project-title-input,
input,
select,
textarea,
.prompt-rich-editor {
  border-color: rgba(230, 199, 143, 0.2);
  background: rgba(4, 7, 12, 0.72);
  color: var(--text);
}

.project-title-input {
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.prompt-rich-editor:focus {
  border-color: rgba(230, 199, 143, 0.7);
  box-shadow: 0 0 0 3px rgba(230, 199, 143, 0.1);
}

.floating-panel,
.tool-dock,
.canvas-utility-dock,
.canvas-info-panel,
.task-tray,
.asset-drawer,
.zoom-panel,
.context-menu,
.prompt-modal-panel,
.node-control-drawer,
.parameter-popover,
.reference-mode-popover,
.camera-popover,
.motion-popover,
.character-library-popover {
  border-color: rgba(230, 199, 143, 0.24);
  background:
    linear-gradient(180deg, rgba(17, 26, 43, 0.96), rgba(7, 10, 17, 0.96));
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tool-dock {
  top: 104px;
  width: 56px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tool-button,
.context-menu button,
.reference-mode-choice,
.character-library-tab,
.motion-category-tab {
  color: rgba(243, 239, 230, 0.72);
}

.tool-button {
  border-color: rgba(230, 199, 143, 0.18);
  border-radius: 10px;
  background: rgba(22, 35, 63, 0.46);
}

.tool-button span,
.utility-button span,
.context-menu button span,
.compact-pill-icon,
.reference-mode-icon,
.parameter-summary-icon,
.motion-summary-icon,
.character-library-icon,
.reference-mode-choice span,
.reference-add-card span,
.prompt-mention-chip i,
.reference-placeholder {
  background: rgba(230, 199, 143, 0.12);
  color: var(--ruyi-gold);
}

.tool-button:hover {
  border-color: rgba(230, 199, 143, 0.52);
  background: rgba(230, 199, 143, 0.1);
}

.canvas-utility-dock {
  gap: 5px;
  padding: 7px;
  border-color: rgba(230, 199, 143, 0.18);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(31, 33, 37, 0.94), rgba(17, 18, 21, 0.94));
}

.utility-button {
  min-width: 44px;
  min-height: 40px;
  border-radius: 9px;
}

.utility-button:hover,
.utility-button.active {
  background: rgba(230, 199, 143, 0.1);
}

.utility-button.active span {
  color: var(--ruyi-gold);
}

.tool-button small {
  color: rgba(243, 239, 230, 0.58);
}

.zoom-panel {
  border-radius: 999px;
}

.node-card {
  border-color: rgba(230, 199, 143, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(22, 35, 63, 0.82), rgba(7, 10, 17, 0.92));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.node-card.selected {
  border-color: rgba(230, 199, 143, 0.64);
  box-shadow:
    0 0 0 3px rgba(230, 199, 143, 0.14),
    0 24px 78px rgba(0, 0, 0, 0.48);
}

.node-card.connecting {
  border-color: rgba(141, 184, 255, 0.74);
  box-shadow:
    0 0 0 3px rgba(141, 184, 255, 0.14),
    0 24px 78px rgba(0, 0, 0, 0.48);
}

.node-card.visual-node,
.node-card.visual-node.selected,
.node-card.visual-node.connecting,
.node-card.visual-expanded,
.node-card.visual-expanded.selected {
  background: transparent;
  box-shadow: none;
}

.node-card.script-expanded,
.node-card.script-expanded.selected,
.node-card.script-workflow,
.node-card.script-workflow.selected,
.node-card.script-text-video,
.node-card.script-text-video.selected {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.text-node-footer .node-actions,
.text-video-footer .node-actions {
  background: transparent;
}

.node-type {
  border: 1px solid rgba(255, 235, 192, 0.38);
  background:
    linear-gradient(180deg, #ffe2ab, #bd8947) !important;
  color: #15100a;
}

.node-port {
  border-color: var(--ruyi-gold);
  background: #06080d;
  box-shadow:
    0 0 0 5px rgba(230, 199, 143, 0.12),
    0 0 18px rgba(230, 199, 143, 0.28);
}

.node-port-in {
  border-color: var(--flow-blue);
  box-shadow:
    0 0 0 5px rgba(141, 184, 255, 0.12),
    0 0 18px rgba(141, 184, 255, 0.26);
}

.node-port:hover {
  background: var(--ruyi-gold);
  box-shadow:
    0 0 0 7px rgba(230, 199, 143, 0.18),
    0 0 24px rgba(230, 199, 143, 0.38);
}

.node-port-in:hover {
  background: var(--flow-blue);
}

.node-result-shell {
  color: var(--text);
}

.visual-title-label,
.visual-title-input {
  color: var(--text);
  text-shadow: 0 0 12px rgba(141, 184, 255, 0.18);
}

.result-stage {
  color: rgba(243, 239, 230, 0.7);
}

.result-frame {
  border-color: rgba(230, 199, 143, 0.34);
  background:
    radial-gradient(circle at 50% 30%, rgba(141, 184, 255, 0.12), transparent 38%),
    #05070b;
  box-shadow:
    0 18px 60px rgba(0, 0, 0, 0.44),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.mock-result {
  background:
    linear-gradient(135deg, rgba(141, 184, 255, 0.78), rgba(230, 199, 143, 0.56)),
    linear-gradient(180deg, var(--result-a), var(--result-b));
}

.result-empty span,
.mock-result span {
  color: var(--text);
}

.result-empty small,
.mock-result small,
.node-card p {
  color: rgba(243, 239, 230, 0.58);
}

.result-error-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(230, 199, 143, 0.42);
  border-radius: 999px;
  background: rgba(230, 199, 143, 0.1);
  color: rgba(255, 231, 179, 0.96);
  font-size: 11px;
  font-weight: 850;
}

.result-error-help:hover {
  border-color: rgba(230, 199, 143, 0.72);
  background: rgba(230, 199, 143, 0.16);
}

.node-control-drawer {
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 28, 46, 0.96), rgba(8, 12, 20, 0.98));
}

.node-actions {
  background: linear-gradient(180deg, rgba(10, 15, 25, 0), rgba(10, 15, 25, 0.98) 34%);
}

.compact-select-pill,
.reference-mode-button,
.parameter-summary-button,
.camera-summary-button,
.motion-summary-button,
.character-library-button {
  border-color: rgba(230, 199, 143, 0.2);
  background: rgba(22, 35, 63, 0.62);
  color: rgba(243, 239, 230, 0.76);
}

.compact-select-pill:hover,
.reference-mode-button:hover,
.reference-mode-compact.open .reference-mode-button,
.parameter-summary-button:hover,
.node-parameter-compact.open .parameter-summary-button,
.camera-summary-button:hover,
.camera-control.open .camera-summary-button,
.motion-summary-button:hover,
.motion-control.open .motion-summary-button,
.character-library-button:hover,
.character-library-control.open .character-library-button {
  border-color: rgba(230, 199, 143, 0.6);
  color: var(--text);
  box-shadow: var(--gold-glow);
}

.ratio-choice,
.resolution-choice,
.audio-toggle,
.camera-chip {
  border-color: rgba(230, 199, 143, 0.2);
  background: rgba(6, 8, 13, 0.2);
  color: rgba(243, 239, 230, 0.64);
}

.ratio-choice:hover,
.ratio-choice.active,
.resolution-choice:hover,
.audio-toggle:hover,
.resolution-choice.active,
.audio-toggle.active,
.camera-chip:hover,
.camera-chip.active {
  border-color: rgba(230, 199, 143, 0.74);
  background: rgba(230, 199, 143, 0.12);
  color: var(--text);
}

.duration-slider-row input::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, var(--ruyi-gold) 0 var(--range-progress), rgba(243, 239, 230, 0.28) var(--range-progress) 100%);
}

.duration-slider-row input::-webkit-slider-thumb {
  background: var(--ruyi-gold);
  box-shadow: 0 0 0 4px rgba(230, 199, 143, 0.18);
}

.duration-slider-row input::-moz-range-progress,
.duration-slider-row input::-moz-range-thumb {
  background: var(--ruyi-gold);
}

.reference-panel,
.reference-preview,
.reference-add-card,
.reference-item,
.character-card,
.motion-card {
  border-color: rgba(230, 199, 143, 0.2);
  background: rgba(6, 8, 13, 0.34);
}

.reference-add-card:hover,
.reference-item:hover,
.character-card:hover,
.motion-card:hover,
.motion-card.active {
  border-color: rgba(230, 199, 143, 0.58);
  background: rgba(230, 199, 143, 0.1);
}

.reference-flow-arrow {
  border-color: rgba(230, 199, 143, 0.36);
  background: rgba(230, 199, 143, 0.1);
  color: var(--ruyi-gold);
}

.prompt-mention-chip {
  border-color: rgba(230, 199, 143, 0.34);
  background: rgba(230, 199, 143, 0.12);
}

.camera-prompt-preview,
.motion-prompt-preview {
  border-color: rgba(230, 199, 143, 0.28);
  background: rgba(6, 8, 13, 0.54);
}

.motion-category-tabs,
.character-library-tabs {
  border-color: rgba(230, 199, 143, 0.18);
  background: rgba(6, 8, 13, 0.42);
}

.motion-category-tab:hover,
.motion-category-tab.active,
.character-library-tab:hover,
.character-library-tab.active,
.reference-mode-choice:hover,
.reference-mode-choice.active {
  background: rgba(230, 199, 143, 0.14);
  color: var(--text);
}

.motion-favorite-button {
  color: rgba(243, 239, 230, 0.82);
}

.motion-favorite-button:hover,
.motion-favorite-button.active,
.character-favorite-button:hover,
.character-favorite-button.active {
  color: var(--ruyi-gold);
  text-shadow:
    0 0 7px rgba(230, 199, 143, 0.72),
    0 2px 10px rgba(0, 0, 0, 0.82);
}

.character-favorite-button {
  color: #8db8ff;
}

.character-library-upload-button {
  border-color: rgba(230, 199, 143, 0.34);
  background: rgba(230, 199, 143, 0.12);
  color: var(--text);
}

.character-library-upload-button:hover {
  border-color: rgba(230, 199, 143, 0.7);
  background: rgba(230, 199, 143, 0.2);
}

.motion-preview,
.motion-preview-float,
.floating-character-zoom,
.reference-zoom-preview {
  border-color: rgba(230, 199, 143, 0.36);
  background: rgba(6, 8, 13, 0.98);
}

.motion-preview-media,
.motion-preview::before {
  filter: saturate(1.05) contrast(1.04);
}

.context-menu {
  border-radius: 14px;
}

.context-menu button:hover {
  background: rgba(230, 199, 143, 0.12);
}

.prompt-modal {
  background:
    radial-gradient(circle at 50% 18%, rgba(141, 184, 255, 0.14), transparent 32%),
    rgba(2, 4, 8, 0.78);
}

.prompt-modal-panel {
  border-radius: 18px;
}

.prompt-modal-tabs {
  border-color: rgba(230, 199, 143, 0.22);
  background: rgba(6, 8, 13, 0.36);
}

.prompt-modal-tabs button.active {
  background: rgba(230, 199, 143, 0.16);
  color: var(--text);
}

.toast {
  border-color: rgba(230, 199, 143, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 26, 43, 0.96), rgba(7, 10, 17, 0.96));
  color: var(--text);
}

@media (max-width: 1100px) {
  .site-header {
    padding: 0 22px;
  }

  .hero-feature-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 58px;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 70px;
    padding: 10px 16px;
  }

  .site-actions {
    gap: 6px;
  }

  .nav-login {
    display: none;
  }

  .ruyi-hero {
    min-height: 100vh;
    padding: 104px 18px 252px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-prompt-card {
    grid-template-columns: 1fr;
  }

  .prompt-icon,
  .prompt-card-footer {
    grid-column: 1;
  }

  .hero-feature-row {
    left: 18px;
    right: 18px;
    bottom: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-feature-row a {
    min-height: 60px;
  }

  .intro-strip,
  .roadmap-section {
    margin-left: 18px;
    margin-right: 18px;
    padding: 28px 18px;
  }

  .intro-strip h2,
  .section-title h2 {
    font-size: 32px;
  }

  .canvas-topbar {
    border-radius: 14px;
  }

  .tool-dock {
    top: 88px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ruyi-home-exact {
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: #020307;
}

.ruyi-home-exact::before,
.ruyi-home-exact::after {
  content: none;
}

.home-artboard {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #020307;
}

.home-scroll-extension {
  min-height: 120vh;
  background:
    linear-gradient(180deg, rgba(2, 3, 7, 0.08), rgba(2, 3, 7, 0.18) 28%, rgba(2, 3, 7, 0.72) 100%),
    url("./assets/brand/ruyi-home-long-20260704-v3.png");
  background-repeat: no-repeat;
  background-size: auto, 100vw auto;
  background-position: center top, center -100vh;
  border-top: 1px solid rgba(230, 199, 143, 0.08);
}

.home-design-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  pointer-events: none;
}

.home-dynamic-layer,
.home-dynamic-layer span {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.home-dynamic-layer {
  inset: 0;
  overflow: hidden;
  mix-blend-mode: screen;
}

.home-crisp-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: #f3efe6;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.home-crisp-layer::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 9.8%;
  background:
    linear-gradient(180deg, #020307, #020307 76%, rgba(2, 3, 7, 0));
  pointer-events: none;
}

.home-crisp-layer a {
  pointer-events: auto;
}

.home-copy-mask {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background: #050912;
}

.home-hero-mask {
  left: 3.55%;
  top: 12.8%;
  width: 47.8%;
  height: 25.6%;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 52%, rgba(25, 36, 58, 0.38), transparent 42%),
    linear-gradient(90deg, rgba(3, 6, 12, 0.995), rgba(5, 9, 18, 0.99) 72%, rgba(5, 9, 18, 0.92));
}

.home-prompt-mask {
  display: none;
}

.home-crisp-logo {
  position: absolute;
  left: 2.65%;
  top: 2.15%;
  z-index: 4;
  width: 10.0%;
  height: auto;
  filter: none;
}

.home-crisp-nav {
  position: absolute;
  left: 30.0%;
  top: 3.25%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 2.7vw;
}

.home-crisp-nav a {
  position: relative;
  color: rgba(243, 239, 230, 0.78);
  font-size: clamp(12px, 1.05vw, 20px);
  font-weight: 650;
  line-height: 1;
  text-shadow: none;
}

.home-crisp-nav a.active,
.home-crisp-nav a:hover {
  color: #fffaf0;
}

.home-crisp-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.9em;
  width: 2.4em;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #e6c78f 26%, #f3efe6 50%, #e6c78f 74%, transparent);
  box-shadow: 0 0 12px rgba(230, 199, 143, 0.75);
  transform: translateX(-50%);
}

.home-crisp-login,
.home-crisp-start,
.home-crisp-prompt a,
.home-crisp-template {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
}

.home-crisp-login {
  left: 79.2%;
  top: 2.55%;
  width: 6.0%;
  height: 5.2%;
  border: 1px solid rgba(243, 239, 230, 0.24);
  border-radius: 13px;
  color: rgba(243, 239, 230, 0.86);
  font-size: clamp(12px, 0.98vw, 18px);
  background: rgba(3, 5, 10, 0.36);
  backdrop-filter: blur(12px);
}

.home-crisp-start {
  left: 86.4%;
  top: 2.55%;
  width: 9.9%;
  height: 5.2%;
  border-radius: 13px;
  color: #17120b;
  font-size: clamp(12px, 1.05vw, 19px);
  background: linear-gradient(180deg, #fff4d7, #e6c78f 58%, #c99f61);
  box-shadow: 0 0 26px rgba(230, 199, 143, 0.42);
}

.home-crisp-start span,
.home-crisp-prompt a span {
  margin-left: 0.55em;
  font-size: 0.74em;
}

.home-crisp-title {
  position: absolute;
  left: 4.85%;
  top: 18.8%;
  z-index: 3;
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 4.22vw, 76px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: none;
}

.home-crisp-subtitle {
  position: absolute;
  left: 4.95%;
  top: 29.6%;
  z-index: 3;
  margin: 0;
  color: rgba(243, 239, 230, 0.78);
  font-size: clamp(13px, 1.23vw, 22px);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0;
  text-shadow: none;
}

.home-crisp-prompt {
  display: none;
}

.home-crisp-prompt .prompt-sparkle {
  position: absolute;
  left: 2.5%;
  top: 21%;
  display: grid;
  place-items: center;
  width: 2.6vw;
  max-width: 42px;
  min-width: 28px;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 50%;
  color: #f3efe6;
  font-size: clamp(14px, 1.2vw, 22px);
  background: transparent;
}

.home-crisp-prompt p {
  position: absolute;
  left: 9.0%;
  top: 23.5%;
  right: 20%;
  margin: 0;
  color: rgba(243, 239, 230, 0.58);
  overflow: hidden;
  font-size: clamp(12px, 1.04vw, 18px);
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-crisp-prompt small {
  position: absolute;
  left: 63.5%;
  bottom: 22.5%;
  color: rgba(243, 239, 230, 0.52);
  font-size: clamp(11px, 0.94vw, 16px);
}

.home-crisp-prompt a {
  right: 2.7%;
  bottom: 13.5%;
  width: 21.5%;
  height: 45%;
  border-radius: 13px;
  color: #17120b;
  font-size: clamp(12px, 1.05vw, 18px);
  background: linear-gradient(180deg, #fff4d7, #f0e5d8 43%, #d7d8ff);
  box-shadow:
    0 0 20px rgba(243, 239, 230, 0.32),
    0 0 28px rgba(141, 184, 255, 0.24);
}

.home-crisp-template {
  display: none;
}

.home-crisp-template span {
  color: #e6c78f;
}

.home-pill-labels {
  position: absolute;
  z-index: 4;
  pointer-events: none;
}

.home-pill-labels {
  display: none;
}

.home-pill-labels {
  left: 4.8%;
  top: 65.25%;
  display: grid;
  grid-template-columns: repeat(5, 7.52vw);
  gap: 0.55vw;
}

.home-pill-labels a {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  min-height: 7.35vh;
  padding-left: 3.05vw;
  color: rgba(243, 239, 230, 0.82);
  pointer-events: auto;
}

.home-pill-labels a::before {
  display: none;
}

.home-pill-labels b,
.home-pill-labels small {
  display: block;
  position: relative;
  z-index: 1;
  text-shadow: none;
}

.home-pill-labels b {
  font-size: clamp(10px, 0.82vw, 15px);
  font-weight: 800;
  line-height: 1.2;
}

.home-pill-labels small {
  margin-top: 0.3em;
  color: rgba(243, 239, 230, 0.48);
  font-size: clamp(8px, 0.62vw, 12px);
  font-weight: 500;
  line-height: 1.1;
}

.ruyi-home-exact .home-pill-labels {
  display: none;
}

.home-ruyi-halo {
  left: 58.5%;
  top: 9.0%;
  width: 34%;
  height: 39%;
  border-radius: 50%;
  opacity: 0.0;
  background:
    radial-gradient(ellipse at 44% 42%, rgba(255, 255, 255, 0.52) 0 3%, transparent 12%),
    conic-gradient(from 220deg, transparent 0deg, rgba(141, 184, 255, 0.0) 42deg, rgba(141, 184, 255, 0.72) 68deg, rgba(230, 199, 143, 0.44) 96deg, transparent 136deg, transparent 360deg);
  filter: blur(7px) drop-shadow(0 0 22px rgba(141, 184, 255, 0.54));
  transform: rotate(-20deg) scale(0.92);
  animation: homeRuyiPulse 5.8s ease-in-out infinite;
}

.home-ruyi-halo.halo-b {
  left: 61.0%;
  top: 16.5%;
  width: 23%;
  height: 25%;
  animation-delay: -2.4s;
  animation-duration: 7.2s;
  filter: blur(5px) drop-shadow(0 0 18px rgba(230, 199, 143, 0.44));
}

.home-light-stream {
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(141, 184, 255, 0.0) 16%, rgba(141, 184, 255, 0.92) 44%, rgba(255, 235, 188, 0.98) 52%, rgba(230, 199, 143, 0.0) 76%, transparent 100%);
  filter: blur(0.4px) drop-shadow(0 0 10px rgba(230, 199, 143, 0.7));
  opacity: 0;
  transform-origin: center;
  animation: homeStreamSweep 5.6s cubic-bezier(0.25, 0.8, 0.35, 1) infinite;
}

.home-light-stream.stream-a {
  left: 53%;
  top: 54%;
  width: 34%;
  transform: rotate(-16deg);
}

.home-light-stream.stream-b {
  left: 62%;
  top: 65%;
  width: 33%;
  transform: rotate(-10deg);
  animation-delay: -1.8s;
  animation-duration: 6.4s;
}

.home-light-stream.stream-c {
  left: 32%;
  top: 61.5%;
  width: 30%;
  transform: rotate(7deg);
  animation-delay: -3.1s;
  animation-duration: 7.1s;
  opacity: 0.3;
}

.home-road-spark {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffe7b3;
  box-shadow:
    0 0 10px rgba(255, 231, 179, 0.95),
    0 0 26px rgba(230, 199, 143, 0.65);
  opacity: 0;
  animation: homeRoadSpark 4.8s ease-in-out infinite;
}

.home-road-spark.spark-a {
  left: 67%;
  top: 67.8%;
}

.home-road-spark.spark-b {
  left: 73%;
  top: 63.0%;
  animation-delay: -1.6s;
}

.home-road-spark.spark-c {
  left: 82%;
  top: 58.0%;
  animation-delay: -3.0s;
}

.home-star {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f3efe6;
  box-shadow:
    0 0 7px rgba(243, 239, 230, 0.72),
    0 0 16px rgba(141, 184, 255, 0.38);
  opacity: 0.3;
  animation: homeStarTwinkle 3.6s ease-in-out infinite;
}

.home-star.star-a {
  left: 45.3%;
  top: 15.8%;
}

.home-star.star-b {
  left: 82.5%;
  top: 9.5%;
  animation-delay: -1.3s;
}

.home-star.star-c {
  left: 26.5%;
  top: 7.2%;
  animation-delay: -2.1s;
}

.home-prompt-sheen {
  left: 4.8%;
  top: 38.9%;
  width: 41.0%;
  height: 13.8%;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0.52;
}

.home-prompt-sheen::before {
  content: "";
  position: absolute;
  top: -35%;
  left: -35%;
  width: 13%;
  height: 170%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(243, 239, 230, 0.12), rgba(141, 184, 255, 0.09), transparent);
  filter: blur(8px);
  transform: rotate(18deg);
  animation: homePromptSheen 5.8s ease-in-out infinite;
}

.home-generate-aura {
  left: 35.5%;
  top: 48.5%;
  width: 10.1%;
  height: 5.6%;
  border-radius: 13px;
  box-shadow:
    0 0 14px rgba(243, 239, 230, 0.35),
    0 0 34px rgba(230, 199, 143, 0.48),
    0 0 48px rgba(141, 184, 255, 0.28);
  opacity: 0.42;
  animation: homeButtonAura 2.8s ease-in-out infinite;
}

.brand-logo-img {
  display: block;
  width: 152px;
  height: auto;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(243, 239, 230, 0.22));
}

.canvas-topbar .brand-link {
  min-width: 190px;
}

.canvas-topbar .brand-link > span:not(.brand-mark) {
  display: none;
}

@media (max-aspect-ratio: 16 / 9) {
  .home-artboard {
    width: 177.7778vh;
    height: 100vh;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
  }
}

@keyframes homeRuyiPulse {
  0%,
  100% {
    opacity: 0.18;
    transform: rotate(-20deg) scale(0.92);
  }
  45% {
    opacity: 0.62;
    transform: rotate(-14deg) scale(1.04);
  }
  70% {
    opacity: 0.28;
    transform: rotate(-10deg) scale(0.98);
  }
}

@keyframes homeStreamSweep {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  22% {
    opacity: 0.82;
  }
  54% {
    opacity: 0.58;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 0 100%);
  }
}

@keyframes homeRoadSpark {
  0%,
  100% {
    opacity: 0;
    transform: translate(-10px, 10px) scale(0.7);
  }
  35% {
    opacity: 0.9;
    transform: translate(0, 0) scale(1);
  }
  72% {
    opacity: 0.15;
    transform: translate(42px, -34px) scale(0.55);
  }
}

@keyframes homeStarTwinkle {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.8);
  }
  46% {
    opacity: 0.78;
    transform: scale(1.55);
  }
}

@keyframes homePromptSheen {
  0%,
  42% {
    transform: translateX(0) rotate(18deg);
    opacity: 0;
  }
  52% {
    opacity: 0.58;
  }
  76%,
  100% {
    transform: translateX(470%) rotate(18deg);
    opacity: 0;
  }
}

@keyframes homeButtonAura {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.72;
    transform: scale(1.04);
  }
}

@keyframes homeCardAura {
  0%,
  100% {
    opacity: 0.08;
  }
  42% {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-dynamic-layer *,
  .home-dynamic-layer *::before {
    animation: none !important;
  }
}

@media (min-aspect-ratio: 16 / 9) {
  .home-artboard {
    width: 100vw;
    height: 56.25vw;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 760px) {
  .image-reverse-simple-grid {
    grid-template-columns: 1fr;
  }

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

.script-preset-compact {
  position: relative;
  flex: 0 0 auto;
}

.script-preset-summary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: 148px;
  padding: 0 11px;
  border: 1px solid rgba(230, 199, 143, 0.24);
  border-radius: 8px;
  background: rgba(22, 35, 63, 0.62);
  color: rgba(243, 239, 230, 0.78);
  font-size: 12px;
  font-weight: 850;
}

.script-preset-summary-button b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-preset-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 80;
  display: none;
  width: 280px;
  max-height: 280px;
  padding: 7px;
  border: 1px solid rgba(230, 199, 143, 0.28);
  border-radius: 10px;
  overflow-y: auto;
  background: rgba(14, 18, 26, 0.98);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

.script-preset-compact.open .script-preset-popover {
  display: grid;
  gap: 6px;
}

.script-preset-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--soft);
  text-align: left;
}

.script-preset-option span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(230, 199, 143, 0.1);
  color: var(--ruyi-gold);
}

.script-preset-option b,
.script-preset-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-preset-option small {
  color: rgba(243, 239, 230, 0.48);
  font-size: 10px;
}

.script-preset-option:hover,
.script-preset-option.active {
  border-color: rgba(230, 199, 143, 0.48);
  background: rgba(230, 199, 143, 0.1);
}

.script-generator-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.script-generator-footer .model-compact-pill {
  min-width: 190px;
  flex: 1 1 190px;
}

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

.duration-choice {
  min-height: 34px;
  min-width: 52px;
  padding: 0 10px;
  border: 1px solid rgba(230, 199, 143, 0.22);
  border-radius: 8px;
  background: rgba(6, 8, 13, 0.28);
  color: rgba(243, 239, 230, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.duration-choice:hover,
.duration-choice.active {
  border-color: rgba(230, 199, 143, 0.72);
  background: rgba(230, 199, 143, 0.13);
  color: var(--text);
}

.result-generating {
  min-width: min(72%, 260px);
}

.result-progress {
  width: min(180px, 72%);
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(243, 239, 230, 0.14);
  justify-self: center;
}

.result-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(141, 184, 255, 0.85), rgba(230, 199, 143, 0.95));
  box-shadow: 0 0 14px rgba(230, 199, 143, 0.32);
}

.result-generating em {
  color: rgba(243, 239, 230, 0.54);
  font-style: normal;
  font-size: 10px;
  font-weight: 850;
}

.node-card.running .result-frame,
.result-frame.running,
.result-frame.submitted,
.script-result-card.running {
  border-color: rgba(230, 199, 143, 0.52);
}

.ruyi-canvas .member-chip {
  display: none !important;
}

/* Latest visual direction from UI设计内容修改. Keep this as a late override so
   behavior-specific node styles above remain intact. */
.ruyi-home-exact .home-artboard {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
}

.ruyi-home-exact .home-design-image {
  object-position: center top;
}

.ruyi-home-exact .home-copy-mask {
  display: none;
}

.ruyi-home-exact .home-dynamic-layer {
  z-index: 1;
  opacity: 0.42;
}

.ruyi-home-exact .home-ruyi-halo,
.ruyi-home-exact .home-light-stream,
.ruyi-home-exact .home-prompt-sheen,
.ruyi-home-exact .home-generate-aura {
  display: none;
}

.ruyi-home-exact .home-light-stream {
  opacity: 0;
}

.ruyi-home-exact .home-crisp-layer {
  z-index: 2;
}

.ruyi-home-exact .home-crisp-logo {
  left: 2.7%;
  top: 2.6%;
  width: 10.0%;
  min-width: 128px;
  max-width: 204px;
}

.ruyi-home-exact .home-crisp-nav {
  left: 30.2%;
  top: 4.9%;
  gap: 34px;
}

.ruyi-home-exact .home-crisp-nav a {
  color: rgba(243, 239, 230, 0.78);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.42);
}

.ruyi-home-exact .home-crisp-login {
  left: auto;
  right: 14.1%;
  top: 3.0%;
  width: 116px;
  height: 55px;
  border: 1px solid rgba(243, 239, 230, 0.32);
  border-radius: 18px;
  background: rgba(3, 6, 12, 0.36);
  color: rgba(243, 239, 230, 0.92);
  font-size: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.ruyi-home-exact .home-crisp-start {
  left: auto;
  right: 4.4%;
  top: 3.0%;
  width: 168px;
  height: 55px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(180deg, #fff0cf, #eac888 64%, #c59a5b);
  color: #17110a;
  font-size: 18px;
  box-shadow:
    0 14px 32px rgba(230, 199, 143, 0.24),
    0 0 28px rgba(230, 199, 143, 0.25);
}

.ruyi-home-exact .home-crisp-title {
  left: 5.05%;
  top: 20.4%;
  font-size: 58px;
  line-height: 1.08;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.52);
}

.ruyi-home-exact .home-crisp-subtitle {
  left: 5.1%;
  top: 30.2%;
  color: rgba(243, 239, 230, 0.72);
  font-size: 23px;
  line-height: 1.66;
  max-width: 720px;
}

.ruyi-home-exact .home-crisp-prompt {
  position: absolute;
  left: 4.85%;
  top: 41.1%;
  z-index: 4;
  display: block;
  width: 42.0%;
  height: 15.8%;
  border: 1px solid rgba(230, 199, 143, 0.62);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 50%, rgba(141, 184, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(12, 20, 34, 0.82), rgba(4, 8, 15, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 66px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.ruyi-home-exact .home-crisp-prompt .prompt-sparkle {
  left: 2.4%;
  top: 20.5%;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  border-color: rgba(243, 239, 230, 0.24);
  background: rgba(2, 4, 8, 0.42);
  font-size: 18px;
}

.ruyi-home-exact .home-crisp-prompt p {
  left: 10.0%;
  top: 22.0%;
  right: 25.5%;
  color: rgba(243, 239, 230, 0.55);
  font-size: 17px;
  line-height: 1.55;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.ruyi-home-exact .home-crisp-prompt small {
  left: auto;
  right: 26.0%;
  bottom: 23.0%;
  font-size: 15px;
  line-height: 1.4;
}

.ruyi-home-exact .home-crisp-prompt a {
  right: 2.35%;
  bottom: 18.0%;
  width: 20.5%;
  height: 38.0%;
  border-radius: 13px;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.92), transparent 40%),
    linear-gradient(180deg, #fff3d6, #f3e8df 48%, #d7d8ff);
  color: #17110a;
  font-size: 16px;
  line-height: 1.2;
}

.ruyi-home-exact .home-crisp-prompt a span {
  margin-left: 0.42em;
  font-size: 0.62em;
}

.ruyi-home-exact .home-crisp-template {
  left: 4.85%;
  top: 57.1%;
  z-index: 4;
  display: inline-flex;
  width: 168px;
  height: 52px;
  border: 1px solid rgba(230, 199, 143, 0.54);
  border-radius: 15px;
  background: rgba(3, 6, 12, 0.48);
  color: rgba(243, 239, 230, 0.9);
  font-size: 17px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

.ruyi-home-exact .home-pill-labels {
  left: 4.85%;
  top: 65.25%;
  display: grid;
  grid-template-columns: 150px 150px 150px 150px 150px;
  gap: 12px;
}

.ruyi-home-exact .home-pill-labels a {
  display: grid;
  align-content: center;
  min-height: 78px;
  padding: 0 12px 0 56px;
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(19, 28, 42, 0.72), rgba(6, 10, 16, 0.76));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.ruyi-home-exact .home-pill-labels a::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  display: block;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  transform: translateY(-50%);
}

.ruyi-home-exact .home-pill-labels a::after {
  content: none;
}

.ruyi-home-exact .home-pill-labels a:nth-child(1)::before {
  background-image: url("./assets/brand/home-pill-text-video-icon.png");
}

.ruyi-home-exact .home-pill-labels a:nth-child(2)::before {
  background-image: url("./assets/brand/home-pill-ai-image-icon.png");
}

.ruyi-home-exact .home-pill-labels a:nth-child(3)::before {
  background-image: url("./assets/brand/home-pill-text-video-icon.png");
}

.ruyi-home-exact .home-pill-labels a:nth-child(4)::before {
  background-image: url("./assets/brand/home-pill-image-video-icon.png");
}

.ruyi-home-exact .home-pill-labels a:nth-child(5)::before {
  background-image: url("./assets/brand/home-pill-ai-video-icon.png");
}

.ruyi-home-exact .home-pill-labels a:first-child {
  border-color: rgba(141, 184, 255, 0.42);
  background: linear-gradient(180deg, rgba(16, 28, 57, 0.8), rgba(6, 10, 18, 0.78));
}

.ruyi-home-exact .home-pill-labels b {
  color: rgba(243, 239, 230, 0.92);
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.ruyi-home-exact .home-pill-labels small {
  margin-top: 4px;
  color: rgba(243, 239, 230, 0.56);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

@keyframes ruyiLogoBreath {
  0%,
  100% {
    opacity: 0.18;
    filter:
      blur(5px)
      drop-shadow(0 0 12px rgba(104, 172, 255, 0.36))
      drop-shadow(0 0 24px rgba(104, 172, 255, 0.18));
    transform: rotate(-20deg) scale(0.94);
  }
  48% {
    opacity: 0.46;
    filter:
      blur(4px)
      drop-shadow(0 0 24px rgba(155, 204, 255, 0.76))
      drop-shadow(0 0 46px rgba(104, 172, 255, 0.44));
    transform: rotate(-17deg) scale(1.02);
  }
}

.ruyi-canvas .canvas-app {
  background: #04070d;
}

.ruyi-canvas .canvas-app::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3, 5, 10, 0.16), rgba(3, 5, 10, 0.08) 48%, rgba(3, 5, 10, 0.18)),
    url("./assets/brand/ruyi-canvas-bg-20260704-v3.png") center bottom / cover no-repeat;
  opacity: 0.98;
}

.ruyi-canvas .canvas-app::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  height: auto;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(141, 184, 255, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 199, 143, 0.052) 1px, transparent 1px),
    radial-gradient(circle, rgba(243, 239, 230, 0.22) 0 1px, transparent 1.5px);
  background-size:
    var(--grid-size, 32px) var(--grid-size, 32px),
    var(--grid-size, 32px) var(--grid-size, 32px),
    190px 190px;
  background-position:
    var(--grid-x, 0) var(--grid-y, 0),
    var(--grid-x, 0) var(--grid-y, 0),
    calc(var(--grid-x, 0) * 0.3) calc(var(--grid-y, 0) * 0.3);
  opacity: 0.42;
  transform: none;
}

.ruyi-canvas .canvas-viewport {
  background: transparent;
}

.ruyi-canvas .canvas-topbar {
  top: 22px;
  left: 24px;
  right: 24px;
  min-height: 56px;
}

.ruyi-canvas .canvas-topbar::after {
  content: "无限画布 · AI创作工作台";
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(243, 239, 230, 0.88);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 0 18px rgba(230, 199, 143, 0.22);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ruyi-canvas .canvas-topbar::before {
  content: "";
  position: absolute;
  left: 38.6%;
  right: 38.6%;
  top: 50%;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(230, 199, 143, 0.52), transparent);
  transform: translateY(-50%);
  opacity: 0.58;
  pointer-events: none;
}

.ruyi-canvas .brand-logo-img {
  width: 170px;
  filter: drop-shadow(0 0 18px rgba(230, 199, 143, 0.18));
}

.ruyi-canvas .project-title-input {
  width: clamp(220px, 16vw, 300px);
  max-width: 300px;
  min-height: 44px;
  border-color: rgba(243, 239, 230, 0.16);
  border-radius: 12px;
  background: rgba(4, 8, 15, 0.48);
  color: rgba(243, 239, 230, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 38px rgba(0, 0, 0, 0.18);
}

.ruyi-canvas .top-icon-button,
.ruyi-canvas .member-chip,
.ruyi-canvas .account-chip {
  border-color: rgba(243, 239, 230, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(22, 34, 52, 0.76), rgba(7, 11, 18, 0.76));
  color: rgba(243, 239, 230, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.ruyi-canvas #publishShareBtn,
.ruyi-canvas .zoom-panel .icon-button,
.ruyi-canvas .utility-button span,
.ruyi-canvas .tool-button span {
  position: relative;
}

.ruyi-canvas #publishShareBtn {
  font-size: 0;
}

.ruyi-canvas #publishShareBtn::before {
  content: "↗";
  color: #f3efe6;
  font-size: 19px;
  font-weight: 900;
}

.ruyi-canvas .member-chip {
  display: inline-flex !important;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.ruyi-canvas .member-chip b {
  color: #f3efe6;
}

.ruyi-canvas .member-chip i {
  display: none;
}

.ruyi-canvas .account-chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.ruyi-canvas .tool-dock {
  top: 120px;
  left: 24px;
  display: grid;
  gap: 12px;
  width: 64px;
}

.ruyi-canvas .tool-button {
  min-height: 74px;
  padding: 8px 6px;
  border: 1px solid rgba(141, 184, 255, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(20, 33, 52, 0.72), rgba(8, 13, 21, 0.78));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 16px 32px rgba(0, 0, 0, 0.22);
}

.ruyi-canvas .tool-button:hover {
  border-color: rgba(230, 199, 143, 0.58);
  background:
    linear-gradient(180deg, rgba(28, 42, 64, 0.86), rgba(9, 14, 22, 0.86));
}

.ruyi-canvas .tool-button span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 238, 196, 0.98), rgba(191, 139, 69, 0.98));
  color: #111827;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 0 12px rgba(230, 199, 143, 0.22);
}

.ruyi-canvas .tool-button span {
  font-size: 0;
}

.ruyi-canvas .tool-button span::before {
  font-size: 19px;
  line-height: 1;
}

.ruyi-canvas #uploadAssetBtn span::before { content: "▱"; }
.ruyi-canvas .tool-button[data-node-type="script"] span::before { content: "▤"; }
.ruyi-canvas .tool-button[data-node-type="image"] span::before { content: "▧"; }
.ruyi-canvas .tool-button[data-node-type="video"] span::before { content: "▷"; }
.ruyi-canvas .tool-button[data-node-type="audio"] span::before { content: "∿"; }
.ruyi-canvas .tool-button[data-node-type="character"] span::before { content: "♙"; }
.ruyi-canvas .tool-button[data-node-type="review"] span::before { content: "◇"; }

.ruyi-canvas .tool-button small {
  margin-top: 4px;
  color: rgba(243, 239, 230, 0.74);
  font-size: 12px;
}

.ruyi-canvas .canvas-utility-dock {
  bottom: 26px;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(141, 184, 255, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 30, 48, 0.78), rgba(6, 10, 17, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 54px rgba(0, 0, 0, 0.36);
}

.ruyi-canvas .utility-button {
  min-width: 78px;
  min-height: 64px;
  padding: 6px 10px;
  border-radius: 16px;
}

.ruyi-canvas .utility-button span {
  width: 34px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  color: #e6c78f;
  font-size: 22px;
  text-shadow: 0 0 10px rgba(230, 199, 143, 0.26);
}

.ruyi-canvas .utility-button span {
  font-size: 0;
}

.ruyi-canvas .utility-button span::before {
  font-size: 24px;
  line-height: 1;
}

.ruyi-canvas .utility-button[data-canvas-panel="material"] span::before { content: "▰"; }
.ruyi-canvas .utility-button[data-canvas-panel="character"] span::before { content: "♙"; }
.ruyi-canvas .utility-button[data-canvas-panel="shortcuts"] span::before { content: "⌨"; }
.ruyi-canvas .utility-button[data-canvas-panel="tutorial"] span::before { content: "?"; }

.ruyi-canvas .utility-button small {
  color: rgba(243, 239, 230, 0.74);
  font-size: 12px;
}

.ruyi-canvas .utility-button:hover,
.ruyi-canvas .utility-button.active {
  background: rgba(230, 199, 143, 0.09);
}

.ruyi-canvas .zoom-panel {
  left: 24px;
  bottom: 26px;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(141, 184, 255, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(18, 30, 48, 0.78), rgba(6, 10, 17, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 46px rgba(0, 0, 0, 0.34);
}

.ruyi-canvas .zoom-panel .icon-button {
  border-color: rgba(141, 184, 255, 0.22);
  background: rgba(16, 28, 45, 0.82);
}

.ruyi-canvas .zoom-value {
  color: rgba(243, 239, 230, 0.88);
  font-size: 15px;
  font-weight: 850;
}

.ruyi-canvas .node-card:not(.visual-node):not(.visual-expanded):not(.script-expanded):not(.script-workflow):not(.script-text-video) {
  border-color: rgba(141, 184, 255, 0.22);
  background:
    radial-gradient(circle at 18% 8%, rgba(141, 184, 255, 0.14), transparent 36%),
    linear-gradient(160deg, rgba(20, 34, 56, 0.82), rgba(5, 9, 16, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 60px rgba(0, 0, 0, 0.42);
}

.ruyi-canvas .result-frame,
.ruyi-canvas .script-result-card,
.ruyi-canvas .prompt-rich-editor,
.ruyi-canvas textarea,
.ruyi-canvas select,
.ruyi-canvas input {
  border-color: rgba(230, 199, 143, 0.28);
  background-color: rgba(3, 6, 12, 0.72);
}

/* UI refresh F: latest homepage and infinite canvas art direction. */
body.ruyi-home-exact {
  overflow-y: auto;
  background: #02050b;
}

.ruyi-home-exact .home-artboard {
  min-height: 760px;
}

.ruyi-home-exact .home-design-image {
  object-fit: cover;
  object-position: center top;
}

.ruyi-home-exact .home-scroll-extension {
  min-height: 205vh;
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.18) 24%, rgba(2, 5, 11, 0.72) 100%),
    url("./assets/brand/ruyi-home-long-20260704-v3.png") center -100vh / 100vw auto no-repeat;
  border-top: 0;
}

.ruyi-home-exact .home-crisp-layer::before {
  position: fixed;
  z-index: 20;
  height: 104px;
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0.94), rgba(2, 5, 11, 0.66) 72%, rgba(2, 5, 11, 0));
}

.ruyi-home-exact .home-crisp-logo,
.ruyi-home-exact .home-crisp-nav,
.ruyi-home-exact .home-crisp-login,
.ruyi-home-exact .home-crisp-start {
  position: fixed;
  z-index: 24;
}

.ruyi-home-exact .home-crisp-logo {
  left: 52px;
  top: 26px;
  width: 168px;
  min-width: 0;
  max-width: none;
}

.ruyi-home-exact .home-crisp-nav {
  left: 50%;
  top: 50px;
  gap: 36px;
  transform: translateX(-50%);
}

.ruyi-home-exact .home-crisp-login {
  top: 27px;
  right: 284px;
  width: 118px;
  height: 54px;
}

.ruyi-home-exact .home-crisp-start {
  top: 27px;
  right: 70px;
  width: 170px;
  height: 54px;
}

.ruyi-home-exact .home-crisp-title {
  top: 20.0%;
}

.ruyi-home-exact .home-crisp-subtitle {
  top: 31.4%;
  line-height: 1.78;
}

.ruyi-home-exact .home-crisp-prompt {
  top: 43.1%;
  height: 15.2%;
}

.ruyi-home-exact .home-crisp-prompt p {
  top: 23.5%;
  line-height: 1.62;
}

.ruyi-home-exact .home-crisp-prompt a {
  width: 164px;
  height: 62px;
  font-size: 15px;
}

.ruyi-home-exact .home-crisp-template {
  top: 58.8%;
}

.ruyi-home-exact .home-pill-labels {
  top: 66.5%;
  grid-template-columns: 138px 138px 138px 138px 150px;
  gap: 12px;
}

.ruyi-home-exact .home-pill-labels a {
  min-height: 70px;
  padding-left: 54px;
  overflow: visible;
}

.ruyi-home-exact .home-pill-labels a::before {
  left: 12px;
  width: 38px;
  height: 38px;
  filter:
    drop-shadow(0 0 8px rgba(141, 184, 255, 0.28))
    drop-shadow(0 0 12px rgba(230, 199, 143, 0.12));
}

.ruyi-home-exact .home-pill-labels b {
  font-size: 15px;
  line-height: 1.18;
}

.ruyi-home-exact .home-pill-labels small {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.24;
}

.ruyi-home-exact .home-ruyi-halo {
  display: block;
  left: 62.5%;
  top: 9.4%;
  width: 28.5%;
  height: 34.5%;
  opacity: 0.22;
  background:
    radial-gradient(ellipse at 48% 48%, rgba(157, 207, 255, 0.18) 0 28%, rgba(101, 173, 255, 0.10) 38%, transparent 66%),
    conic-gradient(from 230deg, transparent 0deg, rgba(141, 184, 255, 0.34) 58deg, rgba(255, 255, 255, 0.42) 76deg, rgba(141, 184, 255, 0.22) 104deg, transparent 145deg, transparent 360deg);
  filter: blur(7px) drop-shadow(0 0 26px rgba(104, 172, 255, 0.42));
  animation: ruyiLogoBreath 6.8s ease-in-out infinite;
}

.ruyi-home-exact .home-ruyi-halo.halo-b {
  display: block;
  left: 67.2%;
  top: 15.8%;
  width: 19%;
  height: 22%;
  opacity: 0.14;
  animation-delay: -2.8s;
}

.ruyi-home-exact .home-star {
  display: block;
}

.ruyi-home-exact .home-star::after {
  content: "";
  position: absolute;
  left: -84px;
  top: 1px;
  width: 92px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(175, 213, 255, 0.72), rgba(255, 235, 188, 0.78));
  opacity: 0;
}

.ruyi-home-exact .home-star.star-a,
.ruyi-home-exact .home-star.star-b,
.ruyi-home-exact .home-star.star-c {
  width: 4px;
  height: 4px;
  animation: homeMeteorDrift 8.5s linear infinite;
}

.ruyi-home-exact .home-star.star-a {
  left: 76%;
  top: 12%;
}

.ruyi-home-exact .home-star.star-b {
  left: 54%;
  top: 18%;
  animation-delay: -3.2s;
}

.ruyi-home-exact .home-star.star-c {
  left: 88%;
  top: 8%;
  animation-delay: -6s;
}

.ruyi-home-exact .home-star.star-a::after,
.ruyi-home-exact .home-star.star-b::after,
.ruyi-home-exact .home-star.star-c::after {
  opacity: 0.7;
}

.ruyi-home-exact .home-light-stream,
.ruyi-home-exact .home-prompt-sheen,
.ruyi-home-exact .home-generate-aura {
  display: none;
}

@keyframes homeMeteorDrift {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-18deg) scale(0.7);
  }
  8% {
    opacity: 0.72;
  }
  24% {
    opacity: 0;
    transform: translate3d(-220px, 92px, 0) rotate(-18deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-220px, 92px, 0) rotate(-18deg) scale(1);
  }
}

.ruyi-canvas .canvas-app::before {
  background:
    linear-gradient(180deg, rgba(2, 4, 8, 0.04), rgba(2, 4, 8, 0.12) 54%, rgba(2, 4, 8, 0.22)),
    url("./assets/brand/ruyi-canvas-bg-20260704-v3.png") center bottom / cover no-repeat;
  opacity: 1;
}

.ruyi-canvas .canvas-app::after {
  background-image:
    linear-gradient(rgba(141, 184, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 199, 143, 0.04) 1px, transparent 1px),
    radial-gradient(circle, rgba(230, 199, 143, 0.22) 0 1px, transparent 1.6px);
  opacity: 0.34;
}

.ruyi-canvas .canvas-topbar {
  top: 20px;
  left: 28px;
  right: 28px;
  min-height: 58px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ruyi-canvas .canvas-topbar::after {
  color: rgba(255, 224, 151, 0.96);
  font-size: 24px;
  text-shadow:
    0 0 12px rgba(230, 199, 143, 0.36),
    0 0 28px rgba(141, 184, 255, 0.12);
}

.ruyi-canvas .canvas-topbar::before {
  left: 39.6%;
  right: 39.6%;
  background: linear-gradient(90deg, transparent, rgba(230, 199, 143, 0.72), transparent);
}

.ruyi-canvas .brand-logo-img {
  width: 165px;
  filter:
    drop-shadow(0 0 10px rgba(230, 199, 143, 0.28))
    drop-shadow(0 0 22px rgba(230, 199, 143, 0.12));
}

.ruyi-canvas .brand-link > span:not(.brand-mark) {
  display: none;
}

.ruyi-canvas .project-title-input {
  width: clamp(220px, 16vw, 300px);
  max-width: 300px;
  min-height: 42px;
  margin-left: 24px;
  border-color: rgba(230, 199, 143, 0.14);
  background: rgba(3, 6, 12, 0.28);
}

.ruyi-canvas .top-icon-button,
.ruyi-canvas .account-chip {
  border-color: rgba(230, 199, 143, 0.24);
  background:
    linear-gradient(180deg, rgba(16, 25, 40, 0.78), rgba(3, 6, 12, 0.78));
}

.ruyi-canvas .tool-dock {
  top: 126px;
  left: 22px;
  width: 54px;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ruyi-canvas .tool-button {
  display: grid;
  place-items: center;
  min-height: 58px;
  width: 54px;
  padding: 0;
  border: 1px solid rgba(243, 239, 230, 0.18);
  border-radius: 13px;
  background:
    radial-gradient(circle at 50% 30%, rgba(141, 184, 255, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(15, 25, 40, 0.78), rgba(3, 6, 12, 0.84));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.ruyi-canvas .tool-button span {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: transparent;
  color: #f5d485;
  box-shadow: none;
  text-shadow:
    0 0 9px rgba(230, 199, 143, 0.36),
    0 0 14px rgba(141, 184, 255, 0.26);
}

.ruyi-canvas .tool-button span::before {
  font-size: 26px;
  font-weight: 500;
}

.ruyi-canvas #uploadAssetBtn span::before { content: "▱"; }
.ruyi-canvas .tool-button[data-node-type="script"] span::before { content: "▤"; }
.ruyi-canvas .tool-button[data-node-type="image"] span::before { content: "▧"; }
.ruyi-canvas .tool-button[data-node-type="video"] span::before { content: "▷"; }
.ruyi-canvas .tool-button[data-node-type="audio"] span::before { content: "≋"; }
.ruyi-canvas .tool-button[data-node-type="character"] span::before { content: "♙"; }
.ruyi-canvas .tool-button[data-node-type="review"] span::before { content: "◇"; }

.ruyi-canvas .tool-button small {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  display: none;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid rgba(230, 199, 143, 0.2);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.9);
  color: rgba(243, 239, 230, 0.82);
  transform: translateY(-50%);
  white-space: nowrap;
}

.ruyi-canvas .tool-button:hover small {
  display: block;
}

.ruyi-canvas .canvas-utility-dock {
  bottom: 24px;
  gap: 22px;
  padding: 12px 30px;
  border-color: rgba(243, 239, 230, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(13, 22, 34, 0.72), rgba(3, 6, 12, 0.84));
}

.ruyi-canvas .utility-button {
  min-width: 54px;
  min-height: 50px;
  padding: 0;
}

.ruyi-canvas .utility-button span {
  width: 34px;
  height: 28px;
}

.ruyi-canvas .utility-button small {
  margin-top: 2px;
  font-size: 11px;
}

.ruyi-canvas .zoom-panel {
  left: 24px;
  bottom: 24px;
  border-color: rgba(243, 239, 230, 0.14);
  border-radius: 17px;
}

.ruyi-canvas .node-card:not(.visual-node):not(.visual-expanded):not(.script-expanded):not(.script-workflow):not(.script-text-video),
.ruyi-canvas .node-control-drawer,
.ruyi-canvas .script-workflow-body,
.ruyi-canvas .script-result-card {
  border-color: rgba(169, 197, 255, 0.22);
  background:
    radial-gradient(circle at 26% 12%, rgba(141, 184, 255, 0.12), transparent 38%),
    linear-gradient(155deg, rgba(16, 28, 44, 0.84), rgba(3, 6, 12, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 22px 70px rgba(0, 0, 0, 0.42),
    0 0 34px rgba(141, 184, 255, 0.08);
}

.ruyi-canvas .result-frame {
  border-color: rgba(230, 199, 143, 0.42);
  background:
    radial-gradient(circle at 50% 62%, rgba(141, 184, 255, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(6, 11, 20, 0.92), rgba(2, 5, 10, 0.96));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 52px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(230, 199, 143, 0.1);
}

.ruyi-canvas .result-frame.running,
.ruyi-canvas .result-frame.submitted,
.ruyi-canvas .script-result-card.running {
  border-color: rgba(230, 199, 143, 0.66);
  animation: canvasGeneratingGlow 2.4s ease-in-out infinite;
}

.ruyi-canvas .result-frame.running::after,
.ruyi-canvas .result-frame.submitted::after,
.ruyi-canvas .script-result-card.running::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 232, 180, 0.48) 28%, transparent 42%),
    linear-gradient(180deg, transparent 0 52%, rgba(141, 184, 255, 0.24) 58%, transparent 70%);
  opacity: 0.55;
  clip-path: inset(0 74% 0 0);
  animation: canvasBorderTrace 3.4s linear infinite;
}

@keyframes canvasGeneratingGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(230, 199, 143, 0.16),
      0 18px 52px rgba(0, 0, 0, 0.44),
      0 0 18px rgba(230, 199, 143, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(230, 199, 143, 0.36),
      0 18px 52px rgba(0, 0, 0, 0.44),
      0 0 28px rgba(230, 199, 143, 0.22);
  }
}

@keyframes canvasBorderTrace {
  0% {
    clip-path: inset(0 76% 96% 0);
  }
  24% {
    clip-path: inset(0 0 96% 76%);
  }
  50% {
    clip-path: inset(0 0 0 96%);
  }
  74% {
    clip-path: inset(96% 0 0 0);
  }
  100% {
    clip-path: inset(0 76% 96% 0);
  }
}

.home-fixed-header {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(300px, 1fr);
  align-items: center;
  gap: 24px;
  height: 104px;
  padding: 0 70px 0 52px;
  color: #f3efe6;
  pointer-events: none;
}

.home-fixed-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(2, 5, 11, 0.94), rgba(2, 5, 11, 0.62) 72%, rgba(2, 5, 11, 0));
  pointer-events: none;
}

.home-fixed-header a {
  pointer-events: auto;
}

.home-fixed-header button {
  pointer-events: auto;
}

.home-fixed-logo {
  display: inline-flex;
  align-items: center;
  width: 168px;
}

.home-fixed-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.home-fixed-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  white-space: nowrap;
  pointer-events: auto;
}

.home-fixed-nav a {
  position: relative;
  color: rgba(243, 239, 230, 0.78);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.42);
}

.home-fixed-nav a.active,
.home-fixed-nav a:hover {
  color: #fffaf0;
}

.home-fixed-nav a.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.9em;
  width: 2.4em;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #e6c78f 26%, #f3efe6 50%, #e6c78f 74%, transparent);
  box-shadow: 0 0 12px rgba(230, 199, 143, 0.75);
  transform: translateX(-50%);
}

.home-fixed-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 5px 6px 5px 8px;
  border: 1px solid rgba(243, 239, 230, 0.14);
  border-radius: 15px;
  background: rgba(13, 18, 26, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.home-fixed-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}

.home-fixed-login {
  width: 72px;
  border: 1px solid rgba(243, 239, 230, 0.32);
  background: rgba(3, 6, 12, 0.36);
  color: rgba(243, 239, 230, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.home-member-center {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff9eb;
  cursor: pointer;
}

.home-member-center:hover,
.home-member-center:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.home-member-center span {
  color: #f1c357;
  font-size: 18px;
  line-height: 1;
  transform: rotate(45deg);
}

.home-member-center b {
  font-size: 14px;
  white-space: nowrap;
}

.home-member-points {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 42px;
  color: #fff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.home-member-points i {
  color: #f5d37d;
  font-size: 12px;
  font-style: normal;
}

.home-member-points strong {
  min-width: 1.3em;
  font-size: 14px;
  text-align: left;
}

@media (max-width: 1180px) {
  .home-fixed-header {
    grid-template-columns: 150px minmax(0, 1fr) minmax(112px, auto);
    gap: 16px;
    padding: 0 28px;
  }

  .home-fixed-logo {
    width: 150px;
  }

  .home-fixed-nav {
    gap: 20px;
  }

  .home-fixed-nav a {
    font-size: 15px;
  }

  .home-fixed-actions {
    gap: 6px;
  }
}

@media (max-width: 820px) {
  .home-fixed-header {
    grid-template-columns: 124px minmax(0, 1fr);
    grid-template-rows: 64px 48px;
    gap: 0 12px;
    height: 112px;
    padding: 0 18px;
    background: rgba(2, 8, 14, 0.96);
    box-sizing: border-box;
  }

  .home-fixed-header::before {
    background: none;
  }

  .home-fixed-logo {
    grid-column: 1;
    grid-row: 1;
    width: 112px;
  }

  .home-fixed-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .home-fixed-login {
    width: 58px;
    height: 40px;
    border-radius: 14px;
    font-size: 14px;
  }

  .home-fixed-actions {
    gap: 4px;
    padding: 3px 4px 3px 6px;
  }

  .home-member-center {
    gap: 5px;
    padding: 0 5px;
  }

  .home-member-center b,
  .home-member-points,
  .home-member-points strong {
    font-size: 12px;
  }

  .home-member-center span {
    font-size: 15px;
  }

  .home-fixed-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 28px;
    width: 100%;
    height: 48px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .home-fixed-nav::-webkit-scrollbar {
    display: none;
  }

  .home-fixed-nav a {
    flex: 0 0 auto;
    font-size: 15px;
  }

  .home-fixed-nav a.active::after {
    bottom: -0.65em;
  }
}

.ruyi-home-exact .home-crisp-logo,
.ruyi-home-exact .home-crisp-nav,
.ruyi-home-exact .home-crisp-login,
.ruyi-home-exact .home-crisp-start,
.ruyi-home-exact .home-crisp-layer::before {
  display: none !important;
}

/* UI refresh H: high-resolution homepage art and canvas node states. */
.ruyi-home-exact .home-design-image {
  content: url("./assets/brand/ruyi-home-long-20260704-v3.png");
}

.ruyi-home-exact .home-scroll-extension {
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.12) 20%, rgba(2, 5, 11, 0.68) 100%),
    url("./assets/brand/ruyi-home-long-20260704-v3.png") center -100vh / 100vw auto no-repeat;
}

.ruyi-canvas .canvas-viewport {
  background: transparent;
  background-image: none;
}

.ruyi-canvas .canvas-app::before {
  background:
    linear-gradient(180deg, rgba(2, 4, 8, 0.02), rgba(2, 4, 8, 0.08) 58%, rgba(2, 4, 8, 0.18)),
    url("./assets/brand/ruyi-canvas-bg-20260704-v3.png") center bottom / cover no-repeat;
  opacity: 1;
}

.ruyi-canvas .canvas-app::after {
  background-image:
    radial-gradient(circle, rgba(255, 220, 142, 0.3) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(91, 177, 255, 0.24) 0 1px, transparent 1.6px);
  background-position:
    var(--grid-x, 0) var(--grid-y, 0),
    calc(var(--grid-x, 0) * 0.74) calc(var(--grid-y, 0) * 0.74);
  background-size:
    calc(var(--grid-size, 32px) * 4.8) calc(var(--grid-size, 32px) * 4.8),
    calc(var(--grid-size, 32px) * 6.6) calc(var(--grid-size, 32px) * 6.6);
  opacity: 0.22;
}

.ruyi-canvas .node-port {
  width: 18px;
  height: 18px;
  background: #03070d;
  border-width: 2px;
}

.ruyi-canvas .node-port-in {
  border-color: #35bfff;
  box-shadow:
    0 0 0 5px rgba(53, 191, 255, 0.12),
    0 0 15px rgba(53, 191, 255, 0.55);
}

.ruyi-canvas .node-port-out {
  border-color: #f7c85a;
  box-shadow:
    0 0 0 5px rgba(247, 200, 90, 0.12),
    0 0 15px rgba(247, 200, 90, 0.55);
}

.ruyi-canvas .result-frame {
  isolation: isolate;
  border-color: transparent;
  background:
    radial-gradient(ellipse at 28% 74%, rgba(53, 139, 255, 0.22), transparent 45%),
    radial-gradient(ellipse at 76% 72%, rgba(247, 200, 90, 0.18), transparent 44%),
    linear-gradient(152deg, rgba(9, 20, 36, 0.68), rgba(3, 7, 13, 0.92));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 20px rgba(53, 191, 255, 0.1),
    0 0 26px rgba(247, 200, 90, 0.08),
    0 22px 64px rgba(0, 0, 0, 0.46);
}

.ruyi-canvas .result-frame::before,
.ruyi-canvas .result-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.ruyi-canvas .result-frame::before {
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 36% 76%, rgba(64, 160, 255, 0.4), transparent 36%),
    radial-gradient(ellipse at 82% 74%, rgba(247, 200, 90, 0.32), transparent 34%);
  filter: blur(10px);
  opacity: 0.55;
}

.ruyi-canvas .result-frame::after {
  inset: -1px;
  z-index: 3;
  padding: 1px;
  background:
    linear-gradient(90deg, rgba(53, 191, 255, 0.94), rgba(154, 177, 210, 0.58) 47%, rgba(247, 200, 90, 0.96));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.82;
}

.ruyi-canvas .result-frame > img,
.ruyi-canvas .result-frame > video,
.ruyi-canvas .result-frame > .mock-result,
.ruyi-canvas .result-frame > .result-empty,
.ruyi-canvas .result-frame > .result-play {
  position: relative;
  z-index: 2;
}

.ruyi-canvas .result-empty {
  min-width: min(68%, 280px);
  padding: 18px 22px;
  color: rgba(243, 239, 230, 0.94);
  background-image:
    linear-gradient(rgba(141, 184, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 199, 143, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

.ruyi-canvas .result-empty span {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0;
}

.ruyi-canvas .result-empty small {
  color: rgba(192, 214, 244, 0.78);
  font-size: 11px;
  line-height: 1.55;
}

.ruyi-canvas .result-frame.done::after {
  background:
    linear-gradient(90deg, rgba(87, 188, 255, 0.76), rgba(247, 200, 90, 0.98) 60%, rgba(255, 226, 154, 0.98));
  opacity: 0.95;
}

.ruyi-canvas .result-frame.error::after {
  background:
    linear-gradient(90deg, rgba(255, 112, 112, 0.92), rgba(247, 200, 90, 0.54));
}

.ruyi-canvas .result-frame.running,
.ruyi-canvas .result-frame.submitted {
  animation: ruyiCanvasFramePulse 2.6s ease-in-out infinite;
}

.ruyi-canvas .result-frame.running::after,
.ruyi-canvas .result-frame.submitted::after {
  inset: -2px;
  padding: 2px;
  background:
    conic-gradient(from 0deg, transparent 0 18%, rgba(53, 191, 255, 0.96) 23%, rgba(247, 200, 90, 0.98) 28%, transparent 36% 100%);
  opacity: 0.98;
  clip-path: none;
  transform-origin: center;
  animation: ruyiCanvasBorderOrbit 3.2s linear infinite;
}

.ruyi-canvas .result-progress {
  height: 5px;
  background: rgba(243, 239, 230, 0.13);
  box-shadow: inset 0 0 0 1px rgba(243, 239, 230, 0.05);
}

.ruyi-canvas .result-progress i {
  background: linear-gradient(90deg, #35bfff, #f7c85a);
  box-shadow: 0 0 14px rgba(247, 200, 90, 0.36);
}

@keyframes ruyiCanvasFramePulse {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.03),
      0 0 20px rgba(53, 191, 255, 0.1),
      0 0 26px rgba(247, 200, 90, 0.1),
      0 22px 64px rgba(0, 0, 0, 0.46);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.04),
      0 0 30px rgba(53, 191, 255, 0.2),
      0 0 34px rgba(247, 200, 90, 0.18),
      0 22px 64px rgba(0, 0, 0, 0.46);
  }
}

@keyframes ruyiCanvasBorderOrbit {
  to {
    transform: rotate(1turn);
  }
}

/* UI refresh I: refine canvas result frames and script workflow panels. */
.ruyi-canvas .visual-title-input,
.ruyi-canvas .text-node-title-input,
.ruyi-canvas .script-result-head .node-title-input,
.ruyi-canvas .script-generator-head .node-title-input {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0;
}

.ruyi-canvas .visual-title-input:hover,
.ruyi-canvas .text-node-title-input:hover,
.ruyi-canvas .script-result-head .node-title-input:hover,
.ruyi-canvas .script-generator-head .node-title-input:hover {
  border-color: transparent !important;
  background: transparent !important;
}

.ruyi-canvas .visual-title-input:focus,
.ruyi-canvas .text-node-title-input:focus,
.ruyi-canvas .script-result-head .node-title-input:focus,
.ruyi-canvas .script-generator-head .node-title-input:focus {
  border-color: rgba(230, 199, 143, 0.44) !important;
  background: rgba(5, 10, 18, 0.5) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(230, 199, 143, 0.12) !important;
}

.ruyi-canvas .result-frame::before {
  inset: -12%;
  background:
    radial-gradient(ellipse at 28% 72%, rgba(45, 151, 255, 0.42), transparent 34%),
    radial-gradient(ellipse at 78% 70%, rgba(247, 200, 90, 0.34), transparent 35%);
  filter: blur(14px);
  opacity: 0.6;
  animation: ruyiResultAuraDrift 8s ease-in-out infinite alternate;
}

.ruyi-canvas .result-frame.running,
.ruyi-canvas .result-frame.submitted {
  animation: none;
}

.ruyi-canvas .result-frame.running::before,
.ruyi-canvas .result-frame.submitted::before {
  animation: ruyiResultAuraWave 5.8s ease-in-out infinite alternate;
}

.ruyi-canvas .result-frame.running::after,
.ruyi-canvas .result-frame.submitted::after {
  inset: -1px;
  padding: 1px;
  background:
    linear-gradient(90deg, rgba(53, 191, 255, 0.88), rgba(154, 177, 210, 0.48) 47%, rgba(247, 200, 90, 0.9));
  opacity: 0.72;
  clip-path: none;
  transform: none;
  animation: none;
}

.ruyi-canvas .result-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  min-width: min(86%, 430px);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  gap: 7px;
  background-image: none !important;
  background: transparent !important;
}

.ruyi-canvas .result-empty span,
.ruyi-canvas .result-empty small,
.ruyi-canvas .result-generating em {
  white-space: nowrap;
}

.ruyi-canvas .result-empty span {
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.1;
}

.ruyi-canvas .result-empty small {
  max-width: none;
  font-size: clamp(11px, 2.4vw, 15px);
  line-height: 1.25;
}

.ruyi-canvas .result-generating {
  min-width: min(84%, 360px);
}

.ruyi-canvas .script-result-generating {
  border-color: rgba(169, 197, 255, 0.18);
  background:
    radial-gradient(ellipse at 30% 68%, rgba(45, 151, 255, 0.24), transparent 38%),
    radial-gradient(ellipse at 78% 70%, rgba(247, 200, 90, 0.18), transparent 38%),
    rgba(3, 7, 13, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  animation: ruyiResultAuraDrift 8s ease-in-out infinite alternate;
}

.ruyi-canvas .script-result-card.running::after {
  display: none;
}

.ruyi-canvas .text-node-choice-card,
.ruyi-canvas .text-node-composer,
.ruyi-canvas .script-generator-card,
.ruyi-canvas .script-result-card,
.ruyi-canvas .text-video-combo,
.ruyi-canvas .image-reverse-combo {
  border-color: rgba(169, 197, 255, 0.24);
  background:
    radial-gradient(ellipse at 24% 18%, rgba(45, 151, 255, 0.16), transparent 42%),
    radial-gradient(ellipse at 88% 72%, rgba(247, 200, 90, 0.11), transparent 44%),
    linear-gradient(155deg, rgba(13, 25, 44, 0.78), rgba(3, 7, 13, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(53, 191, 255, 0.08);
  backdrop-filter: blur(14px);
}

.ruyi-canvas .text-node-choice-card {
  min-height: 330px;
}

.ruyi-canvas .text-node-symbol span {
  background: linear-gradient(90deg, rgba(53, 191, 255, 0.44), rgba(247, 200, 90, 0.34));
  box-shadow: 0 0 16px rgba(53, 191, 255, 0.12);
}

.ruyi-canvas .text-preset-choice {
  border-color: rgba(169, 197, 255, 0.12);
  background: rgba(5, 10, 18, 0.24);
}

.ruyi-canvas .text-preset-choice:hover,
.ruyi-canvas .text-preset-choice.active {
  border-color: rgba(230, 199, 143, 0.42);
  background:
    linear-gradient(90deg, rgba(53, 191, 255, 0.1), rgba(247, 200, 90, 0.1));
}

.ruyi-canvas .script-generator-card .prompt-rich-editor,
.ruyi-canvas .text-node-composer .prompt-rich-editor,
.ruyi-canvas .script-result-editor .prompt-rich-editor {
  border-color: rgba(169, 197, 255, 0.16);
  background: rgba(2, 6, 12, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    inset 0 0 28px rgba(53, 191, 255, 0.04);
}

.ruyi-canvas .script-image-upload-card,
.ruyi-canvas .script-output-panel,
.ruyi-canvas .text-video-result {
  border-color: rgba(169, 197, 255, 0.18);
  background:
    radial-gradient(ellipse at 35% 72%, rgba(53, 191, 255, 0.12), transparent 42%),
    rgba(3, 7, 13, 0.58);
}

@keyframes ruyiResultAuraDrift {
  0% {
    transform: translate3d(-1.5%, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(1.5%, -1.5%, 0) scale(1.04);
  }
}

@keyframes ruyiResultAuraWave {
  0% {
    transform: translate3d(-2%, 1%, 0) scale(1.02);
    opacity: 0.54;
  }
  50% {
    transform: translate3d(1%, -2%, 0) scale(1.08);
    opacity: 0.72;
  }
  100% {
    transform: translate3d(2%, 1%, 0) scale(1.03);
    opacity: 0.58;
  }
}

/* UI refresh J: smaller result copy, animated aura, unified popovers. */
.ruyi-canvas .result-frame::before {
  inset: -20%;
  background:
    radial-gradient(ellipse at 22% 72%, rgba(45, 151, 255, 0.48), transparent 34%),
    radial-gradient(ellipse at 82% 70%, rgba(247, 200, 90, 0.4), transparent 36%);
  background-size: 145% 145%, 150% 150%;
  background-position: 8% 66%, 92% 68%;
  filter: blur(18px);
  opacity: 0.68;
  will-change: background-position, transform, opacity;
  animation: ruyiResultAuraWater 7.2s ease-in-out infinite;
}

.ruyi-canvas .result-frame.running::before,
.ruyi-canvas .result-frame.submitted::before {
  animation: ruyiResultAuraWater 5.2s ease-in-out infinite;
}

.ruyi-canvas .result-empty {
  min-width: min(78%, 360px);
  gap: 5px;
}

.ruyi-canvas .result-empty span {
  font-size: clamp(15px, 2.2vw, 20px);
  font-weight: 850;
}

.ruyi-canvas .result-empty small {
  font-size: clamp(10px, 1.55vw, 13px);
  color: rgba(192, 214, 244, 0.72);
}

.ruyi-canvas .script-preset-summary-button,
.ruyi-canvas .compact-select-pill,
.ruyi-canvas .reference-mode-button,
.ruyi-canvas .parameter-summary-button,
.ruyi-canvas .camera-summary-button,
.ruyi-canvas .motion-summary-button {
  border-color: rgba(169, 197, 255, 0.24) !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(53, 191, 255, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(15, 30, 51, 0.78), rgba(4, 9, 17, 0.9)) !important;
  color: rgba(243, 239, 230, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 10px 26px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.ruyi-canvas .script-preset-summary-button:hover,
.ruyi-canvas .script-preset-compact.open .script-preset-summary-button,
.ruyi-canvas .compact-select-pill:hover,
.ruyi-canvas .reference-mode-button:hover,
.ruyi-canvas .reference-mode-compact.open .reference-mode-button,
.ruyi-canvas .parameter-summary-button:hover,
.ruyi-canvas .node-parameter-compact.open .parameter-summary-button,
.ruyi-canvas .camera-summary-button:hover,
.ruyi-canvas .camera-control.open .camera-summary-button,
.ruyi-canvas .motion-summary-button:hover,
.ruyi-canvas .motion-control.open .motion-summary-button {
  border-color: rgba(230, 199, 143, 0.5) !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(53, 191, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(20, 38, 62, 0.88), rgba(8, 13, 22, 0.92)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 18px rgba(230, 199, 143, 0.14),
    0 12px 30px rgba(0, 0, 0, 0.32);
}

.ruyi-canvas .compact-select-pill select,
.ruyi-canvas .camera-field select {
  background: transparent !important;
  color: rgba(243, 239, 230, 0.96);
}

.ruyi-canvas .script-preset-popover,
.ruyi-canvas .reference-mode-popover,
.ruyi-canvas .image-preset-popover,
.ruyi-canvas .parameter-popover,
.ruyi-canvas .camera-popover,
.ruyi-canvas .motion-popover,
.ruyi-canvas .character-library-popover,
.ruyi-canvas .node-control-drawer {
  border-color: rgba(169, 197, 255, 0.26) !important;
  background:
    radial-gradient(ellipse at 18% 12%, rgba(53, 191, 255, 0.14), transparent 36%),
    radial-gradient(ellipse at 86% 78%, rgba(247, 200, 90, 0.1), transparent 42%),
    linear-gradient(155deg, rgba(12, 24, 42, 0.94), rgba(2, 6, 12, 0.96)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 24px 70px rgba(0, 0, 0, 0.48),
    0 0 34px rgba(53, 191, 255, 0.08);
  backdrop-filter: blur(16px);
}

.ruyi-canvas .script-preset-option,
.ruyi-canvas .reference-mode-choice,
.ruyi-canvas .ratio-choice,
.ruyi-canvas .resolution-choice,
.ruyi-canvas .duration-choice,
.ruyi-canvas .camera-chip,
.ruyi-canvas .motion-category-tab,
.ruyi-canvas .motion-card,
.ruyi-canvas .camera-field,
.ruyi-canvas .parameter-section,
.ruyi-canvas .camera-section,
.ruyi-canvas .motion-apply-section {
  border-color: rgba(169, 197, 255, 0.14) !important;
  background:
    linear-gradient(145deg, rgba(11, 22, 38, 0.62), rgba(3, 7, 13, 0.68)) !important;
  color: rgba(243, 239, 230, 0.9);
}

.ruyi-canvas .script-preset-option:hover,
.ruyi-canvas .script-preset-option.active,
.ruyi-canvas .reference-mode-choice:hover,
.ruyi-canvas .reference-mode-choice.active,
.ruyi-canvas .ratio-choice:hover,
.ruyi-canvas .ratio-choice.active,
.ruyi-canvas .resolution-choice:hover,
.ruyi-canvas .resolution-choice.active,
.ruyi-canvas .duration-choice:hover,
.ruyi-canvas .duration-choice.active,
.ruyi-canvas .camera-chip:hover,
.ruyi-canvas .camera-chip.active,
.ruyi-canvas .motion-category-tab:hover,
.ruyi-canvas .motion-category-tab.active,
.ruyi-canvas .motion-card:hover,
.ruyi-canvas .motion-card.active {
  border-color: rgba(230, 199, 143, 0.5) !important;
  background:
    linear-gradient(120deg, rgba(53, 191, 255, 0.14), rgba(247, 200, 90, 0.12)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 0 18px rgba(230, 199, 143, 0.12);
}

.ruyi-canvas .script-preset-option span,
.ruyi-canvas .reference-mode-icon,
.ruyi-canvas .parameter-summary-icon,
.ruyi-canvas .camera-summary-icon,
.ruyi-canvas .motion-summary-icon,
.ruyi-canvas .compact-pill-icon {
  border-color: rgba(230, 199, 143, 0.22);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 232, 180, 0.2), transparent 42%),
    rgba(230, 199, 143, 0.1);
  color: #f7c85a;
}

.ruyi-canvas .script-preset-option b,
.ruyi-canvas .reference-mode-choice b,
.ruyi-canvas .motion-card b {
  color: rgba(255, 250, 240, 0.96);
}

.ruyi-canvas .script-preset-option small,
.ruyi-canvas .reference-mode-choice small,
.ruyi-canvas .motion-card small,
.ruyi-canvas .camera-meta span,
.ruyi-canvas .camera-prompt-preview,
.ruyi-canvas .motion-prompt-preview {
  color: rgba(192, 214, 244, 0.68);
}

.ruyi-canvas .parameter-section-title,
.ruyi-canvas .camera-section-title,
.ruyi-canvas .motion-popover-head b,
.ruyi-canvas .motion-apply-section > span {
  color: #f1d28a;
}

@keyframes ruyiEdgeFlow {
  to {
    stroke-dashoffset: -302;
  }
}

@keyframes ruyiEdgeColorBreath {
  0%,
  100% {
    filter:
      drop-shadow(0 0 5px rgba(53, 191, 255, 0.28))
      drop-shadow(0 0 8px rgba(247, 200, 90, 0.24));
  }
  50% {
    filter:
      drop-shadow(0 0 8px rgba(247, 200, 90, 0.38))
      drop-shadow(0 0 12px rgba(53, 191, 255, 0.32));
  }
}

@keyframes ruyiResultAuraWater {
  0% {
    background-position: 6% 68%, 94% 70%;
    transform: translate3d(-2%, 1%, 0) scale(1.02);
    opacity: 0.58;
  }
  35% {
    background-position: 22% 76%, 78% 62%;
    transform: translate3d(1%, -2%, 0) scale(1.08);
    opacity: 0.74;
  }
  70% {
    background-position: 14% 60%, 88% 78%;
    transform: translate3d(2%, 2%, 0) scale(1.05);
    opacity: 0.66;
  }
  100% {
    background-position: 6% 68%, 94% 70%;
    transform: translate3d(-2%, 1%, 0) scale(1.02);
    opacity: 0.58;
  }
}

/* UI refresh K: global canvas control polish and visible aura motion. */
.ruyi-canvas .result-frame {
  background:
    radial-gradient(ellipse at 20% 72%, rgba(45, 151, 255, 0.42), transparent 34%),
    radial-gradient(ellipse at 84% 70%, rgba(247, 200, 90, 0.34), transparent 36%),
    linear-gradient(152deg, rgba(9, 20, 36, 0.68), rgba(3, 7, 13, 0.94)) !important;
  background-size: 165% 165%, 175% 175%, 100% 100%;
  background-position: 0% 72%, 100% 70%, center;
  animation: ruyiResultFrameAura 5.8s ease-in-out infinite !important;
}

.ruyi-canvas .result-frame.running,
.ruyi-canvas .result-frame.submitted {
  animation: ruyiResultFrameAura 4.6s ease-in-out infinite !important;
}

.ruyi-canvas .result-frame::before {
  opacity: 0.28;
}

.ruyi-canvas select option,
.ruyi-canvas select optgroup {
  background: #07111f;
  color: #fff7df;
}

.ruyi-canvas select option:checked,
.ruyi-canvas select option:hover {
  background: #1f3554;
  color: #fff7df;
}

.ruyi-canvas .node-generate,
.ruyi-canvas .camera-apply-button,
.ruyi-canvas .motion-apply-button,
.ruyi-canvas .character-library-upload-button,
.ruyi-canvas .reference-add-card,
.ruyi-canvas .prompt-expand-button,
.ruyi-canvas .node-icon-action,
.ruyi-canvas .top-icon-button,
.ruyi-canvas .icon-button,
.ruyi-canvas .tool-button,
.ruyi-canvas .utility-button,
.ruyi-canvas .account-chip,
.ruyi-canvas .member-chip,
.ruyi-canvas .context-menu button {
  border: 1px solid rgba(169, 197, 255, 0.22) !important;
  background:
    radial-gradient(circle at 26% 18%, rgba(53, 191, 255, 0.12), transparent 42%),
    linear-gradient(150deg, rgba(12, 25, 43, 0.88), rgba(3, 7, 13, 0.94)) !important;
  color: rgba(255, 246, 222, 0.94) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 10px 28px rgba(0, 0, 0, 0.34),
    0 0 18px rgba(53, 191, 255, 0.05) !important;
  backdrop-filter: blur(14px);
}

.ruyi-canvas .node-generate {
  min-width: 156px;
  border-color: rgba(247, 200, 90, 0.52) !important;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 240, 190, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(34, 50, 72, 0.92), rgba(78, 56, 24, 0.9)) !important;
  color: #ffe8ad !important;
  text-shadow: 0 0 12px rgba(247, 200, 90, 0.22);
}

.ruyi-canvas .node-generate:hover,
.ruyi-canvas .camera-apply-button:hover,
.ruyi-canvas .motion-apply-button:hover,
.ruyi-canvas .character-library-upload-button:hover,
.ruyi-canvas .reference-add-card:hover,
.ruyi-canvas .prompt-expand-button:hover,
.ruyi-canvas .node-icon-action:hover,
.ruyi-canvas .top-icon-button:hover,
.ruyi-canvas .icon-button:hover,
.ruyi-canvas .tool-button:hover,
.ruyi-canvas .utility-button:hover,
.ruyi-canvas .utility-button.active,
.ruyi-canvas .context-menu button:hover {
  border-color: rgba(247, 200, 90, 0.5) !important;
  background:
    radial-gradient(circle at 28% 20%, rgba(247, 200, 90, 0.18), transparent 42%),
    linear-gradient(150deg, rgba(18, 36, 58, 0.94), rgba(6, 10, 18, 0.96)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 18px rgba(247, 200, 90, 0.16),
    0 12px 30px rgba(0, 0, 0, 0.36) !important;
}

.ruyi-canvas .node-icon-action.danger {
  border-color: rgba(255, 126, 126, 0.26) !important;
  color: #ff8f82 !important;
}

.ruyi-canvas .tool-button {
  width: 62px;
  min-height: 74px;
  gap: 7px;
  border-radius: 14px;
}

.ruyi-canvas .tool-button span,
.ruyi-canvas .utility-button span,
.ruyi-canvas .context-menu button span,
.ruyi-canvas .reference-add-card span,
.ruyi-canvas .compact-pill-icon,
.ruyi-canvas .reference-mode-icon,
.ruyi-canvas .parameter-summary-icon,
.ruyi-canvas .camera-summary-icon,
.ruyi-canvas .motion-summary-icon,
.ruyi-canvas .character-library-icon {
  border: 1px solid rgba(247, 200, 90, 0.18) !important;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 234, 176, 0.2), transparent 44%),
    rgba(247, 200, 90, 0.08) !important;
  color: #f7c85a !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 0 14px rgba(247, 200, 90, 0.08);
}

.ruyi-canvas .tool-button span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0;
}

.ruyi-canvas .tool-button span::before {
  font-size: 22px;
  line-height: 1;
}

.ruyi-canvas .tool-button small,
.ruyi-canvas .utility-button small {
  color: rgba(243, 239, 230, 0.78);
  font-weight: 850;
}

.ruyi-canvas .canvas-utility-dock,
.ruyi-canvas .zoom-panel {
  border: 1px solid rgba(169, 197, 255, 0.2);
  background:
    radial-gradient(circle at 30% 8%, rgba(53, 191, 255, 0.1), transparent 42%),
    rgba(3, 7, 13, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 56px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.ruyi-canvas .utility-button {
  min-width: 64px;
  min-height: 52px;
  border-radius: 12px;
}

.ruyi-canvas .utility-button span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.ruyi-canvas .node-actions {
  align-items: center;
}

.ruyi-canvas .node-actions .node-icon-action {
  width: 40px;
  min-width: 40px;
  min-height: 38px;
  border-radius: 10px;
}

.ruyi-canvas .node-actions button {
  border-radius: 10px;
}

.ruyi-canvas .compact-select-pill select {
  font-weight: 850;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.46);
}

@keyframes ruyiResultFrameAura {
  0% {
    background-position: 0% 72%, 100% 70%, center;
  }
  25% {
    background-position: 18% 58%, 78% 82%, center;
  }
  55% {
    background-position: 34% 78%, 62% 60%, center;
  }
  78% {
    background-position: 12% 62%, 88% 74%, center;
  }
  100% {
    background-position: 0% 72%, 100% 70%, center;
  }
}

/* UI refresh L: homepage balance, canvas background cleanup, and icon system. */
.ruyi-home-exact .home-design-image {
  content: url("./assets/brand/ruyi-home-long-20260704-v4.png") !important;
  left: -8%;
  width: 116%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

.ruyi-home-exact .home-scroll-extension {
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.1) 20%, rgba(2, 5, 11, 0.68) 100%),
    url("./assets/brand/ruyi-home-long-20260704-v4.png") 40% -100vh / 116vw auto no-repeat !important;
}

.ruyi-home-exact .home-dynamic-layer {
  display: block;
  opacity: 0.72;
  mix-blend-mode: screen;
}

.ruyi-home-exact .home-ruyi-halo {
  display: block !important;
  left: 58.5%;
  top: 6.4%;
  width: 34%;
  height: 48%;
  border-radius: 50%;
  opacity: 0.46;
  background:
    radial-gradient(ellipse at 52% 48%, rgba(138, 198, 255, 0.34) 0 24%, rgba(72, 155, 255, 0.18) 42%, transparent 68%),
    conic-gradient(from 210deg, transparent 0 36deg, rgba(150, 211, 255, 0.4) 58deg, rgba(255, 255, 255, 0.48) 72deg, rgba(85, 176, 255, 0.22) 104deg, transparent 144deg 360deg);
  filter:
    blur(13px)
    drop-shadow(0 0 28px rgba(92, 177, 255, 0.5))
    drop-shadow(0 0 64px rgba(92, 177, 255, 0.22));
  transform-origin: 50% 50%;
  animation: homeLogoHaloBreathL 5.8s ease-in-out infinite;
}

.ruyi-home-exact .home-ruyi-halo.halo-b {
  left: 63.5%;
  top: 14.6%;
  width: 22%;
  height: 30%;
  opacity: 0.3;
  animation-delay: -2.2s;
}

.ruyi-home-exact .home-light-stream,
.ruyi-home-exact .home-star {
  display: block !important;
}

.ruyi-home-exact .home-light-stream {
  width: 22vw;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(135, 204, 255, 0.92), rgba(255, 232, 178, 0.74), transparent);
  filter:
    blur(0.2px)
    drop-shadow(0 0 8px rgba(117, 194, 255, 0.55));
  opacity: 0;
  transform: rotate(-19deg);
  animation: homeMeteorSweepL 7.6s linear infinite;
}

.ruyi-home-exact .home-light-stream.stream-a {
  left: 74%;
  top: 13%;
}

.ruyi-home-exact .home-light-stream.stream-b {
  left: 64%;
  top: 25%;
  width: 18vw;
  animation-delay: -2.8s;
}

.ruyi-home-exact .home-light-stream.stream-c {
  left: 83%;
  top: 7%;
  width: 14vw;
  animation-delay: -5.2s;
}

.ruyi-home-exact .home-star.star-a {
  left: 77%;
  top: 12%;
}

.ruyi-home-exact .home-star.star-b {
  left: 60%;
  top: 20%;
}

.ruyi-home-exact .home-star.star-c {
  left: 88%;
  top: 16%;
}

.ruyi-home-exact .home-crisp-prompt small {
  right: 25.4%;
  bottom: 13.6%;
}

.ruyi-home-exact .home-crisp-prompt a {
  right: 2.35%;
  bottom: 8.4%;
  height: 39.5%;
}

.ruyi-canvas .canvas-app::before {
  background:
    linear-gradient(180deg, rgba(3, 5, 10, 0.12), rgba(3, 5, 10, 0.06) 50%, rgba(3, 5, 10, 0.2)),
    url("./assets/brand/ruyi-canvas-bg-20260704-v4.png") center bottom / cover no-repeat !important;
}

.ruyi-canvas .canvas-app::after {
  display: block !important;
  background:
    linear-gradient(180deg, transparent 0 56%, rgba(2, 5, 10, 0.2) 76%, rgba(2, 5, 10, 0.58) 100%) !important;
  background-size: auto !important;
  background-position: center !important;
  opacity: 1 !important;
}

.ruyi-canvas .canvas-viewport {
  background: transparent !important;
  background-image: none !important;
}

.ruyi-canvas .tool-dock {
  width: 66px;
  gap: 11px;
}

.ruyi-canvas .tool-button,
.ruyi-canvas .utility-button,
.ruyi-canvas .zoom-panel .icon-button {
  border-color: rgba(137, 157, 185, 0.38) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(79, 151, 255, 0.13), transparent 48%),
    linear-gradient(180deg, rgba(14, 27, 45, 0.86), rgba(4, 8, 14, 0.9)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 -14px 24px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(0, 0, 0, 0.18),
    0 16px 34px rgba(0, 0, 0, 0.28) !important;
}

.ruyi-canvas .tool-button {
  width: 64px;
  min-height: 74px;
  padding: 0;
  border-radius: 17px;
}

.ruyi-canvas .tool-button small {
  display: none !important;
}

.ruyi-canvas .tool-button:hover,
.ruyi-canvas .utility-button:hover,
.ruyi-canvas .utility-button.active,
.ruyi-canvas .zoom-panel .icon-button:hover {
  border-color: rgba(247, 200, 90, 0.52) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(247, 200, 90, 0.16), transparent 48%),
    linear-gradient(180deg, rgba(19, 35, 56, 0.92), rgba(5, 9, 15, 0.94)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 20px rgba(247, 200, 90, 0.14),
    0 16px 34px rgba(0, 0, 0, 0.3) !important;
}

.ruyi-canvas .tool-button span,
.ruyi-canvas .utility-button span {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
}

.ruyi-canvas .tool-button span::before,
.ruyi-canvas .tool-button span::after,
.ruyi-canvas .utility-button span::before,
.ruyi-canvas .utility-button span::after {
  content: "" !important;
  position: absolute;
  box-sizing: border-box;
  border-color: #ffe5a8;
  filter:
    drop-shadow(0 0 2px rgba(255, 239, 201, 0.72))
    drop-shadow(0 0 6px rgba(77, 184, 255, 0.5));
}

.ruyi-canvas #uploadAssetBtn span::before {
  left: 7px;
  top: 14px;
  width: 25px;
  height: 17px;
  border: 2px solid #ffe5a8;
  border-top-color: #74caff;
  border-radius: 3px;
}

.ruyi-canvas #uploadAssetBtn span::after {
  left: 9px;
  top: 9px;
  width: 15px;
  height: 8px;
  border: 2px solid #74caff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.ruyi-canvas .tool-button[data-canvas-panel="history"] span::before {
  left: 8px;
  top: 7px;
  width: 23px;
  height: 25px;
  border: 2px solid #ffe5a8;
  border-radius: 5px;
  background:
    linear-gradient(#74caff, #74caff) 6px 7px / 11px 2px no-repeat,
    linear-gradient(#ffe5a8, #ffe5a8) 6px 13px / 11px 2px no-repeat,
    linear-gradient(#74caff, #74caff) 6px 19px / 8px 2px no-repeat;
}

.ruyi-canvas .tool-button[data-canvas-panel="history"] span::after {
  left: 23px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #74caff;
  border-left: 0;
  border-bottom: 0;
  border-radius: 2px;
}

.ruyi-canvas .tool-button[data-node-type="script"] span::before {
  left: 9px;
  top: 6px;
  width: 21px;
  height: 27px;
  border: 2px solid #ffe5a8;
  border-radius: 2px;
}

.ruyi-canvas .tool-button[data-node-type="script"] span::after {
  left: 14px;
  top: 14px;
  width: 12px;
  height: 2px;
  background: #74caff;
  box-shadow:
    0 6px 0 #ffe5a8,
    0 12px 0 #ffe5a8;
}

.ruyi-canvas .tool-button[data-node-type="image"] span::before {
  left: 7px;
  top: 8px;
  width: 25px;
  height: 22px;
  border: 2px solid #ffe5a8;
  border-radius: 3px;
}

.ruyi-canvas .tool-button[data-node-type="image"] span::after {
  left: 10px;
  top: 19px;
  width: 20px;
  height: 10px;
  background:
    radial-gradient(circle at 78% 0, #ffe5a8 0 2px, transparent 2.5px),
    linear-gradient(135deg, transparent 0 38%, #74caff 39% 52%, transparent 53%),
    linear-gradient(45deg, transparent 0 44%, #ffe5a8 45% 58%, transparent 59%);
}

.ruyi-canvas .tool-button[data-node-type="video"] span::before {
  left: 7px;
  top: 7px;
  width: 25px;
  height: 25px;
  border: 2px solid #ffe5a8;
  border-radius: 4px;
}

.ruyi-canvas .tool-button[data-node-type="video"] span::after {
  left: 17px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #74caff;
}

.ruyi-canvas .tool-button[data-node-type="audio"] span::before {
  left: 8px;
  top: 10px;
  width: 23px;
  height: 21px;
  background:
    linear-gradient(#74caff, #74caff) 2px 9px / 3px 9px no-repeat,
    linear-gradient(#ffe5a8, #ffe5a8) 8px 5px / 3px 17px no-repeat,
    linear-gradient(#74caff, #74caff) 14px 1px / 3px 25px no-repeat,
    linear-gradient(#ffe5a8, #ffe5a8) 20px 7px / 3px 13px no-repeat;
}

.ruyi-canvas .tool-button[data-node-type="audio"] span::after {
  left: 0;
  top: 17px;
  width: 38px;
  height: 2px;
  background: rgba(255, 229, 168, 0.55);
}

.ruyi-canvas .tool-button[data-node-type="character"] span::before {
  left: 13px;
  top: 6px;
  width: 13px;
  height: 13px;
  border: 2px solid #ffe5a8;
  border-radius: 50%;
}

.ruyi-canvas .tool-button[data-node-type="character"] span::after {
  left: 8px;
  top: 21px;
  width: 24px;
  height: 12px;
  border: 2px solid #74caff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom: 0;
}

.ruyi-canvas .tool-button[data-node-type="review"] span::before {
  left: 9px;
  top: 8px;
  width: 22px;
  height: 22px;
  border: 2px solid #ffe5a8;
  transform: rotate(45deg);
}

.ruyi-canvas .tool-button[data-node-type="review"] span::after {
  left: 14px;
  top: 17px;
  width: 12px;
  height: 2px;
  background: #74caff;
}

.ruyi-canvas .canvas-utility-dock {
  gap: 22px;
  padding: 12px 28px;
  border-radius: 22px;
}

.ruyi-canvas .utility-button {
  min-width: 68px;
  min-height: 62px;
  padding: 5px 8px;
  border-radius: 16px;
}

.ruyi-canvas .utility-button small {
  color: rgba(243, 239, 230, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.ruyi-canvas .utility-button[data-canvas-panel="material"] span::before {
  left: 8px;
  top: 10px;
  width: 23px;
  height: 15px;
  border: 2px solid #ffe5a8;
  transform: skewX(-12deg);
}

.ruyi-canvas .utility-button[data-canvas-panel="material"] span::after {
  left: 10px;
  top: 25px;
  width: 19px;
  height: 3px;
  border-top: 2px solid #74caff;
  box-shadow: 0 4px 0 rgba(255, 229, 168, 0.75);
}

.ruyi-canvas .utility-button[data-canvas-panel="character"] span::before {
  left: 14px;
  top: 7px;
  width: 11px;
  height: 11px;
  border: 2px solid #ffe5a8;
  border-radius: 50%;
}

.ruyi-canvas .utility-button[data-canvas-panel="character"] span::after {
  left: 8px;
  top: 21px;
  width: 23px;
  height: 12px;
  border: 2px solid #74caff;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
  border-bottom: 0;
}

.ruyi-canvas .utility-button[data-canvas-panel="shortcuts"] span::before {
  left: 5px;
  top: 9px;
  width: 28px;
  height: 21px;
  border: 2px solid #ffe5a8;
  border-radius: 3px;
}

.ruyi-canvas .utility-button[data-canvas-panel="shortcuts"] span::after {
  left: 9px;
  top: 15px;
  width: 20px;
  height: 11px;
  background:
    repeating-linear-gradient(90deg, #74caff 0 2px, transparent 2px 5px),
    repeating-linear-gradient(0deg, transparent 0 4px, rgba(255, 229, 168, 0.72) 4px 6px);
}

.ruyi-canvas .utility-button[data-canvas-panel="tutorial"] span::before {
  content: "?" !important;
  left: 8px;
  top: 0;
  width: 24px;
  height: 34px;
  color: #ffe5a8;
  font-size: 31px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
}

.ruyi-canvas .utility-button[data-canvas-panel="tutorial"] span::after {
  display: none;
}

.ruyi-canvas .zoom-panel {
  gap: 12px;
  padding: 10px 13px;
  border-radius: 20px;
}

.ruyi-canvas .zoom-panel .icon-button {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #fff7df !important;
  font-size: 24px;
  font-weight: 850;
}

.ruyi-canvas .result-frame {
  background:
    radial-gradient(ellipse at 8% 76%, rgba(45, 151, 255, 0.46), transparent 38%),
    radial-gradient(ellipse at 92% 72%, rgba(247, 200, 90, 0.36), transparent 38%),
    linear-gradient(152deg, rgba(9, 20, 36, 0.7), rgba(3, 7, 13, 0.94)) !important;
  background-size: 210% 185%, 215% 190%, 100% 100%;
  animation: ruyiResultFrameAuraL 5.2s ease-in-out infinite !important;
}

.ruyi-canvas .result-frame::before {
  opacity: 0.16 !important;
}

.ruyi-canvas .result-empty span {
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.1;
}

.ruyi-canvas .result-empty small {
  max-width: none;
  white-space: nowrap !important;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
}

@keyframes homeLogoHaloBreathL {
  0%,
  100% {
    opacity: 0.34;
    transform: scale(0.96) rotate(-3deg);
  }
  50% {
    opacity: 0.56;
    transform: scale(1.05) rotate(3deg);
  }
}

@keyframes homeMeteorSweepL {
  0% {
    opacity: 0;
    transform: translate3d(120px, -52px, 0) rotate(-19deg) scaleX(0.65);
  }
  8% {
    opacity: 0.78;
  }
  28% {
    opacity: 0;
    transform: translate3d(-360px, 140px, 0) rotate(-19deg) scaleX(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-360px, 140px, 0) rotate(-19deg) scaleX(1);
  }
}

@keyframes ruyiResultFrameAuraL {
  0% {
    background-position: -18% 72%, 118% 70%, center;
  }
  28% {
    background-position: 22% 56%, 78% 82%, center;
  }
  62% {
    background-position: 52% 82%, 48% 58%, center;
  }
  100% {
    background-position: -18% 72%, 118% 70%, center;
  }
}

/* UI refresh M: use home v5 art, simplify dock entries, and suppress canvas floor grid. */
.ruyi-home-exact .home-design-image {
  content: url("./assets/brand/ruyi-home-long-20260704-v5.png") !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

.ruyi-home-exact .home-scroll-extension {
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.1) 20%, rgba(2, 5, 11, 0.72) 100%),
    url("./assets/brand/ruyi-home-long-20260704-v5.png") center -100vh / 100vw auto no-repeat !important;
}

.ruyi-canvas .tool-dock {
  gap: 13px;
}

.ruyi-canvas .tool-button[data-node-type="director3d"] span::before {
  content: "3D" !important;
  inset: 7px 3px auto !important;
  height: 25px;
  border: 2px solid #ffe5a8;
  border-radius: 6px;
  color: #74caff;
  font: 800 13px/21px ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.5px;
  text-align: center;
  transform: none;
  box-shadow: inset 0 0 9px rgba(116, 202, 255, 0.16), 0 0 8px rgba(230, 199, 143, 0.2);
}

.ruyi-canvas .tool-button[data-node-type="director3d"] span::after {
  content: "" !important;
  left: 15px;
  top: 3px;
  width: 9px;
  height: 5px;
  border: 2px solid #74caff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  transform: none;
}

@media (min-width: 821px) and (max-height: 820px) {
  .ruyi-canvas .tool-dock {
    gap: 8px;
  }

  .ruyi-canvas .tool-button {
    min-height: 56px;
    height: 56px;
  }
}

.ruyi-canvas .canvas-app::after {
  top: 62% !important;
  bottom: 0 !important;
  height: auto !important;
  background:
    linear-gradient(180deg, rgba(3, 7, 13, 0), rgba(3, 7, 13, 0.48) 30%, rgba(2, 5, 10, 0.9) 100%) !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* UI refresh N: group selection workflow, latest home art, showcase frames, and recent projects. */
.ruyi-home-exact .home-design-image {
  content: url("./assets/brand/ruyi-home-long-20260704-v6.png") !important;
  top: -5.2vh !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100% + 5.2vh) !important;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

.ruyi-home-exact .home-scroll-extension {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding: 94px 4.8vw 76px;
  scroll-margin-top: 104px;
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.34) 8%, rgba(2, 5, 11, 0.86) 46%, #02050b 100%),
    url("./assets/brand/ruyi-home-long-20260704-v6.png") center calc(-100vh - 5.2vh) / 100vw auto no-repeat !important;
  border-top: 1px solid rgba(230, 199, 143, 0.08);
}

.home-showcase-orbit {
  position: absolute;
  z-index: 4;
  right: 13.4%;
  top: 19.5%;
  width: min(520px, 28vw);
  height: 45vh;
  min-height: 340px;
  pointer-events: none;
  perspective: 900px;
}

.ruyi-home-exact .home-crisp-projects {
  position: absolute;
  left: calc(4.85% + 184px);
  top: 57.1%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 52px;
  border: 1px solid rgba(179, 213, 255, 0.28);
  border-radius: 15px;
  background:
    radial-gradient(circle at 28% 18%, rgba(87, 178, 255, 0.12), transparent 42%),
    rgba(3, 6, 12, 0.42);
  color: rgba(243, 239, 230, 0.9);
  font-size: 16px;
  font-weight: 850;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.ruyi-home-exact .home-crisp-projects span {
  margin-right: 8px;
  color: #8fd3ff;
  font-size: 15px;
}

.ruyi-home-exact .home-crisp-projects:hover {
  border-color: rgba(247, 200, 90, 0.48);
  color: #fffaf0;
}

.home-recent-projects {
  max-width: 1560px;
  margin: 0 auto;
  color: #f3efe6;
}

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

.home-recent-head h2 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(20px, 1.55vw, 30px);
  font-weight: 900;
}

.home-recent-head a {
  color: rgba(230, 199, 143, 0.84);
  font-size: 14px;
  font-weight: 750;
}

.home-recent-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) repeat(4, minmax(180px, 1fr));
  gap: 18px;
}

.home-recent-create,
.home-recent-card {
  display: grid;
  min-height: 190px;
  border: 1px solid rgba(179, 213, 255, 0.18);
  border-radius: 18px;
  overflow: hidden;
  color: #f3efe6;
  background:
    radial-gradient(circle at 30% 12%, rgba(87, 178, 255, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(10, 20, 34, 0.78), rgba(4, 8, 15, 0.88));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 22px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.home-recent-create {
  place-content: center;
  justify-items: center;
  gap: 10px;
  border-style: dashed;
}

.home-recent-create span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(230, 199, 143, 0.12);
  color: #f6d99c;
  font-size: 30px;
  font-weight: 500;
}

.home-recent-create b,
.home-recent-card b {
  font-size: 16px;
  font-weight: 900;
}

.home-recent-create small,
.home-recent-card small {
  color: rgba(243, 239, 230, 0.56);
  font-size: 13px;
}

.home-recent-card {
  grid-template-rows: 122px auto auto;
  gap: 8px;
  padding-bottom: 16px;
}

.home-recent-card img {
  display: block;
  width: 100%;
  height: 122px;
  object-fit: cover;
}

.home-recent-card b,
.home-recent-card small {
  padding: 0 14px;
}

.home-recent-card:hover,
.home-recent-create:hover {
  border-color: rgba(247, 200, 90, 0.46);
  transform: translateY(-2px);
}

.selection-marquee {
  position: absolute;
  z-index: 100;
  display: none;
  border: 1px dashed rgba(243, 239, 230, 0.62);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(87, 178, 255, 0.12), transparent 66%),
    rgba(243, 239, 230, 0.045);
  box-shadow:
    inset 0 0 0 1px rgba(87, 178, 255, 0.12),
    0 0 28px rgba(87, 178, 255, 0.14);
  pointer-events: none;
}

.selection-marquee.active {
  display: block;
}

.selection-group-box {
  position: absolute;
  z-index: 36;
  display: none;
  min-width: 80px;
  min-height: 80px;
  border: 1px dashed rgba(243, 239, 230, 0.58);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(53, 191, 255, 0.08), transparent 38%),
    radial-gradient(circle at 78% 68%, rgba(247, 200, 90, 0.06), transparent 46%);
  box-shadow:
    inset 0 0 0 1px rgba(53, 191, 255, 0.08),
    0 0 26px rgba(53, 191, 255, 0.12);
  pointer-events: none;
}

.selection-group-box.open {
  display: block;
}

.selection-group-box.connecting {
  border-color: rgba(247, 200, 90, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(247, 200, 90, 0.16),
    0 0 34px rgba(247, 200, 90, 0.24),
    0 0 28px rgba(53, 191, 255, 0.16);
}

.selection-group-label {
  position: absolute;
  right: 18px;
  top: -34px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 11px;
  border: 1px solid rgba(230, 199, 143, 0.3);
  border-radius: 999px;
  background: rgba(5, 9, 15, 0.76);
  color: rgba(243, 239, 230, 0.86);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.selection-group-port {
  position: absolute;
  right: -14px;
  top: 50%;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #f7c85a;
  border-radius: 999px;
  background: #03070d;
  box-shadow:
    0 0 0 6px rgba(247, 200, 90, 0.13),
    0 0 18px rgba(247, 200, 90, 0.6);
  cursor: crosshair;
  pointer-events: auto;
  transform: translateY(-50%);
}

.selection-group-port::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: rgba(247, 200, 90, 0.88);
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 140ms ease, transform 140ms ease;
}

.selection-group-port:hover::after,
.selection-group-box.connecting .selection-group-port::after {
  opacity: 1;
  transform: scale(1);
}

.selection-toolbar {
  position: absolute;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(179, 213, 255, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 24% 8%, rgba(87, 178, 255, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(18, 26, 39, 0.92), rgba(5, 9, 15, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 20px 54px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.selection-toolbar.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.selection-toolbar button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(230, 199, 143, 0.22);
  border-radius: 11px;
  background: rgba(7, 13, 22, 0.72);
  color: rgba(243, 239, 230, 0.88);
  font-size: 13px;
  font-weight: 850;
}

.selection-toolbar button:hover {
  border-color: rgba(247, 200, 90, 0.56);
  color: #fffaf0;
  background: rgba(247, 200, 90, 0.11);
}

.node-card.multi-selected {
  z-index: 18;
  outline: 1px dashed rgba(243, 239, 230, 0.6);
  outline-offset: 8px;
}

.node-card.visual-node.multi-selected .result-frame,
.node-card.multi-selected:not(.visual-node) {
  box-shadow:
    0 0 0 1px rgba(87, 178, 255, 0.5),
    0 0 26px rgba(87, 178, 255, 0.22),
    0 18px 46px rgba(0, 0, 0, 0.36) !important;
}

@keyframes homeShowcaseFloat {
  0%,
  100% {
    translate: 0 0;
  }
  35% {
    translate: 10px -12px;
  }
  68% {
    translate: -9px 8px;
  }
}

@media (max-width: 1180px) {
  .home-showcase-orbit {
    display: none;
  }

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

/* UI refresh O: project-aware homepage layout and recent-project alignment. */
.ruyi-home-exact .home-crisp-projects {
  top: 58.8% !important;
  left: calc(4.85% + 172px) !important;
  width: 126px;
  height: 52px;
  gap: 7px;
  padding: 0 14px;
  line-height: 1;
  white-space: nowrap;
}

.ruyi-home-exact .home-crisp-projects span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  margin-right: 0;
  line-height: 1;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects {
  position: absolute;
  left: 4.7%;
  top: 77.6%;
  z-index: 5;
  width: 90.6%;
  max-width: none;
  margin: 0;
  color: #f3efe6;
  pointer-events: auto;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-head {
  margin-bottom: 12px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-head h2 {
  font-size: clamp(18px, 1.25vw, 24px);
  line-height: 1.15;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-row {
  grid-template-columns: minmax(150px, 190px) repeat(4, minmax(148px, 1fr));
  gap: 14px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  min-height: 134px;
  border-radius: 16px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create {
  gap: 6px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 23px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  grid-template-rows: 78px auto auto;
  gap: 5px;
  padding-bottom: 10px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card img {
  height: 78px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create b,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card b {
  font-size: 14px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create small,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card small {
  font-size: 11px;
}

@media (max-width: 1180px) {
  .ruyi-home-exact .home-crisp-layer > .home-recent-projects {
    display: none;
  }
}

/* UI refresh P: compact real project shelf, no cropped demo strip. */
.ruyi-home-exact .home-crisp-layer > .home-recent-projects {
  top: 76.6%;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-row {
  grid-template-columns: minmax(150px, 180px) repeat(3, minmax(260px, 1fr));
  gap: 18px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  min-height: 156px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  grid-template-rows: 104px auto auto;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card img {
  height: 104px;
  object-fit: cover;
  object-position: center center;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-template img {
  object-position: center center;
}

/* UI refresh Q: recent project link follows actual cards instead of floating at page edge. */
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-head {
  justify-content: flex-start;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-head a {
  display: none;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-row {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
  overflow: visible;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create {
  flex: 0 0 180px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  flex: 0 0 clamp(280px, 21vw, 360px);
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-all {
  align-self: center;
  flex: 0 0 auto;
  min-height: 0;
  padding: 10px 12px;
  border: 0;
  color: rgba(230, 199, 143, 0.88);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  box-shadow: none;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-all:hover {
  color: #fff1c4;
  text-shadow: 0 0 12px rgba(247, 200, 90, 0.36);
}

.ruyi-canvas .save-project-button {
  width: auto;
  min-width: 78px;
  padding: 0 16px;
  font-size: 14px;
  letter-spacing: 0;
}

.ruyi-canvas .save-project-button span {
  display: inline-block;
  color: rgba(243, 239, 230, 0.92);
  font-weight: 900;
  line-height: 1;
}

/* UI refresh R: keep visual CTAs and real click targets aligned. */
.ruyi-home-exact .home-start,
.ruyi-home-exact .home-generate,
.ruyi-home-exact .home-nav-create,
.ruyi-home-exact .home-pill-video,
.ruyi-home-exact .home-pill-script,
.ruyi-home-exact .home-pill-image,
.ruyi-home-exact .home-pill-image-video,
.ruyi-home-exact .home-pill-text-video {
  z-index: 28;
  pointer-events: auto;
}

.ruyi-home-exact .home-fixed-login,
.ruyi-home-exact .home-crisp-start,
.ruyi-home-exact .home-recent-create {
  pointer-events: auto;
}

.ruyi-home-exact .home-crisp-layer {
  z-index: 34;
}

/* Login sync: the fixed header owns top navigation clicks. Legacy bitmap hotspots
   can drift under responsive scaling and must not intercept login/start actions. */
.ruyi-home-exact .home-logo-link,
.ruyi-home-exact .home-nav-home,
.ruyi-home-exact .home-nav-create,
.ruyi-home-exact .home-nav-template,
.ruyi-home-exact .home-nav-theater,
.ruyi-home-exact .home-nav-price,
.ruyi-home-exact .home-nav-help,
.ruyi-home-exact .home-login,
.ruyi-home-exact .home-start {
  pointer-events: none !important;
}

.home-fixed-login {
  position: relative;
  z-index: 121;
  pointer-events: auto;
}

.ruyi-home-exact .home-start {
  left: 85.9%;
  top: 2.1%;
  width: 11.0%;
  height: 6.4%;
}

.ruyi-home-exact .home-generate {
  left: 33.2%;
  top: 45.5%;
  width: 14.0%;
  height: 9.0%;
}

/* UI refresh S: project browser and blank project covers. */
.context-menu [hidden] {
  display: none !important;
}

.home-project-placeholder {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 122px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 25%, rgba(87, 178, 255, 0.14), transparent 42%),
    radial-gradient(circle at 72% 78%, rgba(247, 200, 90, 0.09), transparent 44%),
    linear-gradient(180deg, rgba(16, 25, 38, 0.82), rgba(4, 8, 15, 0.92));
  border-bottom: 1px solid rgba(179, 213, 255, 0.1);
}

.home-project-placeholder::before {
  content: "";
  width: 54px;
  height: 40px;
  border: 2px solid rgba(243, 239, 230, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(243, 239, 230, 0.22) 47% 53%, transparent 54%),
    radial-gradient(circle at 72% 30%, rgba(230, 199, 143, 0.54) 0 4px, transparent 5px);
  box-shadow:
    0 0 18px rgba(87, 178, 255, 0.12),
    inset 0 0 18px rgba(87, 178, 255, 0.07);
  opacity: 0.8;
}

.home-project-placeholder span {
  display: none;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card .home-project-placeholder {
  height: 104px;
}

body.all-projects-open {
  overflow: hidden;
}

.all-projects-view {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  overflow: auto;
  color: #f3efe6;
  background:
    radial-gradient(circle at 50% 100%, rgba(87, 178, 255, 0.16), transparent 42%),
    radial-gradient(circle at 76% 18%, rgba(247, 200, 90, 0.1), transparent 36%),
    linear-gradient(180deg, rgba(2, 5, 10, 0.96), rgba(4, 9, 16, 0.98));
}

.all-projects-view.open {
  display: block;
}

.all-projects-shell {
  min-height: 100%;
  padding: 30px clamp(20px, 4vw, 72px) 64px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
}

.all-projects-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin: 0 0 30px;
  padding: 12px 0 20px;
  background: linear-gradient(180deg, rgba(2, 5, 10, 0.98), rgba(2, 5, 10, 0.74), transparent);
}

.all-projects-header h2 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(24px, 2vw, 36px);
  font-weight: 900;
  letter-spacing: 0;
}

.all-projects-back,
.all-projects-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(230, 199, 143, 0.28);
  border-radius: 12px;
  color: rgba(243, 239, 230, 0.9);
  background:
    radial-gradient(circle at 30% 14%, rgba(87, 178, 255, 0.13), transparent 48%),
    rgba(6, 12, 22, 0.76);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.28);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.all-projects-new {
  color: #15120b;
  background: linear-gradient(180deg, #fff3c9, #d6a85d);
  border-color: rgba(255, 232, 178, 0.66);
}

.all-projects-back:hover,
.all-projects-new:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.all-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px;
}

.all-project-create,
.all-project-card {
  display: grid;
  min-height: 248px;
  overflow: hidden;
  border: 1px solid rgba(179, 213, 255, 0.18);
  border-radius: 18px;
  color: #f3efe6;
  background:
    radial-gradient(circle at 28% 12%, rgba(87, 178, 255, 0.13), transparent 46%),
    linear-gradient(180deg, rgba(14, 24, 38, 0.78), rgba(5, 9, 15, 0.9));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.all-project-create {
  place-content: center;
  justify-items: center;
  gap: 10px;
  border-style: dashed;
}

.all-project-create span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #f6d99c;
  background: rgba(230, 199, 143, 0.12);
  font-size: 32px;
  line-height: 1;
}

.all-project-create b,
.all-project-card b {
  padding: 0 18px;
  color: #fffaf0;
  font-size: 17px;
  font-weight: 900;
}

.all-project-create small,
.all-project-card small {
  padding: 0 18px 18px;
  color: rgba(243, 239, 230, 0.6);
  font-size: 13px;
}

.all-project-card {
  grid-template-rows: 164px auto auto;
  gap: 8px;
}

.all-project-card img,
.all-project-card .home-project-placeholder {
  display: block;
  width: 100%;
  height: 164px;
  object-fit: cover;
}

.all-project-card:hover,
.all-project-create:hover {
  border-color: rgba(247, 200, 90, 0.48);
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .all-projects-header {
    grid-template-columns: 1fr;
  }

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

/* UI refresh T: lock homepage elements to one responsive coordinate system. */
.ruyi-home-exact {
  --home-left: clamp(78px, 5.4vw, 118px);
  --home-content-width: clamp(660px, 42vw, 860px);
  --home-entry-width: clamp(560px, 36vw, 720px);
  --home-art-height: clamp(1040px, 100vh, 1180px);
  --home-title-top: clamp(176px, 18.8vh, 216px);
  --home-subtitle-top: calc(var(--home-title-top) + clamp(96px, 9.4vh, 116px));
  --home-prompt-top: calc(var(--home-subtitle-top) + clamp(116px, 10.4vh, 132px));
  --home-prompt-height: clamp(255px, calc(var(--home-entry-width) * 0.455), 328px);
  --home-secondary-top: calc(var(--home-prompt-top) + var(--home-prompt-height) + 14px);
  --home-pill-top: calc(var(--home-prompt-top) + var(--home-prompt-height) + 30px);
  --home-recent-gap: clamp(32px, 3.2vh, 46px);
  --home-recent-top: calc(var(--home-pill-top) + 70px + var(--home-recent-gap));
}

.ruyi-home-exact .home-artboard {
  height: var(--home-art-height) !important;
  min-height: 1040px !important;
}

.ruyi-home-exact .home-crisp-title,
.ruyi-home-exact .home-crisp-subtitle,
.ruyi-home-exact .home-crisp-prompt,
.ruyi-home-exact .home-crisp-template,
.ruyi-home-exact .home-crisp-projects,
.ruyi-home-exact .home-pill-labels,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects {
  left: var(--home-left) !important;
}

.ruyi-home-exact .home-crisp-title {
  top: var(--home-title-top) !important;
  font-size: clamp(44px, 3.35vw, 64px) !important;
}

.ruyi-home-exact .home-crisp-subtitle {
  top: var(--home-subtitle-top) !important;
  max-width: var(--home-content-width);
  font-size: clamp(18px, 1.24vw, 24px) !important;
  line-height: 1.72 !important;
}

.ruyi-home-exact .home-crisp-prompt {
  top: var(--home-prompt-top) !important;
  width: var(--home-entry-width) !important;
  height: var(--home-prompt-height) !important;
}

.ruyi-home-exact .home-crisp-prompt p {
  right: 238px !important;
  top: 26px !important;
  font-size: clamp(14px, 0.92vw, 17px) !important;
  line-height: 1.48 !important;
}

.ruyi-home-exact .home-crisp-prompt small {
  right: 204px !important;
  bottom: 27px !important;
}

.ruyi-home-exact .home-crisp-prompt a {
  right: 20px !important;
  bottom: 30px !important;
  width: 164px !important;
  height: 62px !important;
}

.ruyi-home-exact .home-canvas-entry-card {
  aspect-ratio: 1329 / 605;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-layer {
  position: absolute;
  display: block;
  border: 0;
  user-select: none;
  pointer-events: none;
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-background {
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter:
    drop-shadow(-2px 0 3px rgba(83, 161, 255, 0.5))
    drop-shadow(2px 0 3px rgba(255, 193, 81, 0.42));
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-icon {
  z-index: 1;
  left: 6.7%;
  top: 8.6%;
  width: 14.1%;
  height: auto;
  filter:
    drop-shadow(-1px 0 2px rgba(83, 161, 255, 0.42))
    drop-shadow(1px 0 2px rgba(255, 193, 81, 0.38));
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-title {
  z-index: 1;
  left: 5.8%;
  top: 52.8%;
  width: 43%;
  height: auto;
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-button-art {
  z-index: 1;
  left: 63.2%;
  top: 47.5%;
  width: 32.5%;
  height: 38.5%;
  object-fit: fill;
  filter: drop-shadow(0 0 3px rgba(255, 190, 74, 0.46));
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-button {
  position: absolute;
  left: 65.8% !important;
  top: 49.2% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2;
  display: block;
  width: 25.2% !important;
  height: 26.2% !important;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: transparent;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

.ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-button:focus-visible {
  outline: 2px solid rgba(247, 200, 90, 0.85);
  outline-offset: 4px;
}

.ruyi-home-exact .home-crisp-template,
.ruyi-home-exact .home-crisp-projects {
  top: var(--home-secondary-top) !important;
}

.ruyi-home-exact .home-crisp-projects {
  left: calc(var(--home-left) + 176px) !important;
}

.ruyi-home-exact .home-pill-labels {
  top: var(--home-pill-top) !important;
  display: grid !important;
  width: min(790px, calc(100vw - 144px));
  grid-template-columns: 138px 138px 138px 138px 150px !important;
  gap: 12px !important;
}

.ruyi-home-exact .home-pill-labels a {
  min-height: 70px !important;
  box-sizing: border-box;
}

.ruyi-home-exact .home-showcase-orbit {
  right: clamp(126px, 11.5vw, 260px) !important;
  top: clamp(205px, 21vh, 250px) !important;
  width: clamp(390px, 27vw, 520px) !important;
  height: clamp(360px, 42vh, 470px) !important;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects {
  top: var(--home-recent-top) !important;
  right: var(--home-left) !important;
  width: auto !important;
  max-width: none !important;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-row {
  display: flex !important;
  align-items: stretch;
  justify-content: flex-start;
  gap: 18px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create {
  flex: 0 0 176px;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  flex: 0 0 clamp(280px, 20vw, 360px);
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-all {
  position: static;
  align-self: center;
  margin-left: 4px;
}

.ruyi-home-exact .home-generate {
  display: none !important;
  pointer-events: none !important;
}

@media (min-width: 1900px) {
  .ruyi-home-exact {
    --home-left: clamp(156px, 8.4vw, 205px);
    --home-content-width: clamp(840px, 42vw, 920px);
    --home-entry-width: clamp(640px, 34vw, 740px);
    --home-title-top: clamp(178px, 17.6vh, 205px);
    --home-prompt-height: clamp(292px, calc(var(--home-entry-width) * 0.455), 337px);
  }

  .ruyi-home-exact .home-crisp-title {
    font-size: clamp(56px, 3.15vw, 70px) !important;
  }

  .ruyi-home-exact .home-crisp-subtitle {
    font-size: clamp(20px, 1.15vw, 26px) !important;
  }

  .ruyi-home-exact .home-pill-labels {
    grid-template-columns: 146px 146px 146px 146px 158px !important;
    gap: 14px !important;
  }

  .ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create {
    flex-basis: 190px;
  }

  .ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
    flex-basis: clamp(310px, 19vw, 390px);
  }
}

@media (max-width: 1180px) {
  .ruyi-home-exact {
    --home-left: clamp(44px, 5.3vw, 68px);
    --home-content-width: min(760px, calc(100vw - 80px));
    --home-art-height: 980px;
  }

  .ruyi-home-exact .home-showcase-orbit {
    display: none !important;
  }

  .ruyi-home-exact .home-pill-labels {
    width: calc(100vw - 80px);
    grid-template-columns: repeat(3, minmax(128px, 1fr)) !important;
  }

  .ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-row {
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

@media (max-width: 760px) {
  .ruyi-home-exact {
    --home-left: 24px;
    --home-content-width: calc(100vw - 48px);
    --home-entry-width: calc(100vw - 48px);
    --home-title-top: 154px;
    --home-prompt-height: clamp(214px, calc(var(--home-entry-width) * 0.455), 300px);
    --home-art-height: 1040px;
  }

  .ruyi-home-exact .home-crisp-title {
    font-size: 40px !important;
  }

  .ruyi-home-exact .home-canvas-entry-card img {
    object-position: center;
  }

  .ruyi-home-exact .home-canvas-entry-card .home-canvas-entry-button {
    left: 65.8% !important;
    top: 49.2% !important;
    width: 25.2% !important;
    height: 26.2% !important;
  }

  .ruyi-home-exact .home-crisp-projects {
    left: calc(var(--home-left) + 168px) !important;
  }

  .ruyi-home-exact .home-pill-labels {
    width: calc(100vw - 48px);
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* UI refresh U: keep homepage header and hit areas on the same responsive rails. */
.ruyi-home-exact .home-crisp-logo {
  left: clamp(42px, 3.25vw, 66px) !important;
  top: 24px !important;
  width: clamp(124px, 7.8vw, 166px) !important;
}

.ruyi-home-exact .home-crisp-nav {
  left: 50% !important;
  top: 38px !important;
  gap: clamp(28px, 2.55vw, 46px) !important;
  transform: translateX(-50%);
}

.ruyi-home-exact .home-crisp-nav a {
  font-size: clamp(15px, 0.95vw, 18px) !important;
  white-space: nowrap;
}

.ruyi-home-exact .home-crisp-login {
  left: auto !important;
  right: clamp(208px, 11.6vw, 248px) !important;
  top: 25px !important;
  width: clamp(104px, 5.6vw, 124px) !important;
  height: 56px !important;
}

.ruyi-home-exact .home-crisp-start {
  left: auto !important;
  right: clamp(54px, 4vw, 76px) !important;
  top: 25px !important;
  width: clamp(142px, 8.15vw, 174px) !important;
  height: 56px !important;
}

.ruyi-home-exact .home-logo-link {
  left: clamp(36px, 2.95vw, 58px) !important;
  top: 18px !important;
  width: clamp(134px, 8.35vw, 178px) !important;
  height: 72px !important;
}

.ruyi-home-exact .home-nav-home,
.ruyi-home-exact .home-nav-create,
.ruyi-home-exact .home-nav-template,
.ruyi-home-exact .home-nav-theater,
.ruyi-home-exact .home-nav-price,
.ruyi-home-exact .home-nav-help {
  top: 28px !important;
  height: 48px !important;
}

.ruyi-home-exact .home-nav-home {
  left: calc(50% - 258px) !important;
  width: 52px !important;
}

.ruyi-home-exact .home-nav-create {
  left: calc(50% - 174px) !important;
  width: 66px !important;
}

.ruyi-home-exact .home-nav-template {
  left: calc(50% - 72px) !important;
  width: 82px !important;
}

.ruyi-home-exact .home-nav-theater {
  left: calc(50% + 42px) !important;
  width: 82px !important;
}

.ruyi-home-exact .home-nav-price {
  left: calc(50% + 156px) !important;
  width: 82px !important;
}

.ruyi-home-exact .home-nav-help {
  left: calc(50% + 270px) !important;
  width: 82px !important;
}

.ruyi-home-exact .home-login {
  left: auto !important;
  right: clamp(208px, 11.6vw, 248px) !important;
  top: 25px !important;
  width: clamp(104px, 5.6vw, 124px) !important;
  height: 56px !important;
}

.ruyi-home-exact .home-start {
  left: auto !important;
  right: clamp(54px, 4vw, 76px) !important;
  top: 25px !important;
  width: clamp(142px, 8.15vw, 174px) !important;
  height: 56px !important;
}

@media (max-width: 1180px) {
  .ruyi-home-exact .home-crisp-nav,
  .ruyi-home-exact .home-nav-home,
  .ruyi-home-exact .home-nav-create,
  .ruyi-home-exact .home-nav-template,
  .ruyi-home-exact .home-nav-theater,
  .ruyi-home-exact .home-nav-price,
  .ruyi-home-exact .home-nav-help {
    display: none !important;
  }

  .ruyi-home-exact .home-crisp-login,
  .ruyi-home-exact .home-login {
    right: 196px !important;
  }

  .ruyi-home-exact .home-crisp-start,
  .ruyi-home-exact .home-start {
    right: 40px !important;
  }
}

/* UI refresh V: remove secondary homepage buttons and preserve full project covers. */
.ruyi-home-exact .home-crisp-template,
.ruyi-home-exact .home-crisp-projects,
.ruyi-home-exact .home-template-button {
  display: none !important;
  pointer-events: none !important;
}

.home-recent-card {
  grid-template-rows: auto auto auto !important;
}

.home-recent-card img,
.home-recent-card .home-project-placeholder {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: contain !important;
  object-position: center center !important;
  background:
    radial-gradient(circle at 32% 24%, rgba(87, 178, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(7, 13, 22, 0.94), rgba(3, 6, 11, 0.98));
}

.all-project-card {
  grid-template-rows: auto auto auto !important;
}

.all-project-card img,
.all-project-card .home-project-placeholder {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: contain !important;
  object-position: center center !important;
  background:
    radial-gradient(circle at 32% 24%, rgba(87, 178, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(7, 13, 22, 0.94), rgba(3, 6, 11, 0.98));
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-create,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  min-height: 176px !important;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card {
  flex-basis: clamp(260px, 17.5vw, 320px) !important;
  grid-template-rows: 126px auto auto !important;
}

.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card img,
.ruyi-home-exact .home-crisp-layer > .home-recent-projects .home-recent-card .home-project-placeholder {
  height: 126px !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* UI refresh W: project card actions, deletion confirmation, and copy feedback. */
.home-recent-card,
.all-project-card {
  position: relative;
  cursor: pointer;
}

.home-recent-card:focus-visible,
.all-project-card:focus-visible {
  outline: 1px solid rgba(247, 200, 90, 0.72);
  outline-offset: 3px;
}

.project-card-menu-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(247, 200, 90, 0.28);
  border-radius: 10px;
  color: #ffe3a5;
  background:
    radial-gradient(circle at 48% 22%, rgba(247, 200, 90, 0.16), transparent 58%),
    rgba(3, 7, 13, 0.68);
  box-shadow:
    inset 0 0 14px rgba(123, 191, 255, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.28);
  font: 800 15px / 1 var(--font-sans);
  letter-spacing: 1px;
  cursor: pointer;
  opacity: 0.82;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.home-recent-card:hover .project-card-menu-button,
.all-project-card:hover .project-card-menu-button,
.project-card-menu-button:focus-visible,
.project-card-menu-button[aria-expanded="true"] {
  opacity: 1;
  transform: translateY(0);
}

.project-card-menu-button:hover,
.project-card-menu-button[aria-expanded="true"] {
  border-color: rgba(247, 200, 90, 0.68);
  color: #fff3c7;
}

.project-card-menu {
  position: absolute;
  top: 46px;
  right: 10px;
  z-index: 12;
  display: grid;
  min-width: 154px;
  padding: 8px;
  border: 1px solid rgba(247, 200, 90, 0.26);
  border-radius: 12px;
  background:
    radial-gradient(circle at 15% 10%, rgba(74, 160, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(8, 15, 24, 0.96), rgba(3, 6, 11, 0.98));
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.42),
    inset 0 0 20px rgba(247, 200, 90, 0.04);
}

.project-card-menu[hidden] {
  display: none !important;
}

.project-card-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: rgba(250, 246, 238, 0.88);
  background: transparent;
  font: 700 13px / 1.2 var(--font-sans);
  text-align: left;
  cursor: pointer;
}

.project-card-menu button:hover {
  color: #fff7d4;
  background: rgba(247, 200, 90, 0.12);
}

.project-card-menu button.danger {
  color: #ffb0a5;
}

.project-card-menu button.danger:hover {
  color: #fff0ec;
  background: rgba(255, 106, 96, 0.16);
}

body.project-delete-open {
  overflow: hidden;
}

.project-delete-dialog {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 9, 0.62);
  backdrop-filter: blur(10px);
}

.project-delete-dialog.open,
.project-link-dialog.open {
  display: grid;
}

.project-delete-panel,
.project-link-panel {
  width: min(440px, calc(100vw - 48px));
  padding: 26px;
  border: 1px solid rgba(247, 200, 90, 0.34);
  border-radius: 20px;
  color: #f7f1e8;
  background:
    radial-gradient(circle at 18% 0%, rgba(74, 160, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(10, 17, 28, 0.98), rgba(3, 6, 11, 0.99));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.54),
    inset 0 0 24px rgba(247, 200, 90, 0.05);
}

.project-delete-panel h2,
.project-link-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

.project-delete-panel p,
.project-link-panel p {
  margin: 0;
  white-space: pre-line;
  color: rgba(250, 246, 238, 0.72);
  font-size: 14px;
  line-height: 1.8;
}

.project-link-dialog {
  position: fixed;
  inset: 0;
  z-index: 265;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(1, 4, 9, 0.56);
  backdrop-filter: blur(10px);
}

.project-link-panel {
  width: min(560px, calc(100vw - 48px));
}

.project-link-panel input {
  width: 100%;
  height: 42px;
  margin-top: 16px;
  padding: 0 12px;
  border: 1px solid rgba(179, 213, 255, 0.26);
  border-radius: 12px;
  color: #fff7d8;
  background: rgba(2, 6, 12, 0.84);
  font: 700 13px / 1.2 var(--font-sans);
}

.project-link-panel button {
  display: block;
  min-width: 96px;
  height: 40px;
  margin-top: 18px;
  margin-left: auto;
  border: 1px solid rgba(247, 200, 90, 0.32);
  border-radius: 12px;
  color: #1d160b;
  background: linear-gradient(180deg, #fff4c8, #d9a858);
  box-shadow: 0 14px 34px rgba(247, 200, 90, 0.16);
  font: 900 14px / 1 var(--font-sans);
  cursor: pointer;
}

.project-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.project-delete-actions button {
  min-width: 96px;
  height: 40px;
  border-radius: 12px;
  font: 800 14px / 1 var(--font-sans);
  cursor: pointer;
}

.project-delete-cancel {
  border: 1px solid rgba(179, 213, 255, 0.22);
  color: rgba(250, 246, 238, 0.82);
  background: rgba(9, 16, 27, 0.78);
}

.project-delete-confirm {
  border: 1px solid rgba(255, 112, 96, 0.38);
  color: #fff4ef;
  background: linear-gradient(180deg, rgba(255, 138, 118, 0.92), rgba(154, 44, 38, 0.94));
  box-shadow: 0 14px 34px rgba(255, 93, 78, 0.18);
}

.home-project-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 280;
  max-width: min(460px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid rgba(247, 200, 90, 0.3);
  border-radius: 14px;
  color: #fff3c7;
  background: rgba(4, 8, 14, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
  font: 800 13px / 1.4 var(--font-sans);
}

.home-project-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* UI refresh X: compact LibTV-style media carousel around the hero logo. */
.ruyi-home-exact .home-showcase-orbit {
  right: clamp(82px, 7.6vw, 158px) !important;
  top: clamp(190px, 20.5vh, 260px) !important;
  width: clamp(430px, 31vw, 620px) !important;
  height: clamp(255px, 31vh, 390px) !important;
  z-index: 5;
  pointer-events: auto;
  perspective: 1200px;
}

.ruyi-home-exact .home-showcase-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.ruyi-home-exact .home-showcase-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.ruyi-home-exact .home-showcase-slide {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  align-content: end;
  width: clamp(250px, 18.2vw, 365px);
  aspect-ratio: 16 / 9;
  padding: clamp(13px, 1vw, 18px);
  border: 1px solid rgba(179, 213, 255, 0.28);
  border-radius: 18px;
  color: #fffaf0;
  overflow: hidden;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(7, 19, 34, 0.78), rgba(7, 11, 18, 0.42)),
    rgba(4, 8, 14, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 18px 52px rgba(0, 0, 0, 0.34);
  transform: translate(-50%, -50%) scale(0.76);
  transform-origin: center center;
  transform-style: preserve-3d;
  opacity: 0.48;
  filter: brightness(0.68) saturate(0.82);
  will-change: transform, opacity, filter;
  transition:
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 420ms ease,
    filter 420ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.ruyi-home-exact .home-showcase-slide video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  opacity: 0.62;
  transform: scale(1.02);
  transition: opacity 240ms ease, filter 240ms ease;
}

.ruyi-home-exact .home-showcase-shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0.04) 0%, rgba(2, 5, 11, 0.18) 48%, rgba(2, 5, 11, 0.82) 100%),
    radial-gradient(circle at 68% 18%, rgba(149, 208, 255, 0.2), transparent 34%);
}

.ruyi-home-exact .home-showcase-play {
  position: absolute;
  right: clamp(18px, 1.4vw, 26px);
  top: clamp(16px, 1.25vw, 24px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(28px, 2.05vw, 40px);
  height: clamp(28px, 2.05vw, 40px);
  padding: 0;
  border: 1px solid rgba(255, 250, 240, 0.56);
  border-radius: 50%;
  background: rgba(7, 14, 25, 0.28);
  box-shadow: 0 0 26px rgba(149, 208, 255, 0.14);
  backdrop-filter: blur(7px);
  cursor: pointer;
  appearance: none;
  font: inherit;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ruyi-home-exact .home-showcase-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid rgba(255, 250, 240, 0.9);
}

.ruyi-home-exact .home-showcase-play:hover,
.ruyi-home-exact .home-showcase-play:focus-visible {
  border-color: rgba(247, 200, 90, 0.82);
  background: rgba(9, 15, 24, 0.72);
  box-shadow:
    0 0 22px rgba(247, 200, 90, 0.3),
    0 0 34px rgba(149, 208, 255, 0.18);
  outline: 0;
  transform: scale(1.06);
}

.ruyi-home-exact .home-showcase-kicker,
.ruyi-home-exact .home-showcase-slide b {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.ruyi-home-exact .home-showcase-kicker {
  color: rgba(179, 213, 255, 0.8);
  font-size: clamp(10px, 0.72vw, 12px);
  font-weight: 800;
  letter-spacing: 0;
}

.ruyi-home-exact .home-showcase-slide b {
  margin-top: 5px;
  color: #fffaf0;
  font-size: clamp(16px, 1.18vw, 22px);
  line-height: 1.08;
  font-weight: 950;
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"] {
  z-index: 9;
  opacity: 0.74;
  filter: brightness(0.92) saturate(0.98);
  background: #050a12;
  border-color: rgba(179, 213, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 46px rgba(87, 178, 255, 0.22),
    0 26px 76px rgba(0, 0, 0, 0.46);
  transform: translate(-50%, -50%) scale(1.08) rotateZ(0deg) rotateY(0deg) translateZ(48px);
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"] video {
  opacity: 0.82;
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="prev"] {
  z-index: 3;
  transform: translate(-122%, -55%) scale(0.8) rotateZ(-4deg) rotateY(-18deg) translateZ(-18px);
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="next"] {
  z-index: 4;
  transform: translate(24%, -14%) scale(0.8) rotateZ(4deg) rotateY(18deg) translateZ(-18px);
}

.ruyi-home-exact .home-showcase-slide:hover,
.ruyi-home-exact .home-showcase-slide:focus-visible {
  z-index: 8;
  opacity: 1;
  filter: brightness(1.14) saturate(1.1);
  border-color: rgba(247, 200, 90, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 46px rgba(87, 178, 255, 0.28),
    0 0 42px rgba(247, 200, 90, 0.2),
    0 30px 82px rgba(0, 0, 0, 0.5);
}

.ruyi-home-exact .home-showcase-slide:hover video,
.ruyi-home-exact .home-showcase-slide:focus-visible video {
  opacity: 1;
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"]:hover,
.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"]:focus-visible {
  transform: translate(-50%, -50%) scale(1.16) rotateZ(0deg) rotateY(0deg) translateZ(72px);
}

.ruyi-home-exact .home-showcase-arrow {
  position: absolute;
  top: 49%;
  z-index: 10;
  display: grid;
  place-items: center;
  width: clamp(30px, 2.2vw, 38px);
  height: clamp(42px, 3vw, 54px);
  border: 1px solid rgba(179, 213, 255, 0.22);
  border-radius: 12px;
  color: rgba(255, 250, 240, 0.9);
  background: rgba(3, 7, 13, 0.48);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.ruyi-home-exact .home-showcase-prev {
  left: clamp(-12px, -0.6vw, -6px);
}

.ruyi-home-exact .home-showcase-next {
  right: clamp(-12px, -0.6vw, -6px);
}

.ruyi-home-exact .home-showcase-arrow:hover,
.ruyi-home-exact .home-showcase-arrow:focus-visible {
  border-color: rgba(247, 200, 90, 0.55);
  color: #fff4c8;
  background: rgba(9, 15, 24, 0.72);
}

.ruyi-home-exact .home-showcase-dots {
  position: absolute;
  left: 50%;
  bottom: clamp(2px, 0.3vh, 8px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.ruyi-home-exact .home-showcase-dots button {
  width: 18px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(179, 213, 255, 0.34);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ruyi-home-exact .home-showcase-dots button.is-active {
  width: 32px;
  background: linear-gradient(90deg, #8fd3ff, #f7c85a);
  box-shadow: 0 0 18px rgba(143, 211, 255, 0.22);
}

@media (min-width: 1680px) {
  .ruyi-home-exact .home-showcase-orbit {
    left: clamp(980px, 56vw, 1220px) !important;
    right: auto !important;
    top: clamp(210px, 21vh, 266px) !important;
    width: clamp(650px, 36vw, 780px) !important;
    height: clamp(380px, 40vh, 480px) !important;
  }

  .ruyi-home-exact .home-showcase-slide {
    width: clamp(390px, 22vw, 490px);
  }

  .ruyi-home-exact .home-showcase-slide[data-showcase-position="prev"] {
    transform: translate(-104%, -54%) scale(0.74) rotateZ(-4deg) rotateY(-18deg) translateZ(-22px);
  }

  .ruyi-home-exact .home-showcase-slide[data-showcase-position="next"] {
    transform: translate(-10%, -10%) scale(0.72) rotateZ(4deg) rotateY(18deg) translateZ(-22px);
  }
}

@media (max-width: 1180px) {
  .ruyi-home-exact .home-showcase-orbit {
    right: clamp(44px, 4vw, 72px) !important;
    top: clamp(214px, 23vh, 260px) !important;
    width: clamp(360px, 34vw, 430px) !important;
    height: clamp(230px, 28vh, 310px) !important;
  }

  .ruyi-home-exact .home-showcase-slide {
    width: clamp(210px, 19vw, 255px);
  }
}

@media (max-width: 900px) {
  .ruyi-home-exact .home-showcase-orbit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ruyi-home-exact .home-showcase-slide {
    transition: none;
  }

  .ruyi-home-exact .home-showcase-slide video {
    animation: none;
  }
}

/* UI refresh Y: final homepage rail lock for responsive hero media and seamless background. */
.ruyi-home-exact {
  --home-bg-shift: 5.2vh;
  --home-showcase-width: clamp(520px, 33vw, 740px);
  --home-showcase-height: clamp(305px, 34vh, 455px);
  --home-showcase-left: clamp(
    calc(var(--home-left) + var(--home-content-width) + clamp(82px, 5.6vw, 150px)),
    54vw,
    calc(100vw - var(--home-showcase-width) - clamp(72px, 5.2vw, 128px))
  );
  --home-showcase-top: clamp(192px, 21.6vh, 260px);
  --home-showcase-card-width: clamp(305px, 22vw, 470px);
  background-color: #02050b !important;
  background-image: url("./assets/brand/ruyi-home-long-20260704-v6.png") !important;
  background-position: center calc(-1 * var(--home-bg-shift)) !important;
  background-repeat: no-repeat !important;
  background-size: 100vw auto !important;
}

.ruyi-home-exact .home-artboard {
  height: var(--home-art-height) !important;
  min-height: 1040px !important;
  background: transparent !important;
}

.ruyi-home-exact .home-design-image {
  display: none !important;
}

.ruyi-home-exact .home-scroll-extension {
  background:
    linear-gradient(180deg, rgba(2, 5, 11, 0), rgba(2, 5, 11, 0.08) 12%, rgba(2, 5, 11, 0.34) 48%, rgba(2, 5, 11, 0.82) 100%) !important;
  border-top: 0 !important;
}

.ruyi-home-exact .home-showcase-orbit {
  left: var(--home-showcase-left) !important;
  right: auto !important;
  top: var(--home-showcase-top) !important;
  width: var(--home-showcase-width) !important;
  height: var(--home-showcase-height) !important;
  isolation: isolate;
}

.ruyi-home-exact .home-showcase-track {
  isolation: isolate;
}

.ruyi-home-exact .home-showcase-slide {
  width: var(--home-showcase-card-width) !important;
  backface-visibility: hidden;
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"] {
  z-index: 12;
  background: #050a12;
  transform: translate(-50%, -50%) scale(1.08) rotateZ(0deg) rotateY(0deg) translateZ(60px);
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="prev"] {
  z-index: 3;
  transform: translate(-120%, -55%) scale(0.78) rotateZ(-4deg) rotateY(-18deg) translateZ(-26px);
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="next"] {
  z-index: 4;
  transform: translate(10%, -55%) scale(0.78) rotateZ(4deg) rotateY(18deg) translateZ(-26px);
}

.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"]:hover,
.ruyi-home-exact .home-showcase-slide[data-showcase-position="active"]:focus-visible {
  transform: translate(-50%, -50%) scale(1.14) rotateZ(0deg) rotateY(0deg) translateZ(76px);
}

@media (min-width: 1900px) {
  .ruyi-home-exact {
    --home-showcase-width: clamp(680px, 35vw, 780px);
    --home-showcase-height: clamp(380px, 39vh, 470px);
    --home-showcase-left: clamp(
      calc(var(--home-left) + var(--home-content-width) + 112px),
      56vw,
      calc(100vw - var(--home-showcase-width) - 112px)
    );
    --home-showcase-top: clamp(225px, 24vh, 275px);
    --home-showcase-card-width: clamp(435px, 23vw, 520px);
  }

  .ruyi-home-exact .home-showcase-slide[data-showcase-position="prev"] {
    transform: translate(-112%, -55%) scale(0.72) rotateZ(-4deg) rotateY(-18deg) translateZ(-30px);
  }

  .ruyi-home-exact .home-showcase-slide[data-showcase-position="next"] {
    transform: translate(-4%, -55%) scale(0.72) rotateZ(4deg) rotateY(18deg) translateZ(-30px);
  }
}

@media (max-width: 1180px) {
  .ruyi-home-exact .home-showcase-orbit {
    display: none !important;
  }
}

body.home-showcase-player-open {
  overflow: hidden;
}

.ruyi-home-exact .home-showcase-player {
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: none;
  place-items: center;
  padding: clamp(18px, 4vw, 64px);
  background: rgba(2, 6, 16, 0.66);
  backdrop-filter: blur(18px);
}

.ruyi-home-exact .home-showcase-player.is-open {
  display: grid;
}

.ruyi-home-exact .home-showcase-player-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ruyi-home-exact .home-showcase-player-panel {
  position: relative;
  z-index: 1;
  width: min(82vw, 1080px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(247, 200, 90, 0.52);
  border-radius: 22px;
  background:
    radial-gradient(circle at 24% 22%, rgba(87, 178, 255, 0.18), transparent 36%),
    #050a12;
  box-shadow:
    0 0 58px rgba(87, 178, 255, 0.22),
    0 0 48px rgba(247, 200, 90, 0.18),
    0 32px 110px rgba(0, 0, 0, 0.62);
}

.ruyi-home-exact .home-showcase-player-panel video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #02050b;
}

.ruyi-home-exact .home-showcase-player-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 250, 240, 0.5);
  border-radius: 999px;
  color: #fffaf0;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  background: rgba(4, 8, 14, 0.62);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.ruyi-home-exact .home-showcase-player-close:hover,
.ruyi-home-exact .home-showcase-player-close:focus-visible {
  border-color: rgba(247, 200, 90, 0.82);
  box-shadow:
    0 0 24px rgba(247, 200, 90, 0.24),
    0 12px 28px rgba(0, 0, 0, 0.34);
  outline: 0;
}

@media (max-width: 760px) {
  .ruyi-home-exact .home-showcase-player-panel {
    width: min(92vw, 1080px);
  }
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  place-items: center;
  padding: 24px;
  color: #f8fafc;
}

.auth-modal.open {
  display: grid;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.72);
  backdrop-filter: blur(14px);
}

.auth-panel {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #07111f;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
  padding: 28px;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-brand {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-brand span {
  color: #69d7c4;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-brand h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.auth-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
}

.auth-method-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 800;
  cursor: pointer;
}

.auth-method-tabs button.active {
  background: #69d7c4;
  color: #062018;
}

.auth-form,
.auth-account {
  display: grid;
  gap: 16px;
}

.auth-form[hidden],
.auth-account[hidden],
.auth-login-view[hidden],
.auth-profile-view[hidden],
.auth-method-panel[hidden] {
  display: none !important;
}

.auth-method-panel {
  display: grid;
  gap: 16px;
}

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

.auth-field span,
.auth-account span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 15px;
  padding: 0 14px;
  outline: none;
}

.auth-field input:focus {
  border-color: #69d7c4;
  box-shadow: 0 0 0 3px rgba(105, 215, 196, 0.14);
}

.auth-code-field > div {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 10px;
}

.auth-code-field button,
.auth-submit,
.auth-account button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: #69d7c4;
  color: #062018;
  font-weight: 700;
  cursor: pointer;
}

.auth-code-field button {
  background: rgba(105, 215, 196, 0.13);
  color: #a7f3d0;
  border: 1px solid rgba(105, 215, 196, 0.38);
}

.auth-code-field button:disabled,
.auth-submit:disabled,
.auth-account button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-status {
  min-height: 20px;
  margin: 16px 0 0;
  color: #fbbf24;
  font-size: 13px;
  line-height: 1.5;
}

.auth-account b {
  font-size: 22px;
  color: #f8fafc;
}

.auth-captcha-mount {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.auth-avatar-entry {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  border-radius: 999px !important;
}

.auth-avatar {
  position: relative;
  display: grid !important;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.85), transparent 24%),
    linear-gradient(145deg, #64e5d0 0%, #7b8cff 48%, #1f2b57 100%);
  color: #07111f !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    0 8px 24px rgba(52, 211, 153, 0.24);
}

.auth-avatar::after {
  content: attr(data-initial);
  display: grid;
  place-items: center;
}

.auth-avatar.has-image::after {
  content: "";
}

.auth-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-fixed-login.auth-avatar-entry,
.home-crisp-login.auth-avatar-entry {
  display: inline-grid;
  place-items: center;
  text-indent: 0;
}

.home-fixed-login.auth-avatar-entry {
  width: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-fixed-login.auth-avatar-entry .auth-avatar,
.home-crisp-login.auth-avatar-entry .auth-avatar {
  width: 38px;
  height: 38px;
}

.home-fixed-login.auth-avatar-entry .auth-avatar {
  box-shadow: none;
}

.account-chip.is-authenticated {
  overflow: visible;
}

.account-chip.is-authenticated .auth-avatar {
  width: 30px !important;
  height: 30px !important;
}

.account-chip.is-authenticated i {
  background: #35e6a2;
}

.auth-profile-view {
  display: grid;
  gap: 14px;
}

.auth-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-profile-avatar-button {
  display: grid;
  place-items: center;
  gap: 7px;
  width: 72px;
  min-height: 82px;
  border: 0;
  border-radius: 8px;
  background: rgba(2, 6, 18, 0.28);
  color: rgba(226, 232, 240, 0.78);
  cursor: pointer;
}

.auth-profile-avatar-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-profile-avatar-button em {
  font-size: 12px;
  font-style: normal;
}

.auth-avatar-large {
  width: 56px !important;
  height: 56px !important;
  font-size: 22px !important;
}

.auth-profile-main {
  min-width: 0;
}

.auth-profile-main span {
  color: #69d7c4;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-profile-main h2 {
  margin: 5px 0 6px;
  overflow: hidden;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-profile-main p {
  margin: 0;
  color: rgba(226, 232, 240, 0.62);
  font-size: 12px;
}

.auth-profile-main b {
  color: rgba(248, 250, 252, 0.86);
  font-weight: 700;
}

.auth-profile-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
}

.auth-profile-edit input {
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  padding: 0 12px;
  outline: none;
}

.auth-profile-edit input:focus {
  border-color: #69d7c4;
  box-shadow: 0 0 0 3px rgba(105, 215, 196, 0.12);
}

.auth-profile-edit button,
.auth-member-strip button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: #69d7c4;
  color: #062018;
  font-weight: 800;
  cursor: pointer;
}

.auth-member-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(104, 73, 25, 0.42), rgba(31, 25, 17, 0.7));
}

.auth-member-strip div {
  display: grid;
  gap: 5px;
}

.auth-member-strip span {
  color: #ffe0a2;
  font-size: 14px;
  font-weight: 900;
}

.auth-member-strip b {
  color: rgba(248, 250, 252, 0.72);
  font-size: 12px;
}

.auth-member-strip button {
  min-width: 88px;
  background: #0c0a07;
  color: #ffe0a2;
}

.auth-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.auth-profile-stats section {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
}

.auth-profile-stats span {
  color: rgba(226, 232, 240, 0.68);
  font-size: 13px;
}

.auth-profile-stats b {
  color: #f8fafc;
  font-size: 15px;
  font-weight: 800;
}

.auth-profile-stats strong {
  color: #22d3ee;
  font-size: 20px;
}

.auth-profile-stats i {
  font-style: normal;
}

.auth-profile-menu {
  display: grid;
  gap: 2px;
  padding-top: 3px;
}

.auth-profile-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f8fafc;
  cursor: pointer;
  padding: 0 8px;
  text-align: left;
}

.auth-profile-menu button:hover,
.auth-profile-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

.auth-profile-menu span {
  font-size: 15px;
  font-weight: 700;
}

.home-fixed-login.is-authenticated,
.home-crisp-login.is-authenticated,
.account-chip.is-authenticated {
  position: relative;
}

.auth-notification-count {
  position: absolute;
  top: -5px;
  right: -7px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  place-items: center;
  border: 2px solid #07111a;
  border-radius: 999px;
  background: #ff5d6c;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

/* Shared account actions: bell → membership → credits → avatar. */
.home-fixed-actions {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.account-notification-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(247, 249, 252, 0.9);
  cursor: pointer;
}

.account-notification-button:hover,
.account-notification-button:focus-visible,
.account-notification-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.account-notification-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-notification-button .auth-notification-count {
  top: -1px;
  right: -2px;
}

.home-fixed-login.auth-avatar-entry {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.home-fixed-login.auth-avatar-entry .auth-avatar {
  width: 38px;
  height: 38px;
  border: 0;
  box-shadow: none;
}

.account-notification-tray {
  position: fixed;
  z-index: 510;
  top: var(--notification-tray-top, 76px);
  right: var(--notification-tray-right, 24px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(420px, calc(100vw - 24px));
  max-height: min(650px, calc(100vh - var(--notification-tray-top, 76px) - 12px));
  overflow: hidden;
  border: 1px solid rgba(116, 185, 232, 0.28);
  border-radius: 16px;
  background: rgba(4, 13, 22, 0.98);
  color: #f7f9fc;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(24px);
}

.account-notification-tray[hidden] {
  display: none;
}

.account-notification-tray > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(116, 185, 232, 0.16);
}

.account-notification-tray > header span {
  color: #69d7c4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.account-notification-tray > header h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.account-notification-tray-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-notification-tray-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9d7ea;
  cursor: pointer;
}

.account-notification-tray-actions button:last-child {
  width: 34px;
  padding: 0;
  font-size: 22px;
}

.account-notification-tray-actions button:hover,
.account-notification-tray-actions button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.account-notification-tray-status {
  min-height: 0;
  margin: 0;
  padding: 10px 18px 0;
  color: #8fa8ba;
  font-size: 12px;
}

.account-notification-tray-status:empty {
  display: none;
}

.account-notification-tray-list {
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.account-notification-preview {
  position: relative;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #f7f9fc;
  text-align: left;
  cursor: pointer;
}

.account-notification-preview:hover,
.account-notification-preview:focus-visible {
  background: rgba(104, 190, 244, 0.08);
}

.account-notification-preview > i {
  width: 6px;
  height: 6px;
  margin-top: 25px;
  border-radius: 50%;
  background: transparent;
}

.account-notification-preview.unread > i {
  background: #67d6ff;
  box-shadow: 0 0 10px rgba(103, 214, 255, 0.6);
}

.account-notification-preview-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-notification-preview-copy em {
  color: #69d7c4;
  font-size: 10px;
  font-style: normal;
}

.account-notification-preview-copy b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-notification-preview-copy > span {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(220, 232, 241, 0.68);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.account-notification-preview-copy time {
  color: rgba(170, 192, 208, 0.58);
  font-size: 10px;
}

.account-notification-tray > footer {
  padding: 12px 16px 15px;
  border-top: 1px solid rgba(116, 185, 232, 0.14);
}

.account-notification-tray > footer a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 9px;
  background: rgba(89, 183, 230, 0.1);
  color: #bce8ff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

body.avatar-crop-open {
  overflow: hidden;
}

.avatar-crop-modal {
  position: fixed;
  z-index: 110000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

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

.avatar-crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 4, 9, 0.82);
  backdrop-filter: blur(10px);
}

.avatar-crop-panel {
  position: relative;
  width: min(470px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(118, 190, 237, 0.32);
  border-radius: 16px;
  background: #07131f;
  color: #f7f9fc;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.64);
}

.avatar-crop-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.avatar-crop-panel > header span {
  color: #69d7c4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.avatar-crop-panel > header h2 {
  margin: 5px 0 0;
  font-size: 21px;
}

.avatar-crop-panel > header button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(158, 199, 226, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.avatar-crop-panel > p {
  margin: 12px 0 16px;
  color: #93a9bb;
  font-size: 12px;
  line-height: 1.6;
}

.avatar-crop-stage {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #02070c;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.avatar-crop-stage:active {
  cursor: grabbing;
}

.avatar-crop-stage img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.avatar-crop-panel:not(.has-source) .avatar-crop-stage img,
.avatar-crop-panel:not(.has-source) .avatar-crop-mask {
  display: none;
}

.avatar-crop-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  border: 1px dashed rgba(105, 215, 196, 0.5);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 35%, rgba(105, 215, 196, 0.12), transparent 38%),
    rgba(4, 13, 22, 0.92);
  color: #f7f9fc;
  text-align: center;
  cursor: pointer;
}

.avatar-crop-empty:hover,
.avatar-crop-empty:focus-visible {
  border-color: #69d7c4;
  background:
    radial-gradient(circle at 50% 35%, rgba(105, 215, 196, 0.2), transparent 42%),
    rgba(7, 20, 31, 0.96);
}

.avatar-crop-empty b {
  font-size: 16px;
}

.avatar-crop-empty span {
  color: #8fa8ba;
  font-size: 11px;
  font-weight: 400;
}

.avatar-crop-panel.has-source .avatar-crop-empty {
  display: none;
}

.avatar-crop-source-actions {
  display: none;
  justify-content: center;
  margin-top: 10px;
}

.avatar-crop-panel.has-source .avatar-crop-source-actions {
  display: flex;
}

.avatar-crop-source-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #b9d7ea;
  cursor: pointer;
}

.avatar-crop-source-actions button:hover,
.avatar-crop-source-actions button:focus-visible {
  background: rgba(105, 215, 196, 0.12);
  color: #e8fffa;
}

.avatar-crop-mask {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.58), inset 0 0 24px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.avatar-crop-zoom {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: #a9bdcc;
  font-size: 12px;
}

.avatar-crop-zoom input {
  width: 100%;
  accent-color: #69d7c4;
}

.avatar-crop-zoom output {
  text-align: right;
}

.avatar-crop-panel > p.avatar-crop-status {
  min-height: 20px;
  color: #83d8c8;
  text-align: center;
}

.avatar-crop-panel > p.avatar-crop-status.error {
  color: #ff8d98;
}

.avatar-crop-panel > footer {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 9px;
  margin-top: 4px;
}

.avatar-crop-panel > footer button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(149, 193, 224, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #d9e6ef;
  cursor: pointer;
}

.avatar-crop-panel > footer button.primary {
  border-color: #69d7c4;
  background: #69d7c4;
  color: #052018;
  font-weight: 800;
}

.avatar-crop-panel button:disabled,
.avatar-crop-panel input:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.ruyi-canvas .canvas-notification-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ruyi-canvas .member-chip {
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ruyi-canvas .member-chip::before {
  content: "◆";
}

.canvas-member-points {
  min-width: 34px;
}

@media (max-width: 820px) {
  .home-fixed-actions {
    gap: 3px;
    padding: 0;
  }

  .account-notification-button {
    width: 34px;
    height: 34px;
  }

  .home-member-center {
    gap: 4px;
    padding: 0 3px;
  }

  .home-fixed-login.auth-avatar-entry,
  .home-fixed-login.auth-avatar-entry .auth-avatar {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
}

@media (max-width: 560px) {
  .account-notification-tray {
    top: var(--notification-tray-top, 68px);
    right: 8px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - var(--notification-tray-top, 68px) - 8px);
    border-radius: 13px;
  }

  .avatar-crop-modal {
    padding: 10px;
  }

  .avatar-crop-panel {
    padding: 17px;
  }

  .avatar-crop-panel > footer {
    grid-template-columns: 1fr 1fr;
  }

  .avatar-crop-panel > footer span {
    display: none;
  }

  .avatar-crop-panel > footer button:first-child {
    grid-column: 1 / -1;
  }
}

.auth-notification-count[hidden],
.auth-menu-notification-count[hidden] {
  display: none;
}

.auth-menu-notification-count {
  min-width: 20px;
  margin-left: auto;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ff5d6c;
  color: #fff;
  font-size: 10px;
  text-align: center;
}

.auth-profile-menu i {
  color: rgba(226, 232, 240, 0.48);
  font-style: normal;
  font-size: 18px;
}

@media (max-width: 520px) {
  .auth-modal {
    padding: 16px;
  }

  .auth-panel {
    padding: 24px 18px;
  }

  .auth-code-field > div {
    grid-template-columns: 1fr;
  }

  .auth-profile-edit,
  .auth-profile-stats {
    grid-template-columns: 1fr;
  }

  .auth-member-strip {
    align-items: stretch;
    flex-direction: column;
  }
}

.ruyi-canvas .script-reference-panel {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(118, 178, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 27, 49, 0.78), rgba(14, 17, 25, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 224, 154, 0.08);
}

.ruyi-canvas .script-reference-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.ruyi-canvas .script-reference-head b {
  display: block;
  color: rgba(255, 235, 184, 0.95);
  font-size: 13px;
}

.ruyi-canvas .script-reference-head small,
.ruyi-canvas .script-reference-list.empty p {
  margin: 0;
  color: rgba(207, 224, 245, 0.7);
  font-size: 12px;
  line-height: 1.45;
}

.ruyi-canvas .script-reference-upload-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 210, 125, 0.35);
  border-radius: 10px;
  background: rgba(255, 207, 115, 0.12);
  color: rgba(255, 235, 184, 0.95);
  font-weight: 700;
  cursor: pointer;
}

.ruyi-canvas .script-reference-upload-button:hover {
  background: rgba(255, 207, 115, 0.2);
  border-color: rgba(255, 223, 154, 0.58);
}

.ruyi-canvas .script-reference-list {
  display: grid;
  gap: 8px;
}

.ruyi-canvas .script-reference-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(118, 178, 255, 0.18);
  border-radius: 11px;
  background: rgba(3, 10, 18, 0.48);
}

.ruyi-canvas .script-reference-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  background: rgba(79, 166, 255, 0.13);
  color: rgba(142, 205, 255, 0.96);
  font-size: 11px;
  font-weight: 800;
}

.ruyi-canvas .script-reference-item b,
.ruyi-canvas .script-reference-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ruyi-canvas .script-reference-item b {
  color: rgba(245, 248, 255, 0.94);
  font-size: 13px;
}

.ruyi-canvas .script-reference-item small {
  color: rgba(196, 214, 236, 0.62);
  font-size: 11px;
}

.ruyi-canvas .script-reference-item button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 98, 98, 0.12);
  color: #ff9b9b;
  cursor: pointer;
}

.ruyi-canvas .script-reference-item button:hover {
  background: rgba(255, 98, 98, 0.22);
}

/* Canvas edge visibility guard: keep persisted template links visible after later UI overrides. */
.ruyi-canvas #edgeLayer .edge-base {
  display: inline !important;
  visibility: visible !important;
  fill: none !important;
  stroke: rgba(126, 211, 255, 0.62);
  stroke-width: 2.15px;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 4px rgba(53, 191, 255, 0.28))
    drop-shadow(0 0 7px rgba(247, 200, 90, 0.18));
}

.ruyi-canvas #edgeLayer .edge-path {
  display: inline !important;
  visibility: visible !important;
  fill: none !important;
  stroke: url(#ruyiEdgeGradient) !important;
  stroke-width: 2.8px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-dasharray: none;
  opacity: 0.96 !important;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 5px rgba(53, 191, 255, 0.36))
    drop-shadow(0 0 9px rgba(247, 200, 90, 0.28));
  animation: ruyiEdgeColorBreath 7s ease-in-out infinite;
}

.ruyi-canvas #edgeLayer .edge-flow {
  display: inline !important;
  visibility: visible !important;
  fill: none !important;
  stroke: url(#ruyiEdgeGradient) !important;
  stroke-width: 3.2px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-dasharray: 42 260 !important;
  stroke-dashoffset: 0;
  opacity: 0.72 !important;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
  filter:
    drop-shadow(0 0 6px rgba(53, 191, 255, 0.48))
    drop-shadow(0 0 10px rgba(247, 200, 90, 0.42));
  animation: ruyiEdgeFlow 4.2s linear infinite;
}

.ruyi-canvas #edgeLayer .edge-group.preview .edge-path {
  stroke: url(#ruyiEdgePreviewGradient) !important;
  stroke-dasharray: 8 6;
  opacity: 0.84 !important;
}

.ruyi-canvas #edgeLayer .edge-group.preview .edge-base {
  stroke: rgba(94, 208, 255, 0.58);
  stroke-dasharray: 8 6;
  opacity: 0.64;
}

.ruyi-canvas #edgeLayer .edge-group:not(.preview):hover .edge-path {
  stroke-width: 3.1px !important;
  filter:
    drop-shadow(0 0 7px rgba(54, 191, 255, 0.44))
    drop-shadow(0 0 12px rgba(247, 200, 90, 0.36));
}

.ruyi-canvas #edgeLayer .edge-group:not(.preview):hover .edge-flow {
  opacity: 0.95 !important;
  stroke-width: 3.6px !important;
}

/* Community works use their own component namespace and do not override the home artboard. */
.community-showcase {
  width: min(1760px, calc(100% - 48px));
  margin: 54px auto 0;
  padding-bottom: 72px;
  color: #f7f9fc;
}

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

.community-showcase-head span {
  display: block;
  margin-bottom: 5px;
  color: #70cfff;
  font-size: 12px;
  letter-spacing: 0;
}

.community-showcase-head h2,
.community-library > header h2 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.community-showcase-head > button,
.community-more,
.community-sort button,
.community-engagement button,
.community-engagement a,
.community-danmaku-form button,
.community-comments-panel form button,
.community-comment footer button {
  border: 1px solid rgba(124, 181, 229, 0.35);
  background: rgba(8, 17, 28, 0.92);
  color: #dcecf9;
  cursor: pointer;
  box-sizing: border-box;
}

.community-showcase-head > button {
  min-width: 132px;
  height: 40px;
  border-radius: 6px;
  font-weight: 700;
}

.community-work-grid,
.community-library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 18px;
}

.community-work-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(116, 157, 194, 0.28);
  border-radius: 8px;
  background: #080d13;
  color: #f4f8fb;
  cursor: pointer;
  box-sizing: border-box;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.community-work-card:hover,
.community-work-card:focus-visible {
  border-color: rgba(242, 196, 93, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 18px rgba(73, 173, 255, 0.12);
  transform: translateY(-2px);
}

.community-work-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #02060a;
}

.community-work-media-backdrop {
  position: absolute;
  inset: -12px;
  background-position: center;
  background-size: cover;
  filter: blur(14px) brightness(0.42);
  opacity: 0;
  transform: scale(1.08);
}

.community-work-media > img,
.community-work-media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.community-work-card.is-portrait-media .community-work-media-backdrop,
.community-work-card.is-image-media .community-work-media-backdrop {
  opacity: 1;
}

.community-work-card.is-portrait-media .community-work-media > img,
.community-work-card.is-portrait-media .community-work-media > video,
.community-work-card.is-image-media .community-work-media > img {
  object-fit: contain;
}

.community-work-media > video {
  opacity: 0;
  transition: opacity 150ms ease;
}

.community-work-card.is-previewing .community-work-media > video {
  opacity: 1;
}

.community-card-like {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  background: rgba(2, 7, 12, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.community-card-like.active,
.community-engagement button.active {
  border-color: #f3c85c;
  color: #ffda78;
}

.community-card-report {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 6px;
  background: rgba(2,7,12,.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.community-card-report em { display: none; font-size: 10px; font-style: normal; }
.community-card-report:hover em,
.community-card-report:focus-visible em { display: inline; }

.community-work-meta {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px 12px;
}

.community-avatar,
.community-work-meta img,
.community-work-meta i,
[data-community-viewer-author] > img,
[data-community-viewer-author] > i,
.community-comment-main > img,
.community-comment-main > i,
.community-reply > img,
.community-reply > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(240, 197, 91, 0.5);
  border-radius: 50%;
  background: #102239;
  color: #f8d77e;
  font-style: normal;
  object-fit: cover;
}

.community-avatar img,
.community-avatar i {
  width: 100%;
  height: 100%;
}

.community-work-meta div {
  min-width: 0;
}

.community-work-meta b,
.community-work-meta p {
  display: block;
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-work-meta b {
  margin-bottom: 5px;
  color: #dce6ef;
  font-size: 13px;
}

.community-work-meta p {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.community-section-status,
.community-empty {
  margin: 24px 0;
  color: #8192a3;
  text-align: center;
}

body.community-overlay-open {
  overflow: hidden;
}

.community-library,
.community-viewer {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  color: #eef5fa;
}

.community-library.is-open,
.community-viewer.is-open {
  display: block;
}

.community-viewer [hidden] {
  display: none !important;
}

.community-library {
  overflow: auto;
  padding: 28px clamp(24px, 4vw, 78px) 70px;
  background: #05090e url("./assets/brand/ruyi-canvas-bg-20260704-v4.png") center / cover fixed;
}

.community-library > header {
  display: grid;
  grid-template-columns: 44px minmax(160px, 1fr) minmax(280px, 420px) auto;
  gap: 16px;
  align-items: center;
  max-width: 1760px;
  margin: 0 auto 28px;
}

.community-library-search {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 34px 62px;
  height: 40px;
  border: 1px solid rgba(126, 172, 212, 0.35);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(5, 14, 23, 0.92);
}

.community-library-search input,
.community-library-search button {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #e9f2f8;
}

.community-library-search input {
  padding: 0 12px;
  outline: 0;
}

.community-library-search button {
  border-left: 1px solid rgba(126, 172, 212, 0.2);
  cursor: pointer;
}

.community-library-search button[type="submit"] {
  color: #f8d77e;
  font-weight: 800;
}

.community-library-search [hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.community-library > header > button,
.community-viewer-shell > header > button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(126, 172, 212, 0.35);
  border-radius: 6px;
  background: #07111c;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

.community-library-grid {
  max-width: 1760px;
  margin: 0 auto;
}

.community-sort {
  display: flex;
  gap: 8px;
}

.community-sort button {
  height: 36px;
  padding: 0 18px;
  border-radius: 5px;
}

.community-sort button.active {
  border-color: #e7ba54;
  color: #f8d77e;
}

.community-more {
  display: block;
  width: 140px;
  height: 42px;
  margin: 30px auto 0;
  border-radius: 6px;
}

.community-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: #000;
}

.community-viewer-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  background: #000;
}

[data-community-viewer-author] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(320px, 42vw);
  color: #fff;
  pointer-events: auto;
}

[data-community-viewer-author] > img,
[data-community-viewer-author] > i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  object-fit: cover;
}

[data-community-viewer-author] > i {
  display: grid;
  place-items: center;
  background: #d6a946;
  color: #101010;
  font-style: normal;
  font-weight: 800;
}

[data-community-viewer-author] span,
[data-community-viewer-author] b,
[data-community-viewer-author] small {
  display: block;
}

[data-community-viewer-author] span {
  min-width: 0;
  overflow: hidden;
}

[data-community-viewer-author] b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-community-viewer-author] small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.66);
}

.community-follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(245, 197, 91, 0.72);
  border-radius: 17px;
  background: #d7a945;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  pointer-events: auto;
}

.community-follow-button.active {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(20, 24, 29, 0.78);
  color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
}

.community-follow-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.community-follow-button svg {
  width: 16px;
  height: 16px;
}

.community-viewer-layout {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow: clip;
}

.community-player-column {
  position: absolute;
  inset: 0;
  background: #000;
}

.community-player {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.community-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.community-player-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.community-danmaku-stage {
  position: absolute;
  inset: 70px 0 68px;
  overflow: hidden;
  pointer-events: none;
}

.community-danmaku-stage.is-hidden {
  display: none;
}

.community-danmaku-line {
  position: absolute;
  left: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 80%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  animation: communityDanmaku 8s linear forwards;
  pointer-events: auto;
  cursor: pointer;
}

@keyframes communityDanmaku {
  to { transform: translateX(calc(-100vw - 100%)); }
}

.community-viewer-topbar {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 20px;
  box-sizing: border-box;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent);
  pointer-events: none;
}

.community-round-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(8, 10, 13, 0.66);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.community-round-button svg {
  width: 21px;
  height: 21px;
}

.community-viewer-info {
  position: absolute;
  z-index: 5;
  left: clamp(20px, 4vw, 64px);
  bottom: 76px;
  width: min(520px, 44vw);
  color: #fff;
  text-shadow: 0 2px 8px #000;
}

.community-viewer-info h2 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.25;
  letter-spacing: 0;
}

.community-viewer-info a,
.community-viewer-info > button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.54);
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  backdrop-filter: blur(10px);
}

.community-viewer-info > button {
  margin-left: 8px;
  border: 1px solid rgba(240, 195, 91, 0.72);
  border-radius: 6px;
  background: rgba(62, 43, 13, 0.9);
  color: #ffe49b;
  cursor: pointer;
  font-weight: 800;
}

.community-viewer-info > a + a,
.community-viewer-info > a + button {
  margin-left: 8px;
}

.community-viewer-info > button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.community-viewer-info a svg,
.community-viewer-info > button svg {
  width: 17px;
  height: 17px;
}

.community-action-rail {
  position: absolute;
  z-index: 7;
  right: clamp(20px, 4vw, 62px);
  bottom: 92px;
  display: grid;
  gap: 18px;
  justify-items: center;
  transition: right 220ms ease;
}

.community-action-rail button {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 62px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 2px 8px #000;
}

.community-action-rail button > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(8, 10, 13, 0.66);
  color: #fff;
  backdrop-filter: blur(10px);
}

.community-action-rail button > span svg {
  width: 26px;
  height: 26px;
}

.community-action-rail button b {
  font-size: 14px;
  line-height: 1;
}

.community-action-rail button small {
  font-size: 11px;
  font-weight: 700;
}

.community-action-rail .community-report-button b {
  visibility: hidden;
}

.community-action-rail .community-report-button:hover > span,
.community-action-rail .community-report-button:focus-visible > span {
  border-color: rgba(255, 143, 143, 0.56);
  color: #ffb0b0;
}

.community-action-rail button.active > span {
  border-color: rgba(245, 197, 91, 0.78);
  background: rgba(69, 47, 17, 0.86);
  color: #ffd87d;
}

.community-action-rail [data-community-like].active > span svg {
  fill: currentColor;
}

.community-viewer.comments-open .community-action-rail {
  right: calc(min(420px, 38vw) + 24px);
}

.community-owner-actions {
  position: relative;
  margin-left: auto;
  pointer-events: auto;
}

.community-owner-menu {
  position: absolute;
  top: 50px;
  right: 0;
  display: grid;
  width: 190px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(10, 13, 17, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.community-owner-menu a,
.community-owner-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #eef4f8;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.community-owner-menu a:hover,
.community-owner-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.community-owner-menu button.danger {
  color: #ff9898;
}

.community-owner-menu button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.community-owner-menu svg {
  width: 17px;
  height: 17px;
}

.community-danmaku-controls {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 66px;
  display: flex;
  align-items: end;
  gap: 8px;
  transform: translateX(-50%);
}

.community-danmaku-toggle,
.community-danmaku-list-toggle,
.community-danmaku-compose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 19px;
  background: rgba(7, 10, 14, 0.72);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.community-danmaku-toggle.active {
  border-color: rgba(122, 210, 250, 0.56);
  color: #a6e6ff;
}

.community-danmaku-toggle svg,
.community-danmaku-list-toggle svg,
.community-danmaku-compose svg {
  width: 17px;
  height: 17px;
}

.community-danmaku-list {
  position: absolute;
  z-index: 12;
  top: 76px;
  right: 16px;
  bottom: 118px;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  width: min(430px, calc(100% - 32px));
  border: 1px solid rgba(118,213,255,.28);
  border-radius: 9px;
  background: rgba(5,12,18,.94);
  box-shadow: 0 25px 70px rgba(0,0,0,.5);
  overflow: hidden;
  backdrop-filter: blur(16px);
}
.community-danmaku-list[hidden] { display: none; }
.community-danmaku-list > header { display:flex; align-items:center; justify-content:space-between; padding:13px 15px; border-bottom:1px solid rgba(118,213,255,.14); }
.community-danmaku-list > header div { display:grid; gap:3px; }
.community-danmaku-list > header b { font-size:13px; }
.community-danmaku-list > header small { color:#71899a; font-size:9px; }
.community-danmaku-list > header button { width:30px; height:30px; border:1px solid rgba(118,213,255,.2); border-radius:50%; background:#102331; color:white; }
.community-danmaku-list > div { overflow-y:auto; }
.community-danmaku-list article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; padding:10px 13px; border-bottom:1px solid rgba(118,213,255,.1); }
.community-danmaku-list article > button:first-child { display:grid; grid-template-columns:44px minmax(0,1fr); gap:8px; min-width:0; padding:0; border:0; background:transparent; color:#dce8ee; text-align:left; }
.community-danmaku-list article time { color:#72d4ff; font-size:10px; }
.community-danmaku-list article span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.community-danmaku-list article > button:last-child { min-height:28px; border:1px solid rgba(255,129,129,.24); border-radius:4px; background:rgba(75,25,25,.55); color:#ffaaaa; font-size:9px; }

.community-danmaku-form {
  position: relative;
  display: flex;
  align-items: center;
}

.community-danmaku-fields {
  display: none;
  grid-template-areas: "input emoji send";
  grid-template-columns: minmax(180px, 360px) 38px 68px;
  gap: 7px;
}

.community-danmaku-form.is-expanded .community-danmaku-compose {
  display: none;
}

.community-danmaku-form.is-expanded .community-danmaku-fields {
  display: grid;
}

.community-inline-composer {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(7, 10, 14, 0.9);
  color: #fff;
  box-sizing: border-box;
  outline: none;
  cursor: text;
  overflow-wrap: anywhere;
}

.community-inline-composer:focus {
  border-color: rgba(116, 206, 247, 0.7);
  box-shadow: 0 0 0 2px rgba(64, 164, 211, 0.12);
}

.community-inline-composer:empty::before {
  color: rgba(255, 255, 255, 0.42);
  content: attr(data-placeholder);
  pointer-events: none;
}

.community-danmaku-input {
  grid-area: input;
  height: 38px;
  padding: 7px 12px;
  overflow: hidden;
  line-height: 22px;
  white-space: nowrap;
}

.community-danmaku-fields > button {
  height: 38px;
  border-radius: 5px;
}

.community-danmaku-fields > [data-community-danmaku-submit] { grid-area: send; }

.community-danmaku-fields > .community-emoji-toggle { grid-area: emoji; }

.community-danmaku-form > small {
  position: absolute;
  top: calc(100% + 5px);
  left: 4px;
  width: max-content;
  max-width: 340px;
  color: #b9d9e9;
  font-size: 11px;
}

.community-danmaku-form > small[data-tone="error"] {
  color: #ff9e9e;
}

.community-comments-panel {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(420px, 38vw);
  min-width: 340px;
  border-left: 1px solid rgba(111, 158, 197, 0.24);
  background: rgba(9, 15, 21, 0.97);
  box-shadow: -20px 0 54px rgba(0, 0, 0, 0.42);
  pointer-events: none;
  transform: translateX(100%);
  transition: transform 220ms ease;
  backdrop-filter: blur(14px);
}

.community-viewer.comments-open .community-comments-panel {
  pointer-events: auto;
  transform: translateX(0);
}

.community-comments-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px 14px 10px 18px;
  border-bottom: 1px solid rgba(111, 158, 197, 0.2);
}

.community-comments-panel > header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.community-comments-panel h3 {
  margin: 0;
  font-size: 17px;
}

.community-comments-panel > header span {
  color: #8094a5;
  font-size: 12px;
}

.community-comments {
  overflow: auto;
  padding: 4px 16px 18px;
}

.community-comment {
  padding: 14px 0;
  border-bottom: 1px solid rgba(125, 160, 188, 0.16);
}

.community-comment-main,
.community-reply {
  display: flex;
  gap: 10px;
}

.community-comment-main > div,
.community-reply > div {
  min-width: 0;
  flex: 1;
}

.community-comment p,
.community-reply p {
  margin: 5px 0 7px;
  color: #d6e0e8;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.community-comment em {
  color: #79cef4;
  font-style: normal;
}

.community-comment footer {
  display: flex;
  gap: 9px;
  align-items: center;
}

.community-comment footer small {
  margin-right: auto;
  color: #728598;
}

.community-comment footer button {
  height: 24px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #8ba3b8;
}

.community-replies {
  display: grid;
  gap: 12px;
  margin: 12px 0 0 42px;
  padding: 12px;
  border-left: 2px solid rgba(91, 187, 233, 0.34);
  background: rgba(3, 9, 14, 0.46);
}

.community-comments-panel form {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid rgba(111, 158, 197, 0.2);
}

.community-comment-guest {
  padding: 14px;
  border-top: 1px solid rgba(111, 158, 197, 0.2);
}

.community-comment-guest button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  border: 1px solid rgba(235, 193, 91, 0.54);
  border-radius: 5px;
  background: rgba(70, 49, 18, 0.82);
  color: #ffe3a0;
  font-weight: 700;
  cursor: pointer;
}

.community-comment-guest svg {
  width: 18px;
  height: 18px;
}

.community-comment-input {
  min-height: 76px;
  max-height: 180px;
  overflow-y: auto;
  padding: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.community-comment-compose-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-comment-compose-tools > button[type="submit"] {
  width: 92px;
  height: 34px;
  border-radius: 5px;
}

.community-comments-panel form button:disabled,
.community-danmaku-fields button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.community-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9eb2c2;
  font-size: 12px;
}

.community-replying button {
  width: auto !important;
  height: 24px !important;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #8fdcff;
}

.community-comment-status {
  min-height: 17px;
  margin: 0;
  color: #91afc0;
  font-size: 12px;
}

.community-inline-emoji {
  display: inline-block;
  width: 30px;
  height: 30px;
  margin: 0 2px;
  object-fit: contain;
  vertical-align: -9px;
}

.community-danmaku-line .community-inline-emoji {
  width: 34px;
  height: 34px;
  margin: 0;
  vertical-align: middle;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.72));
}

.community-emoji-missing {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.community-emoji-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 38px;
  min-width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(111, 180, 214, 0.32);
  border-radius: 6px;
  background: rgba(18, 35, 50, 0.86);
  color: #a8dff4;
}

.community-comment-compose-tools .community-emoji-toggle {
  width: auto;
  padding: 0 10px;
}

.community-emoji-toggle svg { width: 17px; height: 17px; }

.community-composer-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: -4px 2px;
  border: 1px solid rgba(230, 199, 143, 0.34);
  border-radius: 6px;
  background: rgba(8, 18, 27, 0.92);
  cursor: pointer;
  vertical-align: middle;
}

.community-composer-emoji:hover {
  border-color: rgba(255, 214, 128, 0.82);
  background: rgba(41, 28, 13, 0.94);
}

.community-composer-emoji img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.community-emoji-picker {
  position: absolute;
  z-index: 14;
  display: grid;
  gap: 9px;
  width: 318px;
  padding: 12px;
  border: 1px solid rgba(111, 180, 214, 0.34);
  border-radius: 8px;
  background: rgba(6, 14, 22, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.community-emoji-picker[hidden] { display: none; }

.community-danmaku-form > .community-emoji-picker {
  right: 0;
  bottom: calc(100% + 10px);
}

.community-comments-panel form > .community-emoji-picker {
  right: 14px;
  bottom: calc(100% - 2px);
}

.community-emoji-picker > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-emoji-picker > header > div { display: flex; gap: 5px; }

.community-emoji-picker > header button {
  width: auto;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #8198aa;
  font-size: 12px;
}

.community-emoji-picker > header button.active {
  background: rgba(86, 177, 211, 0.16);
  color: #bceaff;
}

.community-emoji-picker > header small { color: #687f90; font-size: 11px; }

.community-emoji-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  max-height: 174px;
  overflow: auto;
}

.community-emoji-option {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: rgba(18, 34, 48, 0.58);
}

.community-emoji-option:hover { border-color: rgba(230, 199, 143, 0.58); background: rgba(230, 199, 143, 0.1); }

.community-emoji-option img { width: 100%; height: 100%; object-fit: contain; }

.community-emoji-option .community-emoji-animated {
  position: absolute;
  inset: 3px;
  display: none;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
}

.community-emoji-option:hover .community-emoji-static,
.community-emoji-option:focus .community-emoji-static {
  visibility: hidden;
}

.community-emoji-option:hover .community-emoji-animated,
.community-emoji-option:focus .community-emoji-animated {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .community-emoji-option:hover .community-emoji-static,
  .community-emoji-option:focus .community-emoji-static { visibility: visible; }
  .community-emoji-option:hover .community-emoji-animated,
  .community-emoji-option:focus .community-emoji-animated { display: none; }
}

.community-emoji-option > span {
  position: absolute;
  top: -3px;
  right: -3px;
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #361616;
  color: #ffc0c0;
  font-size: 12px;
}

.community-emoji-option:hover > span { display: grid; }

.community-emoji-empty { margin: 8px 0; color: #71899b; font-size: 12px; text-align: center; }

.community-emoji-upload {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 1px 7px;
  min-height: 42px;
  padding: 6px 9px;
  border: 1px dashed rgba(111, 180, 214, 0.34);
  border-radius: 6px;
  color: #acdff2;
  cursor: pointer;
}

.community-emoji-upload svg { grid-row: 1 / 3; width: 18px; height: 18px; }
.community-emoji-upload span { font-size: 12px; font-weight: 700; }
.community-emoji-upload small { color: #687f90; font-size: 10px; }

.community-comment-status[data-tone="success"] {
  color: #8adbb7;
}

.community-comment-status[data-tone="error"] {
  color: #ff9e9e;
}

.community-comments-scrim {
  display: none;
}

.community-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 330;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px;
  border: 1px solid rgba(236, 194, 91, 0.52);
  border-radius: 6px;
  background: #07111b;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.community-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 1800px) {
  .community-work-grid,
  .community-library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .community-work-grid,
  .community-library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .community-library > header { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .community-library-search { grid-column: 2 / -1; grid-row: 2; }
  .community-viewer-info { width: min(460px, 46vw); }
}

@media (max-width: 860px) {
  .community-work-grid,
  .community-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community-viewer.comments-open .community-action-rail { right: 16px; }
  .community-comments-panel {
    top: auto;
    width: 100%;
    min-width: 0;
    height: min(70vh, 620px);
    border-top: 1px solid rgba(111, 158, 197, 0.28);
    border-left: 0;
    box-shadow: 0 -20px 54px rgba(0, 0, 0, 0.52);
    transform: translateY(100%);
  }
  .community-viewer.comments-open .community-comments-panel { transform: translateY(0); }
  .community-comments-scrim {
    position: absolute;
    z-index: 9;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }
  .community-viewer.comments-open .community-comments-scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 560px) {
  .community-showcase { width: calc(100% - 28px); }
  .community-showcase-head { align-items: center; }
  .community-showcase-head h2 { font-size: 23px; }
  .community-work-grid,
  .community-library-grid { grid-template-columns: 1fr; }
  .community-library { padding: 16px 14px 50px; }
  .community-library > header { grid-template-columns: 40px 1fr; }
  .community-library-search { grid-column: 1 / -1; width: 100%; }
  .community-sort { grid-column: 1 / -1; }
  .community-viewer-topbar { min-height: 64px; padding: 10px 12px; }
  .community-round-button { width: 38px; height: 38px; }
  [data-community-viewer-author] > img,
  [data-community-viewer-author] > i { width: 38px; height: 38px; flex-basis: 38px; }
  [data-community-viewer-author] small { display: none; }
  [data-community-viewer-author] { max-width: min(170px, 44vw); }
  .community-follow-button { min-width: 62px; height: 32px; padding: 0 10px; }
  .community-follow-button svg { display: none; }
  .community-viewer-info { left: 14px; bottom: 118px; width: calc(100vw - 112px); }
  .community-viewer-info h2 { margin-bottom: 7px; font-size: 20px; }
  .community-action-rail { right: 12px; bottom: 86px; gap: 13px; }
  .community-action-rail button { width: 54px; }
  .community-action-rail button > span { width: 46px; height: 46px; }
  .community-action-rail button > span svg { width: 23px; height: 23px; }
  .community-danmaku-controls { left: 12px; right: 76px; bottom: 62px; justify-content: center; transform: none; }
  .community-danmaku-toggle span { display: none; }
  .community-danmaku-toggle { width: 38px; padding: 0; flex: 0 0 38px; }
  .community-danmaku-form { min-width: 0; }
  .community-danmaku-fields { grid-template-columns: minmax(0, 1fr) 38px 62px; width: min(360px, calc(100vw - 138px)); }
  .community-emoji-picker { width: min(300px, calc(100vw - 92px)); }
  .community-danmaku-form > small { max-width: calc(100vw - 140px); }
  .community-comments-panel { height: min(74vh, 640px); }
}

@media (prefers-reduced-motion: reduce) {
  .community-action-rail,
  .community-comments-panel,
  .community-comments-scrim { transition: none; }
}

body.community-report-open { overflow: hidden; }

.community-report-modal {
  position: fixed;
  z-index: 420;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  box-sizing: border-box;
}

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

.community-report-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 3, 7, 0.8);
  backdrop-filter: blur(8px);
}

.community-report-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
  padding: 26px;
  border: 1px solid rgba(111, 180, 214, 0.34);
  border-radius: 8px;
  background: #08121a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.64);
  box-sizing: border-box;
}

.community-report-panel > span { color: #77d6ff; font-size: 10px; font-weight: 800; letter-spacing: 0.2em; }
.community-report-panel h2 { margin: 0; font-size: 22px; }
.community-report-panel p { margin: 0 0 3px; color: #8198aa; font-size: 12px; }
.community-report-panel p b { color: #dbe8ef; }
.community-report-panel .community-report-time { color:#f0c35b; }
.community-report-panel .community-report-guidance { padding:9px 10px; border:1px solid rgba(118,213,255,.13); border-radius:5px; background:rgba(13,31,43,.55); line-height:1.6; }
.community-report-panel label { display: grid; gap: 7px; color: #8fa6b6; font-size: 11px; }
.community-report-panel select,
.community-report-panel textarea {
  width: 100%;
  border: 1px solid rgba(111, 180, 214, 0.28);
  border-radius: 5px;
  background: rgba(3, 9, 14, 0.9);
  color: #e8f1f6;
  outline: none;
  box-sizing: border-box;
}
.community-report-panel select { height: 40px; padding: 0 10px; }
.community-report-panel textarea { min-height: 92px; padding: 10px; resize: vertical; }
.community-report-panel select:focus,
.community-report-panel textarea:focus { border-color: rgba(118, 213, 255, 0.72); }
.community-report-panel > small { min-height: 17px; color: #ff9f9f; font-size: 11px; }
.community-report-panel > div { display: flex; justify-content: flex-end; gap: 8px; }
.community-report-panel > div button { min-width: 88px; height: 35px; border: 1px solid rgba(111, 180, 214, 0.26); border-radius: 5px; background: rgba(16, 37, 51, 0.86); color: #bde8fa; cursor: pointer; }
.community-report-panel > div button[type="submit"] { border-color: rgba(240, 195, 91, 0.52); background: rgba(77, 52, 15, 0.88); color: #ffe19a; }
.community-report-panel > div button:disabled { cursor: wait; opacity: 0.6; }

@media (max-width: 560px) {
  .community-report-modal { align-items: end; padding: 0; }
  .community-report-panel { width: 100%; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 10px 10px 0 0; }
  .community-danmaku-list-toggle span { display: none; }
  .community-danmaku-list-toggle { width: 38px; padding: 0; }
  .community-danmaku-list { top: 68px; right: 10px; bottom: 110px; width: calc(100% - 20px); }
}

body.publish-work-open {
  overflow: hidden;
}

.publish-work-modal {
  position: fixed;
  inset: 0;
  z-index: 340;
  display: none;
}

.publish-work-modal.open {
  display: block;
}

.publish-work-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 4, 9, 0.84);
  backdrop-filter: blur(8px);
}

.publish-work-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(107, 169, 219, 0.42);
  border-radius: 8px;
  background: #07111b;
  color: #edf5fb;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62);
  transform: translate(-50%, -50%);
}

.publish-work-panel > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(114, 165, 205, 0.24);
}

.publish-work-panel > header span {
  color: #6bd1ff;
  font-size: 11px;
}

.publish-work-panel > header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.publish-work-panel > header > button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(122, 171, 211, 0.34);
  border-radius: 6px;
  background: #0a1724;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.publish-work-panel form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.publish-work-panel [hidden] {
  display: none !important;
}

.publish-work-panel label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.publish-work-panel label > span {
  font-size: 13px;
  font-weight: 700;
}

.publish-work-panel input:not([type="checkbox"]),
.publish-work-panel select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(112, 163, 203, 0.34);
  border-radius: 5px;
  background: #040b12;
  color: #fff;
  box-sizing: border-box;
}

.publish-work-panel input[type="file"] {
  padding: 7px 8px;
}

.publish-work-panel small {
  color: #8396a8;
  line-height: 1.45;
}

.publish-work-media-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.publish-canvas-toggle {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(113, 163, 203, 0.26);
  border-radius: 6px;
  background: rgba(3, 9, 15, 0.5);
}

.publish-canvas-toggle input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: #e8bb55;
}

.publish-canvas-toggle span,
.publish-canvas-toggle b,
.publish-canvas-toggle small {
  display: block;
}

.publish-canvas-toggle small {
  margin-top: 5px;
}

.publish-work-status {
  min-height: 20px;
  margin: 0;
  color: #8fdcff;
  font-size: 13px;
}

.publish-work-panel footer {
  display: flex;
  justify-content: end;
  gap: 10px;
}

.publish-work-panel footer button {
  min-width: 110px;
  height: 40px;
  border: 1px solid rgba(123, 173, 213, 0.36);
  border-radius: 5px;
  background: #0a1723;
  color: #dce8f1;
  cursor: pointer;
}

.publish-work-panel footer button[type="submit"] {
  border-color: rgba(235, 193, 91, 0.68);
  background: #4a3516;
  color: #fff0bd;
}

.publish-work-panel footer button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 680px) {
  .publish-work-media-fields { grid-template-columns: 1fr; }
}

.publish-template-note {
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid #e4b74e;
  background: rgba(83, 57, 13, 0.28);
  color: #d9c68e;
  font-size: 13px;
  line-height: 1.55;
}

/* Template center */
body.template-center-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #02070d url("./assets/brand/ruyi-home-long-20260704-v6.png") center top / cover fixed no-repeat;
  color: #eef7ff;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

body.template-center-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  background: rgba(1, 7, 13, 0.56);
  pointer-events: none;
}

.template-center-main {
  width: min(1760px, calc(100% - 48px));
  min-height: calc(100vh - 104px);
  margin: 104px auto 0;
  padding: 52px 0 96px;
  box-sizing: border-box;
}

.template-center-heading,
.template-results > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.template-center-heading span,
.template-results > header span {
  display: block;
  margin-bottom: 6px;
  color: #67d5d0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.template-center-heading h1 {
  margin: 0;
  color: #fff;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: 0;
}

.template-heading-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.template-search {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 34px 64px;
  align-items: center;
  height: 42px;
  border: 1px solid rgba(114, 167, 208, 0.3);
  border-radius: 7px;
  background: rgba(4, 12, 20, 0.88);
  overflow: hidden;
}

.template-search input {
  min-width: 0;
  height: 100%;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f8fb;
}

.template-search input::placeholder {
  color: #7890a2;
}

.template-search button {
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(114, 167, 208, 0.2);
  background: transparent;
  color: #cbd9e3;
  cursor: pointer;
}

.template-search button[type="submit"] {
  color: #ffe6a0;
  font-weight: 800;
}

.template-search [hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.template-sort {
  display: inline-grid;
  grid-template-columns: repeat(2, 72px);
  padding: 3px;
  border: 1px solid rgba(114, 167, 208, 0.28);
  border-radius: 6px;
  background: rgba(4, 12, 20, 0.86);
}

.template-sort button,
.template-category-tabs button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #91a5b5;
  cursor: pointer;
  font-weight: 700;
}

.template-sort button {
  height: 34px;
}

.template-sort button.active,
.template-category-tabs button.active {
  background: #16334a;
  color: #fff;
  box-shadow: inset 0 -2px #e7bc59;
}

.template-category-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 8px;
  margin: 30px 0 48px;
  padding: 7px;
  border: 1px solid rgba(110, 168, 211, 0.24);
  border-radius: 7px;
  background: rgba(3, 11, 18, 0.76);
  overflow-x: auto;
  scrollbar-width: none;
}

.template-category-tabs::-webkit-scrollbar {
  display: none;
}

.template-category-tabs button {
  min-height: 44px;
  padding: 0 12px;
  white-space: nowrap;
}

.template-results {
  min-height: 420px;
}

.template-results > header {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(118, 172, 211, 0.2);
}

.template-results > header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.template-results > header p,
.template-center-status {
  color: #8298aa;
  font-size: 13px;
}

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

.template-center-status {
  margin: 70px 0;
  text-align: center;
}

.template-more[hidden] {
  display: none;
}

@media (max-width: 1500px) {
  .template-work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .template-center-heading { align-items: flex-start; }
  .template-heading-tools { align-items: stretch; flex-direction: column; }
  .template-search { grid-template-columns: minmax(200px, 1fr) 34px 64px; }
  .template-category-tabs { grid-template-columns: repeat(5, minmax(160px, 1fr)); }
  .template-work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .template-center-main { width: calc(100% - 28px); margin-top: 112px; padding-top: 30px; }
  .template-center-heading h1 { font-size: 30px; }
  .template-category-tabs { margin: 22px 0 34px; }
  .template-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .template-center-heading { flex-direction: column; align-items: stretch; gap: 18px; }
  .template-heading-tools { width: 100%; }
  .template-search { width: 100%; box-sizing: border-box; }
  .template-sort { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; box-sizing: border-box; }
  .template-work-grid { grid-template-columns: 1fr; }
  .template-results > header { align-items: start; }
}

.work-canvas-body {
  margin: 0;
  overflow: hidden;
  background: #03070c;
  color: #eef6fc;
  font-family: "Microsoft YaHei", Arial, sans-serif;
}

.work-canvas-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #050a10 url("./assets/brand/ruyi-canvas-bg-20260704-v4.png") center / cover no-repeat;
}

.work-canvas-topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(106, 162, 207, 0.22);
  background: rgba(2, 7, 12, 0.84);
  backdrop-filter: blur(12px);
}

.work-canvas-topbar img {
  width: 126px;
  height: auto;
}

.work-canvas-topbar span {
  color: #70cdf7;
  font-size: 12px;
}

.work-canvas-topbar h1 {
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-canvas-topbar > button {
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(235, 194, 91, 0.66);
  border-radius: 6px;
  background: #4b3617;
  color: #fff0bc;
  font-weight: 700;
  cursor: pointer;
}

.work-canvas-topbar > button[hidden] { display: none; }

.work-canvas-topbar > button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.work-canvas-viewport {
  position: absolute;
  inset: 76px 0 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

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

.work-canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  transform-origin: 0 0;
}

.work-canvas-edges {
  position: absolute;
  left: -6000px;
  top: -6000px;
  width: 12000px;
  height: 12000px;
  overflow: visible;
  pointer-events: none;
}

.work-canvas-nodes {
  position: absolute;
  inset: 0;
}

.work-readonly-node {
  position: absolute;
  width: 300px;
  min-height: 210px;
  overflow: visible;
  border: 1px solid rgba(104, 183, 231, 0.46);
  border-radius: 7px;
  background: rgba(5, 15, 25, 0.94);
  color: #eef7fc;
  box-shadow: 0 15px 32px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  box-sizing: border-box;
}

.work-readonly-node:hover {
  border-color: rgba(239, 199, 93, 0.78);
}

.work-readonly-node > header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  height: 42px;
  padding: 0 11px;
}

.work-readonly-node > header span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #173654;
  color: #82d9ff;
}

.work-node-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #010509;
}

.work-node-preview img,
.work-node-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.work-node-placeholder {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(103, 184, 231, 0.4);
  border-radius: 7px;
  color: #7ed8ff;
  font-size: 24px;
}

.work-readonly-node > p {
  min-height: 34px;
  margin: 0;
  padding: 10px 12px;
  color: #9eb0bf;
  font-size: 12px;
  line-height: 1.45;
}

.work-port-in,
.work-port-out {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #07101a;
  border-radius: 50%;
  transform: translateY(-50%);
}

.work-port-in { left: -8px; background: #35c9ff; }
.work-port-out { right: -8px; background: #efc451; }

.work-canvas-zoom {
  position: absolute;
  z-index: 22;
  left: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: 38px 66px 38px 38px;
  gap: 6px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(104, 161, 205, 0.34);
  border-radius: 7px;
  background: rgba(3, 10, 17, 0.9);
}

.work-canvas-zoom button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(111, 166, 208, 0.32);
  border-radius: 5px;
  background: #0a1723;
  color: #fff;
  font-size: 19px;
  cursor: pointer;
}

.work-canvas-zoom span {
  text-align: center;
}

.work-node-detail {
  position: absolute;
  z-index: 24;
  top: 94px;
  right: 18px;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100vh - 116px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(110, 169, 214, 0.4);
  border-radius: 7px;
  background: rgba(5, 14, 23, 0.97);
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.work-node-detail.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.work-node-detail > button {
  position: sticky;
  top: 0;
  float: right;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(116, 168, 208, 0.34);
  border-radius: 5px;
  background: #0b1824;
  color: #fff;
  cursor: pointer;
}

.work-node-detail h2 {
  margin: 6px 42px 18px 0;
}

.work-node-detail h3 {
  margin: 18px 0 7px;
  color: #efcc76;
  font-size: 13px;
}

.work-node-detail p {
  color: #cbd8e2;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.work-node-detail img,
.work-node-detail video {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #000;
}

@media (max-width: 680px) {
  .work-canvas-topbar { grid-template-columns: 90px minmax(0, 1fr); padding: 0 12px; }
  .work-canvas-topbar img { width: 82px; }
  .work-canvas-topbar > button { position: absolute; right: 12px; bottom: -54px; }
}
/* Public help and membership pages intentionally keep their main content empty. */
.help-page,
.membership-page {
  min-height: 100vh;
  margin: 0;
  color: #f6f2e9;
  background: radial-gradient(circle at 52% 0, rgba(38, 61, 94, 0.28), transparent 42%), #030811;
}

.help-page__main,
.membership-page__main {
  min-height: 100vh;
}
.beta-invite-modal[hidden], .customer-support-modal[hidden] { display: none; }
.beta-invite-modal, .customer-support-modal { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 20px; }
.customer-support-modal { z-index: 5100; }
.beta-invite-backdrop, .customer-support-backdrop { position: absolute; inset: 0; background: rgba(0, 4, 11, 0.8); backdrop-filter: blur(10px); }
.beta-invite-panel, .customer-support-panel { position: relative; width: min(440px, 100%); padding: 30px; border: 1px solid rgba(225, 193, 132, 0.3); border-radius: 22px; color: #f8f3e8; background: linear-gradient(145deg, rgba(14, 27, 45, 0.98), rgba(4, 10, 20, 0.99)); box-shadow: 0 30px 100px rgba(0,0,0,.64); }
.beta-invite-kicker, .customer-support-panel > span { color: #d9b86f; font: 700 11px/1.2 system-ui; letter-spacing: .18em; }
.beta-invite-panel h2, .customer-support-panel h2 { margin: 10px 0 8px; font-size: 25px; }
.beta-invite-panel > p, .customer-support-panel > p { color: #9eabbc; line-height: 1.7; }
.beta-invite-panel label { display: grid; gap: 8px; margin-top: 22px; color: #c8d1df; font-size: 13px; }
.beta-invite-panel input { width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid #263b56; border-radius: 11px; color: #fff; background: #07111f; text-transform: uppercase; }
.beta-invite-panel form > button { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 11px; color: #1d1609; background: #dcb766; font-weight: 800; }
.beta-invite-panel .beta-invite-status { min-height: 22px; margin: 12px 0 0; color: #f3c980; }
.beta-invite-actions, .customer-support-panel > div { display: flex; gap: 10px; margin-top: 18px; }
.beta-invite-actions button, .customer-support-panel a, .customer-support-panel div button { flex: 1; padding: 11px; border: 1px solid #2a405c; border-radius: 10px; color: #dce6f4; background: #0b1727; text-align: center; text-decoration: none; }
.customer-support-panel strong { display: block; margin: 18px 0; color: #f0cf89; font-size: clamp(18px, 5vw, 24px); overflow-wrap: anywhere; }
.customer-support-close { position: absolute; top: 14px; right: 16px; border: 0; color: #c8d1df; background: transparent; font-size: 26px; }
.customer-support-panel em { display: block; min-height: 20px; margin-top: 12px; color: #9fd8b8; font-style: normal; text-align: center; }
body.beta-invite-open { overflow: hidden; }

/* Keep the themed canvas usable on narrow screens. These rules live after the
   theme overrides so the mobile layout cannot be re-expanded by the desktop
   canvas selectors above. */
@media (max-width: 760px) {
  .ruyi-canvas .canvas-topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 42px;
  }

  .ruyi-canvas .canvas-topbar::before,
  .ruyi-canvas .canvas-topbar::after {
    display: none;
  }

  .ruyi-canvas .project-title-input {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 40px;
    margin-left: 0;
    padding-inline: 10px;
  }

  .ruyi-canvas .top-actions {
    gap: 4px;
    min-width: 0;
  }

  .ruyi-canvas .canvas-notification-button,
  .ruyi-canvas .member-chip,
  .ruyi-canvas .canvas-member-points {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
  }

  .ruyi-canvas .top-icon-button,
  .ruyi-canvas .account-chip {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .ruyi-canvas .tool-dock {
    top: 68px;
    left: 10px;
    width: 44px;
    gap: 6px;
  }

  .ruyi-canvas .tool-button {
    width: 44px;
    min-height: 44px;
  }

  .ruyi-canvas .tool-button span {
    width: 28px;
    height: 28px;
  }

  .ruyi-canvas .tool-button span::before {
    font-size: 22px;
  }

  .ruyi-canvas .canvas-utility-dock {
    bottom: 10px;
    gap: 10px;
    max-width: calc(100vw - 20px);
    padding: 9px 12px;
    overflow: visible;
  }

  .ruyi-canvas .utility-button {
    min-width: 52px;
    min-height: 48px;
  }

  .ruyi-canvas .zoom-panel {
    left: 10px;
    bottom: 100px;
  }

  .ruyi-canvas .node-card.visual-expanded,
  .ruyi-canvas .node-card.script-expanded,
  .ruyi-canvas .node-card.script-workflow,
  .ruyi-canvas .node-card.script-text-video {
    width: min(430px, calc(100vw - 76px));
  }

  .ruyi-canvas .node-card.script-expanded .node-editor {
    max-height: calc(100vh - 240px);
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
