:root {
  color-scheme: dark;
  --bg: #0a0b0d;
  --panel: rgba(22, 23, 27, 0.92);
  --panel-strong: rgba(30, 31, 36, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #f2f2f4;
  --muted: #8f929a;
  --muted-2: #656a73;
  --blue: #4f83ff;
  --gold: #d49b55;
  --green: #61bd83;
  --purple: #9d78ff;
  --cyan: #65c9d9;
  --radius: 14px;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(63, 105, 190, 0.14), transparent 28%),
    radial-gradient(circle at 70% 8%, rgba(208, 151, 75, 0.08), transparent 30%),
    #08090b;
}

button,
select,
textarea {
  font: inherit;
}

button,
select {
  color: var(--text);
}

option {
  color: #16181d;
  background: #ffffff;
}

select option:checked,
select option:focus,
select option:hover {
  color: #0f1114;
  background: #d9e8ff;
}

button {
  cursor: pointer;
  scale: 1;
  transform-origin: center;
  transition:
    scale 0.14s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.14s ease,
    box-shadow 0.14s ease,
    background-color 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button:not(:disabled):active,
button.button-pressing {
  scale: 0.965;
  filter: brightness(1.08);
}

button.button-pulse {
  animation: buttonPressPop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes buttonPressPop {
  0% {
    scale: 0.965;
    filter: brightness(1.12);
  }
  56% {
    scale: 1.025;
    filter: brightness(1.06);
  }
  100% {
    scale: 1;
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition:
      filter 0.12s ease,
      box-shadow 0.12s ease,
      background-color 0.12s ease,
      border-color 0.12s ease,
      color 0.12s ease;
  }

  button.button-pulse {
    animation: none;
  }

  button:not(:disabled):active,
  button.button-pressing {
    scale: 0.985;
  }
}

.app-shell {
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.home-view,
.workspace-view {
  position: absolute;
  inset: 0;
}

.workspace-view {
  overflow: hidden;
  background: #15171a;
}

.home-view[hidden],
.workspace-view[hidden] {
  display: none !important;
}

html.app-start-workspace:not(.app-ready) .home-view,
html.app-start-home:not(.app-ready) .workspace-view {
  display: none !important;
}

.home-view {
  position: absolute;
  z-index: 80;
  --home-snake-light-x: 50vw;
  --home-snake-light-y: 32vh;
  --home-food-light-x: 50vw;
  --home-food-light-y: 32vh;
  --home-pointer-light-x: 50vw;
  --home-pointer-light-y: 32vh;
  --home-pointer-mid-x: 50vw;
  --home-pointer-mid-y: 32vh;
  --home-pointer-tail-x: 50vw;
  --home-pointer-tail-y: 32vh;
  --home-pointer-mid-alpha: 0;
  --home-pointer-tail-alpha: 0;
  overflow: auto;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
  background: #030405;
}

.home-snake-canvas,
.home-bee-canvas,
.home-breakout-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.92;
  mix-blend-mode: normal;
  image-rendering: pixelated;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 54vh, rgba(0, 0, 0, 0.62) 64vh, rgba(0, 0, 0, 0.16) 75vh, transparent 86vh);
  mask-image: linear-gradient(180deg, #000 0, #000 54vh, rgba(0, 0, 0, 0.62) 64vh, rgba(0, 0, 0, 0.16) 75vh, transparent 86vh);
}

.home-trail-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.9;
  mix-blend-mode: normal;
  image-rendering: pixelated;
}

.home-bee-canvas,
.home-breakout-canvas {
  opacity: 0.9;
}

.home-video-layer {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 54vh, rgba(0, 0, 0, 0.6) 64vh, rgba(0, 0, 0, 0.14) 75vh, transparent 86vh);
  mask-image: linear-gradient(180deg, #000 0, #000 54vh, rgba(0, 0, 0, 0.6) 64vh, rgba(0, 0, 0, 0.14) 75vh, transparent 86vh);
}

.home-video-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 4, 5, 0.1), rgba(3, 4, 5, 0.02) 42%, rgba(3, 4, 5, 0.24)),
    radial-gradient(circle at 50% 40%, transparent 0 36%, rgba(0, 0, 0, 0.07) 64%, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}

.home-video-window {
  position: absolute;
  width: min(var(--home-video-width, 42vw), var(--home-video-max, 760px));
  aspect-ratio: var(--home-video-aspect, 16 / 9);
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  opacity: 1;
  filter: saturate(1.08) contrast(1.16) brightness(1.18);
  transform: translate3d(0, 0, 0) rotate(var(--home-video-rotate, 0deg));
  mix-blend-mode: screen;
  box-shadow: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 52%, rgba(0, 0, 0, 0.9) 66%, rgba(0, 0, 0, 0.38) 84%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 0 52%, rgba(0, 0, 0, 0.9) 66%, rgba(0, 0, 0, 0.38) 84%, transparent 100%);
}

.home-video-window video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  opacity: 1;
}

.home-video-window::before,
.home-video-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-video-window::before {
  background:
    radial-gradient(ellipse at center, transparent 0 48%, rgba(0, 0, 0, 0.12) 66%, rgba(0, 0, 0, 0.46) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 18% 82%, rgba(0, 0, 0, 0.38)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 20% 78%, rgba(0, 0, 0, 0.42));
  mix-blend-mode: multiply;
}

.home-video-window::after {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.11) 0, transparent 56%),
    rgba(255, 255, 255, 0.015);
  box-shadow: none;
}

.home-view::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.home-view::-webkit-scrollbar-track {
  background:
    linear-gradient(90deg, transparent 0 6px, rgba(255, 255, 255, 0.18) 6px 7px, rgba(7, 8, 9, 0.92) 7px 100%);
}

.home-view::-webkit-scrollbar-thumb {
  min-height: 112px;
  border: 5px solid transparent;
  border-right-width: 4px;
  border-left-width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  background-clip: content-box;
}

.home-view::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.home-view::-webkit-scrollbar-corner {
  background: transparent;
}

.home-view::before {
  content: "";
  position: fixed;
  z-index: 1;
  inset: 0;
  background: rgba(3, 4, 5, 0.84);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='white' fill-rule='evenodd' d='M0 0H14V10H0V0ZM3.5 3.5m-0.9 0a0.9 0.9 0 1 0 1.8 0a0.9 0.9 0 1 0 -1.8 0ZM10.5 8.5m-0.9 0a0.9 0.9 0 1 0 1.8 0a0.9 0.9 0 1 0 -1.8 0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath fill='white' fill-rule='evenodd' d='M0 0H14V10H0V0ZM3.5 3.5m-0.9 0a0.9 0.9 0 1 0 1.8 0a0.9 0.9 0 1 0 -1.8 0ZM10.5 8.5m-0.9 0a0.9 0.9 0 1 0 1.8 0a0.9 0.9 0 1 0 -1.8 0Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-position: center top;
  mask-position: center top;
  opacity: 1;
  pointer-events: none;
}

.home-view::after {
  content: "";
  position: fixed;
  z-index: 1;
  inset: 0;
  background-image:
    radial-gradient(circle at 3.5px 3.5px, rgba(190, 210, 232, 0.64) 0 0.95px, transparent 1.45px),
    radial-gradient(circle at 10.5px 8.5px, rgba(190, 210, 232, 0.58) 0 0.88px, transparent 1.38px);
  background-size: 14px 10px;
  background-position: center top, center top;
  -webkit-mask-image:
    radial-gradient(circle at var(--home-snake-light-x) var(--home-snake-light-y), rgba(0, 0, 0, 1) 0 34px, rgba(0, 0, 0, 0.52) 64px, transparent 106px),
    radial-gradient(circle at var(--home-food-light-x) var(--home-food-light-y), rgba(0, 0, 0, 0.96) 0 24px, rgba(0, 0, 0, 0.46) 48px, transparent 84px),
    radial-gradient(ellipse 136px 76px at var(--home-pointer-light-x) var(--home-pointer-light-y), rgba(0, 0, 0, 1) 0 30px, rgba(0, 0, 0, 0.58) 72px, transparent 138px),
    radial-gradient(ellipse 88px 42px at var(--home-pointer-mid-x) var(--home-pointer-mid-y), rgba(0, 0, 0, var(--home-pointer-mid-alpha)) 0 18px, rgba(0, 0, 0, calc(var(--home-pointer-mid-alpha) * 0.42)) 48px, transparent 86px),
    radial-gradient(ellipse 54px 24px at var(--home-pointer-tail-x) var(--home-pointer-tail-y), rgba(0, 0, 0, var(--home-pointer-tail-alpha)) 0 10px, rgba(0, 0, 0, calc(var(--home-pointer-tail-alpha) * 0.3)) 30px, transparent 54px);
  mask-image:
    radial-gradient(circle at var(--home-snake-light-x) var(--home-snake-light-y), rgba(0, 0, 0, 1) 0 34px, rgba(0, 0, 0, 0.52) 64px, transparent 106px),
    radial-gradient(circle at var(--home-food-light-x) var(--home-food-light-y), rgba(0, 0, 0, 0.96) 0 24px, rgba(0, 0, 0, 0.46) 48px, transparent 84px),
    radial-gradient(ellipse 136px 76px at var(--home-pointer-light-x) var(--home-pointer-light-y), rgba(0, 0, 0, 1) 0 30px, rgba(0, 0, 0, 0.58) 72px, transparent 138px),
    radial-gradient(ellipse 88px 42px at var(--home-pointer-mid-x) var(--home-pointer-mid-y), rgba(0, 0, 0, var(--home-pointer-mid-alpha)) 0 18px, rgba(0, 0, 0, calc(var(--home-pointer-mid-alpha) * 0.42)) 48px, transparent 86px),
    radial-gradient(ellipse 54px 24px at var(--home-pointer-tail-x) var(--home-pointer-tail-y), rgba(0, 0, 0, var(--home-pointer-tail-alpha)) 0 10px, rgba(0, 0, 0, calc(var(--home-pointer-tail-alpha) * 0.3)) 30px, transparent 54px);
  opacity: 0.88;
  pointer-events: none;
}

.home-topbar {
  position: fixed;
  z-index: 3;
  top: 42px;
  left: 0;
  right: 0;
  height: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px 0 28px;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.home-topbar .home-brand {
  display: flex;
  pointer-events: auto;
}

.home-topbar .home-actions,
.home-topbar .home-brand {
  pointer-events: auto;
}

.home-brand,
.home-actions,
.home-prompt-actions,
.home-quick-upload,
.home-section-head,
.home-skill-chips {
  display: flex;
  align-items: center;
}

.home-brand {
  font-size: 20px;
}

.home-brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #8ad7ff, #d98bff 55%, #f3b66b);
  color: #101115;
  font-weight: 900;
}

.home-actions {
  position: relative;
  gap: 12px;
}

.home-actions > button:not(.home-member-pill):not(.home-profile-button) {
  display: none;
}

.home-actions button,
.home-section-head button,
.home-skill-chips button,
.home-quick-upload button,
.home-send {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(246, 247, 250, 0.88);
}

.home-actions button {
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
}

.home-member-pill {
  position: relative;
  z-index: 4;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 0 15px 0 14px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(11, 11, 14, 0.82);
  color: rgba(248, 240, 230, 0.94);
  font-weight: 800;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.home-member-energy,
.home-member-offer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.home-member-bolt {
  color: #d989ff;
  font-size: 13px;
  text-shadow: 0 0 12px rgba(217, 137, 255, 0.55);
}

.home-member-gem {
  color: #efb6ff;
  font-size: 12px;
  text-shadow: 0 0 12px rgba(239, 182, 255, 0.48);
}

.home-member-divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.13);
}

.home-profile-button {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(142, 205, 255, 0.26);
  background:
    conic-gradient(from 214deg, transparent 0 32deg, rgba(131, 210, 255, 0.96) 34deg 45deg, transparent 48deg 168deg, rgba(203, 139, 255, 0.94) 170deg 184deg, transparent 188deg 360deg),
    #171a20;
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.045), 0 0 24px rgba(119, 183, 255, 0.18);
}

.home-profile-button::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #171a20;
}

.home-profile-icon {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 48%),
    #20242b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 10px rgba(151, 210, 255, 0.45);
}

.home-account-menu {
  position: absolute;
  z-index: 8;
  top: calc(100% + 12px);
  right: 0;
  width: 270px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(31, 31, 33, 0.97);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.05);
}

.home-account-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-account-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4a3ff 0%, #c49aff 58%, #8fc6ff 100%);
  color: #fff;
  font-weight: 900;
}

.home-account-head strong {
  display: block;
  color: #f3f4f6;
  font-size: 16px;
}

.home-account-head small {
  display: block;
  margin-top: 2px;
  color: rgba(226, 228, 236, 0.42);
  font-size: 12px;
}

.home-account-head small.is-verified {
  color: rgba(127, 218, 146, 0.72);
}

.home-account-head small.is-unverified {
  color: rgba(255, 199, 117, 0.82);
}

.home-account-menu button {
  width: 100%;
  height: 56px;
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  background: transparent;
  color: rgba(238, 240, 246, 0.88);
  text-align: left;
}

.home-account-menu button[hidden] {
  display: none !important;
}

.home-account-menu button:last-child {
  border-bottom: 0;
}

.home-account-menu button:hover {
  background: rgba(255, 255, 255, 0.045);
}

.home-account-menu button span {
  color: rgba(230, 233, 242, 0.48);
  font-size: 16px;
}

.home-account-menu button strong {
  font-size: 15px;
}

.home-account-menu button em {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(161, 75, 66, 0.72);
  color: #ffd8cf;
  font-style: normal;
  font-size: 12px;
}

.account-simple-dialog {
  display: grid;
  gap: 14px;
}

.account-simple-dialog article,
.account-simple-dialog label {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.account-simple-dialog strong,
.account-simple-dialog span {
  color: #f2f3f7;
  font-weight: 800;
}

.account-simple-dialog p {
  margin: 0;
  color: rgba(225, 228, 236, 0.62);
  line-height: 1.65;
}

.account-simple-dialog input {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.22);
  color: #f4f5f8;
  padding: 0 10px;
}

.account-simple-dialog button {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(245, 247, 252, 0.88);
}

.account-auth-dialog {
  min-width: min(380px, calc(100vw - 48px));
}

.account-auth-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.account-auth-actions button:first-child {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: #08090b;
  font-weight: 900;
}

.account-simple-dialog button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.account-settings-dialog {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  align-items: stretch;
  overflow: hidden;
}

.account-settings-sidebar {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  padding: 20px 14px 20px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.account-settings-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f3a0ca, #9a8cff);
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
}

.account-settings-sidebar strong {
  min-width: 0;
  color: #f6f7fb;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-sidebar small {
  min-width: 0;
  color: rgba(230, 232, 238, 0.52);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-nav {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.account-settings-nav button {
  height: 34px;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: rgba(239, 241, 247, 0.58);
  text-align: left;
}

.account-settings-nav button:hover,
.account-settings-nav button.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.account-settings-main {
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 18px 20px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
}

.account-settings-main::-webkit-scrollbar {
  width: 6px;
}

.account-settings-main::-webkit-scrollbar-track {
  background: transparent;
}

.account-settings-main::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.account-settings-panel {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.account-settings-panel[hidden] {
  display: none;
}

.account-settings-panel > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  min-width: 0;
}

.account-settings-panel > header strong {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.account-settings-panel > header p {
  min-width: 0;
  margin: 0;
  color: rgba(226, 229, 237, 0.58);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-settings-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-settings-dialog article,
.account-settings-dialog label {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-settings-dialog label {
  gap: 8px;
}

.account-settings-dialog input {
  width: 100%;
  min-width: 0;
  height: 40px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.account-settings-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.account-profile-panel {
  gap: 12px;
}

.account-profile-grid,
.account-profile-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 12px;
  min-width: 0;
}

.account-profile-card,
.account-profile-panel .account-membership-status,
.account-profile-panel .account-email-status-panel,
.account-profile-panel .account-local-compute-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.account-profile-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.account-profile-card-head strong,
.account-profile-panel .account-local-compute-panel strong {
  min-width: 0;
  color: #f5f7fb;
  font-size: 15px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-card-head small {
  min-width: 0;
  color: rgba(220, 225, 235, 0.52);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-panel label {
  gap: 7px;
}

.account-profile-panel label span {
  color: rgba(241, 244, 249, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.account-profile-panel .account-settings-field-grid {
  gap: 10px;
}

.account-profile-panel .account-membership-status {
  align-content: space-between;
  border-color: rgba(205, 184, 255, 0.18);
  background: rgba(170, 134, 255, 0.055);
}

.account-profile-panel .account-local-compute-panel {
  border-color: rgba(126, 224, 167, 0.18);
  background: rgba(126, 224, 167, 0.052);
}

.account-profile-panel .account-local-compute-panel.muted {
  border-color: rgba(226, 232, 240, 0.11);
  background: rgba(226, 232, 240, 0.032);
}

.account-profile-panel .account-email-status-panel {
  align-content: start;
}

.account-profile-panel .account-membership-status p,
.account-profile-panel .account-email-status-panel p,
.account-profile-panel .account-local-compute-panel p,
.account-profile-panel .account-local-compute-panel small {
  margin: 0;
  color: rgba(224, 229, 239, 0.66);
  font-size: 12px;
  line-height: 1.48;
}

.account-profile-panel .account-membership-status button {
  width: 100%;
  min-width: 0;
  height: 34px;
  white-space: nowrap;
}

.account-profile-panel .account-email-status-panel button,
.account-profile-panel .account-local-compute-panel button {
  width: auto;
  min-width: 92px;
  height: 32px;
  padding: 0 14px;
  white-space: nowrap;
  justify-self: start;
}

.account-profile-panel .account-local-compute-panel header {
  align-items: start;
}

.account-profile-panel .account-local-compute-panel header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-profile-panel .account-settings-actions {
  padding-top: 2px;
}

.account-api-key-panel {
  padding: 0;
}

.account-api-key-panel .api-key-hero {
  display: none;
}

.account-api-key-panel .api-key-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.account-api-key-panel .api-key-list-head {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) 82px minmax(128px, 0.72fr) minmax(250px, 1.45fr) 152px;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(204, 211, 224, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.account-api-key-panel .api-key-row {
  grid-template-columns: minmax(130px, 0.8fr) 82px minmax(128px, 0.72fr) minmax(250px, 1.45fr) 152px;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 0;
  background: transparent;
  align-items: center;
}

.account-api-key-panel .api-key-row:last-child {
  border-bottom: 0;
}

.account-api-key-panel .api-key-row:hover {
  background: rgba(255, 255, 255, 0.032);
}

.account-api-key-panel .api-key-row input {
  width: 100%;
  grid-column: 4;
  height: 30px;
  border-radius: 10px;
  background: rgba(5, 6, 8, 0.32);
}

.account-api-key-panel .api-key-name {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: center;
}

.account-api-key-panel .api-key-row strong {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: #f3f6fb;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-api-key-panel .api-key-name small {
  color: rgba(190, 198, 213, 0.54);
  font-size: 11px;
}

.account-api-key-panel .api-key-row small {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}

.account-api-key-panel .api-key-status {
  grid-column: 2;
  justify-self: start;
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-api-key-panel .api-key-meta {
  grid-column: 3;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-api-key-panel .api-key-summary {
  color: rgba(209, 216, 228, 0.56);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-api-key-panel .api-key-test-detail:empty,
.account-api-key-panel .api-key-hint:empty {
  display: none;
}

.account-api-key-panel .api-key-row-actions {
  grid-column: 5;
  display: grid;
  grid-template-columns: repeat(3, 44px);
  justify-content: flex-end;
  gap: 6px;
}

.account-api-key-panel .api-key-row button {
  min-width: 0;
  width: 44px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
}

.account-api-key-panel .api-key-hint {
  color: rgba(145, 154, 170, 0.72);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-api-key-focus {
  border-color: rgba(199, 239, 255, 0.38);
  box-shadow: 0 0 0 4px rgba(199, 239, 255, 0.08);
}

.account-usage-panel,
.account-cloud-project-panel {
  gap: 12px;
}

@media (max-width: 980px) {
  .account-api-key-panel .api-key-list-head,
  .account-api-key-panel .api-key-row {
    grid-template-columns: minmax(108px, 0.8fr) 72px minmax(96px, 0.6fr) minmax(180px, 1fr) 132px;
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .account-api-key-panel .api-key-row-actions {
    grid-template-columns: repeat(3, 40px);
    gap: 4px;
  }

  .account-api-key-panel .api-key-row button {
    width: 40px;
    font-size: 11px;
  }
}

@media (max-width: 760px) {
  .account-settings-dialog {
    grid-template-columns: 1fr;
    gap: 18px;
    width: min(520px, calc(100vw - 32px));
    min-height: 0;
  }

  .account-settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 0 14px;
  }

  .account-settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .account-settings-main {
    padding: 0;
    max-height: min(430px, calc(100vh - 230px));
  }

  .account-settings-panel > header {
    display: grid;
    align-items: start;
  }

  .account-settings-panel > header p {
    text-align: left;
    white-space: normal;
  }

  .account-settings-field-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-grid,
  .account-profile-secondary {
    grid-template-columns: 1fr;
  }

  .account-profile-card,
  .account-profile-panel .account-membership-status,
  .account-profile-panel .account-email-status-panel,
  .account-profile-panel .account-local-compute-panel {
    padding: 12px;
  }

  .account-profile-card-head {
    display: grid;
    gap: 4px;
  }

  .account-profile-panel .account-local-compute-panel header {
    display: grid;
  }

  .account-api-key-panel .api-key-list-head {
    display: none;
  }

  .account-api-key-panel .api-key-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px;
  }

  .account-api-key-panel .api-key-name,
  .account-api-key-panel .api-key-meta,
  .account-api-key-panel .api-key-row input,
  .account-api-key-panel .api-key-row-actions {
    grid-column: 1 / -1;
  }

  .account-api-key-panel .api-key-status {
    grid-column: 2;
    grid-row: 1;
  }

  .account-api-key-panel .api-key-row-actions {
    grid-template-columns: repeat(3, 1fr);
    justify-content: stretch;
  }

  .account-api-key-panel .api-key-row button {
    width: auto;
  }
}

.account-usage-panel > header,
.account-cloud-project-panel > header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.account-usage-panel > header p,
.account-cloud-project-panel > header p {
  margin-top: 4px;
  font-size: 12px;
}

.account-usage-panel > header button,
.account-cloud-project-panel > header button {
  min-width: 68px;
}

.account-usage-list,
.account-cloud-project-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.account-usage-item,
.account-cloud-project-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
}

.account-cloud-project-item.active {
  border-color: rgba(159, 240, 189, 0.28);
  background: rgba(159, 240, 189, 0.06);
}

.account-usage-item header,
.account-cloud-project-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-cloud-project-item header div {
  display: grid;
  gap: 2px;
}

.account-usage-item header strong,
.account-cloud-project-item header strong {
  color: rgba(245, 247, 252, 0.92);
  font-size: 12px;
}

.account-usage-item.success header strong {
  color: #9ff0bd;
}

.account-usage-item.failed header strong {
  color: #ffb4a8;
}

.account-usage-item header span,
.account-usage-item small,
.account-usage-item em,
.account-cloud-project-item header span,
.account-cloud-project-item small,
.account-usage-empty {
  color: rgba(225, 228, 236, 0.54);
  font-size: 12px;
  font-style: normal;
}

.account-usage-item p,
.account-cloud-project-item p {
  color: rgba(245, 247, 252, 0.8);
  font-size: 12px;
}

.account-cloud-project-actions {
  display: flex;
  gap: 8px;
}

.account-cloud-project-actions button {
  width: auto;
  min-width: 64px;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.account-cloud-project-actions button:last-child {
  color: rgba(255, 194, 184, 0.86);
}

.account-usage-item em {
  color: rgba(255, 194, 184, 0.78);
  word-break: break-word;
}

.account-usage-empty {
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.home-main {
  position: relative;
  z-index: auto;
  width: min(1760px, calc(100vw - 76px));
  margin: 0 auto;
  padding: clamp(278px, 32vh, 400px) 0 96px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(560px, 780px);
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 74px;
}

.home-hero h1 {
  margin: 0;
  color: #e9e8ff;
  font-size: clamp(30px, 3.2vw, 48px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

.home-hero-copy {
  display: none;
  gap: 14px;
}

.home-eyebrow {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(212, 155, 85, 0.26);
  border-radius: 999px;
  background: rgba(212, 155, 85, 0.09);
  color: #f2c990;
  font-size: 12px;
  font-weight: 800;
}

.home-hero-copy p {
  max-width: 360px;
  margin: 0;
  color: rgba(226, 229, 238, 0.62);
  font-size: 14px;
  line-height: 1.7;
}

.home-hero-workbench {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
  width: min(100%, 960px);
}

.home-game-lobby {
  position: absolute;
  z-index: 0;
  top: clamp(-170px, -13vw, -118px);
  left: 50%;
  display: none !important;
  justify-items: center;
  gap: 12px;
  width: min(92vw, 620px);
  margin: 0;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0.86;
}

.home-game-lobby strong,
.home-game-start {
  display: none;
}

.home-game-lobby strong:not([hidden]),
.home-game-start:not([hidden]) {
  display: block;
  border: 0;
  background: transparent;
  color: rgba(246, 248, 255, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(42px, 6vw, 82px);
  font-weight: 950;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.84),
    0 0 14px rgba(156, 188, 255, 0.22),
    4px 0 0 rgba(101, 226, 255, 0.1),
    -4px 0 0 rgba(210, 128, 255, 0.08);
}

.home-game-lobby strong {
  cursor: pointer;
  user-select: none;
}

.home-game-start {
  padding: 0;
}

.home-game-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 154px));
  gap: 12px;
  position: relative;
}

.home-game-picker::before {
  content: "";
  position: absolute;
  inset: -10px -16px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 5px);
  opacity: 0.38;
  pointer-events: none;
}

.home-game-picker[hidden],
.home-game-lobby:not(.is-open) .home-game-picker {
  display: none;
}

.home-game-picker button {
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(239, 244, 255, 0.72);
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.home-game-picker button.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 78%);
  color: #ffffff;
}

.home-game-picker button.active::before {
  content: ">";
  position: absolute;
  left: -10px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 0 10px rgba(145, 205, 255, 0.4);
}

.home-game-picker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 950;
}

.home-game-picker b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.16);
}

.home-prompt-card {
  position: relative;
  z-index: 3;
  width: min(100%, 820px);
  min-height: 184px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  isolation: isolate;
  border: 1px solid rgba(250, 252, 255, 0.62);
  border-radius: 24px;
  background: rgba(28, 30, 34, 0.48);
  backdrop-filter: blur(26px) saturate(1.24);
  -webkit-backdrop-filter: blur(26px) saturate(1.24);
  box-shadow: none;
  overflow: hidden;
}

.home-prompt-card::before {
  display: none;
}

.home-prompt-card:focus-within {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

.home-prompt-card textarea {
  min-height: 120px;
  resize: none;
  border: 0;
  outline: none;
  padding: 22px 22px 6px;
  background: transparent;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.65;
}

.home-prompt-card textarea::placeholder {
  color: rgba(234, 238, 248, 0.56);
}

.home-prompt-actions {
  justify-content: space-between;
  align-items: end;
  padding: 6px 18px 4px;
}

.home-paste-hint {
  padding: 0 20px 14px;
  color: rgba(232, 236, 246, 0.46);
  font-size: 12px;
  line-height: 1.35;
  pointer-events: none;
}

.home-quick-upload {
  gap: 7px;
}

.home-quick-upload button {
  width: auto;
  height: 28px;
  min-width: 56px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  overflow: hidden;
  border-radius: 6px;
  border-color: rgba(225, 225, 225, 0.16);
  background: #2b2b2b;
  color: rgba(251, 252, 255, 0.88);
  font-size: 13px;
  font-weight: 750;
  box-shadow: none;
}

.home-quick-upload button::before {
  display: none;
}

.home-quick-upload button[data-home-action="import"] {
  --home-tool-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3h8v1.4H4.4v9.2h9.2V7H15v8H3V3Zm9.2.6 2.2 2.2-5.9 5.9-2.4.6.6-2.4 5.5-5.5Zm-4.4 6.9-.2.8.8-.2 4.1-4.1-.6-.6-4.1 4.1Z'/%3E%3C/svg%3E");
}

.home-send {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(244, 245, 247, 0.95);
  color: #090a0c;
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
}

.home-skill-chips {
  position: relative;
  z-index: 3;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 10px;
}

.home-skill-chips button {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(7, 8, 10, 0.72);
  color: rgba(231, 234, 242, 0.68);
  box-shadow: none;
}

.home-start-panel {
  min-height: 210px;
  display: none;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(18, 19, 23, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
}

.home-start-panel strong {
  color: #f4f5f8;
  font-size: 14px;
}

.home-start-panel button {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(240, 242, 248, 0.84);
  font-size: 13px;
  font-weight: 800;
}

.home-start-panel button:hover {
  border-color: rgba(212, 155, 85, 0.32);
  background: rgba(212, 155, 85, 0.1);
  color: #ffd49a;
}

.home-start-panel button span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfe1ff;
  font-size: 11px;
}

.home-start-panel small {
  margin-top: 2px;
  color: rgba(222, 226, 236, 0.5);
  font-size: 12px;
  line-height: 1.55;
}

.home-section {
  position: relative;
  z-index: 2;
  margin-top: 38px;
}

.home-section-head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0;
}

.home-section-head button {
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(235, 237, 244, 0.58);
  font-size: 13px;
  font-weight: 750;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  justify-content: stretch;
}

.home-skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 270px));
  gap: 12px;
  justify-content: start;
}

.home-inspiration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-project-card,
.home-skill-grid article {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-content: start;
  gap: 6px;
  padding: 8px 8px 10px;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004)),
    rgba(12, 13, 15, 0.9);
  color: #f2f3f6;
  text-align: left;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.018);
}

.home-project-cloud-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid rgba(159, 240, 189, 0.28);
  border-radius: 999px;
  background: rgba(159, 240, 189, 0.1);
  color: rgba(207, 255, 222, 0.9);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.home-project-card.cloud {
  border-color: rgba(159, 240, 189, 0.14);
}

.home-project-card.placeholder {
  pointer-events: none;
  opacity: 0.34;
  border: 1px dashed rgba(240, 244, 255, 0.12);
  background: rgba(14, 15, 18, 0.34);
}

.home-project-card.placeholder .home-project-thumb {
  color: transparent;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent),
    rgba(255, 255, 255, 0.018);
}

.home-project-card:hover,
.home-skill-grid article:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)),
    rgba(16, 17, 19, 0.94);
  transform: translateY(-1px);
}

.home-project-card.create {
  grid-template-rows: 1fr;
  align-content: stretch;
  justify-items: center;
  text-align: center;
}

.home-project-card.create strong,
.home-project-card.create small {
  display: none;
}

.home-project-thumb {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.016), transparent 42%),
    rgba(255, 255, 255, 0.025);
  color: rgba(246, 247, 250, 0.42);
  font-size: 22px;
  font-weight: 350;
}

.home-project-card.create .home-project-thumb {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.024);
}

.home-project-card.create .home-project-thumb::after {
  content: "新建项目";
  color: rgba(246, 247, 250, 0.48);
  font-size: 13px;
  font-weight: 650;
}

.home-project-card strong,
.home-skill-grid strong {
  padding: 0 2px;
  font-size: 13px;
  font-weight: 950;
  color: rgba(246, 247, 250, 0.78);
}

.home-project-card small,
.home-skill-grid p {
  margin: 0;
  padding: 0 2px;
  color: rgba(223, 226, 235, 0.42);
  font-size: 11px;
  line-height: 1.55;
}

.all-projects-body {
  width: min(980px, calc(100vw - 36px));
  max-width: min(980px, calc(100vw - 36px));
}

.all-projects-dialog {
  display: grid;
  gap: 16px;
}

.all-projects-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.all-projects-dialog > header > div {
  display: grid;
  gap: 4px;
}

.all-projects-dialog > header strong {
  color: rgba(246, 247, 251, 0.96);
  font-size: 18px;
  font-weight: 850;
}

.all-projects-dialog > header span,
.all-projects-empty {
  color: rgba(224, 228, 238, 0.58);
  font-size: 13px;
}

.all-projects-grid {
  max-height: min(62vh, 620px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding-right: 4px;
}

.home-project-card.compact {
  min-height: 154px;
  aspect-ratio: auto;
}

.all-projects-dialog .home-project-card.create.compact {
  width: 172px;
  min-height: 86px;
  grid-template-rows: auto auto auto;
  align-content: center;
}

.all-projects-dialog .home-project-card.create.compact .home-project-thumb {
  width: 40px;
  height: 32px;
  min-height: 32px;
  margin: 0 auto;
}

.all-projects-dialog .home-project-card.create.compact .home-project-thumb::after {
  content: "";
}

.all-projects-dialog .home-project-card.create.compact strong,
.all-projects-dialog .home-project-card.create.compact small {
  display: block;
}

.home-skill-grid article {
  min-height: 118px;
  align-content: start;
  cursor: pointer;
}

.home-skill-grid span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfe1ff;
  font-size: 12px;
}

.home-refresh-inspiration {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: rgba(235, 237, 244, 0.68);
}

.home-inspiration-card {
  min-height: 202px;
  display: grid;
  grid-template-rows: 118px auto auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.014)),
    rgba(20, 21, 24, 0.86);
  color: #f2f3f6;
  overflow: hidden;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.home-inspiration-card:hover {
  border-color: rgba(212, 155, 85, 0.24);
  background:
    linear-gradient(180deg, rgba(212, 155, 85, 0.08), rgba(255, 255, 255, 0.014)),
    rgba(24, 24, 27, 0.92);
}

.home-inspiration-cover {
  position: relative;
  min-height: 0;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 255, 255, 0.3), transparent 14%),
    linear-gradient(135deg, rgba(80, 95, 126, 0.72), rgba(24, 25, 30, 0.74));
}

.home-inspiration-cover::before,
.home-inspiration-cover::after {
  content: "";
  position: absolute;
  inset: 0;
}

.home-inspiration-cover::before {
  background:
    linear-gradient(115deg, transparent 0 32%, rgba(255, 255, 255, 0.18) 33% 34%, transparent 35%),
    radial-gradient(circle at 28% 74%, rgba(0, 0, 0, 0.36), transparent 24%);
  opacity: 0.85;
}

.home-inspiration-cover::after {
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.42));
}

.home-inspiration-type {
  position: absolute;
  z-index: 1;
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.home-inspiration-card strong {
  padding: 0 2px;
  font-size: 15px;
}

.home-inspiration-card p {
  margin: 0;
  padding: 0 2px 2px;
  color: rgba(223, 226, 235, 0.54);
  font-size: 12px;
  line-height: 1.55;
}

.tone-cinematic .home-inspiration-cover {
  background:
    radial-gradient(circle at 74% 25%, rgba(255, 87, 143, 0.86), transparent 17%),
    radial-gradient(circle at 28% 66%, rgba(70, 190, 255, 0.74), transparent 22%),
    linear-gradient(135deg, #1c2030, #08090d);
}

.tone-portrait .home-inspiration-cover {
  background:
    radial-gradient(circle at 52% 30%, rgba(255, 220, 170, 0.82), transparent 18%),
    linear-gradient(135deg, #4a324f, #131018 70%);
}

.tone-scene .home-inspiration-cover {
  background:
    radial-gradient(circle at 50% 18%, rgba(202, 235, 255, 0.78), transparent 18%),
    linear-gradient(145deg, #253a37, #101513 68%);
}

.tone-product .home-inspiration-cover {
  background:
    radial-gradient(circle at 56% 44%, rgba(224, 232, 255, 0.88), transparent 14%),
    radial-gradient(circle at 74% 70%, rgba(230, 161, 75, 0.58), transparent 20%),
    linear-gradient(135deg, #27282d, #0a0a0c);
}

.home-section-head button {
  color: rgba(235, 237, 244, 0.44);
}

.home-project-card,
.home-skill-grid article {
  border: 1px solid rgba(220, 220, 220, 0.18);
  border-radius: 8px;
  background: #171717;
  box-shadow: none;
}

.home-project-card:hover,
.home-skill-grid article:hover {
  border-color: rgba(235, 235, 235, 0.26);
  background: #1f1f1f;
  transform: none;
}

.home-project-thumb {
  border-radius: 6px;
  background: #242424;
  color: rgba(246, 247, 250, 0.58);
}

.home-project-card.create .home-project-thumb {
  background: #242424;
}

.home-project-card.create .home-project-thumb::after {
  color: rgba(246, 247, 250, 0.68);
}

.home-project-card strong,
.home-skill-grid strong {
  color: rgba(250, 251, 255, 0.9);
}

.home-project-card small,
.home-skill-grid p {
  color: rgba(229, 233, 242, 0.58);
}

.home-refresh-inspiration {
  border-color: rgba(255, 255, 255, 0.065);
  background: rgb(8, 9, 11);
  color: rgba(235, 237, 244, 0.5);
}

.home-inspiration-card {
  border: 1px solid rgba(220, 220, 220, 0.18);
  border-radius: 8px;
  background: #171717;
  box-shadow: none;
}

.home-inspiration-card:hover {
  border-color: rgba(235, 235, 235, 0.26);
  background: #1f1f1f;
}

.home-inspiration-cover {
  border-radius: 6px;
  background: #242424;
}

.home-inspiration-cover::before {
  background:
    linear-gradient(115deg, transparent 0 32%, rgba(255, 255, 255, 0.16) 33% 34%, transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
  opacity: 1;
}

.home-inspiration-cover::after {
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.18));
}

.home-inspiration-type {
  background: rgba(0, 0, 0, 0.48);
  color: rgba(255, 255, 255, 0.9);
}

.home-inspiration-card strong {
  color: rgba(250, 251, 255, 0.92);
}

.home-inspiration-card p {
  color: rgba(229, 233, 242, 0.62);
}

.tone-cinematic .home-inspiration-cover {
  background:
    radial-gradient(circle at 74% 24%, #666 0 11%, transparent 12%),
    radial-gradient(circle at 28% 66%, #4a4a4a 0 16%, transparent 17%),
    linear-gradient(135deg, #3a3a3a, #242424);
}

.tone-portrait .home-inspiration-cover {
  background:
    radial-gradient(circle at 52% 30%, #707070 0 14%, transparent 15%),
    linear-gradient(135deg, #3c3c3c, #242424 70%);
}

.tone-scene .home-inspiration-cover {
  background:
    radial-gradient(circle at 50% 18%, #737373 0 14%, transparent 15%),
    linear-gradient(145deg, #393939, #242424 68%);
}

.tone-product .home-inspiration-cover {
  background:
    radial-gradient(circle at 56% 44%, #686868 0 11%, transparent 12%),
    radial-gradient(circle at 74% 70%, #555 0 16%, transparent 17%),
    linear-gradient(135deg, #3b3b3b, #242424);
}

body.home-mode {
  overflow: hidden;
}

@media (max-width: 980px) {
  .home-topbar {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
  }

  .home-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .home-main {
    width: min(100% - 32px, 720px);
    padding: 218px 0 58px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .home-hero-copy p {
    max-width: none;
  }

  .home-game-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 500px);
  }

  .home-game-lobby {
    top: -130px;
    width: min(92vw, 500px);
  }

  .home-skill-grid,
  .home-inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 270px));
  }

  .home-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .home-video-layer,
  .home-snake-canvas,
  .home-bee-canvas,
  .home-breakout-canvas {
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 60vh, rgba(0, 0, 0, 0.56) 72vh, rgba(0, 0, 0, 0.12) 84vh, transparent 94vh);
    mask-image: linear-gradient(180deg, #000 0, #000 60vh, rgba(0, 0, 0, 0.56) 72vh, rgba(0, 0, 0, 0.12) 84vh, transparent 94vh);
  }

  .home-main {
    width: calc(100% - 24px);
    padding-top: 204px;
  }

  .home-hero {
    margin-bottom: 40px;
  }

  .home-hero h1 {
    font-size: 30px;
  }

  .home-prompt-card {
    border-radius: 16px;
  }

  .home-game-lobby strong {
    font-size: 42px;
  }

  .home-game-lobby {
    top: -112px;
  }

  .home-game-picker button {
    min-height: 52px;
    padding: 0 10px;
  }

  .home-skill-grid,
  .home-inspiration-grid {
    grid-template-columns: minmax(0, 270px);
  }

  .home-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.topbar {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.workspace-nav {
  flex: 1 1 auto;
}

.topbar > * {
  pointer-events: auto;
}

.brand-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #6fa2ff;
  font-size: 22px;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0;
  white-space: nowrap;
}

.divider {
  width: 1px;
  height: 25px;
  background: var(--line);
}

.home-return {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.065);
  color: #f1f3f7;
  font-size: 20px;
  line-height: 1;
}

.home-return:hover {
  border-color: rgba(212, 155, 85, 0.45);
  background: rgba(212, 155, 85, 0.14);
  color: #ffd49a;
}

.project-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switcher-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.project-title-group {
  --project-title-actions-width: 70px;
  --project-title-width: clamp(110px, 10.4vw, 156px);
  position: relative;
  gap: 0;
  padding-right: 0;
}

.project-name-display,
.project-name-edit {
  width: var(--project-title-width);
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(16, 17, 21, 0.78);
  color: #f4f5f8;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.project-name-display {
  overflow: hidden;
  padding: 0 42px 0 12px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name-edit {
  padding: 0 42px 0 11px;
  outline: none;
}

.project-name-edit:focus {
  border-color: rgba(212, 155, 85, 0.52);
  box-shadow: 0 0 0 2px rgba(212, 155, 85, 0.12);
}

.project-title-group:has(.project-menu-button:hover) .project-name-display,
.project-title-group:has(.project-menu-button[aria-expanded="true"]) .project-name-display {
  border-color: rgba(212, 155, 85, 0.42);
  background:
    linear-gradient(180deg, rgba(212, 155, 85, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(18, 18, 21, 0.9);
}

.switcher-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: #e7e9ef;
  line-height: 1;
  padding: 0;
}

.switcher-icon:hover {
  border-color: rgba(92, 137, 255, 0.5);
  background: rgba(92, 137, 255, 0.14);
}

.switcher-icon.danger {
  color: #ffb9b9;
}

.switcher-icon.danger:hover {
  border-color: rgba(220, 90, 90, 0.62);
  background: rgba(120, 35, 35, 0.44);
}

.switcher-icon.save {
  width: 34px;
  color: #bfe8cd;
  font-size: 12px;
}

.switcher-icon.save:hover {
  border-color: rgba(97, 189, 131, 0.58);
  background: rgba(97, 189, 131, 0.14);
}

select,
.top-actions button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(20, 21, 25, 0.88);
}

select {
  padding: 0 36px 0 14px;
}

#projectSelect,
#episodeSelect {
  min-width: 120px;
  height: 38px;
  border-color: var(--line-soft);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(16, 17, 21, 0.78);
  color: #e9e9eb;
}

#projectSelect {
  appearance: none;
  position: absolute;
  z-index: -1;
  top: 0;
  right: var(--project-title-actions-width);
  width: 38px;
  min-width: 38px;
  max-width: 38px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 11px 11px 0;
  padding: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
  font-size: 0;
  opacity: 0;
  pointer-events: none;
}

.project-menu-button {
  position: absolute;
  z-index: 4;
  top: 0;
  right: var(--project-title-actions-width);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 11px 11px 0;
  background: transparent;
  color: rgba(235, 237, 243, 0.82);
  cursor: pointer;
  padding: 0;
}

.project-menu-button span {
  width: 8px;
  height: 8px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease, color 0.16s ease;
}

.project-menu-button:hover,
.project-menu-button[aria-expanded="true"] {
  color: #ffd49a;
}

.project-menu-button[aria-expanded="true"] span {
  transform: translateY(2px) rotate(225deg);
}

.project-title-group::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 7px;
  right: calc(var(--project-title-actions-width) + 37px);
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.project-name-edit:not([hidden]) ~ #projectSelect {
  display: none;
}

.project-name-edit:not([hidden]) ~ .project-menu-button {
  display: none;
}

.project-title-group:has(.project-name-edit:not([hidden]))::before {
  display: none;
}

.project-menu {
  position: absolute;
  z-index: 120;
  left: 0;
  top: calc(100% + 8px);
  width: max(210px, var(--project-title-width));
  max-height: min(360px, calc(100vh - 86px));
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(212, 155, 85, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(32, 28, 24, 0.98), rgba(17, 18, 22, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

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

.project-menu-item {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(244, 245, 248, 0.86);
  text-align: left;
}

.project-menu-item span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-menu-item small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 11px;
  font-weight: 700;
}

.project-menu-item:hover,
.project-menu-item.active {
  border-color: rgba(212, 155, 85, 0.26);
  background: rgba(212, 155, 85, 0.12);
  color: #fff;
}

.project-menu-item.active small {
  color: #ffd49a;
}

.project-menu-empty {
  padding: 10px 12px;
  color: rgba(226, 229, 236, 0.52);
  font-size: 12px;
}

.project-title-group #addProject {
  margin-left: 5px;
}

.project-title-group .switcher-icon + .switcher-icon {
  margin-left: 5px;
}

#episodeSelect {
  min-width: 104px;
}

.top-actions {
  position: fixed;
  z-index: 80;
  top: 42px;
  right: 26px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 0;
}

.top-actions button,
.pill-select {
  padding: 0 16px;
  white-space: nowrap;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
}

.top-actions .gold {
  border-color: rgba(212, 155, 85, 0.5);
  background:
    linear-gradient(180deg, rgba(212, 155, 85, 0.16), rgba(212, 155, 85, 0.08)),
    rgba(22, 21, 18, 0.9);
  color: #ffd49a;
}

.top-actions .workspace-member-pill {
  height: 40px;
  padding: 0 15px 0 14px;
  border-radius: 999px;
  border-color: rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)),
    rgba(11, 11, 14, 0.82);
  color: rgba(248, 240, 230, 0.94);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.top-actions .workspace-profile-button {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0;
  border-radius: 999px;
}

#recycleBin {
  border-color: rgba(143, 148, 160, 0.38);
  color: #d9dce4;
}

#recycleBin:hover {
  border-color: rgba(212, 155, 85, 0.42);
  color: #f2d39f;
}

#storageManager {
  border-color: rgba(97, 189, 131, 0.36);
  color: #c7ecd3;
}

#storageManager:hover {
  border-color: rgba(97, 189, 131, 0.56);
  color: #e1ffe9;
}

.flow-hint {
  position: absolute;
  z-index: 38;
  top: 72px;
  left: 0;
  right: 0;
  height: 42px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  color: var(--muted-2);
  font-size: 14px;
  background: linear-gradient(180deg, rgba(10, 11, 14, 0.62), rgba(10, 11, 14, 0.12));
  pointer-events: none;
}

.flow-hint:not(.storage-health-warning) {
  display: none;
}

.canvas-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: visible;
  cursor: default;
  background: #15171a;
}

.canvas-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
  pointer-events: none;
}

.canvas-grid {
  position: relative;
  width: 1600px;
  height: 900px;
  --canvas-scale: 1;
  --canvas-inverse-scale: 1;
  transform-origin: 0 0;
  backface-visibility: hidden;
}

.connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.connections path {
  fill: none;
  stroke: rgba(130, 137, 152, 0.62);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canvas-stage.performance-mode .connections {
  opacity: 0.5;
}

.canvas-stage.performance-mode .node {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.canvas-stage.performance-mode .floating-link-handle,
.canvas-stage.performance-mode .node-link-handle,
.canvas-stage.performance-mode .node-delete {
  opacity: 0 !important;
}

.connections path.connection-muted {
  stroke: rgba(168, 176, 196, 0.2);
  stroke-width: 3.2;
}

.connections path.temp {
  stroke: rgba(92, 137, 255, 0.9);
  stroke-dasharray: 8 7;
}

.connections path.connection-hit {
  pointer-events: stroke;
  stroke: rgba(255, 255, 255, 0);
  stroke-width: 16;
}

.connections path.connection-cut-preview {
  pointer-events: none;
  stroke: rgba(178, 188, 208, 0.96);
  stroke-width: 4.2;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 5px rgba(134, 157, 196, 0.42));
  animation: connectionCutTension 320ms ease-in-out infinite alternate;
}

.connections path.connection-cut-flash {
  pointer-events: none;
  stroke: rgba(174, 184, 203, 0.82);
  stroke-width: 3.4;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 4px rgba(128, 148, 184, 0.28));
  animation: connectionCutFlash 360ms ease-out forwards;
}

.connections .connection-cut-break {
  pointer-events: none;
}

.connections .connection-cut-break-piece {
  pointer-events: none;
  stroke: rgba(174, 184, 203, 0.92);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(128, 148, 184, 0.34));
  animation: connectionRubberSnap 260ms cubic-bezier(.12, .72, .24, 1) forwards;
}

.connections .connection-cut-break-piece.break-b {
  animation-delay: 4ms;
}

@keyframes connectionCutTension {
  0% {
    opacity: 0.78;
    stroke-width: 3.4;
  }

  100% {
    opacity: 0.98;
    stroke-width: 4.3;
  }
}

@keyframes connectionCutFlash {
  0% {
    opacity: .78;
    stroke-width: 3.4;
  }

  100% {
    opacity: 0;
    stroke-width: 1.4;
  }
}

@keyframes connectionRubberSnap {
  0% {
    opacity: .96;
    stroke-width: 4;
    stroke-dashoffset: 0;
  }

  24% {
    opacity: .96;
    stroke-width: 3.2;
    stroke-dashoffset: calc(var(--break-len) * .12);
  }

  54% {
    opacity: .78;
    stroke-width: 2.3;
    stroke-dashoffset: calc(var(--break-len) * .64);
  }

  100% {
    opacity: 0;
    stroke-width: 1;
    stroke-dashoffset: var(--break-len);
  }
}

.connection-dot {
  fill: #20232b;
  stroke: rgba(156, 163, 178, 0.78);
  stroke-width: 1.8;
}

.connection-dot.source {
  stroke: rgba(212, 155, 85, 0.86);
}

.floating-toolbar {
  --tool-size: clamp(40px, 4.3vw, 46px);
  position: absolute;
  z-index: 5;
  left: clamp(12px, 1.65vw, 24px);
  top: 50%;
  width: calc(var(--tool-size) + 18px);
  max-height: min(520px, calc(100dvh - 56px));
  padding: clamp(8px, 1.1vw, 12px) 9px;
  display: grid;
  gap: clamp(8px, 1.15vh, 12px);
  transform: translateY(-50%);
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(25, 26, 31, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.floating-toolbar button {
  position: relative;
  width: var(--tool-size);
  height: var(--tool-size);
  border: 0;
  border-radius: clamp(12px, 1.35vw, 14px);
  display: grid;
  place-items: center;
  overflow: visible;
  background: transparent;
  color: rgba(231, 232, 235, 0.92);
  font-size: 0;
}

.floating-toolbar button::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  transition: transform 0.16s ease, color 0.16s ease;
}

.floating-toolbar button::after {
  content: attr(title);
  position: absolute;
  z-index: 20;
  left: calc(100% + 12px);
  top: 50%;
  min-width: max-content;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(19, 20, 24, 0.96);
  color: rgba(245, 246, 249, 0.92);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%) scale(0.98);
  transform-origin: left center;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.floating-toolbar button:hover::after,
.floating-toolbar button:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}

.floating-toolbar .tool-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: linear-gradient(180deg, #fafafa, #cfd2d8);
  color: #121318;
  line-height: 1;
  box-shadow: inset 0 1px #fff, 0 10px 28px rgba(0, 0, 0, 0.34);
}

.floating-toolbar .tool-plus::before {
  width: 24px;
  height: 24px;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
}

.floating-toolbar button:not(.tool-plus):hover,
.floating-toolbar button.active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.floating-toolbar button:not(.tool-plus):hover::before,
.floating-toolbar button.active::before {
  transform: scale(1.06);
}

.floating-toolbar #assetLibrary {
  color: #f0c174;
}

.floating-toolbar #specLibrary {
  color: #cfe1ff;
}

.floating-toolbar #recycleBin {
  color: #e4d0b8;
}

.floating-toolbar #storageManager {
  color: #bfe8cd;
}

.floating-toolbar #changeLog {
  color: #ddd8ff;
}

.floating-toolbar #exportProject {
  color: #ffd49a;
}

.floating-toolbar #apiKeyManager {
  color: #c7efff;
}

.floating-toolbar .wechat-service {
  color: #7ee0a7;
}

.floating-toolbar #specLibrary::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h11a2 2 0 0 1 2 2v16H7a3 3 0 0 1-3-3V5a2 2 0 0 1 2-2Zm1 2a1 1 0 0 0-1 1v10.18c.31-.12.65-.18 1-.18h10V5H7Zm0 13a1 1 0 1 0 0 2h10v-2H7Zm2-10h6v1.7H9V8Zm0 4h5v1.7H9V12Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h11a2 2 0 0 1 2 2v16H7a3 3 0 0 1-3-3V5a2 2 0 0 1 2-2Zm1 2a1 1 0 0 0-1 1v10.18c.31-.12.65-.18 1-.18h10V5H7Zm0 13a1 1 0 1 0 0 2h10v-2H7Zm2-10h6v1.7H9V8Zm0 4h5v1.7H9V12Z'/%3E%3C/svg%3E");
}

.floating-toolbar #recycleBin::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm-3 6h12l-1 12H7L6 9Zm3 2 .5 8h1.7l-.4-8H9Zm4 0-.4 8h1.7l.5-8H13Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 3h6l1 2h4v2H4V5h4l1-2Zm-3 6h12l-1 12H7L6 9Zm3 2 .5 8h1.7l-.4-8H9Zm4 0-.4 8h1.7l.5-8H13Z'/%3E%3C/svg%3E");
}

.floating-toolbar #storageManager::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4h14v16H5V4Zm2 2v3h10V6H7Zm0 5v3h10v-3H7Zm0 5v2h10v-2H7Zm8-9h1.5v1.5H15V7Zm0 5h1.5v1.5H15V12Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4h14v16H5V4Zm2 2v3h10V6H7Zm0 5v3h10v-3H7Zm0 5v2h10v-2H7Zm8-9h1.5v1.5H15V7Zm0 5h1.5v1.5H15V12Z'/%3E%3C/svg%3E");
}

.floating-toolbar #changeLog::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h9l3 3v15H6V3Zm2 2v14h8V7h-3V5H8Zm1.5 5h5v1.7h-5V10Zm0 4h5v1.7h-5V14Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 3h9l3 3v15H6V3Zm2 2v14h8V7h-3V5H8Zm1.5 5h5v1.7h-5V10Zm0 4h5v1.7h-5V14Z'/%3E%3C/svg%3E");
}

.floating-toolbar #exportProject::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v8l3-3 1.4 1.4L12 15.8l-5.4-5.4L8 9l3 3V4ZM5 18h14v2H5v-2Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v8l3-3 1.4 1.4L12 15.8l-5.4-5.4L8 9l3 3V4ZM5 18h14v2H5v-2Z'/%3E%3C/svg%3E");
}

.floating-toolbar #assetLibrary::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h7v6H4V5Zm9 0h7v6h-7V5ZM4 13h7v6H4v-6Zm9 0h7v6h-7v-6Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h7v6H4V5Zm9 0h7v6h-7V5ZM4 13h7v6H4v-6Zm9 0h7v6h-7v-6Z'/%3E%3C/svg%3E");
}

.floating-toolbar #apiKeyManager::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 14A5.5 5.5 0 1 1 14 8.5 5.5 5.5 0 0 1 8.5 14Zm0-2A3.5 3.5 0 1 0 5 8.5 3.5 3.5 0 0 0 8.5 12Zm4.1-.8 2.4 2.4 2-2 1.4 1.4-2 2 1.8 1.8-1.4 1.4-5.6-5.6 1.4-1.4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.5 14A5.5 5.5 0 1 1 14 8.5 5.5 5.5 0 0 1 8.5 14Zm0-2A3.5 3.5 0 1 0 5 8.5 3.5 3.5 0 0 0 8.5 12Zm4.1-.8 2.4 2.4 2-2 1.4 1.4-2 2 1.8 1.8-1.4 1.4-5.6-5.6 1.4-1.4Z'/%3E%3C/svg%3E");
}

.floating-toolbar .wechat-service::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c4.4 0 8 2.9 8 6.5S16.4 17 12 17c-.6 0-1.2-.1-1.8-.2L6 20v-4.6c-1.3-1.2-2-2.9-2-4.9C4 6.9 7.6 4 12 4Zm-3 6.8a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Zm6 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c4.4 0 8 2.9 8 6.5S16.4 17 12 17c-.6 0-1.2-.1-1.8-.2L6 20v-4.6c-1.3-1.2-2-2.9-2-4.9C4 6.9 7.6 4 12 4Zm-3 6.8a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Zm6 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4Z'/%3E%3C/svg%3E");
}

.floating-toolbar .wechat-service::after {
  display: none;
}

.wechat-hover-card {
  position: absolute;
  left: calc(100% + 14px);
  bottom: 8px;
  width: 236px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  border: 1px solid rgba(126, 224, 167, 0.22);
  border-radius: 16px;
  background: rgba(20, 22, 28, 0.96);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px) scale(0.98);
  transform-origin: left bottom;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.wechat-hover-card strong {
  color: #f4f7fb;
  font-size: 14px;
}

.wechat-hover-card img {
  width: 212px;
  height: 212px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  background: #ffffff;
}

.wechat-hover-card span {
  color: #aeb8c6;
  font-size: 12px;
}

.wechat-service:hover + .wechat-hover-card,
.wechat-service:focus-visible + .wechat-hover-card,
.wechat-hover-card:hover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

@media (max-height: 420px) {
  .floating-toolbar {
    max-height: calc(100dvh - 24px);
    gap: 6px;
    padding: 7px;
  }

  .add-menu {
    left: 82px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
}

.add-menu {
  position: absolute;
  z-index: 6;
  left: 100px;
  top: 235px;
  width: 178px;
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(24, 25, 30, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.add-menu.open {
  display: grid;
}

.link-create-menu {
  position: fixed;
  z-index: 2400;
  width: min(238px, calc(100vw - 24px));
  padding: 10px;
  display: none;
  grid-template-columns: 1fr;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(22, 23, 28, 0.96);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.link-create-menu.open {
  display: grid;
}

.link-create-menu[hidden] {
  display: none;
}

.link-create-menu-head {
  padding: 4px 4px 2px;
}

.link-create-menu-head strong,
.link-create-menu-head span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-create-menu-head strong {
  color: #f3f4f7;
  font-size: 13px;
}

.link-create-menu-head span {
  margin-top: 3px;
  color: rgba(219, 224, 235, 0.56);
  font-size: 11px;
}

.link-create-menu-list {
  display: grid;
  gap: 7px;
}

.link-create-menu button {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #e8e9ed;
  text-align: left;
  padding: 0 10px;
}

.link-create-menu button:hover {
  border-color: rgba(97, 189, 131, 0.42);
  background: rgba(97, 189, 131, 0.12);
}

.link-create-menu button b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.075);
  color: #ffd49a;
  font-size: 12px;
  line-height: 1;
}

.link-create-menu button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-create-menu .link-create-menu-cancel {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 34px;
  color: rgba(226, 230, 238, 0.66);
  background: rgba(255, 255, 255, 0.026);
}

.canvas-menu {
  position: absolute;
  z-index: 30;
  width: 208px;
  padding: 10px 0;
  display: none;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.012)),
    rgba(16, 17, 21, 0.965);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.canvas-menu.open {
  display: grid;
}

.canvas-menu-group {
  display: grid;
  padding: 0 9px;
}

.canvas-menu-divider {
  height: 1px;
  margin: 9px 14px;
  background: rgba(255, 255, 255, 0.065);
}

.canvas-menu button,
.canvas-menu-submenu-trigger {
  position: relative;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(240, 242, 246, 0.88);
  text-align: left;
  padding: 0 10px 0 36px;
  font-size: 13px;
  font-weight: 650;
}

.canvas-menu button::before,
.canvas-menu-submenu-trigger::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  opacity: 0.58;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.canvas-menu button:hover,
.canvas-menu-submenu-trigger:hover,
.canvas-menu button:focus-visible,
.canvas-menu-submenu-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
}

.canvas-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.canvas-menu button[data-menu-icon="layout"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 3.5h5v3H2v-3Zm7 0h5v3H9v-3ZM2 9.5h5v3H2v-3Zm7 0h5v3H9v-3Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="focus"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 6V3h3v1H4v2H3Zm7-3h3v3h-1V4h-2V3ZM3 10h1v2h2v1H3v-3Zm9 0h1v3h-3v-1h2v-2Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="fit"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 2.5h4v1h-3v3h-1v-4Zm7 0h4v4h-1v-3h-3v-1Zm-7 7h1v3h3v1h-4v-4Zm10 0h1v4h-4v-1h3v-3ZM5.5 5.5h5v5h-5v-5Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="collapse"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4h10v1H3V4Zm2 3h6v1H5V7Zm2 3h2v1H7v-1Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="expand"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h2v1H7V3ZM5 6h6v1H5V6ZM3 9h10v1H3V9Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="rename"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.8 2.4 13.6 5 7 11.6 4.2 12.2 4.8 9.4l6-7Zm-.7 2L5.7 8.8 7.2 10.3l4.4-4.4-1.5-1.5ZM3 13h10v1H3v-1Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="copy"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 2h7a1 1 0 0 1 1 1v8h-1V3H5V2Zm-2 3h7a1 1 0 0 1 1 1v7H4a1 1 0 0 1-1-1V5Zm1 1v6h6V6H4Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="paste"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h4l.7 1H13v11H3V3h2.3L6 2Zm0 2H4v9h8V4h-2l-.7-1H6.7L6 4Zm1 3h3v1H7V7Zm0 3h3v1H7v-1Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="upload"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.5 2.5h1v6h-1v-6ZM5.2 5.1 8 2.3l2.8 2.8-.7.7L8.5 4.2v6.3h-1V4.2L5.9 5.8l-.7-.7ZM3 10h1v2.5h8V10h1v3.5H3V10Z'/%3E%3C/svg%3E");
}

.canvas-menu button[data-menu-icon="refresh"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.5 5V2.5l1 1A6 6 0 1 1 8 2v1a5 5 0 1 0 4.2 2.3L10 7h4V3l-1.5 2Z'/%3E%3C/svg%3E");
}

.canvas-menu-submenu {
  position: relative;
  padding: 0 9px;
}

.canvas-menu-submenu::after {
  content: "";
  position: absolute;
  left: 100%;
  top: -8px;
  width: 12px;
  height: calc(100% + 16px);
}

.canvas-menu-submenu[hidden] {
  display: none;
}

.canvas-menu-submenu-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.canvas-menu-submenu-trigger[data-menu-icon="asset"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5h10v8H3v-8Zm1 1v6h8v-6H4Zm2-3h4l1 1H5l1-1Z'/%3E%3C/svg%3E");
}

.canvas-menu-submenu-trigger span {
  color: rgba(240, 242, 246, 0.42);
  font-size: 15px;
}

.canvas-menu-submenu-panel {
  position: absolute;
  left: calc(100% + 8px);
  top: -8px;
  width: 126px;
  display: none;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(16, 17, 21, 0.975);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  z-index: 1;
}

.canvas-menu-submenu-panel button {
  min-height: 32px;
}

.canvas-menu-submenu-panel button[data-menu-icon="person"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 3a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Zm0 6c2.6 0 4.5 1.4 4.5 3v1h-9v-1c0-1.6 1.9-3 4.5-3Z'/%3E%3C/svg%3E");
}

.canvas-menu-submenu-panel button[data-menu-icon="scene"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 3h11v10h-11V3Zm1 1v7l2.7-3 2 2 2.2-3 2.1 3V4h-9Zm2 2A1.25 1.25 0 1 0 5.5 3.5 1.25 1.25 0 0 0 5.5 6Z'/%3E%3C/svg%3E");
}

.canvas-menu-submenu-panel button[data-menu-icon="asset-category"]::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3.5h4.2l1 1.2H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1Zm0 1V12h10V5.7H7.7l-1-1.2H3Z'/%3E%3C/svg%3E");
}

.canvas-menu-submenu:hover .canvas-menu-submenu-panel,
.canvas-menu-submenu:focus-within .canvas-menu-submenu-panel {
  display: grid;
}

.add-menu button {
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #e8e9ed;
  text-align: left;
  padding: 0 12px;
}

.empty-state {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: clamp(28px, 6vh, 72px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: calc(100vw - 48px);
  padding: 12px 18px 12px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(32, 33, 38, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

@media (max-width: 720px) {
  .empty-state {
    width: calc(100vw - 36px);
    justify-content: space-between;
    border-radius: 18px;
  }

  .empty-state span {
    white-space: normal;
  }
}

.empty-state span {
  color: #d9dbe1;
  white-space: nowrap;
}

.empty-state button {
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: linear-gradient(180deg, #4d8cff, #2867d8);
  color: #fff;
}

.empty-state[hidden] {
  display: none;
}

.zoom-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(25, 26, 31, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

@media (max-width: 720px) {
  .zoom-controls {
    bottom: 18px;
    max-width: calc(100vw - 32px);
    gap: 8px;
    padding: 0 10px;
  }
}

.zoom-controls button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #d9dbe1;
  font-size: 20px;
}

#zoomLabel {
  min-width: 54px;
  color: #f0f1f4;
  text-align: center;
}

.agent-panel {
  --agent-safe-y: clamp(24px, 4.8dvh, 44px);
  --agent-max-height: calc(100dvh - (var(--agent-safe-y) * 2));
  --agent-target-height: clamp(min(500px, var(--agent-max-height)), 82dvh, var(--agent-max-height));
  --agent-icon-size: 58px;
  position: fixed;
  z-index: 160;
  top: max(var(--agent-safe-y), calc((100dvh - var(--agent-target-height)) / 2));
  right: clamp(18px, 2.2vw, 30px);
  bottom: auto;
  width: clamp(430px, var(--agent-width, 500px), min(820px, calc(100vw - 96px)));
  height: var(--agent-target-height);
  max-height: var(--agent-max-height);
  pointer-events: none;
}

.agent-panel.closed {
  top: 80px;
  right: clamp(18px, 2.2vw, 30px);
  width: var(--agent-icon-size);
  height: var(--agent-icon-size);
  bottom: auto;
  pointer-events: auto;
}

.agent-panel.expanded {
  --agent-target-height: clamp(min(540px, var(--agent-max-height)), 86dvh, var(--agent-max-height));
  width: clamp(500px, var(--agent-width, 580px), min(820px, calc(100vw - 92px)));
}

.agent-shell {
  position: relative;
  opacity: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(17, 17, 18, 0.97);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.54), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(20px);
  pointer-events: auto;
  transform-origin: center right;
  transform: translateX(0);
  backface-visibility: hidden;
  contain: layout paint;
  will-change: auto;
}

.agent-panel.opening .agent-shell {
  will-change: transform, opacity;
  animation: agentPanelOpen 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.agent-panel.closing {
  pointer-events: none;
}

.agent-panel.closing .agent-shell {
  will-change: transform, opacity;
  animation: agentPanelClose 0.24s cubic-bezier(0.36, 0, 0.66, -0.08) both;
}

.agent-resize-handle {
  position: absolute;
  z-index: 5;
  top: 18px;
  bottom: 18px;
  left: -5px;
  width: 10px;
  cursor: ew-resize;
}

.agent-resize-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 3px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.agent-resize-handle:hover::after,
body.agent-resizing .agent-resize-handle::after {
  background: rgba(97, 189, 131, 0.72);
  box-shadow: 0 0 16px rgba(97, 189, 131, 0.28);
}

.agent-panel.closed .agent-shell {
  display: none;
}

.agent-rail-button {
  position: absolute;
  inset: 3px;
  width: 52px;
  height: 52px;
  display: none;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(17, 17, 18, 0.94);
  color: #f5f5f6;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  pointer-events: auto;
  transform: none;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.12s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.agent-rail-button:hover {
  border-color: rgba(97, 189, 131, 0.34);
  background: rgba(25, 28, 27, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(97, 189, 131, 0.08);
  transform: translateY(-1px);
}

.agent-rail-button:active {
  transform: translateY(0) scale(0.96);
}

.agent-icon {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

img.agent-icon {
  display: block;
  object-fit: cover;
}

.agent-rail-button .agent-icon {
  max-width: 34px;
  max-height: 34px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
}

.agent-panel.closed .agent-rail-button {
  display: grid;
}

@keyframes agentPanelOpen {
  from {
    opacity: 0;
    transform: translate3d(28px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes agentPanelClose {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
  55% {
    opacity: 0.82;
    transform: translate3d(10px, 0, 0);
  }
  to {
    opacity: 0;
    transform: translate3d(34px, 0, 0);
  }
}

.agent-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 13px 6px 15px;
}

.agent-brand,
.agent-quick-actions,
.agent-window-actions,
.agent-context-strip,
.agent-compose-bar,
.agent-status-card,
.agent-message-meta {
  display: flex;
  align-items: center;
}

.agent-brand {
  min-width: 0;
  flex: 0 0 auto;
  gap: 6px;
}

.agent-brand span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #f4f4f5;
  color: #151516;
  font-size: 13px;
  font-weight: 900;
}

.agent-brand .agent-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #151516;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}

.agent-brand img.agent-icon {
  background: transparent;
  color: inherit;
}

.agent-brand strong {
  color: #f3f3f4;
  font-size: 14px;
  letter-spacing: 0;
}

.agent-brand small,
.agent-message-meta {
  color: rgba(229, 231, 236, 0.45);
  font-size: 11px;
}

.agent-quick-actions {
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 7px;
}

.agent-quick-actions button,
.agent-collapse-button,
.agent-compose-bar button {
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(242, 243, 246, 0.88);
  font-size: 12px;
}

.agent-quick-actions button,
.agent-compose-bar button {
  padding: 0 12px;
}

.agent-new-chat-button {
  flex: 0 0 auto;
}

.agent-session-button {
  flex: 0 0 auto;
}

.agent-session-button.active {
  border-color: rgba(97, 189, 131, 0.34);
  background: rgba(97, 189, 131, 0.14);
  color: #d9f7e4;
}

.agent-permission-select {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px 0 9px;
}

.agent-permission-select span {
  min-width: 0;
  overflow: hidden;
  color: rgba(242, 243, 246, 0.82);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-permission-select::after {
  content: "⌄";
  position: absolute;
  right: 8px;
  top: 50%;
  color: rgba(242, 243, 246, 0.56);
  transform: translateY(-52%);
  pointer-events: none;
}

.agent-permission-select select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
}

.agent-window-actions {
  flex: 0 0 auto;
  gap: 6px;
}

.agent-collapse-button {
  width: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: rgba(226, 229, 236, 0.68);
}

.agent-collapse-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.agent-collapse-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transform: scaleX(-1);
}

.agent-context-strip {
  gap: 6px;
  padding: 0 18px 8px;
  overflow: hidden;
}

.agent-context-strip span,
.agent-context-strip b {
  min-width: 0;
  height: 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 7px;
  background: transparent;
  color: rgba(226, 229, 236, 0.42);
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-context-strip b {
  flex: 1 1 auto;
  color: rgba(218, 223, 232, 0.56);
}

.agent-context-strip b.has-selection {
  border: 1px solid rgba(97, 189, 131, 0.18);
  background: rgba(97, 189, 131, 0.08);
  color: rgba(211, 246, 224, 0.92);
  font-weight: 800;
}

.agent-thread {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 18px 22px;
  overflow: auto;
  scroll-padding-bottom: 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
  container-type: inline-size;
}

.agent-empty {
  margin: auto 0;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: rgba(226, 229, 236, 0.54);
  text-align: center;
}

.agent-empty span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 241, 244, 0.82);
  font-size: 22px;
}

.agent-empty strong {
  color: rgba(245, 246, 248, 0.9);
}

.agent-empty p {
  max-width: 260px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.agent-status-card {
  align-self: flex-start;
  gap: 8px;
  min-height: 42px;
  max-width: 90%;
  border-radius: 12px;
  padding: 8px 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 246, 248, 0.86);
  font-size: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.agent-status-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.12) 48%, transparent 70%);
  transform: translateX(-120%);
  animation: agentStatusSheen 1.7s ease-in-out infinite;
  pointer-events: none;
}

.agent-status-card i {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 5px;
  border: 1px solid rgba(242, 243, 246, 0.5);
  background: transparent;
  animation: progressPulse 1.25s ease-in-out infinite;
}

.agent-status-card span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 243, 246, 0.72);
  font-weight: 900;
}

.agent-status-card div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-status-card strong {
  color: rgba(245, 246, 248, 0.92);
  font-size: 12.5px;
}

.agent-status-card small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
}

.agent-thinking-card {
  align-self: flex-start;
  width: 100%;
  margin-bottom: 8px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  padding: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.082), rgba(255, 255, 255, 0.035)),
    rgba(17, 18, 20, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 34px rgba(0, 0, 0, 0.22);
  color: rgba(242, 244, 248, 0.9);
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.agent-thinking-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.105) 48%, transparent 72%);
  transform: translateX(-120%);
  animation: agentThinkingSheen 2.4s ease-in-out infinite;
  pointer-events: none;
}

.agent-thinking-orbit {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  position: relative;
}

.agent-thinking-orbit span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 999px;
  background: #f6d47a;
  box-shadow: 0 0 12px rgba(246, 212, 122, 0.45);
  animation: agentThinkingDot 1.25s ease-in-out infinite;
  --agent-thinking-dot-x: 0px;
}

.agent-thinking-orbit span:nth-child(1) {
  --agent-thinking-dot-x: -8px;
}

.agent-thinking-orbit span:nth-child(2) {
  animation-delay: 0.16s;
}

.agent-thinking-orbit span:nth-child(3) {
  animation-delay: 0.32s;
  --agent-thinking-dot-x: 8px;
}

.agent-thinking-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.agent-thinking-main header,
.agent-thinking-main footer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.agent-thinking-main header span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(246, 212, 122, 0.11);
  color: #f6d47a;
  font-size: 10px;
  font-weight: 800;
}

.agent-thinking-main header .agent-thinking-kicker {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(238, 241, 247, 0.72);
}

.agent-thinking-main header .agent-thinking-tier {
  border: 1px solid rgba(246, 212, 122, 0.18);
  background: rgba(246, 212, 122, 0.12);
  color: #f6d47a;
}

.agent-thinking-card.tier-local .agent-thinking-main header .agent-thinking-tier {
  border-color: rgba(103, 205, 144, 0.24);
  background: rgba(103, 205, 144, 0.13);
  color: #bff0cf;
}

.agent-thinking-card.tier-light .agent-thinking-main header .agent-thinking-tier {
  border-color: rgba(105, 176, 255, 0.24);
  background: rgba(105, 176, 255, 0.12);
  color: #bbdcff;
}

.agent-thinking-card.tier-deep .agent-thinking-main header .agent-thinking-tier {
  border-color: rgba(246, 212, 122, 0.25);
  background: rgba(246, 212, 122, 0.14);
  color: #f6d47a;
}

.agent-thinking-main header strong {
  min-width: 0;
  flex: 1 1 auto;
  color: rgba(248, 249, 252, 0.94);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-thinking-main header small,
.agent-thinking-main footer small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 10px;
}

.agent-thinking-main p {
  margin: 0;
  color: rgba(226, 229, 236, 0.72);
  font-size: 11.5px;
  line-height: 1.46;
}

.agent-thinking-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.agent-thinking-bar i {
  width: var(--agent-thinking-progress, 12%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #f6d47a, #ffffff);
  box-shadow: 0 0 14px rgba(246, 212, 122, 0.34);
  transition: width 0.32s ease;
}

.agent-thinking-card.tier-local .agent-thinking-bar i {
  background: linear-gradient(90deg, #67cd90, #dff8e8);
  box-shadow: 0 0 14px rgba(103, 205, 144, 0.28);
}

.agent-thinking-card.tier-light .agent-thinking-bar i {
  background: linear-gradient(90deg, #69b0ff, #f3f8ff);
  box-shadow: 0 0 14px rgba(105, 176, 255, 0.3);
}

.agent-thinking-main footer {
  justify-content: space-between;
}

.agent-thinking-main footer button {
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(240, 242, 246, 0.74);
  font-size: 11px;
}

.agent-thinking-main footer button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

@keyframes agentThinkingSheen {
  0% {
    transform: translateX(-120%);
  }
  54%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes agentThinkingDot {
  0%,
  100% {
    opacity: 0.42;
    transform: translate(var(--agent-thinking-dot-x), 0) scale(0.84);
  }
  45% {
    opacity: 1;
    transform: translate(var(--agent-thinking-dot-x), -3px) scale(1);
  }
}

@keyframes agentStatusSheen {
  0% {
    transform: translateX(-120%);
  }
  60%,
  100% {
    transform: translateX(120%);
  }
}

.agent-message {
  max-width: 82%;
  display: grid;
  gap: 6px;
}

.agent-message.user {
  align-self: flex-end;
  max-width: 78%;
}

.agent-message.assistant,
.agent-message.system {
  align-self: flex-start;
}

.agent-message-meta {
  gap: 6px;
  padding: 0 4px;
}

.agent-message-meta b {
  height: 17px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(232, 235, 242, 0.68);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.agent-message-meta .agent-source-local {
  border-color: rgba(97, 189, 131, 0.24);
  background: rgba(97, 189, 131, 0.11);
  color: #bdeecf;
}

.agent-message-meta .agent-source-gpt {
  border-color: rgba(212, 155, 85, 0.26);
  background: rgba(212, 155, 85, 0.1);
  color: #f4d39b;
}

.agent-message-meta .agent-source-light {
  border-color: rgba(105, 176, 255, 0.24);
  background: rgba(105, 176, 255, 0.1);
  color: #bbdcff;
}

.agent-message-meta .agent-source-deep {
  border-color: rgba(212, 155, 85, 0.28);
  background: rgba(212, 155, 85, 0.12);
  color: #f4d39b;
}

.agent-message.user .agent-message-meta {
  justify-content: flex-end;
}

.agent-message-body {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(245, 246, 248, 0.9);
  font-size: 13px;
  line-height: 1.58;
}

.agent-message.assistant .agent-message-body {
  padding: 0;
  background: transparent;
}

.agent-message.user .agent-message-body {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(247, 248, 250, 0.92);
}

.agent-message.system .agent-message-body {
  background: rgba(255, 116, 116, 0.12);
  color: #ffd5d5;
}

.agent-rich {
  display: grid;
  gap: 8px;
  white-space: normal;
}

.agent-rich-card {
  display: grid;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.075);
}

.agent-rich-card header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 0;
  border-bottom: 0;
}

.agent-rich-card header span {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 246, 248, 0.24);
  border-radius: 999px;
  color: rgba(245, 246, 248, 0.62);
  font-size: 9px;
  font-weight: 900;
}

.agent-rich-card header strong {
  color: rgba(246, 247, 249, 0.9);
  font-size: 12.5px;
}

.agent-rich-card p {
  margin: 0;
  color: rgba(235, 238, 244, 0.84);
  font-size: 12.5px;
  line-height: 1.55;
}

.agent-rich-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-rich-card li {
  position: relative;
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0 0 0 16px;
  background: transparent;
  color: rgba(239, 241, 246, 0.86);
  font-size: 12.5px;
  line-height: 1.55;
}

.agent-rich-card li::before {
  content: "•";
  position: absolute;
  left: 2px;
  top: 0;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(245, 246, 248, 0.86);
  font-weight: 900;
}

.agent-message.revealing {
  max-width: 90%;
}

.agent-rich-reveal {
  gap: 7px;
}

.agent-reveal-status {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(246, 212, 122, 0.13);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(246, 212, 122, 0.055);
  color: rgba(246, 212, 122, 0.8);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1;
}

.agent-reveal-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-reveal-status b {
  flex: 0 0 auto;
  color: rgba(246, 212, 122, 0.58);
  font-weight: 800;
}

.agent-rich-reveal .agent-rich-card {
  border: 1px solid rgba(246, 212, 122, 0.12);
  background:
    linear-gradient(180deg, rgba(246, 212, 122, 0.055), rgba(255, 255, 255, 0.055)),
    rgba(255, 255, 255, 0.052);
  box-shadow: inset 2px 0 0 rgba(246, 212, 122, 0.36);
}

.agent-reveal-cursor {
  width: 7px;
  height: 1.15em;
  display: inline-block;
  margin-left: 3px;
  border-radius: 2px;
  background: #f6d47a;
  box-shadow: 0 0 14px rgba(246, 212, 122, 0.42);
  vertical-align: -0.2em;
  animation: agentRevealCursor 0.8s ease-in-out infinite;
}

@keyframes agentRevealCursor {
  0%,
  100% {
    opacity: 0.24;
    transform: scaleY(0.78);
  }
  45% {
    opacity: 1;
    transform: scaleY(1);
  }
}

.agent-brief-wizard {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.065);
}

.agent-brief-wizard header {
  display: grid;
  gap: 4px;
}

.agent-brief-wizard header span,
.agent-brief-group-title {
  color: rgba(226, 229, 236, 0.52);
  font-size: 11px;
}

.agent-brief-wizard header strong {
  color: rgba(246, 247, 249, 0.95);
  font-size: 14px;
}

.agent-brief-wizard p {
  margin: 0;
  color: rgba(232, 235, 242, 0.7);
  font-size: 12px;
  line-height: 1.55;
}

.agent-brief-process {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.agent-brief-process header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-brief-process header span {
  color: rgba(226, 229, 236, 0.52);
  font-size: 11px;
}

.agent-brief-process header strong {
  color: rgba(246, 247, 249, 0.88);
  font-size: 11px;
}

.agent-brief-process > div {
  display: grid;
  gap: 6px;
}

.agent-brief-process article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.035);
}

.agent-brief-process article.done {
  background: rgba(97, 189, 131, 0.1);
}

.agent-brief-process article.active {
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.18);
}

.agent-brief-process article b {
  color: rgba(246, 247, 249, 0.9);
  font-size: 11.5px;
}

.agent-brief-process article small {
  color: rgba(226, 229, 236, 0.46);
  font-size: 10px;
}

.agent-brief-process article.done small {
  color: #bdeecf;
}

.agent-brief-process article p {
  grid-column: 1 / -1;
  color: rgba(226, 229, 236, 0.58);
  font-size: 10.5px;
  line-height: 1.4;
}

.agent-brief-rounds {
  display: grid;
  grid-template-columns: repeat(var(--round-total), minmax(0, 1fr));
  gap: 6px;
}

.agent-brief-rounds span {
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
}

.agent-brief-rounds span.done,
.agent-brief-rounds span.active {
  background: rgba(97, 189, 131, 0.13);
  color: #bdeecf;
}

.agent-brief-rounds span.active {
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.18);
}

.agent-brief-step-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
}

.agent-brief-step-nav span {
  min-width: 0;
  min-height: 38px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-radius: 11px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 229, 236, 0.46);
}

.agent-brief-step-nav span.done,
.agent-brief-step-nav span.active {
  background: rgba(97, 189, 131, 0.12);
  color: #bdeecf;
}

.agent-brief-step-nav span.active {
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.18);
}

.agent-brief-step-nav b {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
}

.agent-brief-step-nav span.done b,
.agent-brief-step-nav span.active b {
  background: rgba(97, 189, 131, 0.18);
}

.agent-brief-step-nav em {
  overflow: hidden;
  font-style: normal;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-brief-group {
  display: grid;
  gap: 7px;
}

.agent-brief-question {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 247, 249, 0.88);
  font-size: 12px;
  line-height: 1.45;
}

.agent-brief-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 7px;
}

.agent-brief-options button {
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 3px;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.86);
  text-align: left;
}

.agent-brief-options button:hover {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.075);
}

.agent-brief-options button.selected {
  border-color: rgba(97, 189, 131, 0.42);
  background: rgba(97, 189, 131, 0.13);
  color: #d9f7e4;
}

.agent-brief-options button.selected::after {
  content: "✓";
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(97, 189, 131, 0.18);
  color: #7ee09e;
  font-size: 13px;
  font-weight: 900;
}

.agent-brief-options b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12.5px;
}

.agent-brief-options small {
  min-width: 0;
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.agent-brief-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-brief-summary span {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 229, 236, 0.46);
  font-size: 10px;
}

.agent-brief-summary span.filled {
  background: rgba(97, 189, 131, 0.12);
  color: #bdeecf;
}

.agent-brief-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.agent-brief-actions button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(242, 243, 246, 0.82);
  font-size: 12px;
}

.agent-brief-actions button.primary {
  border-color: rgba(245, 246, 248, 0.14);
  background: rgba(235, 236, 239, 0.72);
  color: #161719;
  font-weight: 800;
}

.agent-brief-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.agent-brief-next-actions {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.agent-guide-actions {
  align-self: stretch;
  display: grid;
  gap: 9px;
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.agent-guide-actions header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-guide-actions header span {
  color: rgba(226, 229, 236, 0.52);
  font-size: 11px;
}

.agent-guide-actions header strong {
  color: rgba(246, 247, 249, 0.92);
  font-size: 13px;
}

.agent-guide-actions div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 8px;
}

.agent-guide-actions.compact {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.agent-guide-actions.compact div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr));
  gap: 8px;
}

.agent-guide-actions button {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.86);
  text-align: left;
}

.agent-guide-actions.compact button {
  min-width: 0;
  min-height: 58px;
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.agent-guide-actions.compact .agent-guide-copy {
  display: grid;
  gap: 3px;
}

.agent-guide-actions.compact b {
  color: rgba(248, 249, 252, 0.94);
  font-size: 12px;
  overflow-wrap: normal;
}

.agent-guide-actions.compact small {
  color: rgba(226, 229, 236, 0.5);
  font-size: 10px;
}

.agent-guide-actions button:hover {
  border-color: rgba(97, 189, 131, 0.32);
  background: rgba(97, 189, 131, 0.1);
}

.agent-guide-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.agent-guide-actions b {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 249, 252, 0.94);
  font-size: 12.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-guide-actions small {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(226, 229, 236, 0.46);
  font-size: 10.5px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-contest-wizard {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.agent-contest-wizard header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
}

.agent-contest-wizard header span {
  color: rgba(226, 229, 236, 0.5);
  font-size: 11px;
}

.agent-contest-wizard header strong {
  color: rgba(246, 247, 249, 0.94);
  font-size: 13px;
}

.agent-contest-wizard header em {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 38px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 229, 236, 0.62);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.agent-contest-source {
  margin: 0;
  color: rgba(226, 229, 236, 0.58);
  font-size: 11.5px;
  line-height: 1.45;
}

.agent-contest-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-contest-summary span {
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(97, 189, 131, 0.1);
  color: rgba(200, 241, 215, 0.86);
  font-size: 10.5px;
}

.agent-contest-wizard p {
  margin: 0;
  color: rgba(244, 245, 248, 0.88);
  font-size: 12px;
  line-height: 1.5;
}

.agent-contest-step-status {
  border-radius: 11px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 229, 236, 0.58);
  font-size: 11px;
  line-height: 1.4;
}

.agent-contest-step-status.ready {
  background: rgba(97, 189, 131, 0.11);
  color: rgba(205, 245, 219, 0.86);
}

.agent-contest-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 7px;
}

.agent-contest-brief-fields {
  display: grid;
  gap: 8px;
}

.agent-contest-brief-fields label {
  display: grid;
  gap: 5px;
}

.agent-contest-brief-fields span {
  color: rgba(226, 229, 236, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.agent-contest-brief-fields textarea {
  width: 100%;
  min-height: 48px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 247, 249, 0.92);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  outline: none;
}

.agent-contest-brief-fields textarea:focus {
  border-color: rgba(97, 189, 131, 0.36);
  background: rgba(97, 189, 131, 0.075);
}

.agent-contest-brief-fields textarea::placeholder {
  color: rgba(226, 229, 236, 0.34);
}

.agent-contest-options button {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.88);
  text-align: left;
}

.agent-contest-options button:hover {
  border-color: rgba(97, 189, 131, 0.3);
  background: rgba(97, 189, 131, 0.09);
}

.agent-contest-options button.selected {
  border-color: rgba(97, 189, 131, 0.48);
  background: rgba(97, 189, 131, 0.14);
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.08), 0 0 0 1px rgba(97, 189, 131, 0.1);
}

.agent-contest-options button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.agent-contest-options b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.agent-contest-options small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.agent-contest-options i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.agent-contest-options button.selected i {
  background: rgba(97, 189, 131, 0.18);
}

.agent-contest-options button.selected i::before {
  content: "✓";
  color: #84e5a5;
  font-size: 13px;
  font-weight: 900;
}

.agent-contest-wizard footer {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.agent-contest-wizard footer button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(242, 243, 246, 0.78);
  font-size: 11.5px;
}

.agent-contest-wizard footer button.primary {
  border-color: rgba(97, 189, 131, 0.38);
  background: rgba(97, 189, 131, 0.2);
  color: #d9f7e4;
  font-weight: 800;
}

.agent-contest-wizard footer button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.agent-creation-wizard {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.agent-creation-wizard header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 8px;
  align-items: center;
}

.agent-creation-wizard header span {
  color: rgba(226, 229, 236, 0.5);
  font-size: 11px;
}

.agent-creation-wizard header strong {
  color: rgba(246, 247, 249, 0.94);
  font-size: 13px;
}

.agent-creation-wizard header em {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 44px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 229, 236, 0.62);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.agent-creation-source,
.agent-creation-note,
.agent-creation-wizard p {
  margin: 0;
  color: rgba(226, 229, 236, 0.64);
  font-size: 11.5px;
  line-height: 1.45;
}

.agent-creation-wizard p {
  color: rgba(244, 245, 248, 0.88);
  font-size: 12px;
}

.agent-creation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-creation-summary span {
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(97, 189, 131, 0.1);
  color: rgba(200, 241, 215, 0.86);
  font-size: 10.5px;
}

.agent-creation-confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 8px;
}

.agent-creation-confirm-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  padding: 7px;
  background: rgba(0, 0, 0, 0.12);
}

.agent-creation-confirm-field span {
  color: rgba(226, 229, 236, 0.62);
  font-size: 10.5px;
  font-weight: 800;
}

.agent-creation-confirm-control {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.agent-creation-confirm-control.is-open {
  z-index: 12;
}

.agent-creation-confirm-picker {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 247, 249, 0.92);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  outline: none;
}

.agent-creation-confirm-picker b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
}

.agent-creation-confirm-picker i::before {
  content: "⌄";
  color: rgba(246, 247, 249, 0.8);
  font-size: 14px;
}

.agent-creation-confirm-picker:hover,
.agent-creation-confirm-picker.is-open {
  border-color: rgba(97, 189, 131, 0.36);
  background: rgba(97, 189, 131, 0.075);
}

.agent-creation-confirm-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  display: grid;
  gap: 5px;
  max-height: min(230px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(97, 189, 131, 0.24);
  border-radius: 10px;
  background: rgba(24, 26, 30, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
}

.agent-creation-confirm-options button {
  min-width: 0;
  min-height: 34px;
  display: grid;
  gap: 1px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(246, 247, 249, 0.86);
  text-align: left;
}

.agent-creation-confirm-options button:hover,
.agent-creation-confirm-options button.selected {
  border-color: rgba(97, 189, 131, 0.35);
  background: rgba(97, 189, 131, 0.12);
}

.agent-creation-confirm-options button span,
.agent-creation-confirm-options button small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agent-creation-confirm-options button span {
  color: rgba(246, 247, 249, 0.92);
  font-size: 11.5px;
}

.agent-creation-confirm-options button small {
  color: rgba(226, 229, 236, 0.5);
  font-size: 10px;
}

.agent-creation-references {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.16);
}

.agent-creation-references span {
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  color: rgba(231, 235, 243, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.agent-creation-references b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(244, 246, 250, 0.86);
  font-size: 10px;
}

.agent-creation-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
  gap: 7px;
}

.agent-creation-options button {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.88);
  text-align: left;
}

.agent-creation-options button:hover {
  border-color: rgba(97, 189, 131, 0.3);
  background: rgba(97, 189, 131, 0.09);
}

.agent-creation-options button.selected {
  border-color: rgba(97, 189, 131, 0.48);
  background: rgba(97, 189, 131, 0.14);
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.08), 0 0 0 1px rgba(97, 189, 131, 0.1);
}

.agent-creation-options button span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-creation-options b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.agent-creation-options small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.agent-creation-options i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.agent-creation-options button.selected i {
  background: rgba(97, 189, 131, 0.18);
}

.agent-creation-options button.selected i::before {
  content: "✓";
  color: #84e5a5;
  font-size: 13px;
  font-weight: 900;
}

.agent-creation-prompt,
.agent-creation-custom {
  display: grid;
  gap: 6px;
}

.agent-creation-prompt span,
.agent-creation-custom span {
  color: rgba(226, 229, 236, 0.62);
  font-size: 11px;
  font-weight: 800;
}

.agent-creation-prompt textarea,
.agent-creation-custom textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 247, 249, 0.92);
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  outline: none;
}

.agent-creation-custom textarea {
  min-height: 34px;
  max-height: 42px;
  resize: none;
  padding: 7px 9px;
  line-height: 1.35;
}

.agent-creation-prompt textarea:focus,
.agent-creation-custom textarea:focus {
  border-color: rgba(97, 189, 131, 0.36);
  background: rgba(97, 189, 131, 0.075);
}

.agent-creation-wizard footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.agent-creation-wizard footer button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(242, 243, 246, 0.78);
  font-size: 11.5px;
}

.agent-creation-wizard footer button.primary {
  border-color: rgba(97, 189, 131, 0.38);
  background: rgba(97, 189, 131, 0.2);
  color: #d9f7e4;
  font-weight: 800;
}

.agent-creation-wizard footer button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.agent-brief-next-actions header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-brief-next-actions header span {
  color: rgba(226, 229, 236, 0.52);
  font-size: 11px;
}

.agent-brief-next-actions header strong {
  color: rgba(246, 247, 249, 0.92);
  font-size: 13px;
}

.agent-brief-next-actions div {
  display: grid;
  gap: 7px;
}

.agent-brief-next-actions button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.86);
  text-align: left;
}

.agent-brief-next-actions button:hover {
  border-color: rgba(97, 189, 131, 0.32);
  background: rgba(97, 189, 131, 0.1);
}

.agent-brief-next-actions button.selected {
  border-color: rgba(97, 189, 131, 0.48);
  background: rgba(97, 189, 131, 0.13);
  box-shadow: inset 0 0 0 1px rgba(97, 189, 131, 0.08);
}

.agent-brief-next-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-brief-next-actions b {
  font-size: 12.5px;
}

.agent-brief-next-actions small {
  color: rgba(226, 229, 236, 0.46);
  font-size: 10.5px;
}

.agent-brief-next-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: transparent;
}

.agent-brief-next-actions button.selected .agent-brief-next-check {
  background: rgba(97, 189, 131, 0.18);
  color: #7ee09e;
}

.agent-brief-next-actions button.selected .agent-brief-next-check::before {
  content: "✓";
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.agent-pending-action {
  align-self: stretch;
  display: grid;
  gap: 10px;
  border-radius: 14px;
  padding: 12px;
  background: rgba(97, 189, 131, 0.085);
}

.agent-pending-action header {
  display: grid;
  gap: 4px;
}

.agent-pending-action header span {
  color: rgba(189, 238, 207, 0.72);
  font-size: 11px;
}

.agent-pending-action header strong {
  color: rgba(246, 247, 249, 0.94);
  font-size: 13px;
}

.agent-pending-action p {
  margin: 0;
  color: rgba(232, 235, 242, 0.68);
  font-size: 12px;
  line-height: 1.55;
}

.agent-pending-action div {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.agent-pending-action button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(242, 243, 246, 0.82);
  font-size: 12px;
}

.agent-pending-action button.primary {
  border-color: rgba(97, 189, 131, 0.36);
  background: rgba(97, 189, 131, 0.22);
  color: #d9f7e4;
  font-weight: 800;
}

.agent-session-list {
  display: grid;
  gap: 8px;
  margin: 0 0 2px;
  border: 1px solid rgba(97, 189, 131, 0.16);
  border-radius: 14px;
  padding: 10px;
  background: rgba(20, 24, 22, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.agent-session-list header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-session-list header span {
  color: rgba(226, 229, 236, 0.56);
  font-size: 11px;
}

.agent-session-list header strong {
  color: rgba(205, 245, 219, 0.86);
  font-size: 12px;
}

.agent-session-list div {
  display: grid;
  gap: 6px;
}

.agent-session-list button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.84);
  text-align: left;
}

.agent-session-list button:hover,
.agent-session-list button.active {
  border-color: rgba(97, 189, 131, 0.34);
  background: rgba(97, 189, 131, 0.11);
}

.agent-session-list button > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-session-list b {
  overflow: hidden;
  color: rgba(246, 247, 249, 0.92);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session-list small {
  overflow: hidden;
  color: rgba(226, 229, 236, 0.46);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-session-list i {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 229, 236, 0.58);
  font-size: 10px;
  font-style: normal;
}

.agent-session-list button.active i {
  background: rgba(97, 189, 131, 0.18);
  color: #bdeecf;
}

.agent-compose {
  padding: 5px 12px 11px;
  border-top: 0;
  position: relative;
  z-index: 3;
  display: grid;
  gap: 7px;
}

.agent-compose-skill-chips {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 7px 1px;
}

.agent-compose-skill-chips .agent-creation-skill-chip {
  min-height: 30px;
}

.agent-tool-panel {
  display: grid;
  gap: 9px;
  margin: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  padding: 10px;
  background: rgba(31, 32, 34, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.agent-tool-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-tool-panel header strong {
  color: rgba(246, 247, 249, 0.94);
  font-size: 13px;
}

.agent-tool-panel header > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-tool-panel header > span small {
  color: rgba(226, 229, 236, 0.42);
  font-size: 10px;
}

.agent-tool-panel header button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(226, 229, 236, 0.72);
}

.agent-tool-panel p {
  margin: 0;
  color: rgba(226, 229, 236, 0.62);
  font-size: 11.5px;
  line-height: 1.45;
}

.agent-tool-panel div {
  display: grid;
  gap: 6px;
}

.agent-tool-panel div > button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(242, 243, 246, 0.86);
  text-align: left;
}

.agent-tool-panel div > button:hover {
  border-color: rgba(97, 189, 131, 0.28);
  background: rgba(97, 189, 131, 0.09);
}

.agent-skill-search input {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(246, 247, 249, 0.9);
  outline: none;
  font-size: 12px;
}

.agent-skill-search input:focus {
  border-color: rgba(97, 189, 131, 0.32);
  background: rgba(255, 255, 255, 0.075);
}

.agent-skill-tabs {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto;
  padding-bottom: 1px;
}

.agent-skill-tabs button {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 229, 236, 0.58);
  font-size: 10.5px;
}

.agent-skill-tabs button.active {
  border-color: rgba(97, 189, 131, 0.32);
  background: rgba(97, 189, 131, 0.16);
  color: rgba(224, 248, 232, 0.95);
}

.agent-skill-list,
.agent-skill-groups {
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 2px;
}

.agent-skill-groups {
  gap: 8px;
}

.agent-skill-groups section {
  display: grid;
  gap: 6px;
}

.agent-skill-groups label {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(226, 229, 236, 0.58);
  font-size: 10px;
  font-weight: 800;
}

.agent-skill-card {
  position: relative;
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.agent-skill-card:hover {
  border-color: rgba(97, 189, 131, 0.28);
  background: rgba(97, 189, 131, 0.08);
}

.agent-skill-card.favorite {
  border-color: rgba(235, 190, 91, 0.28);
}

.agent-skill-favorite {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(235, 190, 91, 0.92);
  font-size: 13px;
}

.agent-skill-use {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  padding: 9px 38px 9px 9px;
  background: transparent;
  color: rgba(242, 243, 246, 0.86);
  text-align: left;
}

.agent-skill-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 9px;
  align-content: center;
  gap: 2px 9px;
}

.agent-skill-cover {
  grid-row: 1 / 4;
  width: 34px;
  height: 34px;
  display: grid !important;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(97, 189, 131, 0.22), rgba(235, 190, 91, 0.16));
  color: rgba(246, 247, 249, 0.92);
  font-size: 15px;
  font-weight: 900;
}

.agent-skill-main i {
  grid-column: 2;
  max-width: 100%;
  overflow: hidden;
  color: rgba(226, 229, 236, 0.36);
  font-size: 10px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-skill-meta {
  flex: 0 0 auto;
  min-width: 76px;
  justify-items: end;
  align-content: center;
  gap: 3px;
}

.agent-skill-meta em {
  max-width: 80px;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(97, 189, 131, 0.12);
  color: rgba(189, 238, 207, 0.86);
}

.agent-skill-meta strong {
  color: rgba(246, 247, 249, 0.78);
  font-size: 10px;
}

.agent-skill-empty {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 10px;
  color: rgba(226, 229, 236, 0.44);
  font-size: 11px;
  text-align: center;
}

.agent-tool-panel span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.agent-tool-panel b {
  font-size: 12px;
}

.agent-tool-panel small {
  color: rgba(226, 229, 236, 0.48);
  font-size: 10.5px;
}

.agent-tool-panel em {
  flex: 0 0 auto;
  max-width: 92px;
  overflow: hidden;
  color: rgba(189, 238, 207, 0.78);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-input-shell {
  min-height: clamp(88px, 13dvh, 112px);
  display: grid;
  grid-template-rows: minmax(54px, 1fr) auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.agent-panel.busy .agent-input-shell {
  min-height: 92px;
}

.agent-input-shell textarea {
  width: 100%;
  min-height: 54px;
  max-height: 160px;
  resize: none;
  border: 0;
  border-radius: 12px;
  padding: 4px 2px 8px;
  outline: none;
  background: transparent;
  color: #f2f3f6;
  font-size: 13px;
  line-height: 1.55;
}

.agent-input-shell:focus-within {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.agent-input-shell textarea::placeholder {
  color: rgba(226, 229, 236, 0.36);
}

.agent-compose-bar {
  gap: 7px;
  margin-top: 8px;
  justify-content: flex-end;
}

.agent-send {
  width: 34px;
  height: 34px !important;
  margin-left: auto;
  border-radius: 999px !important;
  padding: 0 !important;
  border: 0 !important;
  background: rgba(235, 236, 239, 0.68) !important;
  color: #161719 !important;
  font-size: 18px !important;
  font-weight: 900;
}

.agent-panel.busy .agent-send {
  background: rgba(216, 107, 85, 0.9) !important;
  color: #fff !important;
}

.node {
  position: absolute;
  z-index: 3;
  width: 330px;
  min-height: 260px;
  contain: layout paint;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.03)),
    rgba(22, 23, 28, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.node.selected {
  border-color: rgba(92, 137, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(92, 137, 255, 0.25), 0 24px 80px rgba(0, 0, 0, 0.52);
}

.node.locked {
  border-color: rgba(212, 155, 85, 0.7);
}

.node.link-target {
  border-color: rgba(97, 189, 131, 0.9);
  box-shadow:
    0 0 0 2px rgba(97, 189, 131, 0.3),
    0 22px 76px rgba(33, 150, 83, 0.16),
    var(--shadow);
}

.node.link-success {
  animation: linkSuccessPulse 0.52s ease-out;
}

@keyframes linkSuccessPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(97, 189, 131, 0.72), var(--shadow);
    transform: scale(1);
  }
  48% {
    box-shadow: 0 0 0 7px rgba(97, 189, 131, 0.28), 0 22px 76px rgba(33, 150, 83, 0.18);
    transform: scale(1.012);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(97, 189, 131, 0), var(--shadow);
    transform: scale(1);
  }
}

.floating-link-handle,
.node-link-handle {
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(143, 148, 160, 0.7);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(45, 47, 55, 0.96), rgba(20, 22, 27, 0.96));
  color: #d7dbe4;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  cursor: crosshair;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.node-link-handle {
  right: -14px;
  top: 50%;
  transform: translateY(-50%) scale(0.86);
}

.floating-link-handle {
  z-index: 120;
  transform: translate(-50%, -50%) scale(0.74);
  opacity: 0;
  will-change: left, top, transform, opacity;
}

.floating-link-handle.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.node:hover .node-link-handle,
.node.selected .node-link-handle,
.node.linking .node-link-handle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.floating-link-handle:hover,
.node-link-handle:hover {
  border-color: rgba(92, 137, 255, 0.82);
  color: #ffffff;
  background: linear-gradient(180deg, rgba(58, 70, 98, 0.98), rgba(24, 28, 40, 0.98));
  box-shadow: 0 0 0 5px rgba(92, 137, 255, 0.12), 0 10px 28px rgba(0, 0, 0, 0.34);
}

.node-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(11, 12, 15, 0.62);
  color: #aeb3bf;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.node:hover .node-delete,
.node.selected .node-delete {
  opacity: 1;
  pointer-events: auto;
}

.node-delete:hover {
  color: #ffffff;
  border-color: rgba(220, 90, 90, 0.6);
  background: rgba(90, 24, 24, 0.72);
}

.node-collapse-protected {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.node-collapse-protected:hover {
  border-color: rgba(99, 156, 255, 0.62);
  background: rgba(36, 58, 96, 0.74);
}

.node-character .info-board-summary > .info-board-action[data-action="toggle-collapse"],
.node-scene .info-board-summary > .info-board-action[data-action="toggle-collapse"] {
  display: none;
}

.node-video-gen .node-delete,
.node-image-gen .node-delete,
.node-agent .node-delete {
  top: 10px;
  right: 10px;
  z-index: 12;
  width: 26px;
  height: 26px;
  background: rgba(11, 14, 20, 0.42);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.node-video-gen .generation-node-delete,
.node-image-gen .generation-node-delete,
.node-agent .generation-node-delete {
  top: 28px;
  right: -10px;
}

.selection-box {
  position: absolute;
  z-index: 8;
  border: 1px solid rgba(92, 137, 255, 0.8);
  border-radius: 8px;
  background: rgba(92, 137, 255, 0.12);
  pointer-events: none;
}

.node-head {
  min-height: 58px;
  padding: 15px 16px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.node.collapsed {
  height: 72px !important;
  min-height: 72px !important;
  overflow: hidden;
}

.node.collapsed .node-head {
  height: 70px;
  min-height: 70px;
  border-bottom: 0;
}

.node-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.node-title {
  flex: 1;
  min-width: 0;
}

.node-title input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f3f4f7;
  font-weight: 700;
  font-size: 15px;
}

.title-display {
  width: 100%;
  display: block;
  color: #f3f4f7;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-display:hover {
  color: #fff7e8;
}

.title-input.editing {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(92, 137, 255, 0.5);
}

.node-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.node-status {
  color: var(--green);
  font-size: 12px;
}

.node-error-banner {
  margin: 0;
  padding: 8px 16px 9px 56px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 112, 112, 0.16);
  background: linear-gradient(90deg, rgba(255, 95, 95, 0.15), rgba(255, 154, 92, 0.055));
  color: #ffd8d8;
  font-size: 11px;
}

.node-error-banner strong {
  color: #ffb6a8;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.node-error-banner span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-error-banner.compact {
  min-height: 28px;
  margin: -4px 2px 0;
  padding: 6px 9px;
  border: 1px solid rgba(255, 112, 112, 0.28);
  border-radius: 9px;
  background: rgba(80, 23, 23, 0.48);
}

.node-body {
  padding: 14px 16px 16px;
}

.node-script,
.node-analysis,
.node-character,
.node-scene,
.node-prompt,
.node-grid,
.node-image,
.node-image-gen,
.node-video-gen,
.node-video {
  display: flex;
  flex-direction: column;
}

.node-script .node-body,
.node-analysis .node-body,
.node-character .node-body,
.node-scene .node-body,
.node-prompt .node-body,
.node-grid .node-body,
.node-image .node-body,
.node-image-gen .node-body,
.node-video-gen .node-body,
.node-video .node-body {
  flex: 1 0 auto;
  min-height: 0;
}

.node-character .node-body,
.node-scene .node-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  overflow: hidden;
}

.node-storyboard .node-body {
  display: block;
  min-height: 0;
}

.node-storyboard .node-relations {
  margin-bottom: 7px;
  padding: 6px 8px;
  gap: 3px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.25;
}

.node textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  outline: none;
  padding: 12px;
  background: rgba(5, 6, 8, 0.38);
  color: #e8e9ed;
  line-height: 1.6;
}

.node textarea:focus {
  border-color: rgba(92, 137, 255, 0.6);
}

.node-relations {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #a9adb8;
  font-size: 12px;
  line-height: 1.45;
}

.node-relations span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-output {
  max-height: 150px;
  margin-top: 10px;
  padding: 11px 12px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.22);
  color: #cfd2d9;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.node-script .node-output,
.node-script .node-relations,
.node-analysis .node-output {
  display: none;
}

.node-script textarea {
  min-height: 190px;
  max-height: 260px;
  resize: vertical;
}

.node-agent {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.node-agent .node-body {
  padding: 0;
}

.agent-gen-preview {
  cursor: default;
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  background: #111318;
  color: rgba(238, 241, 247, 0.9);
  box-shadow: none;
}

.agent-gen-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0);
  transition: background 0.16s ease;
}

.agent-gen-preview.can-toggle {
  cursor: pointer;
}

.agent-gen-preview:hover {
  border-color: rgba(237, 241, 247, 0.72);
  background: #111318;
}

.agent-gen-preview:hover::before {
  background: rgba(255, 255, 255, 0.045);
}

.agent-canvas-memory {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: rgba(238, 241, 247, 0.9);
  font-size: 12px;
  line-height: 1.45;
  position: relative;
  z-index: 1;
  pointer-events: auto;
  container-type: inline-size;
}

.agent-canvas-memory::after {
  content: "";
  display: block;
  flex: 0 0 42px;
}

.agent-canvas-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  color: rgba(229, 232, 238, 0.42);
  text-align: center;
}

.agent-canvas-memory .agent-message {
  max-width: 100%;
}

.agent-canvas-memory .agent-message.user {
  max-width: 86%;
}

.agent-canvas-memory .agent-message-body {
  font-size: 12px;
  line-height: 1.5;
}

.agent-canvas-memory .agent-rich-card {
  border-radius: 8px;
  padding: 9px 10px;
}

.agent-canvas-memory .agent-rich-card p,
.agent-canvas-memory .agent-rich-card li {
  font-size: 12px;
}

.agent-canvas-memory .agent-guide-actions,
.agent-canvas-memory .agent-creation-wizard,
.agent-canvas-memory .agent-brief-wizard,
.agent-canvas-memory .agent-brief-next-actions,
.agent-canvas-memory .agent-contest-wizard,
.agent-canvas-memory .agent-pending-action,
.agent-canvas-memory .agent-thinking-card {
  align-self: stretch;
  border-radius: 10px;
}

.agent-canvas-memory .agent-thinking-card {
  min-height: 86px;
  max-height: 104px;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  margin: 2px 0 14px;
  padding: 10px;
  overflow: hidden;
}

.agent-canvas-memory .agent-thinking-orbit {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.agent-canvas-memory .agent-thinking-main {
  gap: 5px;
}

.agent-canvas-memory .agent-thinking-main header {
  gap: 5px;
  flex-wrap: nowrap;
}

.agent-canvas-memory .agent-thinking-main header .agent-thinking-kicker {
  display: none;
}

.agent-canvas-memory .agent-thinking-main header span {
  padding: 2px 6px;
  font-size: 9.5px;
}

.agent-canvas-memory .agent-thinking-main header strong {
  font-size: 12px;
}

.agent-canvas-memory .agent-thinking-main p {
  display: -webkit-box;
  max-height: 34px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.agent-canvas-memory .agent-thinking-bar {
  height: 4px;
}

.agent-canvas-memory .agent-thinking-main footer {
  display: none;
}

.agent-canvas-memory .agent-guide-actions button,
.agent-canvas-memory .agent-creation-wizard button,
.agent-canvas-memory .agent-brief-next-actions button,
.agent-canvas-memory .agent-contest-options button {
  min-height: 36px;
  pointer-events: auto;
}

.agent-canvas-memory .agent-guide-actions div,
.agent-canvas-memory .agent-brief-options,
.agent-canvas-memory .agent-contest-options,
.agent-canvas-memory .agent-creation-options,
.agent-canvas-memory .agent-brief-next-actions div {
  grid-template-columns: 1fr;
}

@container (min-width: 520px) {
  .agent-thread .agent-guide-actions div,
  .agent-thread .agent-brief-options,
  .agent-thread .agent-contest-options,
  .agent-thread .agent-creation-options,
  .agent-thread .agent-brief-next-actions div,
  .agent-canvas-memory .agent-guide-actions div,
  .agent-canvas-memory .agent-brief-options,
  .agent-canvas-memory .agent-contest-options,
  .agent-canvas-memory .agent-creation-options,
  .agent-canvas-memory .agent-brief-next-actions div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.agent-canvas-memory .agent-creation-wizard textarea {
  pointer-events: auto;
}

.agent-canvas-memory .agent-brief-process,
.agent-canvas-memory .agent-brief-rounds,
.agent-canvas-memory .agent-brief-step-nav,
.agent-canvas-memory .agent-brief-summary {
  display: none;
}

.agent-gen-skill-space {
  min-height: 38px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 2px 2px 6px;
  background: transparent;
}

.agent-gen-skill-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(238, 241, 247, 0.9);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.agent-gen-skill-button:hover {
  border-color: rgba(240, 193, 116, 0.34);
  background: rgba(240, 193, 116, 0.1);
  color: #ffffff;
}

.agent-creation-skill-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.agent-creation-skill-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-gen-prompt {
  display: block;
}

.agent-gen-meta {
  justify-content: space-between;
}

.agent-gen-skill-placeholder {
  min-width: 0;
}

.agent-canvas-send {
  cursor: pointer;
}

.script-node-preview {
  height: var(--generation-preview-max-height, 270px);
  max-height: var(--generation-preview-max-height, 270px);
  padding: 24px 30px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.script-node-preview p {
  min-width: 0;
  width: min(100%, 760px);
  max-width: 92%;
  max-height: 100%;
  margin: 0;
  overflow: hidden;
  color: rgba(238, 241, 247, 0.88);
  font-size: 13px;
  font-weight: 620;
  line-height: 1.75;
  white-space: pre-wrap;
  text-align: center;
  text-shadow: none;
}

.script-node-preview.has-script {
  background: #111318;
}

.script-node-preview.has-script::after {
  content: "";
  position: absolute;
  inset: auto 28px 22px 28px;
  height: 42px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(17, 19, 24, 0), #111318);
}

.script-node-empty {
  place-self: center;
}

.script-node-console {
  width: 620px;
  gap: 10px;
  padding: 13px 14px 14px;
}

.script-node-editor-head {
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.script-node-editor-head strong {
  color: rgba(246, 248, 252, 0.94);
  font-size: 13px;
  font-weight: 900;
}

.script-node-editor-head span {
  color: rgba(226, 229, 236, 0.54);
  font-size: 12px;
  font-weight: 800;
}

.script-text-shell {
  min-height: 154px;
}

.node-script textarea.script-node-textarea {
  min-height: 154px;
  max-height: 260px;
  padding: 12px 13px 13px;
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: #edf1f7;
  font-size: 13px;
  line-height: 1.55;
  box-shadow: inset 0 0 0 1px rgba(240, 193, 116, 0.035);
}

.node-script textarea.script-node-textarea:focus {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035);
}

.script-node-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.script-node-meta > .script-actions {
  flex: 0 0 auto;
}

.script-node-model-tools {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
}

.script-model-select {
  width: 126px;
  max-width: 126px;
}

.script-cue-preset-button {
  height: 34px;
  min-width: 54px;
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
}

.script-node-console .script-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
}

.script-node-console .script-actions button {
  flex: 0 0 auto;
  min-height: 36px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
}

.script-node-console .script-actions button.primary,
.script-node-console .script-actions button.gold-action,
.script-node-console .script-actions button.primary:hover,
.script-node-console .script-actions button.gold-action:hover,
.script-cue-preset-button,
.script-cue-preset-button.is-loaded,
.script-cue-preset-button:hover,
.script-cue-preset-button.is-loaded:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  box-shadow: none;
}

.script-node-console .membership-cost-badge {
  transform: none;
}

.script-node-console .script-actions button span {
  display: inline;
}

.script-node-console .script-episode-summary {
  min-height: 30px;
  padding: 6px 10px;
}

.script-node-console .script-episode-list {
  max-height: 210px;
}

.script-panel-head,
.script-episode-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #aeb6c7;
  font-size: 12px;
}

.script-panel-head div {
  display: grid;
  gap: 2px;
}

.script-panel-head span {
  color: #e5eaf6;
  font-size: 12px;
  font-weight: 800;
}

.script-panel-head small {
  color: #7f899a;
  font-size: 10.5px;
}

.script-panel-head strong {
  color: #eef2ff;
  font-size: 12px;
  font-weight: 700;
}

.script-episode-summary {
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.script-episode-summary.dirty {
  border-color: rgba(239, 184, 97, 0.42);
  background: rgba(239, 184, 97, 0.08);
}

.script-episode-summary strong {
  color: #ffd991;
  font-size: 11px;
  font-weight: 600;
}

.script-cue-spec {
  display: block;
  padding: 7px 8px;
  border: 1px solid rgba(95, 188, 255, 0.15);
  border-radius: 10px;
  background: rgba(95, 188, 255, 0.045);
}

.script-cue-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.script-cue-spec-head > div {
  min-width: 0;
}

.script-cue-spec-head span {
  color: #e5eaf6;
  font-size: 12px;
  font-weight: 800;
}

.script-episode-empty {
  min-height: 62px;
  padding: 13px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #9ea7b7;
  font-size: 12px;
  line-height: 1.55;
}

.script-episode-list {
  display: grid;
  gap: 8px;
  max-height: 326px;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
  scrollbar-gutter: stable;
}

.script-episode-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 94px;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 10px 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(93, 137, 255, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.script-episode-no {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(92, 137, 255, 0.22);
  border-radius: 10px;
  background: rgba(92, 137, 255, 0.09);
  color: #eaf0ff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.script-episode-main {
  min-width: 0;
}

.script-episode-main span,
.script-episode-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-episode-main span {
  color: #e2e7f3;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.22;
}

.script-episode-main small {
  margin-top: 5px;
  color: #8f99aa;
  font-size: 10.5px;
  line-height: 1.25;
}

.script-episode-meta {
  display: grid;
  justify-items: stretch;
  gap: 5px;
}

.script-episode-stats {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.script-episode-stats em,
.script-episode-linked {
  color: #9aa4b6;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.script-episode-linked {
  color: #89d4ad;
}

.script-episode-storyboard-button {
  height: 27px;
  border: 1px solid rgba(224, 232, 248, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.036));
  color: rgba(235, 240, 250, 0.76);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.script-episode-storyboard-button:hover {
  border-color: rgba(212, 155, 85, 0.34);
  background:
    linear-gradient(180deg, rgba(212, 155, 85, 0.2), rgba(255, 255, 255, 0.055));
  color: #ffe5b7;
}

.node-analysis textarea {
  min-height: 132px;
  max-height: 132px;
  resize: none;
}

.node-analysis .node-spec-editor {
  gap: 6px;
}

.node-analysis .storyboard-key.compact {
  grid-template-columns: 64px minmax(0, 1fr) 48px;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 9px;
}

.node-analysis .storyboard-key.model-row {
  grid-template-columns: 64px minmax(0, 1fr) 54px;
}

.node-analysis .storyboard-key input,
.node-analysis .storyboard-key select,
.node-analysis .storyboard-key button {
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

.node-analysis .model-generation-source {
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.25;
}

.node-character {
  width: 680px;
}

.node-scene {
  width: 680px;
}

.node-storyboard {
  width: 1180px;
  display: block;
  contain: layout;
  overflow: visible;
}

.node-storyboard .node-head {
  min-height: 46px;
  padding: 9px 14px 8px;
}

.node-storyboard .node-title small {
  margin-top: 1px;
  font-size: 11px;
}

.node-storyboard .node-status {
  font-size: 11px;
}

.node-storyboard .node-body {
  padding: 8px 10px 14px;
  overflow: visible;
}

.node-final {
  display: block;
  contain: layout;
  overflow: visible;
}

.node-prompt,
.node-grid {
  width: 520px;
}

.node-prompt .node-head,
.node-grid .node-head {
  min-height: 50px;
  padding: 11px 14px 9px;
}

.node-prompt .node-icon,
.node-grid .node-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

.node-prompt .node-title small,
.node-grid .node-title small {
  margin-top: 1px;
  font-size: 11px;
}

.node-prompt .node-status,
.node-grid .node-status {
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-prompt .node-body,
.node-grid .node-body {
  padding: 10px 12px 12px;
}

.node-prompt .node-relations,
.node-grid .node-relations {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 7px;
  padding: 6px 8px;
  font-size: 11px;
}

.node-prompt .node-spec-editor,
.node-grid .node-spec-editor {
  gap: 5px;
}

.node-prompt .node-spec-head,
.node-grid .node-spec-head {
  min-height: 26px;
}

.node-prompt .storyboard-key.compact {
  grid-template-columns: 54px minmax(0, 1fr) 48px;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 10px;
}

.node-prompt .storyboard-key.model-row {
  grid-template-columns: 54px minmax(0, 1fr) 58px;
}

.node-prompt .storyboard-key label,
.node-prompt .storyboard-key.model-row span {
  font-size: 11px;
}

.node-prompt .storyboard-key input,
.node-prompt .storyboard-key.model-row select,
.node-prompt .storyboard-key button {
  height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

.node-prompt .storyboard-key input {
  padding: 0 8px;
}

.node-prompt .model-generation-source {
  padding: 5px 7px;
  font-size: 11px;
  line-height: 1.25;
}

.node-prompt textarea,
.node-grid textarea {
  min-height: 72px;
  max-height: 102px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.node-grid .node-body {
  display: grid;
  grid-template-rows: auto auto auto;
  min-height: 0;
}

.prompt-output-summary {
  height: 34px;
  margin-top: 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: #cfd2d9;
  font-size: 11px;
}

.prompt-output-summary strong {
  color: #f1d6ae;
  font-size: 11px;
}

.account-local-compute-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(126, 224, 167, 0.24);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(126, 224, 167, 0.075);
}

.account-local-compute-panel.muted {
  border-color: rgba(226, 232, 240, 0.13);
  background: rgba(226, 232, 240, 0.045);
}

.account-local-compute-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.account-local-compute-panel header div {
  min-width: 0;
}

.account-local-compute-panel strong {
  display: block;
  color: #ecfff3;
}

.account-local-compute-panel p,
.account-local-compute-panel small {
  margin: 3px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.account-local-compute-panel button {
  height: 30px;
  flex: 0 0 auto;
}

.prompt-output-summary span,
.prompt-output-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prompt-output-summary small {
  color: #8fdba8;
}

.node-storyboard textarea {
  min-height: 96px;
  max-height: 122px;
  resize: none;
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.48;
}

.node-storyboard .node-output {
  max-height: 330px;
  font-size: 12px;
  line-height: 1.62;
}

.node-final .node-output {
  display: none;
}

.node-final .node-body {
  display: block;
  min-height: 0;
  overflow: visible;
}

.storyboard-panel {
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  min-height: 0;
}

.storyboard-spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 12px;
  align-items: stretch;
}

.storyboard-spec-main,
.storyboard-model-stack {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.storyboard-model-stack {
  grid-template-columns: 1fr;
  align-content: start;
}

.storyboard-spec label,
.node-spec-head span {
  color: #aeb4c0;
  font-size: 12px;
}

.node-spec-editor {
  display: grid;
  gap: 7px;
}

.node-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-preset-button {
  position: relative;
  height: 26px;
  min-width: 48px;
  border: 1px solid rgba(212, 155, 85, 0.34);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(212, 155, 85, 0.1);
  color: #f5d29d;
  font-size: 12px;
}

.mini-preset-button:hover {
  border-color: rgba(212, 155, 85, 0.64);
  background: rgba(212, 155, 85, 0.18);
}

.mini-preset-button.is-loaded {
  border-color: rgba(70, 214, 129, 0.48);
  background: rgba(70, 214, 129, 0.12);
  color: #dfffe8;
}

.mini-preset-button.is-loaded::after {
  content: "✓";
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(189, 255, 210, 0.78);
  border-radius: 999px;
  background: #32c56f;
  color: #06170d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(28, 191, 95, 0.36);
}

.mini-preset-button.is-loaded::after {
  content: "\2713";
}

.script-node-console .script-cue-preset-button,
.script-node-console .script-cue-preset-button.is-loaded,
.script-node-console .script-cue-preset-button:hover,
.script-node-console .script-cue-preset-button.is-loaded:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  box-shadow: none;
}

.storyboard-key {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.storyboard-key.compact {
  grid-template-columns: 96px minmax(0, 1fr) 58px;
  padding: 7px;
}

.storyboard-key.model-row select {
  min-width: 0;
  width: 100%;
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(5, 6, 8, 0.42);
  color: #e8e9ed;
}

.storyboard-key.model-row span {
  color: #d9c7aa;
  font-size: 12px;
  text-align: center;
}

.storyboard-key label {
  color: #aeb4c0;
  font-size: 12px;
}

.storyboard-key input {
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  outline: none;
  padding: 0 10px;
  background: rgba(5, 6, 8, 0.42);
  color: #e8e9ed;
}

.storyboard-key input:focus {
  border-color: rgba(92, 137, 255, 0.62);
}

.storyboard-key button {
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: #cfd4df;
  font-size: 12px;
}

.model-generation-source {
  padding: 8px 10px;
  border: 1px solid rgba(97, 189, 131, 0.24);
  border-radius: 8px;
  color: #c8ead4;
  background: rgba(97, 189, 131, 0.07);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-spec-meter,
.storyboard-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: hidden;
}

.storyboard-spec-meter span,
.storyboard-field-chips span {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #dfe5f1;
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-model-stack .model-generation-source,
.storyboard-model-stack .storyboard-spec-meter {
  grid-column: 1 / -1;
}

.storyboard-field-chips span {
  color: #b9c7e8;
  border-color: rgba(120, 161, 255, 0.2);
}

.storyboard-card {
  min-height: 0;
  overflow: visible;
  border: 1px solid rgba(120, 161, 255, 0.22);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.34);
  display: grid;
  grid-template-rows: auto auto;
}

.storyboard-toolbar {
  min-height: 32px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.storyboard-toolbar strong {
  margin-right: auto;
  color: #f2f5fb;
  font-size: 13px;
}

.storyboard-toolbar span {
  padding: 3px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #c9ced8;
  font-size: 10px;
  white-space: nowrap;
}

.storyboard-table {
  max-height: none;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.storyboard-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px 56px minmax(480px, 1.7fr) minmax(230px, 0.8fr) 112px;
  align-items: start;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #dce1eb;
  font-size: 11px;
  line-height: 1.38;
}

.storyboard-head-row {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 26px;
  align-items: center;
  color: #8e96a5;
  background: rgba(20, 24, 34, 0.96);
  backdrop-filter: blur(10px);
  font-size: 11px;
}

.storyboard-row.active {
  background: rgba(72, 125, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(92, 137, 255, 0.36);
}

.storyboard-row .shot-no {
  color: #75a1ff;
  font-size: 13px;
  font-weight: 700;
}

.shot-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.storyboard-cell-value {
  min-height: 26px;
  max-height: none;
  display: block;
  padding: 3px 2px;
  border-radius: 7px;
  cursor: text;
  overflow: visible;
  scrollbar-width: thin;
}

.storyboard-cell-value:hover {
  background: rgba(117, 161, 255, 0.07);
}

.storyboard-cell-value.editing {
  padding: 0;
  background: transparent;
}

.storyboard-cell-editor {
  width: 100%;
  min-height: 38px;
  height: 68px;
  resize: none;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(5, 6, 8, 0.24);
  color: #dce1eb;
  padding: 6px 8px;
  font: inherit;
  line-height: 1.35;
  outline: none;
}

.storyboard-cell-editor:focus {
  border-color: rgba(117, 161, 255, 0.52);
  background: rgba(8, 12, 20, 0.42);
  box-shadow: 0 0 0 2px rgba(117, 161, 255, 0.1);
}

.shot-state {
  display: grid;
  gap: 3px;
  color: #8fdba8;
}

.shot-state em {
  font-style: normal;
  color: #8fdba8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shot-state button {
  height: 22px;
  padding: 0 6px;
  border: 1px solid rgba(92, 137, 255, 0.38);
  border-radius: 7px;
  background: rgba(76, 124, 255, 0.16);
  color: #dce8ff;
  font-size: 11px;
  cursor: pointer;
}

.shot-state button:hover {
  border-color: rgba(120, 161, 255, 0.72);
  background: rgba(76, 124, 255, 0.25);
}

.final-doc-panel {
  width: 100%;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  border: 1px solid rgba(212, 155, 85, 0.24);
  border-radius: 8px;
  overflow: visible;
  background: rgba(8, 8, 10, 0.28);
}

.final-doc-toolbar {
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.final-doc-title {
  margin-right: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.final-doc-title strong {
  min-width: 0;
  color: #f4f1ea;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-doc-count,
.final-status {
  padding: 6px 10px;
  border: 1px solid rgba(212, 155, 85, 0.22);
  border-radius: 10px;
  background: rgba(212, 155, 85, 0.08);
  color: #f0d5ac;
  font-size: 12px;
  white-space: nowrap;
}

.final-style-chips {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.final-style-chip {
  height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(212, 155, 85, 0.36);
  border-radius: 999px;
  background: rgba(212, 155, 85, 0.1);
  color: #f0d5ac;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.final-style-check {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 155, 85, 0.42);
  border-radius: 4px;
  color: transparent;
  font-size: 11px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.16);
}

.final-style-chip.active {
  border-color: rgba(240, 193, 116, 0.72);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.42), rgba(143, 92, 42, 0.3));
  color: #fff4dc;
}

.final-style-chip.active .final-style-check {
  border-color: rgba(255, 224, 166, 0.82);
  background: rgba(240, 193, 116, 0.28);
  color: #fff4dc;
}

.final-doc-list {
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 10px;
}

.final-doc-list.two-columns {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.final-doc-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.node-final .node-actions {
  flex: 0 0 auto;
}

.final-doc-card {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 58px minmax(178px, 0.72fr) minmax(330px, 1.35fr) minmax(190px, 0.74fr) 76px;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.16);
  color: #dce1eb;
}

.final-video-generate {
  box-sizing: border-box;
  min-width: 0;
  height: 148px;
  padding: 8px 7px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(100, 195, 255, 0.26);
  border-radius: 8px;
  background: rgba(48, 122, 166, 0.12);
  color: #dff4ff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.final-video-generate span {
  color: #9ed8ff;
  font-size: 11px;
}

.final-video-generate strong {
  color: #f4fbff;
  font-size: 12px;
  line-height: 1.25;
}

.final-video-generate:hover {
  border-color: rgba(144, 217, 255, 0.7);
  background: rgba(48, 122, 166, 0.2);
  box-shadow: 0 0 0 2px rgba(91, 174, 226, 0.13);
}

.final-video-generate:active {
  transform: translateY(1px);
}

.final-shot-no {
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  min-height: 148px;
  padding: 7px 8px;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid rgba(212, 155, 85, 0.28);
  border-radius: 8px;
  background: rgba(212, 155, 85, 0.08);
  color: #f0c174;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.final-shot-no:hover {
  border-color: rgba(240, 193, 116, 0.7);
  background: rgba(212, 155, 85, 0.14);
  box-shadow: 0 0 0 2px rgba(240, 193, 116, 0.12);
}

.final-shot-no:active {
  transform: translateY(1px);
}

.final-shot-no em {
  width: 100%;
  color: #b7aa98;
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.final-shot-no strong {
  width: 100%;
  color: #f0c174;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.final-image-slot,
.final-video-slot {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(212, 155, 85, 0.36);
  border-radius: 8px;
  background: rgba(4, 6, 10, 0.34);
  color: #d9c7aa;
  text-align: center;
  cursor: pointer;
}

.final-image-slot {
  align-self: start;
  aspect-ratio: 16 / 9;
  height: auto;
}

.final-video-slot {
  height: 148px;
}

.final-video-slot {
  cursor: default;
}

button.final-image-slot {
  width: 100%;
  padding: 0;
  font: inherit;
  line-height: normal;
}

button.final-image-slot:hover,
.final-video-slot:hover,
.final-video-slot.drag-over {
  border-color: rgba(240, 193, 116, 0.62);
  background: rgba(8, 10, 14, 0.46);
}

.final-video-slot.drag-over {
  box-shadow:
    0 0 0 5px rgba(240, 193, 116, 0.22),
    0 0 34px rgba(240, 193, 116, 0.28);
}

.final-image-slot img,
.final-video-slot video,
.final-video-storyboard,
.final-video-storyboard img {
  width: 100%;
  height: 100%;
  display: block;
}

.final-image-slot img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center center;
}

.final-video-slot video {
  object-fit: cover;
  object-position: center center;
  background: #050608;
}

.final-video-storyboard {
  position: relative;
  overflow: hidden;
  background: #050608;
}

.final-video-storyboard img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  animation: finalStoryboardSlide var(--slide-duration, 8s) linear infinite;
  animation-delay: calc(var(--slide-duration, 8s) / var(--frame-count, 1) * var(--frame-index, 0) * -1);
}

.final-video-storyboard img:first-child {
  animation-delay: 0s;
}

.final-frame-pending {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 8px;
  border: 1px solid rgba(240, 193, 116, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #ffe2ae;
  font-size: 11px;
  pointer-events: none;
}

@keyframes finalStoryboardSlide {
  0%,
  18% {
    opacity: 1;
  }
  24%,
  100% {
    opacity: 0;
  }
}

.final-video-slot.is-previewing {
  border-color: rgba(240, 193, 116, 0.68);
  box-shadow: 0 0 0 5px rgba(240, 193, 116, 0.16);
}

.final-video-popout {
  position: fixed;
  z-index: 2000;
  overflow: hidden;
  border: 1px solid rgba(240, 193, 116, 0.44);
  border-radius: 12px;
  background: rgba(5, 6, 8, 0.96);
  box-shadow: 0 24px 92px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.final-video-popout.is-loading {
  visibility: hidden;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.final-video-popout video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050608;
}

.final-video-popout span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid rgba(240, 193, 116, 0.26);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffe2ae;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.final-copy-tip,
.final-video-tip {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  border: 1px solid rgba(240, 193, 116, 0.34);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  color: #ffe2ae;
  font-size: 11px;
  line-height: 1.2;
  pointer-events: none;
}

.final-video-slot.has-video .final-video-tip {
  z-index: 2;
  opacity: 0.86;
}

button.final-image-slot:hover .final-copy-tip,
.final-video-slot:hover .final-video-tip,
.final-video-slot.drag-over .final-video-tip {
  border-color: rgba(240, 193, 116, 0.72);
  background: rgba(33, 24, 12, 0.72);
  color: #fff2d2;
}

.final-image-empty,
.final-video-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 12px;
}

.final-image-empty em,
.final-video-empty em {
  font-style: normal;
  color: #f0d5ac;
}

.final-image-empty small,
.final-video-empty small {
  max-width: 190px;
  color: #9fa4ae;
  font-size: 11px;
  line-height: 1.4;
}

.final-prompt-block {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 148px;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  cursor: text;
  user-select: text;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.final-prompt-block * {
  user-select: text;
}

.final-prompt-block strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #f0d5ac;
  font-size: 12px;
}

.final-prompt-block strong em {
  font-style: normal;
  color: #efc274;
  font-size: 11px;
  font-weight: 500;
}

.final-prompt-block p {
  margin: 0;
  color: #e4e7ef;
  font-size: 12px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.final-source {
  display: none;
  min-width: 0;
  align-content: end;
  gap: 5px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  color: #cdd2dc;
  font-size: 11px;
}

.final-source em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-style: normal;
  color: #f0d5ac;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.final-source small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #9fa6b3;
  font-size: 10px;
  line-height: 1.35;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.final-doc-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #9fa6b3;
  text-align: center;
}

.node-resize-handle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  border-right: 2px solid rgba(164, 185, 232, 0.8);
  border-bottom: 2px solid rgba(164, 185, 232, 0.8);
  opacity: 0.75;
  z-index: 6;
}

.node-resize-handle:hover {
  opacity: 1;
}

.storyboard-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  color: #8d929d;
  font-size: 13px;
}

.storyboard-raw-output {
  min-height: 180px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: #dce1eb;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.info-design-board {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.info-design-board:has(.info-card-embedded-image-gen .video-gen-spec-menu[open]) {
  overflow: visible;
}

.info-board-summary {
  min-height: 38px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.info-board-summary > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.info-board-summary strong {
  color: #f6f8fb;
  font-size: 13px;
}

.info-board-summary span {
  color: #9aa4b5;
  font-size: 11px;
}

.info-board-action {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(97, 189, 131, 0.32);
  border-radius: 8px;
  background: rgba(97, 189, 131, 0.15);
  color: #edfff1;
  font-size: 11px;
  font-weight: 800;
}

.info-board-action:hover {
  background: rgba(97, 189, 131, 0.23);
  transform: translateY(-1px);
}

.info-board-action.subtle {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(230, 235, 245, 0.78);
}

.info-board-action.subtle:hover {
  border-color: rgba(97, 189, 131, 0.24);
  background: rgba(97, 189, 131, 0.12);
  color: #f3fff5;
}

.info-card-list {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-right: 2px;
  align-content: start;
  scrollbar-gutter: stable;
}

.info-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "main"
    "prompt"
    "tools";
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(4, 5, 7, 0.24);
  overflow: hidden;
}

.info-card-main {
  grid-area: main;
  min-width: 0;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.info-card header {
  grid-area: head;
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.info-card header > span {
  width: 28px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(97, 189, 131, 0.12);
  color: #8edca9;
  font-size: 12px;
  font-weight: 800;
}

.info-card header div {
  min-width: 0;
}

.info-card header strong {
  display: block;
  overflow: hidden;
  color: #f2f4f6;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-card header small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #9ca4b2;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-card-image-slot {
  position: relative;
  width: calc(100% - 20px);
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  margin: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(97, 189, 131, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(97, 189, 131, 0.12), rgba(79, 131, 255, 0.055)),
    rgba(255, 255, 255, 0.035);
}

.info-card-image-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.info-card-image-slot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.info-card-image-slot div {
  max-width: 86%;
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.info-card-image-slot strong {
  color: #f1f6f4;
  font-size: 12px;
  font-weight: 850;
}

.info-card-image-slot span {
  color: #9ba7b4;
  font-size: 10px;
}

.info-card-image-slot.filled {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.34);
}

.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 0;
}

.info-card-grid section,
.info-card-prompt {
  min-width: 0;
  padding: 9px 11px;
}

.info-card-grid section:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.info-card-grid section:nth-child(-n + 2) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.info-card h4 {
  margin: 0 0 5px;
  color: #8fdba8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.info-card p {
  margin: 0;
  color: #d9dee7;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.info-card-grid p {
  display: -webkit-box;
  min-height: 32px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.info-card-prompt {
  grid-area: prompt;
  background: rgba(97, 189, 131, 0.045);
}

.info-card-prompt p {
  display: -webkit-box;
  min-height: 34px;
  overflow: hidden;
  color: #eef5ee;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.info-card-tools {
  grid-area: tools;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 1.15fr;
  gap: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(2, 3, 5, 0.16);
}

.info-card-tools button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe4ec;
  font-size: 11px;
  font-weight: 800;
}

.info-card-tools button.primary {
  border-color: rgba(97, 189, 131, 0.34);
  background: rgba(97, 189, 131, 0.16);
  color: #eaffef;
}

.info-card-tools button:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

@media (max-width: 820px) {
  .info-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "main"
      "prompt"
      "tools";
  }

  .info-card-main {
    grid-template-columns: 1fr;
  }

  .info-card-grid {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
  }

  .info-card-image-slot {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.character-library {
  max-height: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  gap: 10px;
}

.character-index {
  display: none;
}

.character-index span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  padding: 6px 9px;
  border: 1px solid rgba(97, 189, 131, 0.18);
  border-radius: 8px;
  background: rgba(97, 189, 131, 0.075);
  color: #dceee3;
  font-size: 12px;
}

.character-index b {
  color: #8fdba8;
  font-size: 11px;
}

.character-card-list {
  display: grid;
  gap: 10px;
}

.character-profile {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(4, 5, 7, 0.24);
}

.character-profile header {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.character-profile header > span {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(97, 189, 131, 0.12);
  color: #8edca9;
  font-size: 12px;
}

.character-profile header strong {
  display: block;
  color: #f2f4f6;
  font-size: 14px;
}

.character-profile header small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.character-section {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.character-section:last-child {
  border-bottom: 0;
}

.character-section h4 {
  margin: 0;
  color: #8fdba8;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.character-section p {
  margin: 0;
  color: #d8dce4;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.character-section.primary p {
  color: #f0f3f8;
  font-weight: 700;
}

.character-section.compact {
  grid-template-columns: 86px minmax(0, 1fr);
}

.character-section.compact h4 {
  color: #8fdba8;
}

.character-section.muted p {
  color: #aeb4c0;
}

.info-empty {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  color: #8d929d;
}

.node-video,
.node-splat-prep,
.node-splat-file,
.node-panorama {
  width: 360px;
  min-height: 300px;
}

.node-image {
  width: 780px;
  min-height: 0;
  contain: layout;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.node-image.selected {
  border-color: transparent;
  box-shadow: none;
}

.node-image .node-body {
  padding: 0 12px 12px;
}

.node-image .node-head,
.node-image .node-relations,
.node-image .node-status,
.node-image .node-actions {
  display: none;
}

.node-video {
  width: 420px;
  min-height: 330px;
}

.node-audio {
  width: 560px;
  min-height: 0;
}

.node-splat-prep {
  width: 560px;
  min-height: 360px;
}

.node-splat-file {
  width: 360px;
  min-height: 380px;
}

.node-panorama {
  width: 520px;
  min-height: 500px;
}

.node-image .node-relations,
.node-video .node-relations,
.node-audio .node-relations,
.node-splat-prep .node-relations,
.node-splat-file .node-relations,
.node-panorama .node-relations {
  display: none;
}

.node-splat-prep .node-icon {
  background: linear-gradient(135deg, rgba(120, 205, 255, 0.24), rgba(126, 224, 167, 0.18));
  color: #d8f4ff;
  font-size: 10px;
  letter-spacing: 0;
}

.node-splat-file .node-icon {
  background: linear-gradient(135deg, rgba(150, 180, 255, 0.26), rgba(126, 224, 167, 0.18));
  color: #e7efff;
  font-size: 10px;
  letter-spacing: 0;
}

.node-panorama .node-icon {
  background: linear-gradient(135deg, rgba(91, 184, 255, 0.28), rgba(240, 193, 116, 0.22));
  color: #dff2ff;
}

.splat-file-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 168px minmax(0, auto) 34px;
  gap: 12px;
}

.splat-file-drop {
  min-height: 168px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed rgba(150, 180, 255, 0.34);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 12%, rgba(150, 180, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(17, 22, 31, 0.96), rgba(7, 10, 15, 0.94));
  color: #e8f0ff;
  text-align: center;
  cursor: pointer;
}

.splat-file-drop.has-file {
  border-style: solid;
  border-color: rgba(126, 224, 167, 0.34);
}

.splat-file-drop span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #cfe1ff;
  font-size: 18px;
  font-weight: 900;
}

.splat-file-drop strong,
.splat-file-drop small,
.splat-file-info span {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-file-drop strong {
  max-width: 270px;
  font-size: 13px;
}

.splat-file-drop small {
  color: rgba(218, 226, 238, 0.7);
  font-size: 11px;
}

.splat-file-info {
  display: grid;
  gap: 5px;
  color: rgba(204, 215, 230, 0.72);
  font-size: 11px;
}

.splat-file-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.splat-file-actions button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce4ef;
  font-size: 12px;
  font-weight: 800;
}

.splat-file-actions button.primary {
  border-color: rgba(126, 224, 167, 0.34);
  background: linear-gradient(135deg, rgba(126, 224, 167, 0.22), rgba(150, 180, 255, 0.16));
  color: #eafff3;
}

.splat-file-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.splat-prep-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto auto auto auto auto;
  gap: 10px;
}

.splat-prep-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.splat-prep-summary div {
  min-width: 0;
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.055);
}

.splat-prep-summary strong {
  overflow: hidden;
  color: #eef6ff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-summary span {
  color: rgba(226, 232, 240, 0.62);
  font-size: 11px;
}

.splat-prep-guide {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(120, 205, 255, 0.075);
}

.splat-prep-guide p {
  margin: 0;
  color: rgba(226, 232, 240, 0.76);
  font-size: 11.5px;
  line-height: 1.42;
}

.splat-prep-workflow {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(120, 205, 255, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(120, 205, 255, 0.17), rgba(126, 224, 167, 0.08));
}

.splat-prep-workflow-steps {
  display: grid;
  grid-template-columns: repeat(var(--splat-prep-step-count, 5), minmax(0, 1fr));
  gap: 5px;
}

.splat-prep-workflow-steps span {
  min-width: 0;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.68);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.splat-prep-workflow-steps span i {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.78);
  font-style: normal;
  font-size: 10px;
}

.splat-prep-workflow-steps span.done {
  border-color: rgba(126, 224, 167, 0.24);
  color: rgba(191, 246, 214, 0.76);
}

.splat-prep-workflow-steps span.done i {
  background: rgba(126, 224, 167, 0.18);
  color: #c7f8dd;
}

.splat-prep-workflow-steps span.active {
  border-color: rgba(120, 205, 255, 0.42);
  background: rgba(120, 205, 255, 0.14);
  color: #f8fbff;
}

.splat-prep-workflow-steps span.active i {
  background: rgba(120, 205, 255, 0.24);
  color: #f8fbff;
}

.splat-prep-workflow.running,
.splat-prep-workflow.warning {
  border-color: rgba(240, 193, 116, 0.36);
  background: rgba(240, 193, 116, 0.1);
}

.splat-prep-workflow.done {
  border-color: rgba(126, 224, 167, 0.36);
  background: rgba(126, 224, 167, 0.1);
}

.splat-prep-workflow-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.splat-prep-workflow-head span {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.splat-prep-workflow-head strong {
  min-width: 0;
  color: #f8fbff;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-workflow-focus {
  display: grid;
  grid-template-columns: minmax(130px, 0.72fr) minmax(0, 1.28fr);
  gap: 9px;
}

.splat-prep-workflow-current,
.splat-prep-workflow-next {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(120, 205, 255, 0.24);
  border-radius: 8px;
  padding: 10px;
  background: rgba(14, 22, 32, 0.32);
}

.splat-prep-workflow-current {
  border-color: rgba(120, 205, 255, 0.38);
  background: rgba(120, 205, 255, 0.11);
}

.splat-prep-workflow-current span,
.splat-prep-workflow-next span {
  color: rgba(226, 232, 240, 0.62);
  font-size: 10.5px;
  font-weight: 850;
}

.splat-prep-workflow-current strong {
  color: #d9efff;
  font-size: 12px;
  line-height: 1.2;
}

.splat-prep-workflow-current b {
  min-width: 0;
  color: #f8fbff;
  font-size: 18px;
  line-height: 1.16;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-workflow-next strong {
  color: #f8fbff;
  font-size: 16px;
  line-height: 1.22;
}

.splat-prep-workflow-next em {
  justify-self: start;
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(126, 224, 167, 0.16);
  color: #d8ffe8;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-workflow p {
  margin: 0;
  color: rgba(236, 244, 255, 0.84);
  font-size: 12px;
  line-height: 1.45;
}

.splat-prep-workflow-hint {
  border-left: 3px solid rgba(126, 224, 167, 0.42);
  padding-left: 9px;
  color: rgba(226, 232, 240, 0.72) !important;
}

.splat-prep-workflow-next {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(120, 205, 255, 0.24);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(14, 22, 32, 0.34);
}

.splat-prep-workflow-next strong {
  color: #f8fbff;
  font-size: 13px;
  line-height: 1.25;
}

.splat-prep-workflow-next span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 11.5px;
  line-height: 1.35;
}

.splat-prep-step-action {
  position: relative;
  gap: 7px;
}

.splat-prep-step-action span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 18px;
  border-radius: 999px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(236, 244, 255, 0.78);
  font-size: 9.5px;
  font-weight: 850;
  flex: 0 0 auto;
}

.splat-prep-primary-actions .splat-prep-step-action {
  min-width: 0;
}

.splat-prep-workflow-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.splat-prep-workflow-meta span {
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-workflow-progress {
  min-width: 0;
}

.splat-prep-workflow-progress .splat-prep-training {
  gap: 6px;
  padding: 8px 9px;
  border-color: rgba(240, 193, 116, 0.28);
  background: rgba(14, 22, 32, 0.24);
}

.splat-prep-workflow-progress .splat-prep-training-bar {
  height: 5px;
}

.splat-prep-workflow-progress .splat-prep-training p {
  font-size: 11.5px;
  line-height: 1.35;
}

.splat-prep-workflow-progress .splat-prep-training-log {
  display: none;
}

.splat-prep-primary-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
}

.splat-prep-primary-actions button {
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.58);
  font-size: 11.5px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  text-align: center;
  line-height: 1.18;
}

.splat-prep-primary-actions button.primary {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.58);
}

.splat-prep-primary-actions button.train,
.splat-prep-primary-actions button.supersplat-edit {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.58);
}

.splat-prep-primary-actions button.train.continue {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 232, 240, 0.58);
}

.splat-prep-primary-actions button.danger {
  border-color: rgba(255, 129, 129, 0.34);
  background: rgba(128, 38, 38, 0.16);
  color: #ffd5d5;
}

.splat-prep-primary-actions button.danger:hover:not(:disabled) {
  border-color: rgba(255, 129, 129, 0.56);
  background: rgba(150, 42, 42, 0.24);
  color: #ffe5e5;
}

.splat-prep-primary-actions button:hover:not(:disabled) {
  border-color: rgba(120, 205, 255, 0.28);
  color: rgba(246, 248, 252, 0.82);
}

.splat-prep-primary-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.splat-prep-primary-actions .splat-prep-step-action.is-current-step:not(:disabled) {
  border-color: rgba(126, 224, 167, 0.82);
  background: linear-gradient(135deg, rgba(70, 132, 190, 0.58), rgba(126, 224, 167, 0.34));
  color: #f8fbff;
  box-shadow: 0 0 0 1px rgba(126, 224, 167, 0.28), 0 0 24px rgba(126, 224, 167, 0.2);
  transform: translateY(-1px);
}

.splat-prep-primary-actions .splat-prep-step-action.is-current-step:not(:disabled):hover {
  border-color: rgba(126, 224, 167, 0.95);
  color: #fff;
}

.splat-prep-primary-actions .splat-prep-step-action.is-current-step:not(:disabled) span {
  background: rgba(126, 224, 167, 0.22);
  color: #d8ffe8;
}

.splat-prep-guide.capability {
  gap: 7px;
  padding: 10px;
}

.splat-prep-capability-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(126, 224, 167, 0.2);
  border-radius: 8px;
  padding: 7px 9px;
  background: rgba(126, 224, 167, 0.075);
}

.splat-prep-capability-summary strong {
  flex: 0 0 auto;
  color: #d8ffe8;
  font-size: 12px;
  font-weight: 900;
}

.splat-prep-capability-summary span {
  min-width: 0;
  color: rgba(226, 232, 240, 0.74);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-capability-details {
  display: grid;
  gap: 7px;
}

.splat-prep-capability-details summary {
  cursor: pointer;
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
  font-weight: 850;
  list-style-position: inside;
}

.splat-prep-capability-details:not([open]) {
  gap: 0;
}

.splat-prep-guide .capability-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.splat-prep-guide .capability-row span {
  color: rgba(216, 226, 238, 0.66);
  font-weight: 750;
}

.splat-prep-guide .capability-row strong {
  min-width: 0;
  color: rgba(247, 250, 255, 0.92);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.splat-prep-guide .capability-row.ok strong {
  color: #c7f8dd;
}

.splat-prep-guide .capability-row.warn strong {
  color: #ffe3a1;
}

.splat-prep-guide .capability-row.danger strong {
  color: #ffb4b4;
}

.splat-prep-guide .capability-action {
  color: rgba(255, 227, 161, 0.9);
  font-weight: 760;
}

.splat-prep-package-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 227, 161, 0.2);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 227, 161, 0.075);
}

.splat-prep-package-line span {
  min-width: 0;
  color: rgba(255, 238, 200, 0.86);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.splat-prep-package-line button {
  height: 25px;
  border: 1px solid rgba(255, 227, 161, 0.42);
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(255, 227, 161, 0.13);
  color: #ffe8ad;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.splat-prep-package-line.ready {
  border-color: rgba(126, 224, 167, 0.26);
  background: rgba(126, 224, 167, 0.08);
}

.splat-prep-package-line.ready span {
  color: rgba(215, 255, 229, 0.9);
}

.splat-prep-package-line.ready button {
  border-color: rgba(126, 224, 167, 0.42);
  background: rgba(126, 224, 167, 0.13);
  color: #d7ffe5;
}

.splat-prep-package-line.muted {
  grid-template-columns: minmax(0, 1fr);
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(226, 232, 240, 0.045);
}

.splat-prep-package-line.muted span {
  color: rgba(226, 232, 240, 0.66);
}

.splat-prep-local-status {
  min-width: 0;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.splat-prep-local-status.ready {
  border-color: rgba(126, 224, 167, 0.36);
  background: rgba(126, 224, 167, 0.095);
}

.splat-prep-local-status.warning,
.splat-prep-local-status.checking {
  border-color: rgba(240, 193, 116, 0.34);
  background: rgba(240, 193, 116, 0.09);
}

.splat-prep-local-status.offline {
  border-color: rgba(255, 115, 115, 0.34);
  background: rgba(120, 24, 24, 0.16);
}

.splat-prep-local-status-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.splat-prep-local-status-head strong,
.splat-prep-local-status-head span,
.splat-prep-local-status p,
.splat-prep-local-status small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-local-status-head strong {
  color: #eef6ff;
  font-size: 12px;
}

.splat-prep-local-status-head span {
  color: rgba(226, 232, 240, 0.52);
  font-size: 10px;
}

.splat-prep-local-status p,
.splat-prep-local-status small {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  line-height: 1.35;
}

.splat-prep-local-status small {
  color: rgba(191, 232, 255, 0.78);
}

.splat-prep-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.splat-prep-actions button {
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 248, 252, 0.86);
  font-size: 11.5px;
  font-weight: 800;
}

.splat-prep-actions button.primary {
  border-color: rgba(120, 205, 255, 0.36);
  background: linear-gradient(135deg, rgba(120, 205, 255, 0.22), rgba(126, 224, 167, 0.13));
  color: #d8f4ff;
}

.splat-prep-actions button.train {
  border-color: rgba(240, 193, 116, 0.4);
  background: rgba(240, 193, 116, 0.15);
  color: #fff2d3;
}

.splat-prep-actions button.train.continue {
  border-color: rgba(126, 224, 167, 0.44);
  background: rgba(126, 224, 167, 0.16);
  color: #e7ffef;
}

.splat-prep-actions button.supersplat-edit {
  border-color: rgba(159, 196, 255, 0.38);
  background: rgba(159, 196, 255, 0.13);
  color: #e7f0ff;
}

.splat-prep-actions button:hover:not(:disabled) {
  border-color: rgba(126, 224, 167, 0.42);
  background: rgba(126, 224, 167, 0.14);
  color: #fff;
}

.splat-prep-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.splat-prep-selection,
.splat-prep-selection-brief {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0;
}

.splat-prep-selection {
  align-items: stretch;
}

.splat-prep-selection span,
.splat-prep-selection-brief {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid rgba(122, 223, 170, 0.2);
  border-radius: 8px;
  background: rgba(122, 223, 170, 0.07);
  color: #b8f0d0;
  font-size: 11px;
  line-height: 1.35;
}

.splat-prep-selection strong {
  margin-left: 4px;
  color: #f5fff8;
}

.splat-selection-dialog {
  display: grid;
  gap: 14px;
}

.splat-selection-dialog > header {
  display: grid;
  gap: 5px;
}

.splat-selection-dialog > header span {
  color: #aeb5c0;
  font-size: 12px;
  line-height: 1.5;
}

.splat-selection-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.splat-selection-actions button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
}

.splat-frame-viewer {
  display: grid;
  gap: 12px;
}

.splat-frame-viewer > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.splat-frame-viewer > header strong {
  color: #eef6ff;
  font-size: 16px;
}

.splat-frame-viewer > header span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
}

.splat-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-height: min(72vh, 720px);
  overflow: auto;
  padding-right: 2px;
}

.splat-frame-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.splat-frame-card button {
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 7px;
  padding: 0;
  overflow: hidden;
  background: #050608;
}

.splat-frame-card button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.splat-frame-card button span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(226, 232, 240, 0.62);
  font-size: 11px;
}

.splat-frame-card strong,
.splat-frame-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-frame-card strong {
  color: #eef6ff;
  font-size: 11px;
}

.splat-frame-card em {
  color: rgba(226, 232, 240, 0.66);
  font-size: 10px;
  font-style: normal;
}

.splat-frame-card small {
  min-height: 18px;
  overflow: hidden;
  color: #d8b574;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-frame-empty {
  padding: 16px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 12px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.03);
}

.splat-render-settings-body {
  min-width: min(860px, calc(100vw - 32px));
}

.splat-render-settings-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  white-space: normal;
}

.splat-render-hero {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(120, 205, 255, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(120, 205, 255, 0.08), rgba(126, 224, 167, 0.035)),
    rgba(255, 255, 255, 0.026);
}

.splat-render-hero > div:first-child {
  display: grid;
  gap: 4px;
}

.splat-render-hero strong {
  color: #f2fbff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.splat-render-hero > div:first-child span {
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
  line-height: 1.45;
}

.splat-render-preset {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.splat-render-preset label {
  display: grid;
}

.splat-render-preset select {
  width: 100%;
  height: 30px;
  border: 1px solid rgba(120, 205, 255, 0.22);
  border-radius: 8px;
  padding: 0 26px 0 9px;
  background: rgba(15, 18, 24, 0.88);
  color: rgba(239, 250, 255, 0.92);
  font-size: 11.5px;
  font-weight: 800;
  outline: none;
}

.splat-render-preset small {
  color: rgba(126, 224, 167, 0.74);
  font-size: 9.5px;
  line-height: 1.3;
}

.splat-render-preset .splat-render-local-config {
  color: rgba(126, 224, 167, 0.84);
}

.splat-render-preset .splat-render-preset-warning {
  color: rgba(255, 207, 126, 0.92);
}

.splat-render-preset .splat-render-preset-warning[hidden] {
  display: none;
}

.splat-render-overview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.splat-render-overview span,
.splat-render-mini-summary span {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(120, 205, 255, 0.16);
  border-radius: 8px;
  background: rgba(120, 205, 255, 0.06);
  color: rgba(216, 244, 255, 0.88);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.splat-render-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.splat-render-layout.single {
  grid-template-columns: minmax(0, 1fr);
}

.splat-render-content {
  min-height: 0;
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.splat-render-guide {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.splat-render-guide-nav {
  display: grid;
  gap: 8px;
}

.splat-render-guide-nav button {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 1px solid rgba(120, 205, 255, 0.14);
  border-radius: 8px;
  background: rgba(120, 205, 255, 0.055);
  color: rgba(238, 246, 255, 0.94);
  font-size: 12.5px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.splat-render-guide-nav button:hover,
.splat-render-guide-nav button.active {
  border-color: rgba(120, 205, 255, 0.34);
  background: rgba(120, 205, 255, 0.14);
  color: #f2fbff;
}

.splat-render-guide-nav button.active {
  box-shadow: inset 3px 0 0 rgba(120, 205, 255, 0.78);
}

.splat-render-sections {
  min-height: 0;
  display: grid;
  overflow: hidden;
}

.splat-render-section,
.splat-render-advanced {
  display: grid;
  gap: 0;
  align-content: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}

.splat-render-section[hidden],
.splat-render-advanced[hidden] {
  display: none;
}

.splat-render-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.splat-render-card.postshot-card {
  border-radius: 8px;
}

.splat-render-card-head {
  display: grid;
  gap: 3px;
}

.splat-render-card-head strong {
  color: #eef6ff;
  font-size: 13px;
  font-weight: 900;
}

.splat-render-card-head span {
  color: rgba(226, 232, 240, 0.54);
  font-size: 10.5px;
  line-height: 1.35;
}

.splat-render-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.splat-render-section-head strong {
  color: #eef6ff;
  font-size: 12.5px;
  font-weight: 900;
}

.splat-render-section-head span {
  color: rgba(226, 232, 240, 0.54);
  font-size: 10.5px;
  line-height: 1.35;
}

.splat-render-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.splat-render-settings-grid.postshot-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.splat-render-settings-grid label,
.splat-render-settings-grid .splat-render-field {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.splat-render-settings-grid label.wide,
.splat-render-settings-grid .splat-render-field.wide {
  grid-column: 1 / -1;
}

.splat-render-settings-grid label.compact,
.splat-render-settings-grid .splat-render-field.compact {
  grid-column: span 1;
}

.splat-render-settings-grid span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
}

.splat-render-settings-grid span small,
.splat-render-checks span small {
  color: rgba(226, 232, 240, 0.38);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.splat-render-settings-grid .splat-render-field-hint {
  min-height: 24px;
  color: rgba(226, 232, 240, 0.5);
  font-size: 10px;
  line-height: 1.25;
  font-style: normal;
}

.splat-render-settings-grid input,
.splat-render-settings-grid select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(15, 18, 24, 0.92);
  color: rgba(246, 248, 252, 0.92);
  font-size: 12.5px;
  font-weight: 720;
  outline: none;
}

.splat-render-settings-grid select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(216, 244, 255, 0.84) 50%),
    linear-gradient(135deg, rgba(216, 244, 255, 0.84) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 13px,
    calc(100% - 10px) 13px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.splat-render-settings-grid select option {
  background: #12161d;
  color: #eef6ff;
}

.splat-render-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.splat-render-number-control {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(15, 18, 24, 0.92);
  overflow: hidden;
}

.splat-render-number-control input {
  height: 30px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.splat-render-number-control input:focus {
  box-shadow: none;
}

.splat-render-number-drag {
  width: 28px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: rgba(120, 205, 255, 0.08);
  color: rgba(216, 244, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  cursor: ew-resize;
}

.splat-render-number-control:hover,
.splat-render-number-control.is-dragging {
  border-color: rgba(120, 205, 255, 0.44);
  box-shadow: 0 0 0 2px rgba(120, 205, 255, 0.08);
}

.splat-render-number-control.is-dragging .splat-render-number-drag {
  background: rgba(120, 205, 255, 0.18);
  color: #eef9ff;
}

.splat-render-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.splat-render-checks label {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
  color: rgba(226, 232, 240, 0.74);
  font-size: 10.5px;
  line-height: 1.2;
}

.splat-render-checks span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.splat-render-settings-grid .splat-render-checks input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #78cdff;
}

.splat-render-settings-grid input:focus,
.splat-render-settings-grid select:focus {
  border-color: rgba(120, 205, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(120, 205, 255, 0.1);
}

.splat-render-advanced {
  gap: 9px;
}

.splat-render-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.splat-render-advanced summary::-webkit-details-marker {
  display: none;
}

.splat-render-advanced summary strong {
  color: #eef6ff;
  font-size: 12.5px;
  font-weight: 900;
}

.splat-render-advanced summary span {
  color: rgba(226, 232, 240, 0.48);
  font-size: 10.5px;
}

.splat-render-option-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.splat-render-option-group button {
  min-width: 0;
  min-height: 38px;
  display: grid;
  gap: 1px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.032);
  color: rgba(238, 244, 252, 0.82);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.splat-render-option-group button:hover {
  border-color: rgba(120, 205, 255, 0.28);
  background: rgba(120, 205, 255, 0.075);
}

.splat-render-option-group button.selected {
  border-color: rgba(120, 205, 255, 0.52);
  background: linear-gradient(180deg, rgba(120, 205, 255, 0.18), rgba(120, 205, 255, 0.09));
  box-shadow: inset 0 0 0 1px rgba(216, 244, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.18);
  color: #e9fbff;
}

.splat-render-option-group button strong {
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-render-settings-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.splat-render-settings-footer p {
  margin: 0;
  color: rgba(226, 232, 240, 0.52);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 720px) {
  .splat-render-settings-body {
    min-width: min(100vw - 20px, 100vw);
  }

  .splat-render-hero,
  .splat-render-content,
  .splat-render-layout,
  .splat-render-settings-grid,
  .splat-render-settings-grid.postshot-grid {
    grid-template-columns: 1fr;
  }

  .splat-render-overview {
    justify-content: flex-start;
  }

  .splat-render-checks {
    grid-template-columns: 1fr;
  }

  .splat-render-guide {
    grid-template-rows: auto;
  }

  .splat-render-option-group {
    grid-template-columns: 1fr;
  }
}

.splat-render-settings-actions {
  display: grid;
  grid-template-columns: auto auto;
  gap: 8px;
  justify-content: end;
}

.splat-render-settings-actions button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 248, 252, 0.86);
  font-weight: 850;
}

.splat-render-settings-actions button.primary {
  border-color: rgba(126, 224, 167, 0.36);
  background: rgba(126, 224, 167, 0.16);
  color: #e7ffef;
}

.postshot-login-body {
  width: min(520px, calc(100vw - 40px));
  white-space: normal;
}

.postshot-login-dialog {
  display: grid;
  gap: 14px;
}

.postshot-login-dialog p {
  margin: 0;
  color: rgba(232, 238, 248, 0.72);
  font-size: 13px;
  line-height: 1.55;
}

.postshot-login-dialog label {
  display: grid;
  gap: 7px;
}

.postshot-login-dialog label span {
  color: rgba(244, 248, 255, 0.82);
  font-size: 12px;
  font-weight: 850;
}

.postshot-login-dialog input {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #f5f8ff;
  outline: none;
}

.postshot-login-dialog input:focus {
  border-color: rgba(121, 198, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(121, 198, 255, 0.12);
}

.postshot-login-remember {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 9px !important;
  color: rgba(232, 238, 248, 0.76);
  font-size: 12px;
}

.postshot-login-remember input {
  width: 15px;
  height: 15px;
  padding: 0;
  margin: 0;
  accent-color: #ffd47e;
}

.postshot-login-remember span {
  font-size: 12px !important;
  font-weight: 750 !important;
}

.postshot-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.postshot-login-actions button {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 248, 252, 0.86);
  font-weight: 850;
}

.postshot-login-actions button.primary {
  border-color: rgba(255, 212, 126, 0.42);
  background: rgba(255, 212, 126, 0.18);
  color: #fff4d7;
}

.splat-prep-training {
  min-width: 0;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(240, 193, 116, 0.16);
  border-radius: 8px;
  padding: 11px 10px 10px;
  background: rgba(240, 193, 116, 0.075);
}

.splat-prep-panel .splat-prep-training {
  margin-top: 0;
}

.splat-prep-training.danger {
  border-color: rgba(255, 115, 115, 0.38);
  background: rgba(120, 24, 24, 0.18);
}

.splat-prep-training.needs-login {
  border-color: rgba(121, 198, 255, 0.34);
  background: rgba(70, 132, 190, 0.13);
}

.splat-prep-training.needs-login .splat-prep-training-head strong {
  color: #d9efff;
}

.splat-prep-training-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 18px;
}

.splat-prep-training-head strong,
.splat-prep-training-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-training-head strong {
  color: #fff2d3;
  font-size: 12px;
}

.splat-prep-training-head span {
  color: rgba(226, 232, 240, 0.66);
  font-size: 11px;
}

.splat-prep-training-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.splat-prep-training-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(120, 205, 255, 0.86), rgba(240, 193, 116, 0.92));
}

.splat-prep-step-track {
  display: grid;
  grid-template-columns: repeat(var(--splat-prep-step-count, 8), minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.splat-prep-step-track span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 2px 3px;
  color: rgba(226, 232, 240, 0.48);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
}

.splat-prep-step-track span.done {
  border-color: rgba(120, 205, 255, 0.28);
  color: rgba(191, 232, 255, 0.7);
  background: rgba(120, 205, 255, 0.08);
}

.splat-prep-step-track span.active {
  border-color: rgba(240, 193, 116, 0.42);
  color: #fff2d3;
  background: rgba(240, 193, 116, 0.15);
}

.splat-prep-training-step {
  color: rgba(255, 242, 211, 0.78) !important;
}

.splat-prep-sub-progress {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 7px;
}

.splat-prep-sub-progress span,
.splat-prep-sub-progress b {
  overflow: hidden;
  color: rgba(226, 232, 240, 0.58);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-sub-progress b {
  color: rgba(191, 232, 255, 0.82);
  font-weight: 800;
  text-align: right;
}

.splat-prep-sub-progress div {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.splat-prep-sub-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: rgba(120, 205, 255, 0.82);
}

.splat-prep-training-meta {
  color: rgba(191, 232, 255, 0.82) !important;
}

.splat-prep-training-log {
  color: rgba(226, 232, 240, 0.56) !important;
}

.splat-prep-training p {
  margin: 0;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-training-warning {
  color: #ffb6b6 !important;
}

.splat-result-check {
  display: grid;
  gap: 12px;
  min-width: min(560px, calc(100vw - 72px));
}

.splat-result-check-status {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(240, 193, 116, 0.2);
  border-radius: 10px;
  padding: 11px 12px;
  background: rgba(240, 193, 116, 0.08);
}

.splat-result-check-status.warn {
  border-color: rgba(255, 115, 115, 0.32);
  background: rgba(120, 24, 24, 0.16);
}

.splat-result-check-status.ok {
  border-color: rgba(126, 224, 167, 0.24);
  background: rgba(126, 224, 167, 0.07);
}

.splat-result-check-status.ok {
  border-color: rgba(126, 224, 167, 0.22);
  background: rgba(126, 224, 167, 0.08);
}

.splat-result-check-status strong {
  color: #fff2d3;
  font-size: 14px;
}

.splat-result-check-status.ok strong {
  color: #dfffea;
}

.splat-result-check-status span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.splat-result-check-grid {
  display: grid;
  gap: 8px;
}

.splat-result-check-grid div {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.055);
}

.splat-result-check-grid b {
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
}

.splat-result-check-grid span {
  min-width: 0;
  overflow: hidden;
  color: rgba(246, 248, 252, 0.9);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-result-path button {
  max-width: 100%;
  min-height: 28px;
  border: 1px solid rgba(120, 205, 255, 0.28);
  border-radius: 7px;
  padding: 0 9px;
  overflow: hidden;
  background: rgba(120, 205, 255, 0.1);
  color: #d8f4ff;
  font: inherit;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.splat-result-path button:hover {
  border-color: rgba(120, 205, 255, 0.48);
  background: rgba(120, 205, 255, 0.18);
}

.splat-prep-list {
  min-height: 0;
  max-height: 392px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
  padding-bottom: 2px;
}

.splat-prep-list-row {
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.045);
}

.splat-prep-list-row.is-failed {
  border-color: rgba(255, 142, 142, 0.28);
  background: rgba(220, 90, 90, 0.1);
}

.splat-prep-list-thumb {
  width: 74px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(5, 6, 8, 0.72);
}

.splat-prep-list-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.splat-prep-list-thumb span {
  color: rgba(216, 244, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
}

.splat-prep-list-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.splat-prep-list-main strong,
.splat-prep-list-main span,
.splat-prep-list-main em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-prep-list-main strong {
  color: rgba(246, 248, 252, 0.9);
  font-size: 12px;
}

.splat-prep-list-main span {
  color: rgba(226, 232, 240, 0.58);
  font-size: 11px;
}

.splat-prep-list-main em {
  color: rgba(202, 211, 222, 0.68);
  font-size: 10.5px;
  font-style: normal;
}

.splat-prep-list-main em.splat-prep-source-note {
  color: rgba(202, 211, 222, 0.68);
}

.splat-prep-list-main em.splat-prep-error-note,
.splat-prep-list-row.is-failed .splat-prep-list-main em.splat-prep-error-note {
  color: rgba(255, 190, 190, 0.82);
}

.splat-prep-list-row > b {
  justify-self: end;
  min-width: 52px;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(126, 224, 167, 0.12);
  color: rgba(198, 255, 224, 0.88);
  font-size: 10.5px;
  text-align: center;
  white-space: nowrap;
}

.splat-prep-list-row.is-failed > b {
  background: rgba(255, 142, 142, 0.14);
  color: rgba(255, 205, 205, 0.9);
}

.splat-prep-empty {
  min-height: 128px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: rgba(226, 232, 240, 0.56);
  font-size: 12px;
  text-align: center;
}

.panorama-panel {
  display: grid;
  gap: 9px;
}

.panorama-preview {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(160, 212, 255, 0.18);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 184, 255, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(17, 22, 31, 0.96), rgba(5, 7, 11, 0.92));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  padding: 0;
  color: inherit;
  cursor: pointer;
  appearance: none;
}

.panorama-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(255, 255, 255, 0.045) 22% 22.5%, transparent 22.5% 44%, rgba(255, 255, 255, 0.045) 44% 44.5%, transparent 44.5% 66%, rgba(255, 255, 255, 0.045) 66% 66.5%, transparent 66.5%),
    linear-gradient(180deg, transparent 0 32%, rgba(255, 255, 255, 0.035) 32% 32.5%, transparent 32.5% 66%, rgba(255, 255, 255, 0.035) 66% 66.5%, transparent 66.5%);
  opacity: 0.72;
}

.panorama-preview img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2 / 1;
  min-height: 220px;
  display: block;
  object-fit: cover;
}

.panorama-preview:hover {
  border-color: rgba(240, 193, 116, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 0 0 1px rgba(240, 193, 116, 0.14);
}

.panorama-empty {
  position: relative;
  z-index: 1;
  width: min(86%, 380px);
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #dce9f8;
  text-align: center;
}

.panorama-empty span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #f0c174;
  font-size: 26px;
  line-height: 1;
}

.panorama-empty strong {
  font-size: 14px;
}

.panorama-empty small {
  max-width: 280px;
  color: rgba(218, 226, 238, 0.68);
  font-size: 11px;
  line-height: 1.45;
}

.panorama-splat-preview {
  position: relative;
  z-index: 1;
  min-height: 190px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #eef6ff;
  text-align: center;
}

.panorama-splat-preview span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(91, 184, 255, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(240, 193, 116, 0.48), transparent 38%),
    rgba(91, 184, 255, 0.13);
  color: #fff2d3;
  font-size: 17px;
  font-weight: 800;
}

.panorama-splat-preview strong {
  font-size: 14px;
}

.panorama-splat-preview small {
  max-width: 320px;
  color: rgba(218, 226, 238, 0.7);
  font-size: 11px;
  line-height: 1.45;
}

.panorama-preview-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.66);
  color: rgba(232, 243, 255, 0.9);
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.panorama-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.panorama-info strong,
.panorama-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-info strong {
  color: #edf3ff;
  font-size: 13px;
}

.panorama-info span {
  color: rgba(204, 215, 230, 0.72);
  font-size: 11px;
}

.panorama-info .panorama-prep-link {
  color: rgba(126, 224, 167, 0.82);
}

.panorama-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panorama-actions button {
  flex: 1 1 118px;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce4ef;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.panorama-actions button.primary {
  border-color: rgba(240, 193, 116, 0.36);
  background: linear-gradient(135deg, rgba(240, 193, 116, 0.28), rgba(91, 184, 255, 0.14));
  color: #fff2d3;
}

.panorama-actions button:hover:not(:disabled) {
  border-color: rgba(161, 213, 255, 0.42);
  background: rgba(161, 213, 255, 0.14);
  color: #fff;
}

.panorama-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panorama-3dgs-prep-floating {
  position: fixed;
  right: clamp(18px, 3vw, 42px);
  top: clamp(72px, 12vh, 120px);
  z-index: 42;
  width: min(620px, calc(100vw - 108px));
  max-height: min(760px, calc(100vh - 110px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(15, 16, 18, 0.96);
  color: #f2f5fa;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.panorama-3dgs-prep-floating[hidden] {
  display: none;
}

.panorama-3dgs-prep-shell {
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.panorama-3dgs-prep-shell header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panorama-3dgs-prep-shell header div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.panorama-3dgs-prep-shell header strong {
  font-size: 16px;
}

.panorama-3dgs-prep-shell header span {
  overflow: hidden;
  color: rgba(226, 232, 240, 0.58);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-3dgs-prep-shell header button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(246, 248, 252, 0.9);
}

.panorama-3dgs-prep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panorama-3dgs-prep-actions button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 248, 252, 0.86);
  font-size: 12px;
  font-weight: 800;
}

.panorama-3dgs-prep-actions button:hover:not(:disabled) {
  border-color: rgba(120, 205, 255, 0.42);
  background: rgba(120, 205, 255, 0.16);
  color: #d8f4ff;
}

.panorama-3dgs-prep-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.panorama-3dgs-prep-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panorama-3dgs-prep-stats span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(226, 232, 240, 0.66);
  font-size: 12px;
}

.panorama-3dgs-prep-stats strong {
  color: #fff2d3;
}

.panorama-3dgs-prep-guide {
  display: grid;
  gap: 6px;
  border-radius: 10px;
  padding: 10px;
  background: rgba(120, 205, 255, 0.08);
}

.panorama-3dgs-prep-guide p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.panorama-3dgs-prep-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 9px;
  padding-right: 2px;
}

.panorama-3dgs-prep-grid figure {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}

.panorama-3dgs-prep-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  background: #050608;
}

.panorama-3dgs-prep-grid figcaption {
  overflow: hidden;
  color: rgba(226, 232, 240, 0.58);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-3dgs-prep-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: rgba(226, 232, 240, 0.56);
  font-size: 13px;
  text-align: center;
}

.node-image-preview {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(111, 162, 255, 0.24), transparent 40%),
    linear-gradient(180deg, #26303c, #12151a 52%, #48311f);
}

.canvas-image-preview,
.canvas-video-preview,
.canvas-audio-preview {
  display: grid;
  gap: 7px;
  cursor: grab;
}

.canvas-image-preview {
  contain: layout paint;
  position: relative;
  width: 100%;
  will-change: transform;
}

.canvas-video-preview video,
.canvas-video-preview > em {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: contain;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 6, 8, 0.38);
  color: #cfd6e4;
  font-style: normal;
}

.canvas-image-preview img,
.canvas-image-preview > em {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  object-fit: contain;
  overflow: hidden;
  background: rgba(5, 6, 8, 0.38);
  color: #cfd6e4;
  font-style: normal;
}

.canvas-image-preview img,
.canvas-video-preview video {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-user-drag: none;
  user-select: none;
}

.canvas-audio-preview audio {
  width: min(520px, 78%);
  height: 38px;
  position: relative;
  z-index: 2;
  border-radius: 999px;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.28));
}

.canvas-audio-preview > em {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(230, 236, 246, 0.72);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
}

.canvas-audio-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.78;
  pointer-events: none;
}

.canvas-audio-visual::before {
  content: "";
  position: absolute;
  width: min(420px, 62%);
  height: min(420px, 72%);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(89, 213, 143, 0.18), transparent 62%),
    radial-gradient(circle, rgba(112, 158, 255, 0.12), transparent 70%);
  filter: blur(2px);
}

.canvas-audio-visual span {
  position: relative;
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(226, 255, 239, 0.95), rgba(86, 213, 143, 0.62));
  box-shadow: 0 0 24px rgba(86, 213, 143, 0.18);
}

.canvas-audio-visual span:nth-child(1) {
  height: 42px;
}

.canvas-audio-visual span:nth-child(2) {
  height: 76px;
}

.canvas-audio-visual span:nth-child(3) {
  height: 116px;
}

.canvas-audio-visual span:nth-child(4) {
  height: 72px;
}

.canvas-audio-visual span:nth-child(5) {
  height: 48px;
}

.canvas-audio-visual.empty {
  opacity: 0.42;
}

.canvas-video-preview video {
  object-fit: contain;
}

.canvas-image-preview small,
.canvas-video-preview small,
.canvas-audio-preview small {
  color: #9fa8b8;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  max-height: 30px;
  overflow: hidden;
}

.node-image,
.node-video {
  width: 780px;
  min-height: 0;
  contain: layout;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.node-image.selected,
.node-video.selected,
.node-audio.selected {
  border-color: transparent;
  box-shadow: none;
}

.node-image.video-panel-open,
.node-video.video-panel-open,
.node-audio.video-panel-open {
  z-index: 24;
}

.node-image.video-panel-open.selected,
.node-video.video-panel-open.selected,
.node-audio.video-panel-open.selected {
  z-index: 26;
}

.node-image .node-body,
.node-video .node-body,
.node-audio .node-body {
  padding: 0 12px 12px;
}

.canvas-image-panel,
.canvas-video-panel,
.canvas-audio-panel {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.node-audio {
  width: 560px;
  min-height: 0;
  contain: layout;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.canvas-image-frame,
.canvas-video-frame,
.canvas-audio-frame {
  position: relative;
  min-width: 0;
  width: min(100%, var(--generation-preview-width, 100%));
  justify-self: center;
  display: grid;
  gap: 8px;
  overflow: visible;
}

.canvas-video-preview {
  position: relative;
  width: 100%;
  contain: layout paint;
  will-change: transform;
  cursor: grab;
}

.canvas-audio-preview {
  position: relative;
  width: 100%;
  min-height: 180px;
  contain: layout paint;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 24px;
  overflow: hidden;
  cursor: grab;
}

.canvas-video-preview video {
  cursor: pointer;
}

.canvas-video-console {
  display: grid;
  gap: 6px;
  color: rgba(226, 232, 240, 0.74);
  font-size: 12px;
  line-height: 1.35;
}

.canvas-video-meta {
  display: grid;
  gap: 2px;
  padding: 0 2px;
}

.canvas-video-meta span {
  color: rgba(246, 248, 252, 0.94);
  font-weight: 700;
}

.canvas-video-meta small {
  color: rgba(175, 183, 198, 0.88);
}

.node-image .node-head,
.node-image .node-relations,
.node-image .node-status,
.node-image .node-actions,
.node-video .node-head,
.node-video .node-relations,
.node-video .node-status,
.node-video .node-actions,
.node-audio .node-head,
.node-audio .node-relations,
.node-audio .node-status,
.node-audio .node-actions {
  display: none;
}

.node-video-gen,
.node-image-gen,
.node-agent,
.node-script {
  width: 780px;
  min-height: 0;
  contain: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.node-image-gen,
.node-agent {
  width: 700px;
}

.node-script {
  width: 620px;
}

.node-video-gen.video-panel-open,
.node-image-gen.video-panel-open,
.node-agent.video-panel-open,
.node-script.video-panel-open {
  z-index: 24;
}

.node-video-gen.video-panel-open.selected,
.node-image-gen.video-panel-open.selected,
.node-agent.video-panel-open.selected,
.node-script.video-panel-open.selected {
  z-index: 26;
}

.node-video-gen.selected,
.node-image-gen.selected,
.node-agent.selected,
.node-script.selected {
  border-color: transparent;
  box-shadow: none;
}

.node-video-gen.reference-drag-over,
.node-image-gen.reference-drag-over,
.node-agent.reference-drag-over,
.node-script.reference-drag-over {
  border-color: transparent;
  box-shadow: none;
}

.node-video-gen.compact-video-gen .node-body,
.node-image-gen.compact-video-gen .node-body,
.node-agent.compact-video-gen .node-body,
.node-script.compact-video-gen .node-body,
.node-storyboard .node-body {
  padding: 0 12px 12px;
}

.video-gen-panel {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.image-gen-panel {
  gap: 12px;
}

.node-image-gen:has(.video-gen-spec-menu[open]) .generation-preview-frame {
  z-index: 1;
}

.node-image-gen:has(.video-gen-spec-menu[open]) .image-gen-console {
  z-index: 220;
}

.node-image-gen:has(.video-gen-spec-menu[open]) .video-gen-preview,
.node-image-gen:has(.video-gen-spec-menu[open]) .image-gen-preview-busy {
  z-index: 0;
}

.script-panel {
  gap: 12px;
}

.script-preview-frame {
  --generation-preview-width: 596px;
  --generation-preview-max-height: 320px;
}

.node-script .script-preview-frame {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.generation-preview-frame {
  position: relative;
  min-width: 0;
  width: min(100%, var(--generation-preview-width, 100%));
  justify-self: center;
  display: grid;
  gap: 8px;
  overflow: visible;
}

.video-gen-label {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 4px;
  color: rgba(226, 229, 236, 0.58);
  font-size: 18px;
  font-weight: 700;
}

.generation-node-label {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding: 0 2px;
}

.video-gen-label span {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(226, 229, 236, 0.24);
  border-radius: 4px;
  color: rgba(226, 229, 236, 0.5);
  font-size: 10px;
}

.generation-node-label strong {
  color: rgba(246, 248, 252, 0.92);
  font-size: 14px;
  line-height: 1;
}

.generation-node-label small {
  min-width: 0;
  max-width: min(72%, 190px);
  padding: 4px 8px;
  border: 1px solid rgba(226, 229, 236, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(246, 248, 252, 0.74);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-preview {
  min-width: 0;
  width: 100%;
  max-height: var(--generation-preview-max-height, 420px);
  justify-self: center;
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(237, 241, 247, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.09);
  color: #dfe4ec;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.node-script .script-node-preview {
  height: var(--generation-preview-max-height, 320px);
  max-height: var(--generation-preview-max-height, 320px);
  padding: 24px 34px 28px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(235, 239, 248, 0.52);
  border-radius: 12px;
  background: #111318;
  color: rgba(238, 241, 247, 0.88);
  box-shadow: none;
}

.video-gen-preview.can-toggle,
.video-gen-preview.has-video,
.video-gen-preview.has-image,
.script-node-preview {
  cursor: pointer;
}

.video-gen-preview.can-toggle:hover,
.video-gen-preview.has-video:hover,
.video-gen-preview.has-image:hover,
.script-node-preview:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.11);
}

.node-script .script-node-preview:hover {
  border-color: rgba(235, 239, 248, 0.68);
  background: #111318;
}

.node-agent .agent-gen-preview {
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  border-color: rgba(235, 239, 248, 0.52);
  border-radius: 12px;
  background: #111318;
  color: rgba(238, 241, 247, 0.9);
  box-shadow: none;
}

.node-agent .agent-gen-preview::before {
  content: none;
}

.node-agent .agent-gen-preview:hover {
  border-color: rgba(235, 239, 248, 0.52);
  background: #111318;
}

.node-agent .agent-gen-preview:hover::before {
  content: none;
}

.node-agent .agent-canvas-memory {
  position: relative;
  z-index: 1;
}

.video-gen-preview video,
.video-gen-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.24);
}

.video-gen-preview-failure {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74%, 220px);
  z-index: 5;
  min-height: 48px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 99, 99, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(93, 24, 28, 0.84), rgba(33, 18, 22, 0.82)),
    rgba(14, 16, 22, 0.86);
  color: #ffe1dc;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
}

.video-gen-preview-failure strong {
  color: #ffd0b7;
  font-size: clamp(11px, 3.4%, 13px);
  font-weight: 900;
  line-height: 1.15;
}

.video-gen-preview-failure span {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 236, 232, 0.9);
  font-size: clamp(10px, 3%, 12px);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-gen-preview img {
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.045) 50% 75%, transparent 75%),
    rgba(0, 0, 0, 0.22);
  background-size: 22px 22px;
}

.image-gen-preview-busy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 44%, rgba(240, 193, 116, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(7, 9, 13, 0.34), rgba(7, 9, 13, 0.7));
  color: #f5ead7;
  pointer-events: none;
  text-align: center;
  backdrop-filter: blur(3px);
}

.image-gen-preview-busy-ring {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
}

.image-gen-preview-busy-ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(240, 193, 116, 0.18);
  border-radius: 999px;
  background: rgba(240, 193, 116, 0.06);
}

.image-gen-preview-busy-ring span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(245, 210, 145, 0.95);
  box-shadow: 0 0 18px rgba(240, 193, 116, 0.55);
  transform-origin: 27px 27px;
  animation: imageGenBusyOrbit 1.28s linear infinite;
}

.image-gen-preview-busy-ring span:nth-child(2) {
  animation-delay: -0.42s;
  opacity: 0.72;
}

.image-gen-preview-busy-ring span:nth-child(3) {
  animation-delay: -0.84s;
  opacity: 0.48;
}

.image-gen-preview-busy strong {
  color: rgba(255, 246, 226, 0.96);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.image-gen-preview-busy small {
  max-width: min(74%, 260px);
  overflow: hidden;
  color: rgba(245, 236, 218, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-card-design-preview .image-gen-preview-busy {
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.42), rgba(7, 9, 13, 0.72));
  backdrop-filter: none;
  contain: paint;
  transform: translateZ(0);
}

.info-card-design-preview .image-gen-preview-busy-ring {
  width: 42px;
  height: 42px;
}

.info-card-design-preview .image-gen-preview-busy-ring::before {
  inset: 4px;
  border: 2px solid rgba(240, 193, 116, 0.22);
  border-top-color: rgba(245, 210, 145, 0.96);
  background: transparent;
  animation: infoCardBusySpin 0.96s linear infinite;
  will-change: transform;
}

.info-card-design-preview .image-gen-preview-busy-ring span {
  display: none;
  animation: none;
  box-shadow: none;
}

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

@keyframes imageGenBusyOrbit {
  from {
    transform: rotate(0deg) translateX(20px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateX(20px) rotate(-360deg);
  }
}

.generation-preview-tools,
.image-gen-preview-tools {
  position: absolute;
  right: clamp(8px, 3.2%, 16px);
  top: clamp(8px, 3.2%, 16px);
  z-index: 4;
  display: flex;
  gap: clamp(6px, 1.6%, 10px);
  align-items: center;
  pointer-events: auto;
}

.generation-preview-tool,
.image-gen-preview-tool {
  width: clamp(28px, 8%, 38px);
  height: clamp(28px, 8%, 38px);
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(11, 14, 20, 0.34);
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(14px, 3.5%, 17px);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0.72;
}

.generation-preview-tool:hover,
.image-gen-preview-tool:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(18, 22, 30, 0.58);
  transform: translateY(-1px);
}

.generation-preview-tool:active,
.image-gen-preview-tool:active {
  transform: translateY(0) scale(0.94);
}

.image-gen-result-strip {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 48px;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 2px 2px;
  scrollbar-width: thin;
}

.image-gen-result-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(237, 241, 247, 0.3);
  border-radius: 8px;
  background: rgba(12, 15, 20, 0.72);
  color: rgba(245, 248, 252, 0.78);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.image-gen-result-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-gen-result-thumb span {
  font-size: 13px;
  font-weight: 900;
}

.image-gen-result-thumb.status-pending,
.image-gen-result-thumb.status-running,
.image-gen-result-thumb.status-error,
.image-gen-result-thumb.status-cancelled {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(12, 15, 20, 0.74);
}

.image-gen-result-thumb.status-pending {
  color: rgba(245, 248, 252, 0.46);
}

.image-gen-result-thumb.status-running {
  border-color: rgba(246, 202, 128, 0.62);
  color: rgba(255, 232, 184, 0.95);
}

.image-gen-result-thumb.status-running::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background:
    conic-gradient(from 0deg, rgba(246, 202, 128, 0), rgba(246, 202, 128, 0.95), rgba(246, 202, 128, 0) 74%),
    radial-gradient(circle, rgba(246, 202, 128, 0.14), transparent 58%);
  -webkit-mask: radial-gradient(circle, transparent 0 50%, #000 52% 100%);
  mask: radial-gradient(circle, transparent 0 50%, #000 52% 100%);
  animation: imageGenSlotSpin 0.86s linear infinite;
  will-change: transform;
}

.image-gen-result-thumb.status-running::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f6ca80;
  box-shadow: 0 0 14px rgba(246, 202, 128, 0.72);
  animation: imageGenSlotGlow 1.25s ease-in-out infinite;
}

.image-gen-slot-spinner {
  width: 22px;
  height: 22px;
  display: block;
  border-radius: 999px;
}

.image-gen-result-thumb.status-error {
  border-color: rgba(255, 112, 112, 0.78);
  color: rgba(255, 142, 142, 0.96);
}

.image-gen-result-thumb.status-cancelled {
  border-color: rgba(172, 180, 194, 0.55);
  color: rgba(214, 220, 232, 0.72);
}

.image-gen-result-thumb small {
  position: absolute;
  right: 3px;
  bottom: 3px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.76);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.image-gen-result-thumb:hover,
.image-gen-result-thumb.active {
  border-color: rgba(246, 202, 128, 0.88);
}

.image-gen-result-thumb.active {
  box-shadow: 0 0 0 2px rgba(246, 202, 128, 0.24), 0 8px 18px rgba(0, 0, 0, 0.18);
}

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

@keyframes imageGenSlotGlow {
  0%,
  100% {
    opacity: 0.68;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.video-gen-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-items: center;
  justify-content: center;
  padding: 38px 34px;
}

.video-gen-empty small {
  color: rgba(223, 228, 236, 0.62);
  font-size: 13px;
}

.video-gen-play {
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
  padding-left: 2px;
  border: 2px solid rgba(226, 229, 236, 0.18);
  border-radius: 5px;
  background: transparent;
  color: rgba(226, 229, 236, 0.28);
  font-size: 14px;
  line-height: 1;
}

.video-gen-console {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 9px;
  left: 50%;
  top: calc(100% + 14px);
  width: 620px;
  max-width: calc(100vw - 48px);
  padding: 12px 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(24, 25, 29, 0.94), rgba(12, 13, 16, 0.96));
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.28);
  overflow: visible;
  transform: translateX(-50%) scale(var(--video-gen-console-scale, var(--canvas-inverse-scale, 1)));
  transform-origin: 50% 0;
}

.video-gen-panel.is-open::after {
  content: none;
}

.video-gen-tabs {
  position: relative;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 70px;
}

.video-gen-tabs button,
.video-gen-tools button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #8d929d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.video-gen-tabs button.active {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.105);
  color: #ffffff;
}

.video-gen-tabs button:hover,
.video-gen-tools button:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.075);
  color: #f4f4f5;
  transform: translateY(-1px);
}

.video-gen-tabs button:disabled {
  opacity: 0.48;
}

.video-gen-diagnostic-button {
  position: absolute;
  top: 0;
  right: 34px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 229, 236, 0.68);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.video-gen-diagnostic-button:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.video-gen-tools {
  display: flex;
  gap: 7px;
}

.video-gen-ref-slots {
  min-height: 60px;
  display: flex;
  gap: 10px;
  padding: 2px 2px 6px;
  overflow: visible;
}

.video-gen-ref-slots.is-empty {
  pointer-events: none;
}

.video-gen-ref-slots button,
.video-gen-ref-slot {
  position: relative;
  width: 64px;
  height: 54px;
  display: grid;
  grid-template-rows: 32px 13px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(226, 229, 236, 0.48);
  overflow: visible;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.video-gen-ref-slot {
  cursor: default;
}

.video-gen-ref-slots button .video-gen-ref-icon,
.video-gen-ref-slot .video-gen-ref-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  line-height: 1;
}

.video-gen-ref-fan,
.video-gen-ref-stack,
.video-gen-ref-empty-stack {
  position: relative;
  width: 44px;
  height: 32px;
  display: block;
  z-index: 1;
}

.video-gen-ref-fan i,
.video-gen-ref-stack i,
.video-gen-ref-item,
.video-gen-ref-add {
  position: absolute;
  left: 7px;
  top: 2px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(238, 229, 205, 0.9);
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
  transform: translateX(calc(var(--i) * 5px));
  transform-origin: 50% 50%;
  transition:
    width 0.18s ease,
    height 0.18s ease,
    border-color 0.18s ease,
    border-radius 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.video-gen-ref-item,
.video-gen-ref-add {
  cursor: pointer;
  user-select: none;
}

.video-gen-ref-item.is-audio {
  background:
    radial-gradient(circle at 50% 52%, rgba(89, 213, 143, 0.16), transparent 58%),
    rgba(22, 28, 33, 0.9);
  border-color: rgba(89, 213, 143, 0.34);
  color: rgba(211, 255, 230, 0.96);
}

.video-gen-ref-audio-icon {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
}

.video-gen-ref-audio-icon i {
  position: absolute;
  display: block;
}

.video-gen-ref-audio-icon .note-head {
  left: 3px;
  bottom: 3px;
  width: 9px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ecfff4, #62e39b);
  box-shadow: 0 0 10px rgba(86, 213, 143, 0.4);
  transform: rotate(-18deg);
}

.video-gen-ref-audio-icon .note-stem {
  left: 11px;
  top: 3px;
  width: 3px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ecfff4, #62e39b);
  box-shadow: 0 0 8px rgba(86, 213, 143, 0.32);
}

.video-gen-ref-audio-icon .note-flag {
  left: 13px;
  top: 3px;
  width: 8px;
  height: 5px;
  border-radius: 0 999px 999px 0;
  border-top: 3px solid #bfffd8;
  transform: rotate(14deg);
}

.video-gen-ref-audio-icon .wave {
  right: 0;
  top: 8px;
  border: 1.5px solid rgba(191, 255, 216, 0.8);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 999px 0 0;
  background: transparent;
  transform: rotate(45deg);
  opacity: 0.9;
}

.video-gen-ref-audio-icon .wave-a {
  width: 6px;
  height: 6px;
}

.video-gen-ref-audio-icon .wave-b {
  width: 10px;
  height: 10px;
  right: -3px;
  top: 6px;
  opacity: 0.55;
}

.video-gen-ref-icon.is-audio {
  background:
    radial-gradient(circle at 50% 52%, rgba(89, 213, 143, 0.14), transparent 62%),
    rgba(255, 255, 255, 0.045);
  color: rgba(211, 255, 230, 0.92);
}

.video-gen-ref-add {
  left: 9px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transform: translateX(22px) scale(0.86);
}

.video-gen-ref-fan i:nth-child(1),
.video-gen-ref-stack i:nth-child(1),
.video-gen-ref-stack .video-gen-ref-item:nth-child(1) {
  z-index: 4;
}

.video-gen-ref-fan i:nth-child(2),
.video-gen-ref-stack i:nth-child(2),
.video-gen-ref-stack .video-gen-ref-item:nth-child(2) {
  z-index: 3;
}

.video-gen-ref-fan i:nth-child(3),
.video-gen-ref-stack i:nth-child(3),
.video-gen-ref-stack .video-gen-ref-item:nth-child(3) {
  z-index: 2;
}

.video-gen-ref-fan i:nth-child(4),
.video-gen-ref-stack i:nth-child(4),
.video-gen-ref-stack .video-gen-ref-item:nth-child(4) {
  z-index: 1;
}

.video-gen-ref-fan img,
.video-gen-ref-stack img,
.video-gen-ref-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-gen-ref-item.is-video {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.video-gen-ref-item.is-video img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center;
  aspect-ratio: 1 / 1;
}

.video-gen-ref-fan b,
.video-gen-ref-stack b {
  position: absolute;
  right: -4px;
  top: -2px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(12, 14, 19, 0.88);
  color: #fff0c2;
  font-size: 9px;
  font-weight: 900;
  z-index: 6;
  transition:
    right 0.18s ease,
    top 0.18s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

.video-gen-ref-slots button small,
.video-gen-ref-slot small {
  display: block;
  max-width: 58px;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-ref-slots button:hover,
.video-gen-ref-slot:hover {
  z-index: 30;
  border-color: rgba(255, 255, 255, 0.105);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.video-gen-ref-slots button:hover .video-gen-ref-icon,
.video-gen-ref-slot:hover .video-gen-ref-icon {
  background: rgba(255, 255, 255, 0.115);
}

.video-gen-ref-slot:hover .video-gen-ref-stack,
.video-gen-ref-slot:hover .video-gen-ref-empty-stack,
.video-gen-ref-slots button:hover .video-gen-ref-stack,
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack {
  z-index: 40;
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-item,
.video-gen-ref-slots button:hover .video-gen-ref-stack i,
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack i {
  width: 40px;
  height: 40px;
  border-color: rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: rgba(22, 24, 30, 0.94);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  filter: saturate(1.08) brightness(1.08);
}

.video-gen-ref-slot:hover .video-gen-ref-add,
.video-gen-ref-slot:hover .video-gen-ref-empty-stack .video-gen-ref-add {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(22, 24, 30, 0.95);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.video-gen-ref-slot:hover .video-gen-ref-empty-stack .video-gen-ref-add {
  transform: translate(24px, -2px) scale(1);
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-item:nth-child(1) {
  transform: translate(-32px, -16px) rotate(-15deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-item:nth-child(2) {
  transform: translate(-10px, -28px) rotate(-5deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-item:nth-child(3) {
  transform: translate(14px, -28px) rotate(5deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-item:nth-child(4) {
  transform: translate(36px, -16px) rotate(15deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack .video-gen-ref-add {
  transform: translate(62px, -1px) rotate(20deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="1"] .video-gen-ref-item {
  transform: translate(1px, -25px) rotate(0deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="1"] .video-gen-ref-add {
  transform: translate(44px, -14px) rotate(0deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="2"] .video-gen-ref-item:nth-child(1) {
  transform: translate(-16px, -23px) rotate(-9deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="2"] .video-gen-ref-item:nth-child(2) {
  transform: translate(18px, -23px) rotate(9deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="2"] .video-gen-ref-add {
  transform: translate(51px, -10px) rotate(13deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="3"] .video-gen-ref-item:nth-child(1) {
  transform: translate(-25px, -18px) rotate(-13deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="3"] .video-gen-ref-item:nth-child(2) {
  transform: translate(1px, -30px) rotate(0deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="3"] .video-gen-ref-item:nth-child(3) {
  transform: translate(27px, -18px) rotate(13deg);
}

.video-gen-ref-slot:hover .video-gen-ref-stack[data-count="3"] .video-gen-ref-add {
  transform: translate(52px, -4px) rotate(18deg);
}

.node-video-gen:has(.video-gen-type-menu[open]) .video-gen-ref-slot,
.node-video-gen:has(.video-gen-model-menu[open]) .video-gen-ref-slot,
.node-video-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-slot,
.node-image-gen:has(.video-gen-type-menu[open]) .video-gen-ref-slot,
.node-image-gen:has(.video-gen-model-menu[open]) .video-gen-ref-slot,
.node-image-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-slot {
  z-index: 1;
}

.node-video-gen:has(.video-gen-type-menu[open]) .video-gen-ref-slot:hover,
.node-video-gen:has(.video-gen-model-menu[open]) .video-gen-ref-slot:hover,
.node-video-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-slot:hover,
.node-image-gen:has(.video-gen-type-menu[open]) .video-gen-ref-slot:hover,
.node-image-gen:has(.video-gen-model-menu[open]) .video-gen-ref-slot:hover,
.node-image-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-slot:hover {
  transform: none;
}

.node-video-gen:has(.video-gen-type-menu[open]) .video-gen-ref-add-cover,
.node-video-gen:has(.video-gen-model-menu[open]) .video-gen-ref-add-cover,
.node-video-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-add-cover,
.node-image-gen:has(.video-gen-type-menu[open]) .video-gen-ref-add-cover,
.node-image-gen:has(.video-gen-model-menu[open]) .video-gen-ref-add-cover,
.node-image-gen:has(.video-gen-spec-menu[open]) .video-gen-ref-add-cover {
  pointer-events: none;
  z-index: 1 !important;
}

.video-gen-ref-item:hover,
.video-gen-ref-add:hover {
  border-color: rgba(255, 230, 179, 0.72) !important;
  color: #ffe8b8;
  filter: saturate(1.16) brightness(1.16);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack i:nth-child(1),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack i:nth-child(1) {
  transform: translate(-32px, -16px) rotate(-15deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack i:nth-child(2),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack i:nth-child(2) {
  transform: translate(-10px, -28px) rotate(-5deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack i:nth-child(3),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack i:nth-child(3) {
  transform: translate(14px, -28px) rotate(5deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack i:nth-child(4),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack i:nth-child(4) {
  transform: translate(36px, -16px) rotate(15deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="1"] i:nth-child(1),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="1"] i:nth-child(1) {
  transform: translate(1px, -25px) rotate(0deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="2"] i:nth-child(1),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="2"] i:nth-child(1) {
  transform: translate(-16px, -23px) rotate(-9deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="2"] i:nth-child(2),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="2"] i:nth-child(2) {
  transform: translate(18px, -23px) rotate(9deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="3"] i:nth-child(1),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="3"] i:nth-child(1) {
  transform: translate(-25px, -18px) rotate(-13deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="3"] i:nth-child(2),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="3"] i:nth-child(2) {
  transform: translate(1px, -30px) rotate(0deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack[data-count="3"] i:nth-child(3),
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack[data-count="3"] i:nth-child(3) {
  transform: translate(27px, -18px) rotate(13deg);
}

.video-gen-ref-slots button:hover .video-gen-ref-stack b,
.video-gen-ref-slots button:focus-visible .video-gen-ref-stack b {
  top: -22px;
  right: -18px;
  transform: scale(1.04);
}

.video-gen-reference-empty,
.video-gen-reference-list {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.14);
}

.video-gen-reference-empty {
  padding: 10px 12px;
  color: #8f929a;
  font-size: 12px;
  line-height: 1.45;
}

.video-gen-reference-list {
  max-height: 88px;
  display: grid;
  gap: 7px;
  padding: 8px;
  overflow: auto;
}

.image-gen-reference-list {
  max-height: 78px;
}

.image-gen-reference-hint {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(240, 193, 116, 0.16);
  border-radius: 999px;
  background: rgba(240, 193, 116, 0.07);
  color: rgba(246, 216, 170, 0.9);
  font-size: 11px;
  font-weight: 700;
}

.video-gen-reference-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.video-gen-reference-thumb {
  width: 52px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #d9bd8c;
  font-size: 12px;
  font-weight: 700;
}

.video-gen-reference-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-gen-reference-thumb.video {
  color: #c7efff;
}

.video-gen-reference-thumb.text {
  color: #dbd0ff;
}

.video-gen-reference-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.video-gen-reference-head {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.video-gen-reference-head strong {
  min-width: 0;
  overflow: hidden;
  color: #edf1f7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-reference-head span,
.video-gen-reference-main small {
  color: #9ca6b5;
  font-size: 11px;
}

.video-gen-reference-main small.warn {
  color: #f0c174;
}

.video-gen-reference-main small.asset {
  color: #bdeaff;
}

.video-gen-reference-item.pending {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.026);
}

.video-gen-reference-item.pending .video-gen-reference-main small {
  color: rgba(232, 219, 178, 0.72);
}

.video-gen-reference-mention {
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(240, 193, 116, 0.24);
  border-radius: 7px;
  background: rgba(240, 193, 116, 0.11);
  color: #ffe3a7;
  font-size: 11px;
  font-weight: 800;
}

.video-gen-reference-mention:hover {
  border-color: rgba(240, 193, 116, 0.42);
  background: rgba(240, 193, 116, 0.18);
  color: #fff2c8;
}

.video-gen-reference-head select,
.video-gen-reference-url {
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #f4f4f5;
  font-size: 11px;
}

.video-gen-reference-url::placeholder {
  color: rgba(223, 228, 236, 0.36);
}

.video-gen-reference-head select {
  width: 88px;
  padding: 0 20px 0 7px;
}

.video-gen-reference-url {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
}

.node-video-gen.reference-drag-over,
.node-image-gen.reference-drag-over {
  border-color: transparent;
  box-shadow: none;
}

.node-video-gen.reference-drag-over .video-gen-preview,
.node-image-gen.reference-drag-over .image-gen-preview {
  border-color: rgba(240, 193, 116, 0.74);
  box-shadow: 0 0 0 4px rgba(240, 193, 116, 0.12), 0 18px 55px rgba(0, 0, 0, 0.24);
}

.node-image-gen.reference-link-over .image-gen-preview,
.node-video-gen.reference-link-over .video-gen-preview,
.node-video-gen .video-gen-preview.reference-link-over,
.node-image-gen.link-target .image-gen-preview {
  border-color: rgba(112, 158, 255, 0.92);
  box-shadow:
    0 0 0 4px rgba(112, 158, 255, 0.18),
    0 0 34px rgba(112, 158, 255, 0.24),
    0 18px 55px rgba(0, 0, 0, 0.24);
  animation: referenceLinkHoverPulse 1.05s ease-in-out infinite;
}

.video-gen-ref-slot.reference-link-over {
  border-color: rgba(240, 193, 116, 0.86);
  background: rgba(240, 193, 116, 0.1);
  color: rgba(255, 235, 198, 0.96);
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 0 3px rgba(240, 193, 116, 0.16),
    0 10px 26px rgba(240, 193, 116, 0.16);
}

.video-gen-ref-slot.reference-link-over .video-gen-ref-icon,
.video-gen-ref-slot.reference-link-over .video-gen-ref-empty-stack,
.video-gen-ref-slot.reference-link-over .video-gen-ref-stack {
  filter: brightness(1.2) saturate(1.12);
}

.image-gen-preview.reference-link-success,
.video-gen-preview.reference-link-success,
.video-gen-ref-slot.reference-link-success {
  animation: referenceLinkSuccessPulse 0.68s ease-out;
}

@keyframes referenceLinkHoverPulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.08);
  }
}

@keyframes referenceLinkSuccessPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(97, 189, 131, 0.72), 0 18px 55px rgba(0, 0, 0, 0.24);
    transform: scale(0.992);
  }
  48% {
    box-shadow: 0 0 0 8px rgba(97, 189, 131, 0.28), 0 0 36px rgba(97, 189, 131, 0.24);
    transform: scale(1.018);
  }
  100% {
    box-shadow: 0 0 0 15px rgba(97, 189, 131, 0), 0 18px 55px rgba(0, 0, 0, 0.24);
    transform: scale(1);
  }
}

.video-gen-prompt-shell {
  position: relative;
  min-width: 0;
}

.video-gen-prompt {
  width: 100%;
  min-height: 104px;
  max-height: 168px;
  overflow: auto;
  resize: vertical;
  padding: 10px 12px 34px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(240, 193, 116, 0.035);
  color: #edf1f7;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.video-gen-prompt-expand {
  position: absolute;
  right: 11px;
  bottom: 9px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(226, 229, 236, 0.72);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.76;
  transition: opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.video-gen-prompt-expand::before,
.video-gen-prompt-expand::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-color: currentColor;
  border-style: solid;
  opacity: 0.94;
}

.video-gen-prompt-expand::before {
  top: 6px;
  right: 6px;
  border-width: 2px 2px 0 0;
}

.video-gen-prompt-expand::after {
  left: 6px;
  bottom: 6px;
  border-width: 0 0 2px 2px;
}

.video-gen-prompt-shell:hover .video-gen-prompt-expand,
.video-gen-prompt-expand:focus-visible {
  opacity: 1;
}

.video-gen-prompt-expand:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.image-gen-prompt-stack {
  display: grid;
  gap: 8px;
}

.node-image-gen .image-gen-main-prompt-shell .video-gen-prompt {
  min-height: 104px;
  padding-right: 104px;
  padding-bottom: 42px;
}

.info-card-embedded-image-gen .image-gen-main-prompt-shell .video-gen-prompt {
  padding-right: 44px;
}

.info-card-embedded-image-gen,
.info-card-embedded-image-gen .video-gen-console,
.info-card-embedded-image-gen .image-gen-console,
.info-card-embedded-image-gen .video-gen-tabs,
.info-card-embedded-image-gen .video-gen-meta,
.info-card-embedded-image-gen .image-gen-meta,
.info-card-embedded-image-gen .video-gen-prompt-shell,
.info-card-embedded-image-gen .image-gen-prompt-stack {
  min-width: 0;
  max-width: 100%;
}

.info-card-embedded-image-gen .video-gen-console,
.info-card-embedded-image-gen .image-gen-console {
  overflow-x: hidden;
}

.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) {
  position: relative;
  z-index: 360;
  overflow: visible;
}

.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-console,
.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .image-gen-console {
  position: relative;
  z-index: 380;
  overflow: visible;
}

.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .image-gen-prompt-stack,
.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-prompt-shell,
.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-prompt {
  position: relative;
  z-index: 0;
}

.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-meta,
.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .image-gen-meta,
.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-spec-menu[open] {
  position: relative;
  z-index: 420;
}

.info-card-embedded-image-gen:has(.video-gen-spec-menu[open]) .video-gen-spec-popover {
  z-index: 430;
  isolation: isolate;
  background: #15161a;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.info-card-embedded-image-gen .image-gen-spec-menu {
  flex: 0 1 auto;
}

.info-card-embedded-image-gen .video-gen-spec-popover {
  left: 50%;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.72);
  transform: translate(calc(-50% + var(--video-gen-spec-popover-freeze-x, 0px)), var(--video-gen-spec-popover-freeze-y, 0px));
}

.info-card-embedded-image-gen .video-gen-spec-popover::after {
  left: 50%;
  background: #15161a;
  transform: translateX(-50%) rotate(45deg);
}

.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-segment,
.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-ratio-strip,
.info-card-embedded-image-gen .video-gen-spec-popover .image-gen-auto-size,
.info-card-embedded-image-gen .video-gen-spec-popover .image-gen-custom-size-fields label {
  background: #27282e;
}

.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-ratio-option:hover,
.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-spec-option:hover {
  background: #363840;
}

.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-ratio-option.active,
.info-card-embedded-image-gen .video-gen-spec-popover .video-gen-spec-option.active {
  background: #55575f;
}

.image-gen-prompt-multi-angle {
  position: absolute;
  right: 44px;
  bottom: 9px;
  width: 58px;
  height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(240, 193, 116, 0.2);
  border-radius: 8px;
  background: rgba(240, 193, 116, 0.12);
  color: #f6ddb0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.86;
  white-space: nowrap;
  transition: opacity 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.image-gen-prompt-multi-angle:hover,
.image-gen-prompt-multi-angle:focus-visible {
  opacity: 1;
  border-color: rgba(240, 193, 116, 0.34);
  background: rgba(240, 193, 116, 0.18);
  color: #ffe9bd;
}

.image-style-preset-editor {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(240, 193, 116, 0.13);
  border-radius: 12px;
  background: rgba(240, 193, 116, 0.045);
}

.image-style-preset-head {
  min-height: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.image-style-preset-head span {
  min-width: 0;
  overflow: hidden;
  color: rgba(246, 248, 252, 0.9);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-style-preset-head small {
  color: rgba(240, 193, 116, 0.72);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.image-style-preset-editor textarea {
  min-height: 58px;
  max-height: 104px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  outline: none;
  background: rgba(5, 6, 8, 0.24);
  color: #e9edf5;
  font-size: 12px;
  line-height: 1.45;
}

.image-style-preset-editor textarea:focus {
  border-color: rgba(240, 193, 116, 0.32);
  background: rgba(8, 9, 12, 0.36);
}

.image-gen-style-button {
  width: 76px;
  min-width: 76px;
  height: 50px;
  min-height: 50px;
  display: inline-grid;
  grid-template-rows: 26px 18px;
  place-items: center;
  align-content: start;
  gap: 1px;
  padding: 1px 4px 3px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(226, 229, 236, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.image-gen-style-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 229, 236, 0.5);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.image-gen-style-copy {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-rows: 10px 8px;
  gap: 0;
  justify-items: center;
}

.image-gen-style-copy b,
.image-gen-style-copy small {
  max-width: 68px;
  overflow: hidden;
  color: inherit;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-gen-style-copy b {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
}

.image-gen-style-copy small {
  color: rgba(246, 216, 170, 0.66);
  font-size: 7px;
  font-weight: 700;
}

.image-gen-style-button:hover,
.image-gen-style-button.has-style {
  border-color: rgba(255, 255, 255, 0.105);
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
  transform: translateY(-1px);
}

.image-gen-style-button.has-style {
  color: rgba(246, 216, 170, 0.92);
}

.image-gen-style-button.has-style .image-gen-style-copy {
  grid-template-rows: 10px 8px;
}

.image-gen-style-button.has-style .image-gen-style-copy b {
  color: rgba(238, 241, 247, 0.88);
  font-size: 10px;
}

.image-gen-style-button.has-style .image-gen-style-copy small {
  display: block;
}

.image-gen-style-button.has-style .image-gen-style-mark {
  background: rgba(240, 193, 116, 0.12);
  color: rgba(246, 216, 170, 0.92);
}

.asset-prompt-editor {
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}

.video-gen-prompt:focus {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035);
}

.asset-prompt-editor[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: rgba(223, 228, 236, 0.34);
  pointer-events: none;
}

.asset-mention-chip {
  max-width: 184px;
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  margin: 0 2px;
  padding: 1px 7px 2px;
  border: 1px solid rgba(240, 193, 116, 0.38);
  border-radius: 999px;
  background: rgba(240, 193, 116, 0.13);
  color: #ffe1a7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-mention-chip:hover {
  border-color: rgba(240, 193, 116, 0.68);
  background: rgba(240, 193, 116, 0.2);
  color: #fff0ce;
}

.node-mention-chip {
  border-color: rgba(125, 190, 255, 0.38);
  background: rgba(125, 190, 255, 0.13);
  color: #cfe8ff;
}

.node-mention-chip:hover {
  border-color: rgba(125, 190, 255, 0.68);
  background: rgba(125, 190, 255, 0.2);
  color: #edf8ff;
}

.video-gen-meta {
  min-height: 40px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  color: #f4f4f5;
  font-size: 12px;
}

.video-gen-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.video-gen-kind {
  color: #f0f1f5;
  font-weight: 800;
}

.video-gen-meta-separator {
  color: rgba(226, 229, 236, 0.38);
}

.video-gen-type-menu,
.video-gen-model-menu {
  position: relative;
  overflow: visible;
}

.video-gen-type-menu[open],
.video-gen-model-menu[open],
.video-gen-spec-menu[open] {
  z-index: 180;
}

.video-gen-type-menu {
  flex: 0 0 auto;
}

.video-gen-model-menu {
  min-width: 126px;
}

.video-gen-type-menu > summary,
.video-gen-model-menu > summary {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 148px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(232, 235, 242, 0.78);
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.video-gen-type-menu > summary {
  max-width: none;
  padding-left: 8px;
}

.video-gen-type-menu > summary::-webkit-details-marker,
.video-gen-model-menu > summary::-webkit-details-marker {
  display: none;
}

.video-gen-type-menu > summary b {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.video-gen-type-menu > summary span,
.video-gen-model-menu > summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-type-menu > summary i,
.video-gen-model-menu > summary i {
  font-style: normal;
  transition: transform 0.16s ease;
}

.video-gen-type-menu:hover > summary,
.video-gen-type-menu[open] > summary,
.video-gen-model-menu:hover > summary,
.video-gen-model-menu[open] > summary {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
}

.video-gen-type-menu[open] > summary i,
.video-gen-model-menu[open] > summary i {
  transform: rotate(180deg);
}

.video-gen-type-popover,
.video-gen-model-popover {
  position: absolute;
  left: 0;
  bottom: 38px;
  z-index: 190;
  width: 184px;
  max-height: 292px;
  padding: 7px;
  overflow: auto;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(18, 18, 19, 0.98);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.52);
}

.video-gen-type-popover {
  width: 136px;
  padding: 6px;
}

.video-gen-type-popover button,
.video-gen-model-popover button {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  padding: 0 7px 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f1f2f5;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.video-gen-type-popover button {
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  min-height: 34px;
  padding: 0 7px;
  color: rgba(241, 242, 245, 0.92);
}

.video-gen-type-popover button b {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.video-gen-model-popover button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-model-popover button small {
  min-width: 0;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.video-gen-model-popover button.disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.44);
}

.video-gen-type-popover button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-type-popover button em {
  color: #ffffff;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  text-align: center;
}

.video-gen-model-popover button b {
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
}

.video-gen-type-popover button:hover,
.video-gen-type-popover button.active,
.video-gen-model-popover button:hover,
.video-gen-model-popover button.active {
  background: rgba(255, 255, 255, 0.08);
}

.video-gen-meta select {
  height: 34px;
  max-width: 148px;
  padding: 0 22px 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
  background: transparent;
  color: rgba(232, 235, 242, 0.78);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.video-gen-meta select[data-node-data-field="seedanceModel"] {
  width: 142px;
  max-width: none;
}

.video-gen-meta select:hover,
.video-gen-meta select:focus {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.065);
  color: #ffffff;
}

.video-gen-advanced input,
.video-gen-advanced select,
.video-gen-task-controls input,
.video-gen-task-controls select {
  height: 26px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #f4f4f5;
  font-size: 12px;
}

.video-gen-spec-menu {
  position: relative;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.image-gen-spec-menu {
  flex: 0 0 208px;
  width: 208px;
  max-width: 208px;
}

.image-gen-spec-menu .video-gen-spec-popover {
  left: 50%;
  transform: translateX(-50%);
}

.image-gen-spec-menu .video-gen-spec-popover::after {
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.video-gen-spec-menu > summary {
  min-width: 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: rgba(232, 235, 242, 0.78);
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.video-gen-spec-menu > summary::-webkit-details-marker {
  display: none;
}

.video-gen-spec-menu > summary:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  transform: translateY(-1px);
}

.video-gen-spec-menu[open] > summary {
  border-color: rgba(240, 193, 116, 0.28);
  background: rgba(240, 193, 116, 0.1);
}

.video-gen-spec-menu > summary i {
  font-style: normal;
  transition: transform 0.16s ease;
}

.video-gen-spec-menu[open] > summary i {
  transform: rotate(180deg);
}

.video-gen-spec-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-gen-type-menu > summary span,
.video-gen-model-menu > summary span,
.video-gen-spec-summary {
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.video-gen-type-menu > summary i,
.video-gen-model-menu > summary i,
.video-gen-spec-menu > summary i {
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1;
}

.video-gen-spec-popover {
  position: absolute;
  left: 0;
  bottom: 46px;
  z-index: 190;
  width: 390px;
  display: grid;
  gap: 12px;
  padding: 14px;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(20, 21, 23, 0.98);
  color: #f1f3f6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  transform: translate(var(--video-gen-spec-popover-freeze-x, 0), var(--video-gen-spec-popover-freeze-y, 0));
}

.happyhorse-spec-menu .video-gen-spec-popover {
  left: 50%;
  width: 318px;
  max-width: min(318px, calc(100vw - 32px));
  gap: 10px;
  padding: 12px;
  box-sizing: border-box;
  transform: translate(calc(-50% + var(--video-gen-spec-popover-freeze-x, 0px)), var(--video-gen-spec-popover-freeze-y, 0px));
}

.happyhorse-spec-menu .video-gen-spec-popover::after {
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}

.happyhorse-spec-menu .video-gen-spec-section {
  min-width: 0;
  gap: 7px;
}

.happyhorse-spec-menu .video-gen-spec-head {
  min-width: 0;
  gap: 8px;
}

.happyhorse-spec-menu .video-gen-spec-head strong,
.happyhorse-spec-menu .video-gen-spec-head span {
  min-width: 0;
  white-space: nowrap;
}

.video-gen-spec-popover::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(20, 21, 24, 0.98);
  transform: rotate(45deg);
}

.video-gen-spec-section {
  display: grid;
  gap: 8px;
}

.video-gen-spec-section.compact {
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.video-gen-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(232, 235, 242, 0.7);
  font-size: 12px;
}

.video-gen-spec-head strong {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(232, 235, 242, 0.72);
  font-weight: 700;
}

.video-gen-spec-head b {
  color: #d4d7df;
  font-size: 12px;
}

.video-gen-spec-head span {
  color: #d8dbe2;
  font-weight: 800;
}

.video-gen-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  align-items: center;
  gap: 10px;
}

.happyhorse-spec-menu .video-gen-duration-control {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.video-gen-duration-control input[type="range"] {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  height: 18px;
  padding: 0;
  accent-color: rgba(180, 186, 198, 0.78);
  background: transparent;
}

.video-gen-duration-control input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.video-gen-duration-control input[type="range"]::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: #b9bec8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
}

.video-gen-segment {
  display: grid;
  gap: 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
}

.video-gen-segment.ratio {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-gen-segment.quality {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.happyhorse-quality-segment {
  justify-self: stretch;
  width: 100%;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.happyhorse-quality-segment .video-gen-spec-option {
  min-width: 0;
}

.image-gen-quality-segment {
  width: max-content;
  max-width: 100%;
  grid-template-columns: repeat(4, auto);
}

.image-gen-quality-segment .video-gen-spec-option {
  min-width: 72px;
}

.video-gen-segment.toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-gen-segment.wide {
  min-height: 34px;
}

.image-gen-size-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  row-gap: 4px;
}

.image-gen-scale-segment {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-gen-scale-segment .video-gen-spec-option {
  min-width: 0;
}

.image-gen-inline-settings {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: 10px;
}

.image-gen-inline-settings .video-gen-spec-section.compact {
  grid-template-columns: 1fr;
  gap: 7px;
}

.image-gen-format-segment {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-gen-count-segment {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-gen-ratio-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  padding: 6px 6px 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
}

.happyhorse-spec-menu .video-gen-ratio-strip {
  width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 6px;
}

.happyhorse-spec-menu .video-gen-ratio-option {
  width: auto;
  min-width: 0;
  height: 45px;
  justify-self: stretch;
  grid-template-rows: 20px 14px;
  gap: 1px;
  padding: 4px 2px;
}

.video-gen-ratio-option {
  min-width: 0;
  height: 54px;
  display: grid;
  grid-template-rows: 22px 16px;
  place-items: center;
  gap: 2px;
  padding: 5px 3px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(218, 222, 230, 0.48);
  font-size: 10px;
  font-weight: 700;
}

.video-gen-ratio-option i {
  width: 16px;
  height: 12px;
  display: block;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.video-gen-ratio-option i.ratio-16-9 {
  width: 17px;
  height: 10px;
}

.video-gen-ratio-option i.ratio-4-3 {
  width: 15px;
  height: 12px;
}

.video-gen-ratio-option i.ratio-3-2 {
  width: 17px;
  height: 11px;
}

.video-gen-ratio-option i.ratio-2-3 {
  width: 11px;
  height: 17px;
}

.video-gen-ratio-option i.ratio-1-1 {
  width: 13px;
  height: 13px;
}

.video-gen-ratio-option i.ratio-3-4 {
  width: 12px;
  height: 15px;
}

.video-gen-ratio-option i.ratio-9-16 {
  width: 9px;
  height: 16px;
}

.video-gen-ratio-option i.ratio-7-10 {
  width: 11px;
  height: 16px;
}

.video-gen-ratio-option i.ratio-21-9 {
  width: 18px;
  height: 8px;
}

.video-gen-ratio-option i.ratio-panorama {
  width: 19px;
  height: 9px;
}

.video-gen-ratio-option i.ratio-wide {
  width: 17px;
  height: 11px;
}

.video-gen-ratio-option i.ratio-tall {
  width: 11px;
  height: 17px;
}

.video-gen-ratio-option i.ratio-adaptive {
  width: 15px;
  height: 15px;
  border-style: dashed;
}

.video-gen-ratio-option i.ratio-custom {
  position: relative;
  width: 15px;
  height: 15px;
  border-style: solid;
}

.video-gen-ratio-option i.ratio-custom::before,
.video-gen-ratio-option i.ratio-custom::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%);
}

.video-gen-ratio-option i.ratio-custom::after {
  top: 3px;
  bottom: 3px;
  left: 50%;
  right: auto;
  width: 1.5px;
  height: auto;
  transform: translateX(-50%);
}

.image-gen-custom-size-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.image-gen-custom-size-fields label {
  height: 34px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.image-gen-custom-size-fields span {
  color: rgba(231, 235, 244, 0.68);
  font-size: 11px;
  font-weight: 800;
}

.image-gen-custom-size-fields input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
}

.image-gen-auto-size {
  min-height: 36px;
  align-content: center;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.video-gen-ratio-option:hover {
  color: rgba(244, 246, 250, 0.86);
  background: rgba(255, 255, 255, 0.06);
}

.video-gen-ratio-option.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.video-gen-spec-option {
  min-width: 0;
  height: 28px;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(207, 212, 222, 0.5);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.video-gen-spec-option span {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-gen-spec-option small {
  color: #8f96a3;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.video-gen-spec-option:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: none;
}

.video-gen-spec-option.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.video-gen-spec-option.active small {
  color: rgba(255, 255, 255, 0.5);
}

.video-gen-spec-option.disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.video-gen-spec-option.disabled:hover {
  border-color: transparent;
  background: transparent;
  color: rgba(207, 212, 222, 0.5);
  transform: none;
}

.video-gen-cost {
  height: 34px;
  min-width: 72px;
  padding: 0 10px;
  justify-content: center;
  color: rgba(246, 216, 170, 0.82);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  border: 1px solid rgba(246, 216, 170, 0.12);
  background: rgba(246, 216, 170, 0.055);
  white-space: nowrap;
}

.video-gen-cost.actual {
  color: rgba(191, 238, 255, 0.94);
  border-color: rgba(116, 211, 255, 0.18);
  background: rgba(116, 211, 255, 0.07);
}

.video-gen-cost.estimated {
  color: rgba(246, 216, 170, 0.84);
}

.video-gen-submit {
  margin-left: auto;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #0b0c10;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 26px rgba(255, 255, 255, 0.12);
}

.video-gen-submit.is-busy {
  position: relative;
  color: transparent;
  background: rgba(255, 255, 255, 0.92);
  opacity: 1 !important;
  cursor: progress;
}

.video-gen-submit.is-busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11, 12, 16, 0.18);
  border-top-color: rgba(11, 12, 16, 0.86);
  border-radius: 50%;
  animation: videoGenSpin 0.86s linear infinite;
}

@keyframes videoGenSpin {
  to {
    transform: rotate(360deg);
  }
}

.video-gen-foldout {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.video-gen-foldout summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  cursor: pointer;
  list-style: none;
  color: #dfe4ec;
  font-size: 12px;
  user-select: none;
}

.video-gen-foldout summary::-webkit-details-marker {
  display: none;
}

.video-gen-foldout summary::before {
  content: "›";
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.065);
  color: #f0c174;
  font-size: 14px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.16s ease, background 0.16s ease;
}

.video-gen-foldout[open] summary::before {
  background: rgba(240, 193, 116, 0.14);
  transform: rotate(90deg);
}

.video-gen-foldout summary span {
  color: #edf1f7;
  font-weight: 700;
  white-space: nowrap;
}

.video-gen-foldout summary small {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #8f929a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-foldout[open] {
  background: rgba(255, 255, 255, 0.045);
}

.video-gen-settings-drawer {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  border: 0;
  background: transparent;
  overflow: visible;
}

.video-gen-settings-drawer > summary {
  width: 30px;
  min-height: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 229, 236, 0.68);
}

.video-gen-settings-drawer > summary span {
  color: inherit;
  font-size: 15px;
  line-height: 1;
}

.video-gen-settings-drawer > summary small,
.video-gen-settings-drawer > summary::before {
  display: none;
}

.video-gen-settings-drawer[open] > summary {
  border-color: rgba(240, 193, 116, 0.34);
  background: rgba(240, 193, 116, 0.12);
  color: #f0c174;
}

.video-gen-settings-content {
  position: absolute;
  top: 34px;
  right: 0;
  width: min(560px, calc(100vw - 48px));
  max-height: 70vh;
  display: grid;
  gap: 8px;
  padding: 9px;
  overflow: auto;
  border: 1px solid rgba(240, 193, 116, 0.16);
  border-radius: 10px;
  background: rgba(22, 24, 29, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

.video-gen-foldout[open] > .video-gen-advanced,
.video-gen-foldout[open] > .video-gen-taskbar,
.video-gen-foldout[open] > .video-gen-request-preview {
  margin: 0 8px 8px;
}

.video-gen-advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
}

.video-gen-advanced-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: #c9d0dc;
  font-size: 12px;
}

.video-gen-advanced-field > span {
  color: #9fa8b8;
  white-space: nowrap;
}

.video-gen-advanced-field small {
  grid-column: 2;
  color: rgba(223, 228, 236, 0.48);
  font-size: 10px;
  line-height: 1.25;
}

.video-gen-advanced-check {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
  color: #c9d0dc;
  font-size: 12px;
}

.video-gen-advanced-check input {
  width: 13px;
  height: 13px;
  accent-color: #d49b55;
}

.video-gen-taskbar {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.video-gen-request-preview {
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
  color: #c9d0dc;
  font-size: 12px;
}

.video-gen-request-title {
  color: #f0d5ac;
  font-weight: 700;
}

.video-gen-request-preview pre {
  max-height: 112px;
  margin: 8px 0 0;
  overflow: auto;
  color: #dfe4ec;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.video-gen-diagnostic-hint {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 123, 84, 0.28);
  border-radius: 9px;
  background: rgba(255, 123, 84, 0.08);
  color: #ffd5c7;
  font-size: 12px;
}

.video-gen-diagnostic-hint strong {
  color: #ffe6db;
  font-size: 12px;
}

.video-gen-diagnostic-hint span {
  min-width: 0;
  overflow: hidden;
  color: #ffb8a6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-diagnostic-hint button {
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 184, 166, 0.34);
  border-radius: 7px;
  background: rgba(255, 184, 166, 0.1);
  color: #ffe6db;
  font-size: 12px;
}

.video-gen-task-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.video-gen-task-controls button {
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: #dfe4ec;
  font-size: 12px;
}

.video-gen-task-controls select {
  max-width: 132px;
}

.video-gen-task-controls input {
  width: 58px;
}

.video-gen-task-controls input[placeholder="Endpoint筛选"],
.video-gen-task-controls input[placeholder="任务ID筛选"] {
  width: 118px;
}

.video-gen-task-empty {
  color: #8f929a;
  font-size: 12px;
}

.video-gen-task-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}

.video-gen-task-summary p {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  color: #9fa8b8;
  font-size: 11px;
}

.video-gen-task-summary b {
  overflow: hidden;
  color: #edf1f7;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-api-coverage {
  display: grid;
  gap: 10px;
}

.video-gen-api-coverage article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.video-gen-api-coverage strong {
  color: #fff1d4;
}

.video-gen-api-coverage code {
  color: #c7efff;
  font-size: 12px;
}

.video-gen-api-coverage p {
  margin: 0;
  color: #c9d0dc;
  font-size: 12px;
  line-height: 1.55;
}

.video-gen-preview-dialog {
  display: grid;
  gap: 10px;
}

.video-gen-preview-dialog video {
  width: min(76vw, 960px);
  max-height: 68vh;
  display: block;
  border-radius: 10px;
  background: #050608;
}

.image-gen-preview-dialog {
  display: grid;
  gap: 10px;
}

.image-gen-preview-dialog img {
  width: min(78vw, 1080px);
  max-height: 72vh;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.045) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.045) 50% 75%, transparent 75%),
    #050608;
  background-size: 22px 22px;
}

.video-gen-preview-dialog p,
.image-gen-preview-dialog p {
  margin: 0;
  color: #c9d0dc;
  font-size: 12px;
}

.media-preview-floating {
  position: fixed;
  z-index: 60;
  inset: 12px;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.media-preview-floating[hidden] {
  display: none;
}

.media-preview-exclusive-backdrop {
  position: fixed;
  inset: 0;
  z-index: 71;
  background: rgba(3, 5, 8, 0.34);
  backdrop-filter: none;
  cursor: default;
  pointer-events: auto;
}

.media-preview-exclusive-backdrop[hidden] {
  display: none;
}

.media-preview-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  color: #edf2fb;
}

.media-preview-head {
  display: none;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  cursor: move;
}

.media-preview-head strong,
.media-preview-head span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-preview-head strong {
  font-size: 13px;
}

.media-preview-head span {
  margin-top: 3px;
  color: rgba(218, 226, 238, 0.62);
  font-size: 11px;
}

.media-preview-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.media-preview-close,
.media-preview-download {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1;
  padding: 0;
}

.media-preview-download:hover {
  background: rgba(212, 155, 85, 0.28);
  border-color: rgba(255, 210, 142, 0.5);
  color: #fff;
}

.media-preview-close:hover {
  background: rgba(220, 90, 90, 0.35);
  border-color: rgba(255, 142, 142, 0.48);
  color: #fff;
}

.media-preview-body {
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  display: block;
  padding: 0;
  background: transparent;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  scrollbar-width: thin;
}

.media-preview-content {
  min-width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
}

.media-preview-body img,
.media-preview-body video {
  max-width: none;
  max-height: none;
  display: block;
  object-fit: contain;
  border-radius: 0;
  background: #050608;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  user-select: none;
}

.media-preview-floating.is-zoomed .media-preview-body {
  cursor: grab;
}

.media-preview-floating.is-panning .media-preview-body {
  cursor: grabbing;
}

.panorama-3d-floating {
  z-index: 72;
  inset: 18px;
  background: rgba(3, 5, 8, 0.74);
  backdrop-filter: blur(10px);
}

.panorama-3d-floating.panorama-splat-floating {
  inset: 50%;
  width: min(82vw, calc(100vw - 168px));
  height: min(78vh, calc(100vh - 128px));
  transform: translate(-50%, -50%);
}

.panorama-3d-floating.supersplat-floating {
  inset: 50%;
  width: min(88vw, calc(100vw - 116px));
  height: min(88vh, calc(100vh - 72px));
  transform: translate(-50%, -50%);
  background: rgba(3, 5, 8, 0.42);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.panorama-3d-floating.supersplat-floating.is-supersplat-fullscreen {
  inset: 0;
  width: 100vw;
  height: 100vh;
  transform: none;
  background: rgba(3, 5, 8, 0.92);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.supersplat-window {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #202020;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.supersplat-window--startup {
  background: #202020;
}

.supersplat-startup-body {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 36%),
    #111;
}

.supersplat-startup-card {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(36, 36, 36, 0.92);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
  color: rgba(245, 247, 250, 0.94);
  text-align: center;
}

.supersplat-startup-card::after {
  content: "";
  width: 22px;
  height: 22px;
  margin-top: 8px;
  border: 2px solid rgba(235, 242, 252, 0.2);
  border-top-color: rgba(235, 242, 252, 0.86);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.supersplat-startup-card strong {
  font-size: 14px;
}

.supersplat-startup-card span {
  color: rgba(213, 224, 239, 0.68);
  font-size: 11px;
  line-height: 1.55;
}

.is-supersplat-fullscreen .supersplat-window {
  border-radius: 0;
  border-color: transparent;
  box-shadow: none;
}

.supersplat-titlebar {
  position: relative;
  z-index: 4;
  min-height: 50px;
  display: flex;
  gap: 0;
  align-items: center;
  padding: 0 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.45);
  background: #333;
}

.supersplat-title-info {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  align-items: center;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.supersplat-title-copy {
  min-width: 112px;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  padding: 0 10px;
}

.supersplat-titlebar strong,
.supersplat-titlebar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-titlebar strong {
  color: #fff;
  font-size: 13px;
}

.supersplat-titlebar span {
  color: #aaa;
  font-size: 11px;
}

.supersplat-title-actions {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  overflow-x: auto;
  position: relative;
  scrollbar-width: none;
  z-index: 2;
}

.supersplat-title-actions::-webkit-scrollbar {
  display: none;
}

.supersplat-title-actions button,
.supersplat-create-trigger,
.supersplat-title-menu-trigger {
  height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  background: #333;
  color: #aaa;
  font-size: 13px;
  font-weight: 500;
}

.supersplat-title-actions button:hover,
.supersplat-create-trigger:hover,
.supersplat-title-menu-trigger:hover,
.supersplat-create-menu:has(.supersplat-create-popover:not([hidden])) .supersplat-create-trigger,
.supersplat-title-menu:has(.supersplat-title-menu-popover:not([hidden])) .supersplat-title-menu-trigger {
  background: #282828;
  color: #fff;
}

.supersplat-title-actions button:disabled {
  cursor: progress;
  opacity: 0.58;
}

.supersplat-render-mode-toggle {
  display: flex;
  height: 32px;
  gap: 4px;
  align-items: center;
  padding: 2px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.supersplat-title-actions .supersplat-render-mode-toggle button {
  position: relative;
  width: 28px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #303030;
  background: #3a3a3a;
  color: #d7d7d7;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.supersplat-title-actions .supersplat-render-mode-toggle button + button {
  border-left: 1px solid #303030;
}

.supersplat-title-actions .supersplat-render-mode-toggle button.is-active {
  border-color: #6f909a;
  background: #536b73;
  color: #eef8fa;
  box-shadow: 0 0 0 1px rgba(111, 144, 154, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.supersplat-title-actions .supersplat-render-mode-toggle button:hover {
  border-color: #707070;
  background: #464646;
  color: #fff;
}

.supersplat-title-actions .supersplat-render-mode-toggle button.is-active:hover {
  border-color: #83a7b0;
  background: #5f7a82;
  color: #f4fcfd;
}

.supersplat-mode-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.supersplat-mode-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
}

.supersplat-mode-icon-display::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.5px solid currentColor;
  transform: skewY(-24deg) rotate(45deg);
}

.supersplat-mode-icon-display::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: skewY(-24deg) rotate(45deg);
  opacity: 0.78;
}

.supersplat-mode-icon-point-edit::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.supersplat-mode-icon-point-edit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  box-shadow:
    0 -7px 0 currentColor,
    7px 0 0 currentColor,
    0 7px 0 currentColor,
    -7px 0 0 currentColor;
}

.supersplat-title-actions button:last-child {
  width: 34px;
  padding: 0;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
}

.supersplat-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  background: #050608;
}

.supersplat-save-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: 3px;
  display: block;
  pointer-events: none;
}

.supersplat-save-progress[hidden] {
  display: none;
}

.supersplat-save-progress__meta {
  display: none;
}

.supersplat-save-progress__meta strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(248, 250, 252, 0.94);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-save-progress__meta span {
  display: none;
}

.supersplat-save-progress__track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
}

.supersplat-save-progress__track i {
  display: block;
  width: var(--supersplat-save-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #ff6600;
  transition: width 0.18s ease, background 0.18s ease;
}

.supersplat-save-progress small {
  display: none;
}

.supersplat-save-progress.is-done .supersplat-save-progress__track i {
  background: #4fd16a;
}

.supersplat-save-progress.is-error .supersplat-save-progress__track i {
  background: #ff5c5c;
}

.supersplat-diagnostic-panel {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 18;
  width: min(760px, calc(100% - 24px));
  max-height: min(70vh, 680px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(20, 22, 26, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.46);
  color: rgba(245, 248, 252, 0.94);
}

.supersplat-diagnostic-panel[hidden] {
  display: none;
}

.supersplat-diagnostic-panel > header {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(45, 48, 54, 0.96);
}

.supersplat-diagnostic-panel > header strong {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-diagnostic-panel > header .supersplat-diagnostic-copy {
  width: auto;
  min-width: 74px;
  max-width: 160px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(124, 211, 255, 0.32);
  border-radius: 4px;
  background: rgba(124, 211, 255, 0.12);
  color: rgba(218, 243, 255, 0.96);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.supersplat-diagnostic-panel > header .supersplat-diagnostic-copy:hover {
  background: rgba(124, 211, 255, 0.2);
  color: #fff;
}

.supersplat-diagnostic-panel > header button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(245, 248, 252, 0.76);
  font-size: 18px;
  line-height: 1;
}

.supersplat-diagnostic-panel > header button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.supersplat-diagnostic-body {
  min-height: 0;
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 10px;
  font-size: 11px;
}

.supersplat-diagnostic-body p {
  margin: 0;
  color: rgba(220, 228, 238, 0.78);
}

.supersplat-diagnostic-block {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.supersplat-diagnostic-block > strong {
  font-size: 12px;
}

.supersplat-diagnostic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supersplat-diagnostic-meta span {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(226, 234, 242, 0.84);
}

.supersplat-diagnostic-hints {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 7px 9px 7px 24px;
  border: 1px solid rgba(255, 184, 77, 0.28);
  border-radius: 4px;
  background: rgba(255, 184, 77, 0.1);
  color: rgba(255, 232, 194, 0.95);
}

.supersplat-health-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(124, 211, 255, 0.2);
  border-radius: 6px;
  background: rgba(55, 96, 120, 0.14);
}

.supersplat-health-summary {
  display: grid;
  gap: 4px;
}

.supersplat-health-summary span {
  color: rgba(169, 211, 235, 0.78);
  font-size: 10px;
  font-weight: 700;
}

.supersplat-health-summary strong {
  color: rgba(247, 250, 252, 0.98);
  font-size: 13px;
  line-height: 1.35;
}

.supersplat-health-status {
  display: inline-grid;
  min-width: 36px;
  place-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.supersplat-health-status.is-pass {
  background: rgba(61, 220, 151, 0.16);
  color: rgba(159, 255, 215, 0.98);
}

.supersplat-health-status.is-warn {
  background: rgba(255, 184, 77, 0.16);
  color: rgba(255, 230, 184, 0.98);
}

.supersplat-health-status.is-fail {
  background: rgba(255, 92, 92, 0.18);
  color: rgba(255, 205, 205, 0.98);
}

.supersplat-health-status.is-unknown {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(235, 240, 246, 0.86);
}

.supersplat-health-errors {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 7px 9px 7px 24px;
  border-radius: 4px;
  background: rgba(255, 92, 92, 0.12);
  color: rgba(255, 216, 216, 0.98);
}

.supersplat-diagnostic-block table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  overflow: hidden;
  border-radius: 4px;
}

.supersplat-diagnostic-block th,
.supersplat-diagnostic-block td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(235, 240, 246, 0.86);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-diagnostic-block th {
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.supersplat-diagnostic-block tr.is-warning td {
  background: rgba(255, 184, 77, 0.14);
  color: rgba(255, 232, 194, 0.96);
}

.supersplat-frame-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #202020;
}

.supersplat-safe-frame-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.supersplat-safe-project-frame {
  position: absolute;
  border: 0;
  box-shadow: none;
}

.supersplat-safe-frame {
  position: absolute;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  box-shadow: none;
}

.supersplat-safe-frame span {
  position: absolute;
  left: 6px;
  top: -18px;
  min-width: max-content;
  height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(5, 6, 8, 0.32);
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
}

.supersplat-safe-frame-action {
  border-color: rgba(115, 221, 255, 0.42);
}

.supersplat-safe-frame-action span {
  color: rgba(185, 244, 255, 0.58);
}

.supersplat-safe-frame-title {
  border-color: rgba(255, 218, 120, 0.46);
}

.supersplat-safe-frame-title span {
  color: rgba(255, 226, 154, 0.6);
}

.supersplat-title-menus {
  min-width: 0;
  flex: 0 0 auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  align-items: stretch;
}

.supersplat-title-menu {
  position: relative;
  z-index: 9;
}

.supersplat-title-menu-trigger {
  width: 100%;
}

.supersplat-node-file-label {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: min(360px, 34vw);
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  padding: 0 14px;
  background: transparent;
  color: #f2f2f2;
  font-size: 13px;
  font-weight: 650;
  line-height: 50px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  text-align: center;
}

.supersplat-create-menu {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
}

.supersplat-create-trigger {
  min-width: 74px;
}

.supersplat-title-menu-popover,
.supersplat-create-popover {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 24;
  width: 180px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 6px 6px;
  background: #333;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
}

.supersplat-title-menu-popover[hidden],
.supersplat-create-popover[hidden] {
  display: none;
}

.supersplat-create-popover {
  width: 220px;
  max-height: min(520px, calc(100vh - 96px));
  overflow-y: auto;
  padding: 6px;
}

.supersplat-title-menu-popover button,
.supersplat-create-popover button {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  border: 0;
  border-radius: 4px;
  padding: 7px 8px;
  background: transparent;
  color: #aaa;
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
}

.supersplat-create-popover button {
  min-height: 28px;
  padding: 6px 8px;
}

.supersplat-title-menu-popover button.supersplat-title-menu-switch {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.supersplat-title-menu-popover button.supersplat-title-menu-choice {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.supersplat-title-menu-popover button.supersplat-title-menu-choice small {
  grid-column: 1 / -1;
}

.supersplat-title-menu-popover button span,
.supersplat-create-popover button b {
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.supersplat-title-menu-popover button:hover,
.supersplat-create-popover button:hover {
  background: #282828;
  color: #fff;
}

.supersplat-title-menu-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px 4px;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
}

.supersplat-title-menu-heading small {
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 500;
}

.supersplat-menu-number-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 4px;
  color: #aaa;
  font-size: 13px;
}

.supersplat-menu-number-row:hover,
.supersplat-menu-number-row.is-dragging {
  background: #282828;
  color: #fff;
}

.supersplat-menu-number-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-menu-number-input {
  display: grid;
  grid-template-columns: 22px 56px auto;
  gap: 4px;
  align-items: center;
}

.supersplat-menu-number-input button {
  width: 22px;
  min-height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #242424;
  color: #9ca3af;
  cursor: ew-resize;
}

.supersplat-menu-number-input button:hover {
  background: #3b3b3b;
  color: #fff;
}

.supersplat-menu-number-input input {
  width: 56px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 0 5px;
  background: #202020;
  color: #ddd;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.supersplat-menu-number-input input:focus {
  outline: 1px solid rgba(141, 164, 190, 0.85);
  outline-offset: 1px;
}

.supersplat-menu-number-input em {
  color: #777;
  font-size: 11px;
  font-style: normal;
}

.supersplat-create-section {
  display: grid;
  gap: 2px;
}

.supersplat-create-section + .supersplat-create-section {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.supersplat-create-section > strong {
  display: block;
  padding: 3px 8px 4px;
  color: #777;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.supersplat-title-menu-popover hr {
  height: 1px;
  margin: 4px 2px;
  border: 0;
  background: #555;
}

.supersplat-title-menu-popover small {
  color: #777;
  font-size: 11px;
}

.supersplat-title-menu-switch small {
  grid-column: 1 / -1;
}

.supersplat-menu-switch {
  width: 30px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: #202020;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.supersplat-menu-switch em {
  width: 12px;
  height: 12px;
  display: block;
  border-radius: 999px;
  background: #777;
  transition: transform 0.16s ease, background 0.16s ease;
}

.supersplat-title-menu-switch.is-active .supersplat-menu-switch {
  background: #1f6feb;
}

.supersplat-title-menu-switch.is-active .supersplat-menu-switch em {
  transform: translateX(14px);
  background: #fff;
}

.supersplat-menu-check {
  width: 14px;
  height: 14px;
  position: relative;
  display: inline-block;
  opacity: 0;
}

.supersplat-menu-check::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #58a6ff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.supersplat-title-menu-choice.is-active {
  color: #fff;
}

.supersplat-title-menu-choice.is-active .supersplat-menu-check {
  opacity: 1;
}

.supersplat-create-popover span {
  color: #777;
  font-size: 11px;
}

.supersplat-embed-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 0;
  background: #07090d;
}

.supersplat-frame-wrap.is-director-dragging .supersplat-embed-frame {
  pointer-events: none;
}

.has-open-supersplat-menu .supersplat-embed-frame {
  pointer-events: none;
}

.supersplat-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.82), rgba(7, 9, 13, 0.64));
  color: rgba(235, 242, 252, 0.92);
  text-align: center;
  transition: opacity 0.18s ease;
}

.supersplat-loading::after {
  content: "";
  width: 22px;
  height: 22px;
  margin: 8px auto 0;
  border: 2px solid rgba(235, 242, 252, 0.2);
  border-top-color: rgba(235, 242, 252, 0.86);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.is-supersplat-loading .supersplat-loading {
  opacity: 1;
}

.supersplat-loading strong {
  font-size: 14px;
}

.supersplat-loading span {
  max-width: 360px;
  color: rgba(213, 224, 239, 0.68);
  font-size: 11px;
  line-height: 1.55;
}

.supersplat-video-render-settings-host,
.supersplat-project-settings-host {
  position: absolute;
  left: auto;
  right: 18px;
  top: 62px;
  z-index: 18;
  width: min(520px, calc(100% - 36px));
  max-height: calc(100% - 84px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #333;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
  color: #aaa;
}

.supersplat-video-render-settings-host.is-dragging,
.supersplat-project-settings-host.is-dragging {
  user-select: none;
}

.supersplat-video-render-settings-dialog,
.supersplat-project-settings-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  background: #333;
  max-height: inherit;
}

.supersplat-video-render-settings-dialog header,
.supersplat-project-settings-dialog header {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #282828;
  cursor: grab;
  user-select: none;
}

.supersplat-video-render-settings-host.is-dragging .supersplat-video-render-settings-dialog header,
.supersplat-project-settings-host.is-dragging .supersplat-project-settings-dialog header {
  cursor: grabbing;
}

.supersplat-video-render-settings-dialog header div,
.supersplat-project-settings-dialog header div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.supersplat-video-render-settings-dialog header strong,
.supersplat-project-settings-dialog header strong {
  color: #fff;
  font-size: 13px;
}

.supersplat-video-render-settings-dialog header span,
.supersplat-project-settings-dialog header span {
  color: #777;
  font-size: 11px;
}

.supersplat-video-render-settings-dialog header button,
.supersplat-project-settings-dialog header button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: transparent;
  color: #aaa;
  font-size: 16px;
}

.supersplat-video-render-settings-dialog header button:hover,
.supersplat-project-settings-dialog header button:hover {
  background: #202020;
  color: #fff;
}

.supersplat-video-render-settings-dialog .splat-render-overview,
.supersplat-project-settings-dialog .splat-render-overview {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid,
.supersplat-project-settings-dialog .splat-render-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid label,
.supersplat-project-settings-dialog .splat-render-settings-grid label {
  display: grid;
  gap: 4px;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid label span,
.supersplat-project-settings-dialog .splat-render-settings-grid label span {
  color: #aaa;
  font-size: 11px;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid input,
.supersplat-video-render-settings-dialog .splat-render-settings-grid select,
.supersplat-project-settings-dialog .splat-render-settings-grid input,
.supersplat-project-settings-dialog .splat-render-settings-grid select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid #202020;
  border-radius: 4px;
  padding: 0 8px;
  background: #282828;
  color: #fff;
  font-size: 12px;
}

.supersplat-video-render-settings-dialog .splat-render-select-wrap,
.supersplat-project-settings-dialog .splat-render-select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.supersplat-video-render-settings-dialog .splat-render-select-wrap::after,
.supersplat-project-settings-dialog .splat-render-select-wrap::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #aaa;
  border-bottom: 2px solid #aaa;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.supersplat-video-render-settings-dialog .splat-render-select-wrap:hover::after,
.supersplat-project-settings-dialog .splat-render-select-wrap:hover::after {
  border-color: #fff;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid select,
.supersplat-project-settings-dialog .splat-render-settings-grid select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 30px;
  cursor: pointer;
}

.supersplat-video-render-settings-dialog .splat-render-settings-grid input:focus,
.supersplat-video-render-settings-dialog .splat-render-settings-grid select:focus,
.supersplat-project-settings-dialog .splat-render-settings-grid input:focus,
.supersplat-project-settings-dialog .splat-render-settings-grid select:focus {
  border-color: #f60;
  outline: none;
}

.supersplat-video-render-settings-dialog .splat-render-settings-footer,
.supersplat-project-settings-dialog .splat-render-settings-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #303030;
}

.supersplat-video-render-settings-dialog .splat-render-footer-info,
.supersplat-project-settings-dialog .splat-render-footer-info {
  min-width: 0;
  display: grid;
  gap: 7px;
  flex: 1 1 auto;
}

.supersplat-video-render-settings-dialog .splat-render-settings-footer p,
.supersplat-project-settings-dialog .splat-render-settings-footer p {
  margin: 0;
  color: #777;
  font-size: 11px;
  line-height: 1.5;
}

.supersplat-video-render-settings-dialog .splat-render-settings-footer .splat-render-overview,
.supersplat-project-settings-dialog .splat-render-settings-footer .splat-render-overview {
  font-size: 10px;
  line-height: 1.45;
}

.supersplat-video-render-settings-dialog .splat-render-overview span,
.supersplat-project-settings-dialog .splat-render-overview span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 0 7px;
  background: #282828;
  color: #aaa;
  white-space: nowrap;
}

.supersplat-video-render-settings-dialog .splat-render-overview b,
.supersplat-project-settings-dialog .splat-render-overview b {
  color: #777;
  font-weight: 600;
}

.supersplat-video-render-settings-dialog .splat-render-settings-actions,
.supersplat-project-settings-dialog .splat-render-settings-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.supersplat-video-render-settings-dialog .splat-render-settings-actions button,
.supersplat-project-settings-dialog .splat-render-settings-actions button {
  min-width: 76px;
  min-height: 30px;
  border: 0;
  border-radius: 4px;
  padding: 0 10px;
  background: #282828;
  color: #aaa;
}

.supersplat-video-render-settings-dialog .splat-render-settings-actions button:hover,
.supersplat-project-settings-dialog .splat-render-settings-actions button:hover {
  background: #202020;
  color: #fff;
}

.supersplat-video-render-settings-dialog .splat-render-settings-actions button.primary,
.supersplat-project-settings-dialog .splat-render-settings-actions button.primary {
  background: #f60;
  color: #fff;
}

@media (max-width: 720px) {
  .supersplat-video-render-settings-dialog .splat-render-settings-footer,
  .supersplat-project-settings-dialog .splat-render-settings-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .supersplat-video-render-settings-dialog .splat-render-settings-actions,
  .supersplat-project-settings-dialog .splat-render-settings-actions {
    justify-content: flex-end;
  }
}

.supersplat-director-host {
  position: absolute;
  left: 24px;
  top: 74px;
  z-index: 19;
  width: min(390px, calc(100% - 48px));
  max-height: min(70vh, 620px);
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: #333;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.supersplat-director-host.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.supersplat-director {
  min-width: 0;
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(47, 47, 47, 0.97);
  color: rgba(238, 244, 252, 0.9);
}

.supersplat-director header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #262626;
  cursor: grab;
  user-select: none;
}

.supersplat-director header div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.supersplat-director header div::before {
  content: "▣";
  color: #ff710a;
  font-size: 12px;
  line-height: 1;
}

.supersplat-director header button {
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #ff710a;
  cursor: pointer;
}

.supersplat-director header div::before {
  content: "";
  width: 7px;
  height: 7px;
  display: block;
  border-radius: 999px;
  background: #ff710a;
  box-shadow: 0 0 10px rgba(255, 113, 10, 0.55);
}

.supersplat-director header strong {
  color: #fff;
  font-size: 13px;
}

.supersplat-director header span {
  color: rgba(225, 232, 242, 0.62);
  font-size: 10px;
}

.supersplat-director-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.supersplat-director-actions button,
.supersplat-camera-list button {
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 0 8px;
  background: rgba(30, 30, 30, 0.78);
  color: rgba(236, 241, 248, 0.88);
  font-size: 11px;
}

.supersplat-director-actions button:hover,
.supersplat-camera-list button:hover {
  background: #282828;
  color: #fff;
}

.supersplat-director-actions button:disabled,
.supersplat-camera-list button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.supersplat-camera-list {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.supersplat-camera-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  background: rgba(35, 35, 35, 0.78);
}

.supersplat-camera-list b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 113, 10, 0.16);
  color: #ff8a2a;
  font-size: 10px;
}

.supersplat-camera-list article div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.supersplat-camera-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-camera-list span {
  overflow: hidden;
  color: rgba(213, 224, 239, 0.54);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supersplat-camera-list p {
  margin: 0;
  padding: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: rgba(213, 224, 239, 0.58);
  font-size: 11px;
  line-height: 1.45;
}

.panorama-viewer-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(91, 184, 255, 0.16), transparent 36%),
    rgba(5, 7, 11, 0.96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.panorama-viewer-shell header {
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panorama-viewer-shell header strong,
.panorama-viewer-shell header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-viewer-shell header strong {
  color: #f2f6ff;
  font-size: 13px;
}

.panorama-viewer-shell header span {
  color: rgba(216, 226, 241, 0.64);
  font-size: 11px;
}

.panorama-viewer-shell header button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  padding: 0;
}

.panorama-viewer-shell header button:hover {
  border-color: rgba(255, 142, 142, 0.5);
  background: rgba(220, 90, 90, 0.34);
  color: #fff;
}

.splat-c4d-workspace {
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(57, 61, 68, 0.96), rgba(31, 34, 39, 0.98) 54px, rgba(18, 20, 24, 0.98));
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.52);
  outline: none;
}

.panorama-viewer-shell > .splat-c4d-titlebar {
  min-height: 54px;
  grid-template-columns: minmax(160px, 0.78fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  padding: 7px 10px 7px 12px;
  border-bottom-color: rgba(0, 0, 0, 0.54);
  background: linear-gradient(180deg, #4a4e56, #343840);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset;
}

.splat-c4d-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-title strong {
  color: rgba(247, 248, 250, 0.94);
  font-size: 12px;
}

.panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-title span {
  color: rgba(218, 223, 231, 0.58);
  font-size: 10px;
}

.splat-c4d-menu {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
}

.panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-menu button {
  width: auto;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 0 9px;
  background: transparent;
  color: rgba(246, 248, 252, 0.76);
  font-size: 11px;
  font-weight: 700;
}

.panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-menu button:hover,
.panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-menu button[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.splat-c4d-titlebar > button[data-media-preview-action="close"] {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(19, 21, 25, 0.6);
}

.splat-c4d-main {
  min-height: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(228px, 280px);
  grid-template-rows: auto minmax(0, 1fr) 74px;
  grid-template-areas:
    "top top top"
    "left viewport right"
    "bottom bottom bottom";
  background: #202329;
}

.splat-c4d-top-tools {
  grid-area: top;
  min-height: 52px;
  position: relative;
  left: auto;
  top: auto;
  z-index: 5;
  max-width: none;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.62);
  background: linear-gradient(180deg, #373b43, #2d3037);
}

.splat-c4d-toolbar-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-right: 1px solid rgba(0, 0, 0, 0.48);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06);
}

.splat-c4d-toolbar-group:last-child {
  border-right: 0;
  box-shadow: none;
}

.splat-c4d-toolbar-group > span {
  color: rgba(227, 231, 237, 0.52);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.splat-c4d-left-tools,
.splat-c4d-side-tools {
  z-index: 4;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 5px;
  padding: 8px 5px;
  border-right: 1px solid rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, #333740, #252830);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.splat-c4d-left-tools {
  grid-area: left;
}

.splat-c4d-side-tools {
  grid-area: side;
  border-left: 1px solid rgba(0, 0, 0, 0.55);
}

.splat-c4d-left-tools button,
.splat-c4d-side-tools button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.1));
  color: rgba(246, 248, 252, 0.84);
  font-size: 11px;
  font-weight: 900;
}

.splat-c4d-left-tools button:hover,
.splat-c4d-side-tools button:hover,
.splat-c4d-left-tools button[aria-pressed="true"],
.splat-c4d-side-tools button[aria-pressed="true"] {
  border-color: rgba(255, 178, 84, 0.62);
  background: linear-gradient(180deg, rgba(255, 178, 84, 0.34), rgba(184, 106, 38, 0.22));
  color: #fff5df;
}

.splat-c4d-viewport {
  grid-area: viewport;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(0, 0, 0, 0.78);
  border-width: 0 1px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    #090b0f;
  background-size: 32px 32px;
}

.splat-c4d-viewport::before {
  content: "Perspective";
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(17, 19, 23, 0.62);
  color: rgba(229, 235, 244, 0.68);
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
}

.splat-c4d-axis {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 54px;
  height: 54px;
  pointer-events: none;
}

.splat-c4d-axis span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.splat-c4d-axis span:nth-child(1) {
  right: 0;
  top: 26px;
  background: #e05b54;
}

.splat-c4d-axis span:nth-child(2) {
  left: 17px;
  top: 0;
  background: #59b760;
}

.splat-c4d-axis span:nth-child(3) {
  left: 0;
  bottom: 0;
  background: #5489e0;
}

.splat-c4d-right-panels {
  grid-area: right;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(180px, 0.92fr);
  border-left: 1px solid rgba(0, 0, 0, 0.64);
  background: #292c33;
}

.splat-c4d-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-bottom: 1px solid rgba(0, 0, 0, 0.62);
  overflow: hidden;
}

.splat-c4d-panel > header {
  min-height: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  background: linear-gradient(180deg, #383c44, #30333a);
}

.splat-c4d-panel > header strong {
  color: rgba(247, 248, 250, 0.9);
  font-size: 11px;
}

.splat-c4d-panel > header span {
  color: rgba(218, 223, 231, 0.54);
  font-size: 10px;
}

.splat-c4d-panel > header button {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0;
  background: rgba(15, 17, 21, 0.46);
  color: rgba(231, 237, 245, 0.74);
  font-size: 11px;
}

.splat-c4d-panel > header button:hover {
  border-color: rgba(255, 178, 84, 0.44);
  color: #fff1d4;
}

.splat-c4d-panel.is-collapsed {
  grid-template-rows: auto 0;
}

.splat-c4d-panel.is-collapsed > :not(header) {
  display: none;
}

.splat-c4d-panel.is-collapsed > header button {
  transform: rotate(-90deg);
}

.splat-c4d-object-panel {
  align-content: start;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.splat-c4d-property-panel {
  position: relative;
}

.splat-c4d-object-list {
  display: grid;
  gap: 8px;
  padding: 9px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.48);
  background: rgba(18, 20, 24, 0.28);
}

.splat-c4d-object-list[hidden],
.splat-c4d-object-properties[hidden] {
  display: none;
}

.splat-c4d-object-list > strong {
  color: rgba(255, 210, 139, 0.95);
  font-size: 10px;
}

.splat-c4d-object-row {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 5px 7px;
  background: rgba(10, 12, 15, 0.46);
  color: rgba(235, 240, 248, 0.82);
  text-align: left;
}

.splat-c4d-object-row b {
  width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(87, 164, 255, 0.16);
  color: #a9d7ff;
  font-size: 10px;
}

.splat-c4d-object-row span,
.splat-c4d-object-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-c4d-object-row span {
  font-size: 11px;
  font-weight: 800;
}

.splat-c4d-object-row em {
  color: rgba(219, 225, 235, 0.56);
  font-size: 10px;
  font-style: normal;
}

.splat-c4d-object-row:hover,
.splat-c4d-object-row.is-selected {
  border-color: rgba(120, 205, 255, 0.48);
  background: rgba(55, 82, 112, 0.42);
}

.splat-c4d-object-file-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.splat-c4d-object-file-row .splat-c4d-object-actions {
  grid-column: 1 / -1;
}

.splat-c4d-object-file-row.is-hidden {
  opacity: 0.62;
}

.splat-c4d-object-actions,
.splat-c4d-object-toggles,
.splat-c4d-object-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.splat-c4d-object-actions button,
.splat-c4d-object-toggles button,
.splat-c4d-object-foot button {
  min-height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(15, 17, 21, 0.5);
  color: rgba(232, 238, 247, 0.8);
  font-size: 10px;
  font-weight: 800;
}

.splat-c4d-object-actions button:hover,
.splat-c4d-object-toggles button:hover,
.splat-c4d-object-foot button:hover,
.splat-c4d-object-actions button[aria-pressed="true"],
.splat-c4d-object-toggles button[aria-pressed="true"] {
  border-color: rgba(255, 178, 84, 0.45);
  background: rgba(255, 178, 84, 0.15);
  color: #fff1d4;
}

.splat-c4d-object-properties {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  overflow: auto;
}

.splat-c4d-object-properties > header {
  display: grid;
  gap: 3px;
}

.splat-c4d-object-properties > header strong {
  color: rgba(247, 248, 250, 0.92);
  font-size: 11px;
}

.splat-c4d-object-properties > header span {
  min-width: 0;
  overflow: hidden;
  color: rgba(218, 223, 231, 0.58);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.splat-c4d-transform-grid {
  display: grid;
  gap: 8px;
}

.splat-c4d-transform-row {
  display: grid;
  grid-template-columns: 38px repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.splat-c4d-transform-row > span {
  color: rgba(255, 210, 139, 0.9);
  font-size: 10px;
  font-weight: 800;
}

.splat-c4d-transform-row label {
  min-width: 0;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.splat-c4d-transform-row b {
  color: rgba(218, 225, 235, 0.64);
  font-size: 9px;
}

.splat-c4d-transform-row input {
  width: 100%;
  min-width: 0;
  height: 25px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0 5px;
  background: rgba(8, 10, 13, 0.64);
  color: rgba(243, 246, 250, 0.9);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.splat-c4d-transform-row input:focus {
  outline: none;
  border-color: rgba(120, 205, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(120, 205, 255, 0.12);
}

.splat-c4d-empty-properties {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  color: rgba(234, 239, 247, 0.62);
  font-size: 11px;
  line-height: 1.45;
}

.splat-c4d-empty-properties strong {
  color: rgba(247, 248, 250, 0.9);
}

.splat-c4d-workspace.is-director-open .splat-c4d-empty-properties {
  display: none;
}

.splat-c4d-timeline {
  grid-area: bottom;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  border-top: 1px solid rgba(0, 0, 0, 0.66);
  background: linear-gradient(180deg, #30343c, #24272e);
}

.splat-c4d-timeline-ruler {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(18, minmax(26px, 1fr));
  align-items: stretch;
  overflow: hidden;
  padding: 0 8px 8px;
  color: rgba(229, 235, 244, 0.42);
  font-size: 9px;
  font-weight: 800;
}

.splat-c4d-playhead {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 8px;
  z-index: 2;
  width: 0;
  border-left: 2px solid rgba(255, 178, 84, 0.9);
  filter: drop-shadow(0 0 8px rgba(255, 178, 84, 0.55));
  transform: translateX(8px);
  transition: left 120ms linear;
}

.splat-c4d-playhead b {
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #ffb254;
  transform: rotate(45deg);
}

.splat-c4d-timeline-ruler span {
  position: relative;
  display: flex;
  align-items: end;
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 4px;
}

.splat-c4d-timeline-ruler span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 10px;
  background: rgba(255, 255, 255, 0.22);
}

.splat-c4d-timeline-ruler em {
  position: absolute;
  right: 12px;
  top: 4px;
  z-index: 3;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(14, 16, 20, 0.64);
  color: rgba(255, 214, 148, 0.88);
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .panorama-3d-floating.panorama-splat-floating,
  .panorama-3d-floating.supersplat-floating {
    width: calc(100vw - 72px);
    height: calc(100vh - 72px);
  }

  .splat-c4d-main {
    grid-template-columns: 40px minmax(0, 1fr) minmax(196px, 228px);
  }

  .panorama-viewer-shell > .splat-c4d-titlebar {
    grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1fr) auto;
  }

  .panorama-viewer-shell > .splat-c4d-titlebar .splat-c4d-menu button {
    padding: 0 7px;
  }

  .splat-c4d-toolbar-group {
    padding: 0 6px;
  }
}

@media (max-width: 860px) {
  .panorama-3d-floating.panorama-splat-floating,
  .panorama-3d-floating.supersplat-floating {
    width: calc(100vw - 32px);
    height: calc(100vh - 40px);
  }

  .supersplat-titlebar {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }

  .supersplat-title-info {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .supersplat-title-info::-webkit-scrollbar {
    display: none;
  }

  .supersplat-title-copy {
    min-width: 120px;
    flex: 1 0 120px;
  }

  .supersplat-title-actions {
    min-height: 50px;
    grid-row: 2;
    justify-content: start;
  }

  .supersplat-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .splat-c4d-main {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) 68px minmax(150px, 26vh);
    grid-template-areas:
      "top top"
      "left viewport"
      "bottom bottom"
      "right right";
  }

  .splat-c4d-right-panels {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .splat-c4d-panel {
    border-bottom: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.62);
  }
}

.panorama-viewer-canvas {
  min-height: 0;
  position: relative;
  cursor: grab;
  background: #050608;
  touch-action: none;
}

.panorama-viewer-canvas.dragging {
  cursor: grabbing;
}

.panorama-roam-canvas {
  outline: none;
}

.panorama-splat-canvas {
  cursor: default;
}

.panorama-splat-controls {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(620px, calc(100% - 36px));
}

.splat-c4d-top-tools.panorama-splat-controls {
  position: relative;
  left: auto;
  top: auto;
  max-width: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
}

.panorama-splat-controls button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(5, 8, 12, 0.62);
  color: rgba(246, 248, 252, 0.88);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.splat-c4d-top-tools.panorama-splat-controls button {
  min-height: 28px;
  border-color: rgba(255, 255, 255, 0.11);
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(20, 22, 27, 0.58);
  color: rgba(239, 243, 249, 0.84);
  white-space: nowrap;
  backdrop-filter: none;
}

.panorama-splat-control-select {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(5, 8, 12, 0.62);
  color: rgba(246, 248, 252, 0.82);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.splat-c4d-top-tools .panorama-splat-control-select {
  min-height: 28px;
  border-radius: 4px;
  padding: 0 7px;
  background: rgba(20, 22, 27, 0.58);
  backdrop-filter: none;
  white-space: nowrap;
}

.panorama-splat-control-select select {
  min-height: 24px;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff2d3;
  font: inherit;
}

.splat-c4d-top-tools .panorama-splat-control-select select {
  min-width: 82px;
}

.panorama-splat-control-select option {
  color: #10151f;
}

.panorama-splat-controls button:hover,
.panorama-splat-controls button[aria-pressed="true"] {
  border-color: rgba(240, 193, 116, 0.52);
  background: rgba(240, 193, 116, 0.2);
  color: #fff2d3;
}

.splat-c4d-top-tools.panorama-splat-controls button:hover,
.splat-c4d-top-tools.panorama-splat-controls button[aria-pressed="true"] {
  border-color: rgba(255, 178, 84, 0.62);
  background: rgba(255, 178, 84, 0.2);
  color: #fff4db;
}

.panorama-splat-director-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(520px, calc(100% - 36px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 8, 12, 0.62);
  color: rgba(246, 248, 252, 0.72);
  font-size: 11px;
  font-weight: 800;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.splat-c4d-timeline .panorama-splat-director-dock {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 4;
  justify-content: center;
  max-width: none;
  min-width: 0;
  padding: 5px 8px;
  border: 0;
  border-radius: 0;
  background: rgba(17, 19, 23, 0.36);
  transform: none;
  backdrop-filter: none;
}

.panorama-splat-director-dock button {
  min-height: 30px;
  border: 1px solid rgba(240, 193, 116, 0.34);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(240, 193, 116, 0.16);
  color: #fff2d3;
  font-size: 11px;
  font-weight: 900;
}

.splat-c4d-timeline .panorama-splat-director-dock button {
  min-height: 24px;
  border-radius: 4px;
  padding: 0 10px;
}

.panorama-splat-director-dock button:hover,
.panorama-splat-director-dock button[aria-pressed="true"] {
  border-color: rgba(120, 205, 255, 0.48);
  background: rgba(120, 205, 255, 0.18);
  color: #d8f4ff;
}

.panorama-splat-director-dock span {
  white-space: nowrap;
}

.panorama-splat-target-marker {
  position: absolute;
  z-index: 4;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(120, 205, 255, 0.96);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.26) inset,
    0 0 28px rgba(120, 205, 255, 0.45);
}

.panorama-splat-target-marker::before,
.panorama-splat-target-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: rgba(120, 205, 255, 0.92);
  transform: translate(-50%, -50%);
}

.panorama-splat-target-marker::before {
  width: 20px;
  height: 2px;
}

.panorama-splat-target-marker::after {
  width: 2px;
  height: 20px;
}

.panorama-splat-target-marker.is-visible {
  animation: splatTargetMarkerPulse 900ms ease-out both;
}

.panorama-splat-hotspots {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  max-width: min(260px, calc(100% - 36px));
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 8, 12, 0.58);
  color: rgba(246, 248, 252, 0.86);
  backdrop-filter: blur(10px);
}

.splat-c4d-object-panel .panorama-splat-hotspots {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: auto;
  max-width: none;
  max-height: 120px;
  overflow: auto;
  margin: 0;
  padding: 8px;
  border-width: 0 0 1px;
  border-color: rgba(0, 0, 0, 0.45);
  border-radius: 0;
  background: rgba(18, 20, 24, 0.32);
  backdrop-filter: none;
}

.splat-c4d-object-panel .panorama-splat-hotspots strong,
.splat-c4d-object-panel .panorama-splat-camera-marks strong,
.splat-c4d-object-panel .panorama-splat-screenshots > strong {
  color: rgba(255, 210, 139, 0.95);
  font-size: 10px;
}

.splat-c4d-object-panel .panorama-splat-hotspots button,
.splat-c4d-object-panel .panorama-splat-camera-marks button,
.splat-c4d-object-panel .panorama-splat-shot button {
  min-height: 26px;
  border-radius: 4px;
  font-size: 10px;
}

.panorama-splat-hotspots[hidden] {
  display: none;
}

.panorama-splat-hotspots strong {
  font-size: 12px;
  color: #fff2d3;
}

.panorama-splat-hotspots button {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 248, 252, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-splat-hotspots button:hover {
  border-color: rgba(120, 205, 255, 0.42);
  background: rgba(120, 205, 255, 0.16);
  color: #d8f4ff;
}

.panorama-splat-camera-marks {
  position: absolute;
  right: 18px;
  bottom: 118px;
  z-index: 3;
  width: min(260px, calc(100% - 36px));
  max-height: min(34vh, 300px);
  overflow: auto;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 8, 12, 0.58);
  color: rgba(246, 248, 252, 0.86);
  backdrop-filter: blur(10px);
}

.splat-c4d-object-panel .panorama-splat-camera-marks {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
  width: auto;
  max-width: none;
  max-height: 150px;
  overflow: auto;
  margin: 0;
  padding: 8px;
  border-width: 0 0 1px;
  border-color: rgba(0, 0, 0, 0.45);
  border-radius: 0;
  background: rgba(18, 20, 24, 0.28);
  backdrop-filter: none;
}

.panorama-splat-camera-marks[hidden] {
  display: none;
}

.panorama-splat-camera-marks strong {
  color: #fff2d3;
  font-size: 12px;
}

.panorama-splat-camera-marks button {
  min-height: 30px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 9px 0 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 248, 252, 0.9);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
}

.panorama-splat-camera-marks button b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  border-radius: 6px;
  background: rgba(240, 193, 116, 0.16);
  color: #fff2d3;
  font-size: 10px;
}

.panorama-splat-camera-marks button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-splat-camera-marks button:hover {
  border-color: rgba(240, 193, 116, 0.42);
  background: rgba(240, 193, 116, 0.16);
}

.panorama-splat-director {
  position: absolute;
  left: 50%;
  bottom: 74px;
  z-index: 4;
  width: min(560px, calc(100% - 36px));
  max-height: min(58vh, 560px);
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(5, 8, 12, 0.72);
  color: rgba(246, 248, 252, 0.88);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.splat-c4d-property-panel .panorama-splat-director {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 1;
  width: auto;
  max-height: none;
  min-height: 0;
  overflow: auto;
  gap: 8px;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: rgba(18, 20, 24, 0.2);
  transform: none;
  backdrop-filter: none;
  box-shadow: none;
}

.panorama-splat-director[hidden] {
  display: none;
}

.panorama-splat-director header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panorama-splat-director header strong {
  color: #fff2d3;
  font-size: 13px;
}

.panorama-splat-director header button,
.panorama-splat-director-form button,
.panorama-splat-director-actions button,
.panorama-splat-director-list button {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 248, 252, 0.9);
  font-size: 11px;
  font-weight: 800;
}

.panorama-splat-director header button {
  width: 30px;
  padding: 0;
}

.panorama-splat-director-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.splat-c4d-property-panel .panorama-splat-director-form {
  grid-template-columns: minmax(0, 1fr);
}

.panorama-splat-director-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.panorama-splat-director-form label.wide,
.panorama-splat-director-form button {
  grid-column: 1 / -1;
}

.panorama-splat-director-form span {
  color: rgba(246, 248, 252, 0.62);
  font-size: 10px;
  font-weight: 800;
}

.panorama-splat-director-form select,
.panorama-splat-director-form input {
  min-width: 0;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 9px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(246, 248, 252, 0.92);
  font-size: 11px;
  font-weight: 750;
}

.panorama-splat-director-form option {
  color: #10151f;
}

.panorama-splat-director-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panorama-splat-director-form button,
.panorama-splat-director-actions button:first-child {
  border-color: rgba(240, 193, 116, 0.34);
  background: rgba(240, 193, 116, 0.16);
  color: #fff2d3;
}

.panorama-splat-director button:hover:not(:disabled) {
  border-color: rgba(120, 205, 255, 0.44);
  background: rgba(120, 205, 255, 0.16);
  color: #d8f4ff;
}

.panorama-splat-director button:disabled,
.panorama-splat-director select:disabled,
.panorama-splat-director input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.panorama-splat-director-list {
  display: grid;
  gap: 8px;
}

.panorama-splat-director-list p {
  margin: 0;
  color: rgba(246, 248, 252, 0.62);
  font-size: 11px;
  line-height: 1.45;
}

.panorama-splat-director-list article {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.splat-c4d-property-panel .panorama-splat-director-list article {
  grid-template-columns: 24px minmax(0, 1fr);
}

.splat-c4d-property-panel .panorama-splat-director-list article button {
  min-height: 26px;
}

.splat-c4d-property-panel .panorama-splat-director-list article button:nth-of-type(1) {
  grid-column: 1 / 2;
}

.splat-c4d-property-panel .panorama-splat-director-list article button:nth-of-type(2) {
  grid-column: 2 / 3;
}

.splat-c4d-property-panel .panorama-splat-director-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panorama-splat-director-list article > b {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(240, 193, 116, 0.16);
  color: #fff2d3;
  font-size: 10px;
}

.panorama-splat-director-list article div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.panorama-splat-director-list article strong,
.panorama-splat-director-list article span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panorama-splat-director-list article strong {
  color: rgba(246, 248, 252, 0.92);
  font-size: 11px;
}

.panorama-splat-director-list article span {
  color: rgba(246, 248, 252, 0.58);
  font-size: 10px;
}

.panorama-splat-screenshots {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
  width: min(300px, calc(100% - 36px));
  max-height: min(46vh, 420px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(5, 8, 12, 0.6);
  backdrop-filter: blur(10px);
}

.splat-c4d-object-panel .panorama-splat-screenshots {
  position: relative;
  right: auto;
  top: auto;
  z-index: 1;
  width: auto;
  max-width: none;
  max-height: none;
  overflow: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: rgba(18, 20, 24, 0.18);
  backdrop-filter: none;
}

.panorama-splat-screenshots[hidden] {
  display: none;
}

.panorama-splat-screenshots > strong {
  grid-column: 1 / -1;
  color: #fff2d3;
  font-size: 12px;
}

.panorama-splat-shot {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.panorama-splat-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  background: #050608;
}

.panorama-splat-shot button {
  min-height: 27px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(120, 205, 255, 0.14);
  color: #d8f4ff;
  font-size: 11px;
  font-weight: 800;
}

.panorama-splat-shot button:hover {
  border-color: rgba(120, 205, 255, 0.48);
  background: rgba(120, 205, 255, 0.24);
}

.panorama-splat-exit-confirm {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  width: min(340px, calc(100% - 40px));
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 16px;
  background: rgba(8, 10, 14, 0.88);
  color: rgba(246, 248, 252, 0.9);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(16px);
}

.panorama-splat-exit-confirm[hidden] {
  display: none;
}

.panorama-splat-exit-confirm strong {
  color: #fff2d3;
  font-size: 15px;
}

.panorama-splat-exit-confirm span {
  font-size: 12px;
  line-height: 1.45;
}

.panorama-splat-exit-confirm div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.panorama-splat-exit-confirm button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(246, 248, 252, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.panorama-splat-exit-confirm button:last-child {
  border-color: rgba(255, 142, 142, 0.44);
  background: rgba(220, 90, 90, 0.28);
  color: #fff;
}

@keyframes splatTargetMarkerPulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }

  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.32);
  }
}

.panorama-viewer-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.splat-c4d-viewport canvas {
  position: absolute;
  inset: 0;
}

.panorama-viewer-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 2;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(5, 8, 12, 0.58);
  color: rgba(239, 246, 255, 0.86);
  font-size: 12px;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.panorama-roam-hud {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(5, 8, 12, 0.58);
  color: rgba(239, 246, 255, 0.82);
  font-size: 11px;
  pointer-events: none;
  backdrop-filter: blur(10px);
}

.splat-c4d-viewport .panorama-roam-hud {
  left: 10px;
  bottom: 10px;
  min-width: 142px;
  padding: 9px 10px;
  border-radius: 5px;
  background: rgba(18, 20, 24, 0.54);
  font-size: 10px;
}

.panorama-roam-hud strong {
  color: #fff2d3;
  font-size: 13px;
}

.panorama-roam-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.panorama-roam-crosshair::before,
.panorama-roam-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(255, 242, 211, 0.72);
  box-shadow: 0 0 12px rgba(240, 193, 116, 0.32);
}

.panorama-roam-crosshair::before {
  left: 8px;
  top: 2px;
  width: 2px;
  height: 14px;
}

.panorama-roam-crosshair::after {
  left: 2px;
  top: 8px;
  width: 14px;
  height: 2px;
}

.panorama-flat-preview {
  min-height: 0;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 14px;
}

.panorama-flat-preview img {
  width: min(100%, 1400px);
  max-height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: #050608;
}

.node-actions.video-gen-actions {
  grid-template-columns: 1.15fr 0.7fr 0.95fr;
  gap: 8px;
  margin-top: 10px;
}

.node-panorama.image-dragging {
  opacity: 0.52;
  transform: scale(0.92);
  transform-origin: center center;
  filter: saturate(1.08) brightness(1.04);
  box-shadow:
    0 0 0 1px rgba(240, 193, 116, 0.4),
    0 18px 70px rgba(212, 155, 85, 0.25),
    var(--shadow);
}

.node-splat-prep.node-drag-lite .splat-prep-panel,
.node-splat-file.node-drag-lite .splat-file-panel,
.node-panorama.node-drag-lite .panorama-panel {
  opacity: 0.34;
  filter: saturate(0.8) brightness(0.9);
}

.node-image.node-drag-lite .canvas-image-panel,
.node-video.node-drag-lite .canvas-video-panel,
.node-audio.node-drag-lite .canvas-audio-preview {
  opacity: 0.92;
  filter: none;
}

.node-audio.node-drag-lite .canvas-audio-preview audio {
  opacity: 0;
  visibility: hidden;
}

.node-audio.node-drag-lite .canvas-audio-visual {
  opacity: 0.36;
}

.node-image.node-drag-lite,
.node-video.node-drag-lite,
.node-audio.node-drag-lite {
  will-change: transform;
  contain: layout paint;
}

.node-image.node-drag-prewarmed,
.node-video.node-drag-prewarmed,
.node-audio.node-drag-prewarmed {
  will-change: transform;
  contain: layout paint;
  backface-visibility: hidden;
}

.node-image.canvas-media-drag-source-hidden,
.node-video.canvas-media-drag-source-hidden,
.node-audio.canvas-media-drag-source-hidden {
  opacity: 0.18;
}

.canvas-media-drag-ghost {
  position: fixed;
  z-index: 1200;
  pointer-events: none;
  overflow: hidden;
  border: 1px solid rgba(240, 193, 116, 0.5);
  border-radius: 8px;
  background: rgba(5, 6, 8, 0.82);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.42);
  will-change: transform;
  contain: layout paint;
  backface-visibility: hidden;
}

.canvas-media-drag-ghost img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.node-splat-prep.node-drag-lite .splat-prep-panel *,
.node-splat-file.node-drag-lite .splat-file-panel *,
.node-panorama.node-drag-lite .panorama-panel *,
.node-image.node-drag-lite .canvas-image-panel *,
.node-video.node-drag-lite .canvas-video-panel *,
.node-audio.node-drag-lite .canvas-audio-preview * {
  pointer-events: none !important;
}

.node-panorama.image-dragging .panorama-panel {
  cursor: grabbing;
}

.node-panorama.image-drop-source-hidden {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.image-drag-particle {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: var(--size, 6px);
  height: var(--size, 6px);
  pointer-events: none;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 238, 180, 0.95), rgba(240, 193, 116, 0.72) 46%, rgba(240, 193, 116, 0) 72%);
  box-shadow:
    0 0 10px rgba(240, 193, 116, 0.66),
    0 0 18px rgba(92, 137, 255, 0.18);
  transform: translate(-50%, -50%) scale(0.6);
  animation: imageDragParticle 0.62s ease-out forwards;
}

@keyframes imageDragParticle {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
  }
  18% {
    opacity: 0.92;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx, 0px)), calc(-50% + var(--ty, -22px))) scale(0.08);
  }
}

.image-drop-ghost {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
  border: 1px solid rgba(240, 193, 116, 0.44);
  border-radius: 14px;
  background: rgba(5, 6, 8, 0.72);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.image-drop-ghost img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.image-drop-ghost.video-drop-ghost video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #050608;
}

.grid-node-panel {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 228px;
  grid-template-rows: 80px 154px;
  gap: 8px 10px;
  align-items: stretch;
}

.grid-field,
.grid-preview-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 24px minmax(0, 1fr);
  gap: 5px;
}

.grid-spec-field {
  grid-column: 1 / -1;
}

.grid-prompt-field {
  grid-column: 1;
}

.grid-preview-panel {
  grid-column: 2;
  align-self: start;
  grid-template-rows: 24px auto;
}

.grid-field-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #aeb4c0;
  font-size: 12px;
}

.grid-field-head span,
.grid-field-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-field-head span {
  color: #dce2ec;
  font-weight: 700;
}

.grid-field-head small {
  color: #88919f;
  font-size: 10px;
}

.grid-field-head .mini-preset-button {
  height: 24px;
  min-width: 46px;
  padding: 0 8px;
  font-size: 11px;
}

.node-grid .grid-field textarea {
  min-height: 0;
  height: 100%;
  max-height: none;
  resize: none;
  overflow: auto;
}

.node-grid .grid-spec-field textarea {
  line-height: 1.45;
}

.node-grid .grid-prompt-field textarea {
  font-size: 11px;
  line-height: 1.42;
}

.node-grid .grid-prompt-preview-text {
  color: #cbd3df;
  background: rgba(5, 6, 8, 0.28);
  cursor: text;
}

.node-grid-preview {
  min-height: 0;
  width: 100%;
  align-self: start;
  display: block;
  margin-top: 0;
  contain: layout paint;
}

.node-grid-preview span {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: auto;
  height: 128px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(111, 162, 255, 0.24), transparent 40%),
    linear-gradient(180deg, #26303c, #12151a 52%, #48311f);
  color: #cfd6e4;
  text-align: center;
}

.node-grid-preview span em {
  display: block;
  color: #eef3ff;
  font-style: normal;
  font-size: 12px;
}

.node-grid-preview span small {
  display: block;
  max-width: 86%;
  color: #9fa8b8;
  font-size: 9px;
  line-height: 1.25;
}

.node-grid-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: auto;
  background: rgba(5, 6, 8, 0.5);
}

.canvas-stage.performance-mode,
.canvas-stage.performance-mode * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.canvas-stage.performance-mode .node-grid-preview img,
.canvas-stage.performance-mode .final-video-slot video,
.canvas-stage.performance-mode .final-video-storyboard img,
.canvas-stage.performance-mode .final-image-slot img {
  visibility: hidden;
}

.canvas-stage.performance-mode .final-video-storyboard img {
  animation-play-state: paused;
}

.canvas-stage.performance-mode .node-grid-preview span::after,
.canvas-stage.performance-mode .final-video-slot::after,
.canvas-stage.performance-mode .final-image-slot::after {
  content: "素材预览暂停 · 操作结束后恢复";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(9, 11, 15, 0.72);
  color: #d9c7aa;
  font-size: 11px;
  text-align: center;
}

.canvas-stage.performance-mode .final-video-slot {
  position: relative;
}

.node-grid-preview .image-flow-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 6px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.58);
  color: #f2eadf;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-grid-preview.drag-over span {
  border-color: rgba(255, 210, 96, 0.96);
  box-shadow:
    0 0 0 3px rgba(240, 193, 116, 0.24),
    0 0 24px rgba(240, 193, 116, 0.3),
    inset 0 0 18px rgba(240, 193, 116, 0.13);
  transform: scale(1.012);
  filter: brightness(1.12) saturate(1.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, filter 0.14s ease;
}

.node-grid-preview.image-embed-target span,
.node-grid-preview.image-embed-flash span,
.final-video-slot.image-embed-target,
.final-video-slot.image-embed-flash {
  border-color: rgba(255, 215, 112, 0.92);
  box-shadow:
    0 0 0 4px rgba(240, 193, 116, 0.2),
    0 0 28px rgba(240, 193, 116, 0.26);
}

.node-grid-preview.image-embed-flash span,
.final-video-slot.image-embed-flash {
  animation: imageEmbedPulse 0.42s ease-out;
}

@keyframes imageEmbedPulse {
  0% {
    transform: scale(0.97);
    filter: brightness(1.18);
  }
  52% {
    transform: scale(1.025);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.node-image-preview {
  height: 98px;
  margin-top: 10px;
}

.node-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.node-actions button {
  min-height: 34px;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.055);
  color: #e7e8ec;
  font-size: 12px;
  line-height: 1.15;
}

.node-actions button > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-actions button.primary {
  border-color: rgba(92, 137, 255, 0.5);
  background: linear-gradient(180deg, rgba(78, 132, 255, 0.8), rgba(40, 94, 210, 0.78));
}

.node-actions button.locked {
  color: #ffd49a;
}

.node-actions button.gold-action {
  border-color: rgba(212, 155, 85, 0.58);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.78), rgba(150, 99, 42, 0.78));
  color: #fff3dc;
}

.node-actions button.gold-action:hover {
  border-color: rgba(245, 196, 126, 0.78);
  background: linear-gradient(180deg, rgba(225, 172, 98, 0.86), rgba(166, 111, 50, 0.86));
}

.node-actions button.export-action {
  border-color: rgba(238, 132, 54, 0.62);
  background: linear-gradient(180deg, rgba(236, 139, 58, 0.84), rgba(177, 86, 30, 0.82));
  color: #fff2df;
}

.node-actions button.export-action:hover {
  border-color: rgba(255, 177, 91, 0.82);
  background: linear-gradient(180deg, rgba(247, 153, 67, 0.92), rgba(197, 98, 34, 0.9));
}

.node-actions.script-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}

.node-actions.single-action {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.node-actions.analysis-actions {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.node-actions.storyboard-actions {
  grid-template-columns: 0.82fr 1fr 1.22fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.node-actions .span-all {
  grid-column: 1 / -1;
}

.node-actions.storyboard-actions .span-all {
  grid-column: auto;
}

.node-actions.prompt-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.node-prompt .node-relations,
.node-prompt .node-spec-editor {
  display: none;
}

.node-prompt .node-icon {
  display: none;
}

.node-prompt .node-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.node-prompt .prompt-output-summary {
  margin-top: 0;
}

.prompt-preview-box {
  min-height: 122px;
  max-height: 168px;
  padding: 12px 14px;
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(12, 13, 16, 0.72);
  color: rgba(235, 238, 244, 0.84);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.68;
  white-space: pre-wrap;
  box-shadow: none;
  resize: vertical;
}

.prompt-preview-box:focus {
  border-color: rgba(255, 255, 255, 0.18);
  outline: none;
  background: rgba(10, 11, 14, 0.82);
}

.prompt-bottom-console {
  min-height: 46px;
  display: block;
  margin-top: 2px;
  padding: 0;
  border-top: 0;
}

.prompt-node-model-tools {
  min-width: 0;
  display: grid;
  grid-template-columns: 145px 56px repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 8px;
}

.prompt-node-model-tools .script-model-select {
  width: 100%;
  max-width: none;
  height: 36px;
  border-radius: 9px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
}

.prompt-node-model-tools > span {
  display: none;
  color: rgba(226, 229, 236, 0.56);
  font-size: 12px;
  font-weight: 800;
}

.prompt-preset-button,
.prompt-preset-button:hover,
.prompt-node-model-tools > button,
.prompt-node-model-tools > button.primary,
.prompt-node-model-tools > button.gold-action,
.prompt-node-model-tools > button.primary:hover,
.prompt-node-model-tools > button.gold-action:hover {
  height: 36px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.prompt-node-model-tools > button:hover,
.prompt-node-model-tools .script-model-select:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.node-actions.grid-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.node-actions.final-actions {
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.node-actions.script-actions button,
.node-actions.single-action button,
.node-actions.analysis-actions button,
.node-actions.prompt-actions button,
.node-actions.grid-actions button,
.node-actions.final-actions button,
.node-actions.storyboard-actions button {
  min-height: 32px;
  height: auto;
  font-size: 12px;
}

.node-actions.storyboard-actions button {
  height: 34px;
  border-radius: 9px;
}

.node-storyboard {
  width: 1000px;
  border-color: transparent;
  box-shadow: none;
}

.storyboard-panel {
  grid-template-rows: auto;
  gap: 8px;
}

.storyboard-preset-button,
.storyboard-preset-button:hover {
  height: 36px;
  min-width: 54px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  box-shadow: none;
}

.storyboard-card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.storyboard-toolbar {
  min-height: 42px;
  padding: 0 14px;
  gap: 12px;
  border-bottom-color: transparent;
  background: transparent;
}

.storyboard-table {
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(15, 16, 20, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.storyboard-toolbar strong {
  margin-right: auto;
  color: rgba(246, 248, 252, 0.94);
  font-size: 13px;
  font-weight: 900;
}

.storyboard-toolbar span {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(226, 229, 236, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.storyboard-episode-binding {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 14px 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 9, 12, 0.7);
}

.storyboard-episode-binding label {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.storyboard-episode-binding span {
  flex: 0 0 auto;
  color: rgba(226, 229, 236, 0.58);
  font-size: 12px;
  font-weight: 800;
}

.storyboard-episode-binding select {
  min-width: 0;
  width: min(420px, 100%);
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #17191f;
  color: #eef0f4;
  font-size: 12px;
  font-weight: 700;
}

.storyboard-episode-binding em {
  flex: 0 1 auto;
  min-width: 0;
  color: rgba(226, 229, 236, 0.48);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-episode-binding.is-bound {
  border-color: rgba(124, 218, 158, 0.18);
}

.storyboard-episode-binding.is-bound em {
  color: rgba(184, 239, 204, 0.74);
}

.storyboard-episode-binding.is-pending {
  border-color: rgba(239, 198, 126, 0.2);
}

.storyboard-empty {
  min-height: 118px;
  display: grid;
  place-items: center;
  color: rgba(226, 229, 236, 0.54);
  font-size: 12px;
  letter-spacing: 0;
}

.storyboard-raw-output {
  min-height: 180px;
  max-height: 220px;
  margin: 0;
  padding: 14px;
  color: rgba(237, 241, 247, 0.78);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow: auto;
}

.storyboard-row {
  min-height: 52px;
  grid-template-columns: 48px 64px minmax(410px, 1.55fr) minmax(220px, 0.9fr) 124px;
  gap: 10px;
  padding: 9px 10px;
  border-bottom-color: rgba(255, 255, 255, 0.075);
  font-size: 12px;
  line-height: 1.44;
}

.storyboard-head-row {
  min-height: 30px;
  color: rgba(226, 229, 236, 0.5);
  background: rgba(18, 20, 26, 0.92);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.storyboard-row .shot-no {
  font-size: 14px;
}

.storyboard-bottom-console {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 0 0 2px;
  border-top: 0;
}

.storyboard-node-model-tools {
  min-width: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.storyboard-node-model-tools .script-model-select {
  width: 144px;
  max-width: 144px;
  height: 36px;
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: #eef0f4;
}

.storyboard-node-model-tools span {
  flex: 0 0 auto;
  color: rgba(226, 229, 236, 0.56);
  font-size: 12px;
  font-weight: 800;
}

.storyboard-node-model-tools em {
  min-width: 0;
  color: rgba(200, 234, 212, 0.82);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storyboard-bottom-console .storyboard-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.storyboard-bottom-console .storyboard-actions button,
.storyboard-bottom-console .storyboard-actions button.primary,
.storyboard-bottom-console .storyboard-actions button.gold-action,
.storyboard-bottom-console .storyboard-actions button.primary:hover,
.storyboard-bottom-console .storyboard-actions button.gold-action:hover {
  flex: 0 0 auto;
  min-height: 36px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.storyboard-bottom-console .storyboard-actions button:hover,
.storyboard-preset-button:hover,
.storyboard-node-model-tools .script-model-select:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.shot-state button {
  height: 26px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef0f4;
  font-size: 12px;
}

.shot-state button:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.node-actions.prompt-actions,
.node-actions.grid-actions {
  gap: 6px;
  margin-top: 8px;
}

.node-actions.grid-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.node-actions.prompt-actions button,
.node-actions.grid-actions button {
  min-height: 32px;
  height: auto;
  border-radius: 9px;
  font-size: 12px;
}

.script-node-console .script-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
}

.script-node-console .script-actions button {
  flex: 0 0 auto;
  min-height: 36px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12px;
}

.script-node-console .script-actions button > span:first-child {
  max-width: none;
}

.script-node-console .membership-cost-badge {
  transform: none;
}

.membership-cost-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 76px;
  min-width: 0;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(225, 233, 244, 0.86);
  background: rgba(255, 255, 255, 0.055);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.membership-cost-badge.billable {
  border-color: rgba(245, 196, 126, 0.38);
  background: rgba(245, 196, 126, 0.14);
  color: #ffe0a3;
}

.membership-cost-badge.free {
  border-color: rgba(112, 197, 150, 0.22);
  background: rgba(112, 197, 150, 0.095);
  color: #bff2d1;
}

.membership-cost-badge.locked,
.video-gen-cost.locked {
  border-color: rgba(255, 116, 116, 0.34);
  background: rgba(255, 116, 116, 0.12);
  color: #ffd0d0;
}

.membership-cost-badge.compact {
  max-width: 70px;
  height: 17px;
  padding: 0 5px;
  font-size: 9.5px;
}

.node-progress.cancelled {
  border-color: rgba(255, 202, 120, 0.24);
}

.node-progress.cancelled .node-progress-track i {
  background: linear-gradient(90deg, #9b7842, #e2ad5a);
}

.node-progress {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(120, 161, 255, 0.18);
  border-radius: 12px;
  background: rgba(5, 8, 13, 0.42);
}

.node-progress.active {
  border-color: rgba(120, 161, 255, 0.28);
  background: linear-gradient(180deg, rgba(10, 16, 28, 0.56), rgba(5, 8, 13, 0.42));
}

.node-progress-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #cdd4e3;
  font-size: 12px;
}

.node-progress-head > span {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-progress-head b {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-right: 7px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(120, 161, 255, 0.12);
  color: #b8cbff;
  font-size: 11px;
  font-weight: 700;
}

.node-progress-head strong {
  position: relative;
  color: #f0f4ff;
  font-size: 12px;
}

.node-progress.active .node-progress-head strong::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #8fb1ff;
  transform: translateY(-50%);
  animation: progressPulse 1.25s ease-in-out infinite;
}

.node-progress-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: max-content;
  margin-left: 0;
}

.node-progress-side em {
  min-width: 38px;
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(231, 237, 250, 0.72);
  font-style: normal;
  font-size: 11px;
  text-align: center;
}

.node-progress-detail {
  min-height: 16px;
  margin: -2px 0 8px;
  overflow: hidden;
  color: rgba(224, 232, 248, 0.72);
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-cancel-button,
.progress-log-button,
.progress-continue-button {
  height: 24px;
  min-width: 42px;
  border: 1px solid rgba(255, 113, 113, 0.42);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 87, 87, 0.1);
  color: #ffb9b9;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.progress-log-button {
  border-color: rgba(126, 166, 255, 0.36);
  background: rgba(92, 128, 214, 0.14);
  color: #d9e4ff;
}

.progress-continue-button {
  min-width: 62px;
  border-color: rgba(212, 155, 85, 0.5);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.24), rgba(150, 99, 42, 0.18));
  color: #ffe8bd;
}

.progress-cancel-button:hover {
  border-color: rgba(255, 113, 113, 0.72);
  background: rgba(255, 87, 87, 0.18);
}

.progress-log-button:hover {
  border-color: rgba(151, 184, 255, 0.68);
  background: rgba(92, 128, 214, 0.22);
}

.progress-continue-button:hover {
  border-color: rgba(245, 196, 126, 0.78);
  background: linear-gradient(180deg, rgba(225, 172, 98, 0.34), rgba(166, 111, 50, 0.26));
}

.node-progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
}

.node-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f83ff, #8fb1ff);
  transition: width 0.22s ease;
}

.node-progress.active .node-progress-track i {
  background-image:
    linear-gradient(90deg, #4f83ff, #8fb1ff),
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.34) 48%, transparent 72%);
  background-size: 100% 100%, 42px 100%;
  background-position: 0 0, -46px 0;
  animation: progressSheen 1.35s linear infinite;
}

.node-asset-design .node-progress {
  padding: 11px 12px 12px;
}

.node-asset-design .node-progress-detail,
.node-script .node-progress-detail {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.node-script .node-progress {
  padding: 11px 12px 12px;
}

.node-script .node-progress-head {
  gap: 8px;
}

.node-script .node-progress-side {
  gap: 5px;
}

.node-script .progress-log-button,
.node-script .progress-cancel-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 10.5px;
}

.node-script .progress-continue-button {
  width: 62px;
  min-width: 62px;
  padding: 0;
  font-size: 10.5px;
}

.node-script .node-progress-side strong {
  min-width: 36px;
  text-align: right;
}

.node-script .node-progress-side em {
  min-width: 34px;
  padding-inline: 6px;
}

.node-progress.queued {
  border-color: rgba(202, 213, 235, 0.2);
  background: rgba(11, 15, 23, 0.44);
}

.node-progress.queued .node-progress-head {
  color: #b7c0d1;
}

.node-progress.queued .node-progress-track i {
  background: linear-gradient(90deg, #7d8799, #c4cce0);
}

.node-progress.success {
  border-color: rgba(97, 189, 131, 0.28);
}

.node-progress.success .node-progress-track i {
  background: linear-gradient(90deg, #4cae72, #8edca9);
}

.node-progress.error {
  border-color: rgba(220, 90, 90, 0.35);
}

.node-progress.error .node-progress-track i {
  background: linear-gradient(90deg, #bc4b4b, #f08b8b);
}

.asset-design-log-dialog-body {
  max-width: 100%;
  max-height: min(430px, calc(100vh - 118px));
  padding: 8px 10px 10px;
  overflow: hidden;
}

.script-node-dialog-body.asset-design-log-dialog-body {
  max-width: 100%;
}

.asset-design-log-dialog,
.asset-design-cues-dialog {
  display: grid;
  gap: 7px;
  color: #e8edf8;
}

.asset-design-log-dialog {
  gap: 7px;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.script-node-dialog {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.asset-design-log-summary,
.asset-design-cues-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid rgba(120, 161, 255, 0.1);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(120, 161, 255, 0.07), rgba(255, 255, 255, 0.026));
}

.asset-design-log-summary > div:first-child,
.asset-design-cues-summary > div:first-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.asset-design-log-summary strong,
.asset-design-cues-summary strong {
  color: #f3f6ff;
  font-size: 12px;
  line-height: 1.25;
}

.asset-design-log-summary span,
.asset-design-cues-summary span {
  color: rgba(222, 230, 247, 0.58);
  font-size: 10px;
  line-height: 1.25;
}

.asset-design-dialog-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 45%;
}

.asset-design-dialog-pills em {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(232, 238, 250, 0.78);
  font-style: normal;
  font-size: 9.5px;
  line-height: 1.35;
}

.asset-design-log-list {
  display: grid;
  gap: 6px;
  max-height: min(330px, calc(100vh - 220px));
  overflow: auto;
  padding-right: 3px;
}

.script-node-dialog .asset-design-log-list,
.script-node-dialog .asset-design-cues-list {
  max-height: none;
  min-height: 0;
}

.asset-design-log-entry {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.058);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.038);
}

.asset-design-log-entry.success {
  background: rgba(88, 178, 121, 0.08);
}

.asset-design-log-entry.error {
  background: rgba(220, 90, 90, 0.1);
}

.asset-design-log-entry.cancelled,
.asset-design-log-entry.canceled {
  background: rgba(226, 173, 90, 0.08);
}

.asset-design-log-entry time {
  color: rgba(224, 232, 248, 0.55);
  font-size: 9px;
  line-height: 17px;
}

.asset-design-log-entry header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.asset-design-log-entry header b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 5px;
  background: rgba(120, 161, 255, 0.14);
  color: #b8cbff;
  font-size: 9px;
  line-height: 1.2;
}

.asset-design-log-entry header strong {
  min-width: 0;
  overflow: hidden;
  color: #f2f6ff;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-design-log-entry header small {
  flex: 0 0 auto;
  margin-left: auto;
  color: rgba(224, 232, 248, 0.55);
  font-size: 9px;
}

.asset-design-log-entry p {
  margin: 3px 0 0;
  color: rgba(224, 232, 248, 0.72);
  font-size: 10px;
  line-height: 1.42;
}

.progress-log-hover-preview {
  position: fixed;
  z-index: 1200;
  width: min(360px, calc(100vw - 24px));
  max-height: min(330px, calc(100vh - 32px));
  box-sizing: border-box;
  padding: 9px;
  border: 1px solid rgba(120, 161, 255, 0.17);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(22, 24, 31, 0.985), rgba(12, 14, 19, 0.985));
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.44);
  color: #e8edf8;
}

.progress-log-hover-preview[hidden] {
  display: none;
}

.progress-log-hover-preview.measuring {
  pointer-events: none;
  opacity: 0;
}

.progress-log-hover-preview::after {
  content: "";
  position: absolute;
  left: clamp(18px, var(--arrow-left, 50%), calc(100% - 18px));
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(120, 161, 255, 0.17);
  border-bottom: 1px solid rgba(120, 161, 255, 0.17);
  background: rgba(12, 14, 19, 0.985);
  transform: translateX(-50%) rotate(45deg);
}

.progress-log-hover-preview.below::after {
  top: -7px;
  bottom: auto;
  border: 0;
  border-left: 1px solid rgba(120, 161, 255, 0.17);
  border-top: 1px solid rgba(120, 161, 255, 0.17);
  background: rgba(22, 24, 31, 0.985);
}

.progress-log-hover-preview .asset-design-log-dialog {
  max-height: min(312px, calc(100vh - 52px));
}

.progress-log-hover-preview .asset-design-log-summary {
  padding: 6px 7px;
}

.progress-log-hover-preview .asset-design-dialog-pills {
  max-width: 40%;
}

.progress-log-hover-preview .asset-design-log-list {
  max-height: min(238px, calc(100vh - 132px));
  padding-right: 2px;
}

.progress-log-hover-preview .asset-design-log-entry {
  grid-template-columns: 40px minmax(0, 1fr);
  padding: 6px 7px;
}

.asset-design-cues-dialog-body {
  max-width: min(940px, 86vw);
}

.script-node-dialog-body.asset-design-cues-dialog-body {
  max-width: none;
}

.asset-design-cues-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.script-node-dialog .asset-design-cues-metrics {
  display: none;
}

.asset-design-cues-metrics b {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #f1f5ff;
  font-size: 14px;
  font-weight: 700;
}

.asset-design-cues-metrics small {
  color: rgba(222, 230, 247, 0.55);
  font-size: 11px;
  font-weight: 500;
}

.asset-design-cues-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 650px);
  overflow: auto;
  padding-right: 4px;
}

.asset-design-cue-card {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.045);
}

.asset-design-cue-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.asset-design-cue-card header strong {
  min-width: 0;
  overflow: hidden;
  color: #f2f6ff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-design-cue-card header span {
  flex: 0 0 auto;
  color: rgba(224, 232, 248, 0.58);
  font-size: 11px;
}

.asset-design-cue-card pre {
  max-height: 170px;
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  padding: 8px 9px;
  background: rgba(2, 5, 11, 0.36);
  color: rgba(232, 238, 250, 0.78);
  font: 12px/1.48 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.script-node-dialog .asset-design-cue-card pre {
  max-height: none;
}

.asset-design-empty-state {
  border: 1px dashed rgba(120, 161, 255, 0.24);
  border-radius: 14px;
  padding: 22px;
  background: rgba(120, 161, 255, 0.055);
  color: rgba(232, 238, 250, 0.76);
  font-size: 13px;
}

@media (max-width: 760px) {
  .asset-design-cues-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-design-cue-card header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@keyframes progressSheen {
  from {
    background-position: 0 0, -46px 0;
  }
  to {
    background-position: 0 0, 120px 0;
  }
}

@keyframes progressPulse {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(-50%) scale(0.85);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.35);
  }
}

.video-gen-preview .node-progress,
.image-gen-preview .node-progress {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  padding: 9px 10px 10px;
  border-color: rgba(120, 161, 255, 0.34);
  border-radius: 12px;
  background: rgba(7, 10, 16, 0.84);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.video-gen-preview .node-progress-head,
.image-gen-preview .node-progress-head {
  min-width: 0;
  margin-bottom: 6px;
  gap: 8px;
  color: rgba(237, 241, 247, 0.88);
  line-height: 1.25;
}

.video-gen-preview .node-progress-head > span,
.image-gen-preview .node-progress-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-gen-preview .node-progress-side,
.image-gen-preview .node-progress-side {
  flex: 0 0 auto;
}

.video-gen-preview .node-progress-side strong,
.image-gen-preview .node-progress-side strong {
  min-width: 36px;
  text-align: right;
}

.video-gen-preview .node-progress-track,
.image-gen-preview .node-progress-track {
  height: 6px;
}

.video-gen-preview:has(.node-progress) > small,
.image-gen-preview:has(.node-progress) > small {
  bottom: 74px;
}

.image-gen-panel .video-gen-label span {
  border-color: rgba(240, 193, 116, 0.38);
  color: rgba(240, 193, 116, 0.7);
}

.image-gen-panel .video-gen-submit {
  background: linear-gradient(135deg, #e88d35, #f3bd67);
  color: #17100a;
}

.image-gen-panel .video-gen-submit.is-busy {
  color: transparent;
}

.node-script .node-icon {
  color: var(--cyan);
}

.node-analysis .node-icon {
  color: var(--purple);
}

.node-character .node-icon,
.node-scene .node-icon,
.node-grid .node-icon,
.node-image-gen .node-icon,
.node-image .node-icon,
.node-video .node-icon {
  color: var(--green);
}

.node-storyboard .node-icon,
.node-prompt .node-icon,
.node-final .node-icon {
  color: var(--gold);
}

#textDialog {
  width: min(800px, calc(100vw - 56px));
  max-height: min(720px, calc(100vh - 56px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #15161b;
  color: var(--text);
  box-shadow: var(--shadow);
}

#textDialog:has(.spec-library) {
  width: min(1320px, calc(100vw - 40px));
  max-height: min(880px, calc(100vh - 32px));
}

#textDialog:has(.video-prompt-dialog) {
  width: min(900px, calc(100vw - 56px));
  max-height: min(760px, calc(100vh - 44px));
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(18, 19, 22, 0.94);
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.56);
}

#textDialog:has(.account-settings-dialog) {
  width: min(1080px, calc(100vw - 28px));
  height: min(660px, calc(100vh - 28px));
  max-height: min(660px, calc(100vh - 28px));
  overflow: hidden;
}

#textDialog:has(.account-settings-dialog) > header {
  flex: 0 0 auto;
  padding: 18px 34px 16px;
}

#textDialog:has(.account-settings-dialog) form {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#dialogBody:has(.account-settings-dialog) {
  height: calc(100% - 69px);
  max-height: none;
  padding: 18px 18px 18px 16px;
  overflow: hidden;
}

#textDialog:has(.splat-render-settings-dialog) {
  width: min(920px, calc(100vw - 32px));
  max-height: min(480px, calc(100vh - 32px));
  overflow: hidden;
  border-color: rgba(120, 205, 255, 0.12);
  background: linear-gradient(180deg, rgba(18, 20, 25, 0.98), rgba(12, 14, 19, 0.98));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.44);
}

#textDialog:has(.splat-render-settings-dialog) header {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

#textDialog:has(.splat-render-settings-dialog) header strong {
  display: none;
}

#textDialog:has(.splat-render-settings-dialog) header button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

#textDialog:has(.splat-render-settings-dialog) form {
  overflow: hidden;
}

#textDialog:has(.supersplat-video-render-settings-dialog) {
  width: min(760px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 32px));
}

#textDialog:has(.supersplat-close-confirm) {
  position: fixed;
  inset: auto;
  left: var(--supersplat-close-left, 50vw);
  top: var(--supersplat-close-top, 50vh);
  width: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
}

#textDialog:has(.supersplat-close-confirm) > form > header {
  display: none;
}

#textDialog:has(.supersplat-close-confirm) form {
  overflow: visible;
}

#dialogBody.confirm-dialog:has(.supersplat-close-confirm) {
  padding: 0;
  max-height: none;
  overflow: visible;
}

#textDialog:has(.script-node-dialog-body) {
  width: min(1040px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 40px));
  border-color: rgba(120, 161, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(22, 25, 33, 0.98), rgba(14, 16, 22, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

#textDialog:has(.script-node-dialog-body.asset-design-log-dialog-body) {
  width: min(468px, calc(100vw - 32px));
  max-height: min(500px, calc(100vh - 52px));
  border-color: rgba(120, 161, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.98), rgba(12, 14, 19, 0.98));
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

#textDialog:has(.spec-preset-picker) {
  width: min(980px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 44px));
  border-color: rgba(212, 155, 85, 0.18);
  background:
    linear-gradient(180deg, rgba(24, 24, 28, 0.98), rgba(16, 17, 22, 0.98));
  box-shadow: 0 28px 92px rgba(0, 0, 0, 0.52);
}

#textDialog:has(.changelog-dialog) {
  position: fixed;
  inset: 28px 28px auto auto;
  width: min(760px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  margin: 0;
  border-color: rgba(141, 203, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.97), rgba(13, 15, 20, 0.97));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

#textDialog:has(.membership-center-dialog) {
  width: min(1180px, calc(100vw - 44px));
  max-height: min(840px, calc(100vh - 36px));
  border-color: rgba(226, 180, 103, 0.18);
  background:
    linear-gradient(180deg, rgba(23, 24, 29, 0.98), rgba(13, 15, 20, 0.98));
  box-shadow: 0 30px 98px rgba(0, 0, 0, 0.5);
}

#textDialog:has(.asset-design-log-dialog-body) {
  position: fixed;
  inset: auto;
  left: var(--progress-log-left, 50%);
  top: var(--progress-log-top, 50%);
  right: auto;
  bottom: auto;
  width: min(468px, calc(100vw - 32px));
  max-height: min(500px, calc(100vh - 52px));
  margin: 0;
  border-color: rgba(120, 161, 255, 0.15);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.98), rgba(12, 14, 19, 0.98));
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.42);
  transform: var(--progress-log-transform, translate(-50%, -50%));
}

#textDialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
}

#textDialog:has(.changelog-dialog)::backdrop,
#textDialog:has(.asset-design-log-dialog-body)::backdrop {
  background: transparent;
}

#textDialog:has(.script-node-dialog-body)::backdrop {
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: none;
}

#textDialog:has(.script-node-dialog-body.asset-design-log-dialog-body)::backdrop {
  background: transparent;
}

#textDialog:has(.video-prompt-dialog)::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px) saturate(0.72);
}

#textDialog form {
  margin: 0;
}

#textDialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

#textDialog header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

#textDialog:has(.changelog-dialog) header {
  padding: 12px 14px;
}

#textDialog:has(.changelog-dialog) header strong {
  font-size: 15px;
}

#textDialog:has(.changelog-dialog) header button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

#textDialog:has(.asset-design-log-dialog-body) header {
  cursor: move;
  user-select: none;
  padding: 8px 10px;
  border-bottom-color: rgba(255, 255, 255, 0.075);
}

#textDialog:has(.asset-design-log-dialog-body) header strong {
  font-size: 13px;
}

#textDialog:has(.asset-design-log-dialog-body) header button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  cursor: pointer;
}

#textDialog:has(.asset-design-log-dialog-body) form {
  max-height: inherit;
}

#dialogBody.asset-design-log-dialog-body.script-node-dialog-body,
#dialogBody.asset-design-log-dialog-body {
  height: min(430px, calc(100vh - 118px));
  max-height: none;
  padding: 8px 10px 10px;
  overflow: hidden;
  line-height: 1.42;
}

#dialogBody {
  max-height: 560px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: #d9dce4;
  line-height: 1.7;
}

#dialogBody.spec-library {
  height: min(760px, calc(100vh - 128px));
  max-height: none;
  overflow: hidden;
}

#dialogBody.video-prompt-dialog {
  height: min(620px, calc(100vh - 138px));
  max-height: none;
  padding: 14px;
  overflow: hidden;
}

#dialogBody.splat-render-settings-body {
  height: min(454px, calc(100vh - 58px));
  max-height: none;
  padding: 12px;
  overflow: hidden;
}

#dialogBody.script-node-dialog-body {
  height: min(620px, calc(100vh - 132px));
  max-height: none;
  padding: 12px 16px 16px;
  overflow: hidden;
  line-height: 1.5;
}

#dialogBody.spec-preset-picker {
  height: min(620px, calc(100vh - 132px));
  max-height: none;
  padding: 16px;
  overflow: hidden;
}

#dialogBody.membership-center-dialog {
  height: min(720px, calc(100vh - 126px));
  max-height: none;
  padding: 16px;
  overflow: auto;
  line-height: 1.45;
  white-space: normal;
}

.video-prompt-dialog-editor {
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 14px;
  outline: none;
  resize: vertical;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018));
  color: #f3f6fb;
  font-size: 15px;
  line-height: 1.72;
  white-space: pre-wrap;
  word-break: break-word;
}

.video-prompt-dialog-editor:focus {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035);
}

.dialog-plain {
  white-space: pre-wrap;
}

.confirm-dialog,
.final-video-link-body {
  white-space: normal;
}

.confirm-card {
  display: grid;
  gap: 12px;
  padding: 4px;
}

.confirm-eyebrow {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid rgba(144, 217, 255, 0.24);
  border-radius: 999px;
  background: rgba(48, 122, 166, 0.12);
  color: #9ed8ff;
  font-size: 11px;
  font-weight: 800;
}

.confirm-card strong {
  color: #f4f7fb;
  font-size: 18px;
  line-height: 1.35;
}

.confirm-card p {
  margin: 0;
  color: #aeb7c5;
  font-size: 13px;
  line-height: 1.6;
}

.confirm-card.danger .confirm-eyebrow {
  border-color: rgba(244, 163, 95, 0.34);
  background: rgba(244, 163, 95, 0.12);
  color: #ffd1a3;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.supersplat-close-confirm-actions {
  margin-top: 0;
}

.supersplat-close-confirm {
  width: min(448px, calc(100vw - 48px));
  gap: 20px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(19, 20, 26, 0.98);
  color: #f2f3f6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.supersplat-close-confirm-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.supersplat-close-confirm-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #1489d8;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.supersplat-close-confirm-message strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  font-weight: 780;
  line-height: 1.25;
}

.supersplat-close-confirm-message p {
  margin: 5px 0 0;
  color: rgba(235, 238, 246, 0.64);
  font-size: 13.5px;
  line-height: 1.45;
}

.supersplat-close-confirm .supersplat-close-confirm-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.supersplat-close-confirm .supersplat-close-confirm-actions button {
  height: 34px;
  min-width: 92px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 720;
}

.supersplat-close-confirm .supersplat-close-confirm-actions .confirm-ok {
  min-width: 96px;
  border-color: rgba(120, 193, 255, 0.48);
  background: rgba(91, 168, 255, 0.18);
  color: #d9ecff;
}

.supersplat-close-confirm .supersplat-close-confirm-actions .subtle {
  color: rgba(232, 235, 242, 0.68);
}

.confirm-actions button {
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe7f2;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.confirm-actions .confirm-ok {
  border-color: rgba(144, 217, 255, 0.42);
  background: linear-gradient(180deg, rgba(64, 132, 185, 0.78), rgba(35, 88, 139, 0.78));
  color: #ffffff;
}

.confirm-actions .confirm-ok.danger {
  border-color: rgba(244, 163, 95, 0.54);
  background: linear-gradient(180deg, rgba(216, 126, 65, 0.9), rgba(152, 74, 38, 0.88));
}

.final-video-link-dialog {
  width: min(560px, calc(100vw - 80px));
  display: grid;
  gap: 14px;
}

.final-video-link-hero {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(144, 217, 255, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(65, 118, 153, 0.18), rgba(12, 16, 24, 0.18));
}

.final-video-link-hero span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(144, 217, 255, 0.11);
  color: #9ed8ff;
  font-size: 11px;
  font-weight: 800;
}

.final-video-link-hero strong {
  color: #f5f8fd;
  font-size: 18px;
}

.final-video-link-hero p {
  margin: 0;
  color: #aeb7c5;
  font-size: 12px;
  line-height: 1.55;
}

.final-video-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.final-video-link-actions button,
.final-video-link-list button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #e4ebf5;
  cursor: pointer;
}

.final-video-link-actions button {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

.final-video-link-actions .primary {
  border-color: rgba(144, 217, 255, 0.42);
  background: linear-gradient(180deg, rgba(64, 132, 185, 0.78), rgba(35, 88, 139, 0.78));
}

.final-video-link-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.final-video-link-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
}

.final-video-link-list button.linked {
  border-color: rgba(126, 224, 167, 0.4);
  background: rgba(126, 224, 167, 0.09);
}

.final-video-link-list strong,
.final-video-link-list small {
  display: block;
}

.final-video-link-list strong {
  color: #f3f7fb;
  font-size: 13px;
}

.final-video-link-list small,
.final-video-link-list em {
  color: #9ca8b7;
  font-size: 12px;
  font-style: normal;
}

.final-video-link-list button.linked em {
  color: #9bf0bd;
}

.final-video-link-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #9ca8b7;
  text-align: center;
}

.analysis-complete-dialog {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.customer-wechat-dialog {
  width: min(420px, calc(100vw - 64px));
  display: grid;
  gap: 14px;
  justify-items: center;
  white-space: normal;
}

.customer-wechat-head {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: center;
}

.customer-wechat-dialog strong {
  color: #f4f7fb;
  font-size: 20px;
}

.customer-wechat-dialog p {
  margin: 0;
  color: #b9bec9;
  font-size: 13px;
}

.customer-wechat-dialog img {
  width: min(340px, calc(100vw - 108px));
  max-height: min(72vh, 520px);
  display: block;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
}

.analysis-complete-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(97, 189, 131, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(97, 189, 131, 0.12), rgba(97, 189, 131, 0.045));
}

.seedance-review-dialog-body {
  display: grid;
  width: min(520px, calc(100vw - 52px));
  max-height: min(520px, calc(100vh - 140px));
  gap: 10px;
  padding: 14px !important;
  white-space: normal;
}

.seedance-review-dialog {
  display: grid;
  gap: 10px;
  line-height: 1.5;
}

.seedance-review-hero {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 118, 118, 0.32);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 95, 95, 0.14), rgba(255, 184, 92, 0.055));
}

.seedance-review-hero span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 118, 118, 0.18);
  color: #ffd4d4;
  font-size: 21px;
  font-weight: 900;
}

.seedance-review-hero strong {
  display: block;
  margin-bottom: 2px;
  color: #fff4e8;
  font-size: 15px;
}

.seedance-review-hero p,
.seedance-review-card ul {
  margin: 0;
  color: #d8c3b4;
  font-size: 12px;
}

.seedance-review-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.seedance-review-card small {
  color: #f0c174;
  font-size: 12px;
  font-weight: 800;
}

.seedance-review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.seedance-review-tags b {
  max-width: 132px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid rgba(240, 193, 116, 0.22);
  border-radius: 7px;
  background: rgba(240, 193, 116, 0.1);
  color: #ffe4b7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seedance-review-card li {
  margin: 3px 0;
}

.seedance-review-meta {
  display: grid;
  gap: 2px;
  padding: 0 2px;
  color: #9fa8b8;
  font-size: 11px;
  line-height: 1.35;
}

.seedance-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.seedance-review-actions button {
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
}

.analysis-complete-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(97, 189, 131, 0.18);
  color: #8af0aa;
  font-size: 24px;
  font-weight: 800;
}

.analysis-complete-hero strong {
  display: block;
  color: #f3f7f4;
  font-size: 18px;
}

.analysis-complete-hero p {
  margin: 3px 0 0;
  color: #bdd9c7;
  font-size: 13px;
}

.analysis-complete-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.analysis-complete-stats article,
.analysis-complete-list div {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.analysis-complete-stats article {
  padding: 12px;
}

.analysis-complete-stats span {
  display: block;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.analysis-complete-stats small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.analysis-complete-list {
  display: grid;
  gap: 8px;
}

.analysis-complete-list div {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
}

.analysis-complete-list strong {
  color: #f1f3f8;
}

.analysis-complete-list span {
  color: #aeb4c0;
  font-size: 13px;
}

.io-dialog {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.io-dialog section {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(4, 6, 10, 0.28);
}

.io-dialog header {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: #f0f3f8;
  font-weight: 700;
}

.io-dialog pre {
  max-height: 240px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: #d9dce4;
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.spec-library {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  white-space: normal;
}

.spec-library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 14px 16px;
  border: 1px solid rgba(212, 155, 85, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(212, 155, 85, 0.13), rgba(101, 201, 217, 0.055)),
    rgba(255, 255, 255, 0.035);
}

.spec-library-hero span {
  display: block;
  margin-bottom: 5px;
  color: #f1d6ae;
  font-size: 12px;
  font-weight: 700;
}

.spec-library-hero strong {
  display: block;
  color: #f4f6fa;
  font-size: 21px;
  line-height: 1.15;
}

.spec-library-hero p {
  max-width: 620px;
  margin: 8px 0 0;
  color: #c7ccd7;
  font-size: 13px;
  line-height: 1.6;
}

.spec-library-hero dl {
  display: grid;
  grid-template-columns: repeat(3, 92px);
  gap: 8px;
  margin: 0;
}

.spec-library-hero dl div {
  min-height: 72px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.28);
}

.spec-library-hero dt {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.spec-library-hero dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.spec-library-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.spec-library-nav {
  align-self: stretch;
  display: grid;
  grid-auto-rows: minmax(88px, auto);
  gap: 8px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(4, 6, 10, 0.26);
}

.spec-library-nav button {
  width: 100%;
  min-height: 88px;
  height: auto;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  text-align: left;
  border-radius: 12px;
}

.spec-library-nav button:hover,
.spec-library-nav button.active {
  border-color: rgba(212, 155, 85, 0.42);
  background: rgba(212, 155, 85, 0.09);
}

.spec-library-nav span {
  min-width: 0;
}

.spec-library-nav strong,
.spec-library-nav em {
  display: block;
}

.spec-library-nav strong {
  overflow: hidden;
  color: #f0f3f8;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-library-nav em {
  margin-top: 5px;
  color: #9aa2af;
  font-style: normal;
  font-size: 12px;
  line-height: 1.35;
}

.spec-library-fields {
  display: grid;
  min-height: 0;
  min-width: 0;
}

.spec-library-field {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.spec-library-field[hidden] {
  display: none;
}

.spec-library-field header,
.spec-library-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spec-library-field header {
  padding: 0;
  border-bottom: 0;
}

.spec-library-field header > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.spec-library-field header > div > div {
  min-width: 0;
}

.spec-library-field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.spec-library-field-actions button {
  min-width: 0;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 155, 85, 0.22);
  background: rgba(255, 248, 236, 0.045);
  color: #f0d4a5;
  font-size: 11px;
  letter-spacing: 0;
}

.spec-library-field-actions button:hover {
  border-color: rgba(212, 155, 85, 0.5);
  background: rgba(212, 155, 85, 0.12);
  color: #ffe7bf;
}

.spec-library-field strong {
  display: block;
  color: #f0f3f8;
  line-height: 1.25;
}

.spec-library-field small {
  display: block;
  margin-top: 3px;
  color: #9aa2af;
  font-size: 12px;
  line-height: 1.35;
}

.spec-library-field .spec-library-active-meta {
  margin-top: 7px;
  color: #d7b27a;
  font-size: 11px;
}

.spec-library-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
  font-style: normal;
  font-size: 14px;
  font-weight: 800;
}

.spec-library-mark.gold {
  border-color: rgba(212, 155, 85, 0.34);
  background: rgba(212, 155, 85, 0.14);
  color: #ffd9a6;
}

.spec-library-mark.cyan {
  border-color: rgba(101, 201, 217, 0.34);
  background: rgba(101, 201, 217, 0.12);
  color: #a9edf5;
}

.spec-library-mark.green {
  border-color: rgba(97, 189, 131, 0.34);
  background: rgba(97, 189, 131, 0.12);
  color: #a9e7bd;
}

.spec-library-mark.purple {
  border-color: rgba(157, 120, 255, 0.34);
  background: rgba(157, 120, 255, 0.12);
  color: #cbbcff;
}

.spec-version-shell {
  min-height: 0;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 12px;
}

.spec-version-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.26);
}

.spec-version-item {
  position: relative;
  min-width: 0;
}

.spec-version-list button {
  min-height: 48px;
  height: auto;
  display: grid;
  align-content: center;
  gap: 0;
  padding: 10px 12px;
  text-align: left;
}

.spec-version-list button.active,
.spec-version-item.active .spec-version-main {
  border-color: rgba(212, 155, 85, 0.5);
  background: rgba(212, 155, 85, 0.12);
}

.spec-version-main {
  width: 100%;
  padding-right: 30px;
  overflow: hidden;
}

.spec-version-main strong {
  max-width: 100%;
  padding-right: 4px;
}

.spec-version-delete {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 19px;
  height: 19px;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0;
  opacity: 0;
  transform: translateY(-50%) scale(0.95);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(214, 220, 231, 0.72);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  box-shadow: none;
  transition: opacity 0.14s ease, transform 0.14s ease, color 0.14s ease;
}

.spec-version-item:hover .spec-version-delete,
.spec-version-delete:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.spec-version-delete:hover {
  color: #ffd0d0;
}

.spec-version-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-version-create {
  min-height: 74px;
  place-items: center;
  justify-items: center;
  border-style: dashed;
  color: #f2d39f;
  text-align: center;
}

.spec-version-create strong {
  font-size: 24px;
  line-height: 1;
}

.spec-version-create:hover {
  border-color: rgba(212, 155, 85, 0.58);
  background: rgba(212, 155, 85, 0.1);
}

.spec-version-editor,
.spec-version-editor-pane {
  min-height: 0;
  display: grid;
}

.spec-version-editor-pane {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.spec-version-editor-pane[hidden] {
  display: none;
}

.spec-version-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.spec-version-meta label {
  display: grid;
  gap: 5px;
  color: #9aa2af;
  font-size: 12px;
}

.spec-version-meta input {
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(4, 6, 10, 0.38);
  color: #e4e7ef;
  padding: 0 10px;
  outline: none;
}

.spec-library-field textarea {
  min-height: 0;
  height: 100%;
  resize: none;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.38);
  color: #e4e7ef;
  padding: 12px;
  font-size: 13px;
  line-height: 1.65;
  outline: none;
}

.spec-library-field textarea:focus {
  border-color: rgba(212, 155, 85, 0.46);
  box-shadow: 0 0 0 3px rgba(212, 155, 85, 0.08);
}

.spec-library button {
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
  cursor: pointer;
}

.spec-library-field header button {
  width: auto;
  min-width: 64px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0 13px;
}

.spec-library-actions {
  position: relative;
  z-index: 2;
  justify-content: flex-end;
  margin: 0 -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(21, 22, 27, 0.94);
}

.spec-library-actions button {
  min-width: 120px;
  height: 36px;
}

.spec-library-actions button:first-child {
  border-color: rgba(212, 155, 85, 0.55);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.72), rgba(151, 94, 40, 0.72));
  color: #fff6df;
}

.spec-library-save-notice {
  position: absolute;
  right: 18px;
  bottom: calc(100% + 10px);
  z-index: 5;
  max-width: min(420px, calc(100vw - 80px));
  padding: 9px 13px;
  border: 1px solid rgba(255, 214, 137, 0.4);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 196, 98, 0.2), rgba(96, 151, 255, 0.13)),
    rgba(22, 23, 29, 0.98);
  color: #fff3d7;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.44), 0 0 24px rgba(212, 155, 85, 0.16);
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.spec-library-save-notice.show {
  opacity: 1;
  transform: translateY(0);
}

.spec-library .spec-version-delete {
  right: 11px;
  top: 50%;
  width: 19px;
  min-width: 0;
  height: 19px;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(214, 220, 231, 0.72);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%) scale(0.95);
}

.spec-library .spec-version-delete:hover {
  border: 0 !important;
  background: transparent !important;
  color: #ffd0d0;
  transform: translateY(-50%) scale(1.08);
}

.spec-library .spec-version-item:hover .spec-version-delete,
.spec-library .spec-version-delete:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.spec-library-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(6, 7, 11, 0.58);
}

.spec-library-confirm-card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 187, 126, 0.2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28, 25, 24, 0.98), rgba(17, 18, 22, 0.98));
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
}

.spec-library-confirm-card > span {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid rgba(244, 163, 95, 0.28);
  border-radius: 999px;
  background: rgba(244, 163, 95, 0.1);
  color: #ffd1a3;
  font-size: 11px;
  font-weight: 800;
}

.spec-library-confirm-card strong {
  color: #f7f3ed;
  font-size: 17px;
  line-height: 1.4;
}

.spec-library-confirm-card p {
  margin: 0;
  color: #aeb5c0;
  font-size: 13px;
  line-height: 1.65;
}

.spec-library-confirm-card div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.spec-library-confirm-card button {
  width: auto;
  min-width: 88px;
  height: 36px;
  padding: 0 14px;
}

.spec-library-confirm-card button.danger {
  border-color: rgba(244, 163, 95, 0.54);
  background: linear-gradient(180deg, rgba(216, 126, 65, 0.9), rgba(152, 74, 38, 0.88));
  color: #fff7ef;
}

@media (max-width: 920px) {
  #textDialog:has(.spec-library) {
    width: min(760px, calc(100vw - 32px));
  }

  #dialogBody.spec-library {
    height: min(760px, calc(100vh - 128px));
    overflow: hidden;
  }

  .spec-library-hero,
  .spec-library-layout {
    grid-template-columns: 1fr;
  }

  .spec-library-hero dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spec-library-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .spec-library-field textarea {
    min-height: 320px;
  }

  .spec-version-shell {
    grid-template-columns: 1fr;
  }

  .spec-version-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 160px;
  }
}

.final-style-dialog {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.spec-preset-picker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  white-space: normal;
}

.spec-preset-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 155, 85, 0.15);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(212, 155, 85, 0.085), rgba(255, 255, 255, 0.035));
}

.spec-preset-intro strong {
  color: #fff2d2;
  font-size: 14px;
}

.spec-preset-intro span {
  min-width: 0;
  overflow: hidden;
  color: rgba(226, 230, 239, 0.64);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-preset-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}

.spec-preset-version-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.spec-preset-version {
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.042);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.spec-preset-version:hover {
  border-color: rgba(212, 155, 85, 0.32);
  background: rgba(212, 155, 85, 0.07);
}

.spec-preset-version.active {
  border-color: rgba(212, 155, 85, 0.62);
  background: rgba(212, 155, 85, 0.13);
  box-shadow: inset 0 0 0 1px rgba(212, 155, 85, 0.12);
}

.spec-preset-version input {
  accent-color: #d49b55;
}

.spec-preset-version span,
.spec-preset-version strong,
.spec-preset-version small {
  min-width: 0;
  display: block;
}

.spec-preset-version strong {
  overflow: hidden;
  color: #f0f3f8;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-preset-version small {
  margin-top: 4px;
  overflow: hidden;
  color: rgba(215, 178, 122, 0.82);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-preset-preview {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.spec-preset-preview-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.spec-preset-preview-head strong {
  color: #f3f6fb;
  font-size: 13px;
}

.spec-preset-preview-head span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 2px 7px;
  color: rgba(225, 230, 239, 0.55);
  font-size: 11px;
}

.spec-preset-preview textarea {
  width: 100%;
  min-height: 0;
  height: 100%;
  resize: none;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.38);
  color: rgba(232, 236, 244, 0.84);
  padding: 13px 14px;
  font-size: 12px;
  line-height: 1.65;
  outline: none;
}

.spec-preset-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.spec-preset-actions button {
  min-width: 104px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.spec-preset-actions button:last-child {
  border-color: rgba(212, 155, 85, 0.55);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.72), rgba(151, 94, 40, 0.72));
  color: #fff6df;
}

@media (max-width: 760px) {
  #dialogBody.spec-preset-picker {
    height: min(660px, calc(100vh - 118px));
  }

  .spec-preset-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .spec-preset-intro span {
    text-align: left;
    white-space: normal;
  }

  .spec-preset-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 0.44fr) minmax(0, 0.56fr);
  }
}

.image-style-floating {
  position: absolute;
  z-index: 42;
  left: 50%;
  top: 52%;
  width: min(780px, calc(100vw - 96px));
  min-width: 560px;
  max-height: min(430px, calc(100vh - 110px));
  resize: both;
  overflow: auto;
  border: 1px solid rgba(240, 193, 116, 0.18);
  border-radius: 16px;
  background: rgba(18, 19, 22, 0.96);
  box-shadow: 0 24px 82px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%);
}

.image-style-floating[hidden] {
  display: none;
}

.image-style-dialog-window {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(320px, 1.15fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  white-space: normal;
}

.image-style-float-head {
  grid-column: 1 / -1;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
}

.image-style-float-head span {
  color: rgba(240, 193, 116, 0.82);
  font-size: 12px;
  font-weight: 900;
}

.image-style-float-head button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #dfe4ed;
}

.image-style-dialog-presets,
.image-style-preview-pane {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.image-style-version-list {
  max-height: 270px;
  display: grid;
  gap: 8px;
  overflow: auto;
}

.image-style-version {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.image-style-version.active {
  border-color: rgba(240, 193, 116, 0.46);
  background: rgba(240, 193, 116, 0.1);
}

.image-style-version span,
.image-style-version strong,
.image-style-version small {
  min-width: 0;
  display: block;
}

.image-style-version strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #f3f6fb;
  font-size: 12px;
}

.image-style-version strong > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-style-version strong button,
.image-style-preview-head button {
  height: 24px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid rgba(240, 193, 116, 0.22);
  border-radius: 999px;
  background: rgba(240, 193, 116, 0.07);
  color: rgba(246, 216, 170, 0.92);
  font-size: 11px;
  font-weight: 800;
}

.image-style-version small {
  margin-top: 4px;
  overflow: hidden;
  color: rgba(199, 205, 216, 0.66);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-style-empty {
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: rgba(223, 228, 236, 0.54);
  font-size: 12px;
}

.image-style-preview-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.image-style-preview-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f3f6fb;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-style-version-preview {
  width: 100%;
  min-height: 228px;
  height: 100%;
  resize: none;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  outline: none;
  background: rgba(4, 6, 10, 0.34);
  color: rgba(227, 232, 240, 0.78);
  font-size: 12px;
  line-height: 1.62;
}

.image-style-dialog-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.image-style-dialog-actions button {
  height: 34px;
  min-width: 92px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #e8ecf4;
  font-size: 12px;
  font-weight: 850;
}

.image-style-dialog-actions button.primary {
  border-color: rgba(240, 193, 116, 0.52);
  background: linear-gradient(180deg, rgba(221, 168, 86, 0.82), rgba(146, 91, 42, 0.82));
  color: #fff6df;
}

.image-style-dialog-actions button:disabled,
.image-style-preview-head button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .image-style-floating {
    left: 12px;
    right: 12px;
    top: 96px;
    width: auto;
    min-width: 0;
    transform: none;
  }

  .image-style-dialog-window {
    grid-template-columns: 1fr;
  }
}

.final-style-dialog p {
  margin: 0;
  color: #d9dce4;
  font-size: 13px;
  line-height: 1.65;
}

.final-style-dialog textarea {
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(4, 6, 10, 0.42);
  color: #e4e7ef;
  padding: 12px;
  line-height: 1.65;
  outline: none;
}

.final-style-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.final-style-actions button {
  height: 36px;
  min-width: 104px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
  cursor: pointer;
}

.final-style-actions button.gold {
  border-color: rgba(212, 155, 85, 0.56);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.72), rgba(151, 94, 40, 0.72));
  color: #fff6df;
}

.flow-ready {
  display: grid;
  gap: 12px;
  white-space: normal;
}

.flow-ready p {
  margin: 0;
  color: #d9dce4;
}

.flow-ready-actions {
  display: flex;
  gap: 10px;
}

.flow-ready-actions button {
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
}

.flow-ready-actions button:first-child {
  border-color: rgba(92, 137, 255, 0.5);
  background: linear-gradient(180deg, rgba(78, 132, 255, 0.75), rgba(40, 94, 210, 0.72));
}

.flow-ready textarea {
  min-height: 260px;
  resize: vertical;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(4, 6, 10, 0.42);
  color: #e4e7ef;
  padding: 12px;
  line-height: 1.65;
}

.storage-manager {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.storage-loading {
  min-height: 160px;
  display: grid;
  place-items: center;
  color: #cfd6e4;
}

.storage-manager-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(97, 189, 131, 0.26);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(97, 189, 131, 0.12), rgba(97, 189, 131, 0.045));
}

.storage-manager-hero span,
.storage-manager-grid small,
.storage-manager-note {
  color: #9fa9b7;
  font-size: 12px;
}

.storage-manager-hero strong {
  display: block;
  margin-top: 4px;
  color: #f4f7f5;
  font-size: 19px;
}

.storage-manager-hero p,
.storage-manager-message {
  margin: 7px 0 0;
  color: #cdd8d2;
  font-size: 13px;
}

.storage-ring {
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #15161b 0 58%, transparent 59%),
    conic-gradient(#61bd83 var(--storage-percent, 0%), rgba(255, 255, 255, 0.1) 0);
}

.storage-ring b,
.storage-ring small {
  grid-area: 1 / 1;
}

.storage-ring b {
  color: #f1fff5;
  font-size: 20px;
}

.storage-ring small {
  margin-top: 36px;
  color: #9fb0a7;
  font-size: 11px;
}

.storage-meter {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.storage-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #dce3ed;
  font-size: 13px;
}

.storage-meter-head strong {
  color: #c7ecd3;
}

.storage-meter-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.storage-meter-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #61bd83, #91e2a9);
}

.storage-manager-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.storage-manager-grid article {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.storage-manager-grid strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #f1f4f8;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-manager-message {
  padding: 10px 12px;
  border: 1px solid rgba(97, 189, 131, 0.24);
  border-radius: 10px;
  background: rgba(97, 189, 131, 0.07);
}

.storage-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.storage-manager-actions button {
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.06);
  color: #e9edf3;
}

.storage-manager-actions button.primary {
  border-color: rgba(97, 189, 131, 0.5);
  background: linear-gradient(180deg, rgba(97, 189, 131, 0.72), rgba(45, 126, 76, 0.72));
  color: #f3fff6;
}

.storage-manager-note {
  margin: 0;
}

.changelog-dialog {
  display: grid;
  box-sizing: border-box;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  padding: 12px 14px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: normal;
}

.changelog-popover {
  position: fixed;
  z-index: 1250;
  box-sizing: border-box;
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid rgba(141, 203, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 22, 28, 0.98), rgba(13, 15, 20, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
  color: #e9eef8;
}

.changelog-popover[hidden] {
  display: none;
}

.changelog-popover.measuring {
  opacity: 0;
  pointer-events: none;
}

.changelog-popover::before {
  content: "";
  position: absolute;
  left: clamp(18px, var(--arrow-left, 50%), calc(100% - 18px));
  top: -8px;
  width: 14px;
  height: 14px;
  border-left: 1px solid rgba(141, 203, 255, 0.16);
  border-top: 1px solid rgba(141, 203, 255, 0.16);
  background: rgba(20, 22, 28, 0.98);
  transform: translateX(-50%) rotate(45deg);
}

.changelog-popover.above::before {
  top: auto;
  bottom: -8px;
  border: 0;
  border-right: 1px solid rgba(141, 203, 255, 0.16);
  border-bottom: 1px solid rgba(141, 203, 255, 0.16);
  background: rgba(13, 15, 20, 0.98);
}

.changelog-popover .changelog-dialog {
  max-height: inherit;
  border-radius: inherit;
}

.changelog-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  white-space: normal;
}

.changelog-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1px solid rgba(141, 203, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(74, 119, 255, 0.16), rgba(88, 205, 156, 0.1)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.changelog-hero div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.changelog-hero span,
.changelog-day header strong {
  color: #95a1b3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.changelog-hero strong {
  color: #f1f7f3;
  font-size: 18px;
  line-height: 1.35;
}

.changelog-hero p {
  max-width: 520px;
  margin: 0;
  color: #aeb8c8;
  font-size: 12px;
  line-height: 1.45;
}

.changelog-hero aside {
  flex: 0 0 auto;
  display: grid;
  min-width: 92px;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 16px;
  background: rgba(5, 8, 14, 0.28);
  text-align: center;
}

.changelog-hero aside strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.changelog-hero aside span {
  color: #a8f2c0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.changelog-hero aside small {
  color: #8f9bad;
  font-size: 11px;
}

.changelog-day {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 10px;
}

.changelog-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 0 12px;
}

.changelog-day header span {
  color: #eef3fb;
  font-size: 15px;
  font-weight: 850;
}

.changelog-items {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 12px;
}

.changelog-items::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(141, 203, 255, 0.1), rgba(141, 203, 255, 0.34), rgba(141, 203, 255, 0.08));
}

.changelog-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.038);
  animation: changelogFadeIn 0.26s ease both;
  animation-delay: var(--delay, 0ms);
}

.changelog-card::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 17px;
  width: 9px;
  height: 9px;
  border: 2px solid rgba(141, 203, 255, 0.72);
  border-radius: 999px;
  background: #10151f;
}

.changelog-card:hover {
  border-color: rgba(141, 203, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.changelog-tag {
  flex: 0 0 auto;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(141, 203, 255, 0.11);
  color: #b9dcff;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.changelog-tag.layout {
  background: rgba(141, 203, 255, 0.13);
  color: #b9dcff;
}

.changelog-tag.storage {
  background: rgba(103, 213, 140, 0.13);
  color: #b9f1c7;
}

.changelog-tag.asset {
  background: rgba(202, 166, 255, 0.13);
  color: #d7c0ff;
}

.changelog-tag.generation {
  background: rgba(244, 190, 113, 0.14);
  color: #ffd59c;
}

.changelog-card p {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  color: #dce2ec;
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.changelog-empty {
  padding: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #9fa6b3;
  text-align: center;
}

@media (max-width: 760px) {
  .changelog-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .changelog-hero aside {
    text-align: left;
  }

  .changelog-card {
    align-items: flex-start;
    flex-direction: column;
  }

}

@keyframes changelogFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.recycle-bin {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.recycle-bin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(212, 155, 85, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(212, 155, 85, 0.18), rgba(92, 137, 255, 0.1)),
    rgba(4, 6, 10, 0.34);
}

.recycle-bin-hero span,
.recycle-item small,
.recycle-empty p {
  color: #9fa6b3;
  font-size: 12px;
}

.recycle-bin-hero strong,
.recycle-empty strong {
  display: block;
  margin-top: 2px;
  color: #f2f4f8;
  font-size: 18px;
}

.recycle-bin-hero button,
.recycle-item-actions button {
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
}

.recycle-list {
  display: grid;
  gap: 10px;
}

.recycle-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.34);
}

.recycle-item-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(212, 155, 85, 0.14);
  color: #f2d39f;
  font-weight: 800;
}

.recycle-item-main {
  min-width: 0;
}

.recycle-item-main header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
}

.recycle-item-main strong,
.recycle-item-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recycle-item-main header span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid rgba(143, 148, 160, 0.28);
  border-radius: 999px;
  color: #bfc5d1;
  font-size: 11px;
}

.recycle-item-main p {
  margin: 3px 0 0;
  color: #cfd3dd;
}

.recycle-item-actions {
  display: flex;
  gap: 8px;
}

.recycle-item-actions .danger,
.recycle-bin-hero button {
  border-color: rgba(220, 90, 90, 0.4);
  color: #ffd0d0;
}

.recycle-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
  background: rgba(4, 6, 10, 0.26);
}

.new-canvas-form {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.project-create-dialog {
  place-items: center;
}

.new-canvas-card {
  display: grid;
  gap: 12px;
  width: min(460px, calc(100vw - 44px));
  padding: 18px;
  border: 1px solid rgba(226, 180, 103, 0.2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 24, 35, 0.96), rgba(10, 14, 22, 0.96));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.new-canvas-eyebrow {
  width: fit-content;
  min-height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(226, 180, 103, 0.24);
  border-radius: 999px;
  background: rgba(226, 180, 103, 0.1);
  color: #f4cb8c;
  font-size: 11px;
  font-weight: 900;
  line-height: 20px;
}

.new-canvas-card > strong {
  color: #fff4d8;
  font-size: 20px;
  font-weight: 950;
}

.new-canvas-form p {
  margin: 0;
  color: #cfd3dd;
  font-size: 13px;
  line-height: 1.62;
}

.new-canvas-form label {
  display: grid;
  gap: 8px;
}

.new-canvas-form span {
  color: #9fa6b3;
  font-size: 13px;
}

.new-canvas-form input {
  height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  outline: none;
  padding: 0 12px;
  background: rgba(4, 6, 10, 0.42);
  color: #e4e7ef;
  font-size: 13px;
  font-weight: 850;
}

.new-canvas-form input:focus {
  border-color: rgba(226, 180, 103, 0.5);
  box-shadow: 0 0 0 3px rgba(226, 180, 103, 0.12);
}

.new-canvas-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.new-canvas-actions button {
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
}

.new-canvas-actions button:first-child {
  border-color: rgba(226, 180, 103, 0.48);
  background: linear-gradient(180deg, rgba(226, 180, 103, 0.82), rgba(155, 101, 43, 0.82));
  color: #fff6df;
}

.api-key-manager {
  display: grid;
  gap: 14px;
  white-space: normal;
}

.api-key-hero {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(199, 239, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(73, 159, 220, 0.14), rgba(240, 193, 116, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.api-key-hero strong {
  color: #ffffff;
  font-size: 16px;
}

.api-key-hero p,
.api-key-hero small {
  margin: 0;
  color: #aeb8c7;
  font-size: 12px;
  line-height: 1.55;
}

.api-key-hero small {
  color: #f0c174;
}

.api-key-list {
  display: grid;
  gap: 10px;
}

.api-key-list-head {
  display: none;
}

.api-key-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) auto minmax(150px, 0.8fr) minmax(220px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.api-key-row span,
.api-key-name,
.api-key-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.api-key-row strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #edf1f7;
  font-size: 13px;
}

.api-key-status {
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(223, 226, 235, 0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.api-key-status.ok {
  border-color: rgba(113, 223, 164, 0.32);
  background: rgba(113, 223, 164, 0.1);
  color: #9df0bd;
}

.api-key-status.saved {
  border-color: rgba(199, 239, 255, 0.26);
  background: rgba(199, 239, 255, 0.08);
  color: #c7efff;
}

.api-key-status.failed {
  border-color: rgba(255, 118, 118, 0.32);
  background: rgba(255, 118, 118, 0.1);
  color: #ff9b9b;
}

.api-key-status.missing {
  color: rgba(223, 226, 235, 0.42);
}

.api-key-status.testing {
  border-color: rgba(240, 193, 116, 0.45);
  background: rgba(240, 193, 116, 0.12);
  color: #f0c174;
}

.api-key-row.is-testing {
  border-color: rgba(240, 193, 116, 0.2);
  background: rgba(240, 193, 116, 0.045);
}

.api-key-row small,
.api-key-row em {
  color: #8f98a8;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.api-key-row input {
  height: 36px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 10px;
  outline: none;
  padding: 0 11px;
  background: rgba(5, 6, 8, 0.38);
  color: #eef9ff;
  font-size: 12px;
}

.api-key-row input:focus {
  border-color: rgba(199, 239, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(199, 239, 255, 0.08);
}

.api-key-row button,
.api-key-actions button {
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.055);
  color: #dfe7f2;
  font-size: 12px;
  font-weight: 700;
}

.api-key-row button:disabled,
.api-key-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.api-key-row-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
}

.api-key-row em {
  grid-column: auto;
}

.api-key-test-detail {
  min-height: 15px;
}

.api-key-test-detail.is-ok {
  color: #9df0bd;
}

.api-key-test-detail.is-error {
  color: #ff9b9b;
}

.api-key-actions {
  display: flex;
  gap: 10px;
}

.api-key-actions button:first-child {
  border-color: rgba(199, 239, 255, 0.38);
  background: linear-gradient(180deg, rgba(64, 132, 185, 0.72), rgba(35, 88, 139, 0.72));
  color: #ffffff;
}

.membership-center {
  display: grid;
  gap: 14px;
  color: #dfe5ee;
}

.membership-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid rgba(226, 180, 103, 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 12%, rgba(226, 180, 103, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(68, 118, 162, 0.16), rgba(226, 180, 103, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.membership-hero > div {
  display: grid;
  align-content: center;
  gap: 8px;
}

.membership-eyebrow {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(226, 180, 103, 0.3);
  border-radius: 999px;
  color: #f4c985;
  background: rgba(226, 180, 103, 0.08);
  font-size: 11px;
  font-weight: 800;
}

.membership-hero strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.22;
}

.membership-hero p {
  max-width: 760px;
  margin: 0;
  color: #aeb8c7;
  font-size: 13px;
  line-height: 1.65;
}

.membership-hero aside {
  display: grid;
  gap: 5px;
  align-content: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: 14px;
  background: rgba(5, 6, 8, 0.24);
}

.membership-hero aside span,
.membership-hero aside small {
  color: #8f98a8;
  font-size: 12px;
}

.membership-hero aside strong {
  color: #f5c879;
  font-size: 20px;
}

.membership-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.membership-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
}

.membership-summary span,
.membership-summary small {
  color: #8f98a8;
  font-size: 11px;
}

.membership-summary strong {
  color: #f3f7fb;
  font-size: 17px;
}

.membership-section {
  display: grid;
  gap: 10px;
}

.membership-section > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.membership-section > header strong {
  color: #f3f7fb;
  font-size: 15px;
}

.membership-section > header span {
  color: #8f98a8;
  font-size: 12px;
}

.membership-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.membership-estimate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.membership-estimate-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
}

.membership-estimate-grid strong {
  color: #eef3fb;
  font-size: 12px;
}

.membership-estimate-grid span {
  color: #f4c985;
  font-size: 15px;
  font-weight: 900;
}

.membership-estimate-grid small {
  color: #8f98a8;
  font-size: 11px;
  line-height: 1.42;
}

.membership-mode-card,
.membership-credit-packs button,
.membership-plan button,
.membership-actions button {
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe7f2;
}

.membership-mode-card {
  display: grid;
  gap: 5px;
  min-height: 98px;
  padding: 12px;
  text-align: left;
}

.membership-mode-card span {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(141, 203, 255, 0.09);
  color: #9fd4ff;
  font-size: 11px;
  font-weight: 800;
}

.membership-mode-card strong {
  color: #ffffff;
  font-size: 15px;
}

.membership-mode-card small {
  color: #9ea8b6;
  font-size: 12px;
  line-height: 1.5;
}

.membership-mode-card.active {
  border-color: rgba(112, 197, 150, 0.42);
  background: linear-gradient(180deg, rgba(59, 143, 96, 0.18), rgba(255, 255, 255, 0.035));
  box-shadow: 0 0 0 1px rgba(112, 197, 150, 0.08) inset;
}

.membership-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.membership-plan {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.032);
}

.membership-plan.active {
  border-color: rgba(226, 180, 103, 0.5);
  background:
    linear-gradient(180deg, rgba(226, 180, 103, 0.15), rgba(255, 255, 255, 0.03));
}

.membership-plan.recommended:not(.active) {
  border-color: rgba(141, 203, 255, 0.24);
}

.membership-plan header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.membership-plan header span {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.membership-plan header b {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(226, 180, 103, 0.13);
  color: #f3c987;
  font-size: 11px;
}

.membership-plan > strong {
  color: #ffffff;
  font-size: 23px;
}

.membership-plan > strong small {
  margin-left: 4px;
  color: #8f98a8;
  font-size: 12px;
}

.membership-plan p {
  min-height: 38px;
  margin: 0;
  color: #9ea8b6;
  font-size: 12px;
  line-height: 1.5;
}

.membership-plan-limits {
  min-height: 28px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(226, 180, 103, 0.095);
  color: #ffe0a3;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
}

.membership-plan dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.membership-plan dl div {
  min-width: 0;
  padding: 7px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
}

.membership-plan dt,
.membership-plan dd {
  margin: 0;
}

.membership-plan dt {
  color: #7f8898;
  font-size: 10px;
}

.membership-plan dd {
  overflow: hidden;
  color: #dfe6f1;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 48px;
}

.membership-feature-pills span {
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  color: #b7c1cf;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
}

.membership-plan button {
  height: 34px;
  color: #f4f7fb;
  font-size: 12px;
  font-weight: 800;
}

.membership-plan.active button {
  border-color: rgba(226, 180, 103, 0.38);
  background: linear-gradient(180deg, rgba(226, 180, 103, 0.42), rgba(141, 93, 37, 0.34));
}

.membership-section.split {
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.15fr);
  align-items: start;
}

.membership-section.split.compact {
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
}

.membership-section.split > div {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.membership-cost-models,
.membership-settlement-list,
.membership-free-actions {
  display: grid;
  gap: 8px;
}

.membership-cost-models article,
.membership-settlement-list article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
}

.membership-cost-models b,
.membership-settlement-list b {
  color: #eef3fb;
  font-size: 12px;
}

.membership-cost-models span,
.membership-settlement-list span {
  color: #9ea8b6;
  font-size: 11px;
  line-height: 1.45;
}

.membership-free-actions {
  grid-template-columns: 1fr;
  padding: 9px;
  border: 1px solid rgba(112, 197, 150, 0.13);
  border-radius: 12px;
  background: rgba(112, 197, 150, 0.045);
}

.membership-free-actions span {
  color: #a9d9ba;
  font-size: 11px;
  line-height: 1.4;
}

.membership-credit-packs {
  display: grid;
  gap: 8px;
}

.membership-credit-packs button {
  display: grid;
  grid-template-columns: 72px 62px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 10px;
  text-align: left;
}

.membership-credit-packs span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.membership-credit-packs strong {
  color: #f4c985;
  font-size: 15px;
}

.membership-credit-packs small {
  color: #9ea8b6;
  font-size: 11px;
  line-height: 1.4;
}

.membership-rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.membership-rule-list article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.membership-rule-list b {
  color: #f2f6fb;
  font-size: 12px;
}

.membership-rule-list span {
  color: #9ea8b6;
  font-size: 11px;
  line-height: 1.48;
}

.membership-roadmap {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: membership-roadmap;
}

.membership-roadmap li {
  counter-increment: membership-roadmap;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
  color: #b9c4d2;
  font-size: 12px;
}

.membership-roadmap li::before {
  content: counter(membership-roadmap);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #f5ca83;
  background: rgba(226, 180, 103, 0.12);
  font-size: 11px;
  font-weight: 900;
}

.membership-actions {
  position: sticky;
  bottom: -16px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 0 0;
  background: linear-gradient(180deg, rgba(15, 16, 21, 0), rgba(15, 16, 21, 0.96) 36%);
}

.membership-actions button {
  height: 36px;
  padding: 0 13px;
  color: #f1f5fb;
  font-size: 12px;
  font-weight: 800;
}

.membership-actions button:nth-child(2) {
  border-color: rgba(226, 180, 103, 0.34);
  background: linear-gradient(180deg, rgba(226, 180, 103, 0.28), rgba(116, 82, 38, 0.24));
}

.membership-entitlement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.membership-entitlement-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(231, 238, 248, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.membership-entitlement-grid span.enabled {
  border-color: rgba(112, 197, 150, 0.22);
  background: rgba(112, 197, 150, 0.08);
  color: #c9f6d8;
}

.membership-entitlement-grid span.locked {
  border-color: rgba(255, 116, 116, 0.22);
  background: rgba(255, 116, 116, 0.07);
  color: rgba(255, 210, 210, 0.88);
}

.membership-entitlement-grid small {
  flex: 0 0 auto;
  color: rgba(255, 224, 163, 0.82);
  font-size: 10px;
  font-weight: 900;
}

.membership-gate-dialog {
  display: grid;
  place-items: center;
}

.membership-gate-card {
  width: min(520px, calc(100vw - 44px));
  padding: 20px;
  border: 1px solid rgba(226, 180, 103, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 24, 35, 0.97), rgba(10, 14, 22, 0.97));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.membership-gate-card > strong {
  display: block;
  margin-top: 8px;
  color: #fff4d8;
  font-size: 19px;
  font-weight: 950;
}

.membership-gate-card p {
  margin: 9px 0 0;
  color: rgba(231, 238, 248, 0.82);
  font-size: 13px;
  line-height: 1.6;
}

.membership-gate-card small {
  display: block;
  margin-top: 8px;
  color: rgba(178, 190, 206, 0.82);
  font-size: 12px;
}

.membership-gate-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.membership-gate-plans span {
  min-height: 34px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(231, 238, 248, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.membership-gate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.membership-gate-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(226, 180, 103, 0.28);
  border-radius: 8px;
  background: rgba(226, 180, 103, 0.16);
  color: #ffe0a3;
  font-size: 12px;
  font-weight: 950;
}

.membership-gate-actions button:first-child {
  background: linear-gradient(135deg, #e2b467, #f3d48a);
  color: #241707;
}

@media (max-width: 980px) {
  .membership-hero,
  .membership-section.split {
    grid-template-columns: 1fr;
  }

  .membership-summary,
  .membership-plan-grid,
  .membership-entitlement-grid,
  .membership-estimate-grid,
  .membership-rule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .membership-summary,
  .membership-plan-grid,
  .membership-mode-grid,
  .membership-entitlement-grid,
  .membership-estimate-grid,
  .membership-rule-list {
    grid-template-columns: 1fr;
  }

  .membership-credit-packs button {
    grid-template-columns: 1fr;
  }
}

#textDialog:has(.membership-redesign) {
  width: min(1690px, calc(100vw - 180px));
  height: min(1140px, calc(100vh - 92px));
  max-height: calc(100vh - 92px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(92, 72, 142, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(27, 27, 33, 0.99), rgba(12, 12, 16, 0.99));
  overflow: hidden;
  box-shadow: 0 34px 130px rgba(0, 0, 0, 0.7);
}

#textDialog:has(.membership-redesign)::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(18px) saturate(0.78);
}

#textDialog:has(.membership-redesign) > form > header {
  display: none;
}

#textDialog:has(.membership-redesign) form,
#textDialog:has(.membership-redesign) header,
#textDialog:has(.membership-redesign) .membership-redesign-top {
  border-bottom: 0;
  box-shadow: none;
}

#textDialog:has(.membership-redesign) .membership-redesign-top::before,
#textDialog:has(.membership-redesign) .membership-redesign-top::after {
  content: none;
}

#dialogBody.membership-center-dialog:has(.membership-redesign) {
  height: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
  line-height: 1.45;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.membership-redesign {
  position: relative;
  display: grid;
  grid-template-rows: 58px auto minmax(0, 1fr);
  gap: 28px;
  min-height: 0;
  height: 100%;
  padding: 26px 40px 40px;
  color: #f4f2f8;
  background: transparent;
}

.membership-redesign,
.membership-redesign * {
  box-sizing: border-box;
}

.membership-redesign-close {
  top: clamp(14px, 2vh, 20px);
  right: clamp(18px, 2.2vw, 26px);
}

.membership-redesign .membership-redesign-top {
  padding-right: 58px;
}

.membership-redesign .membership-account-lockup {
  align-items: flex-start;
}

.membership-redesign .membership-account-text {
  padding-top: 1px;
}

@media (max-height: 780px) and (min-width: 900px) {
  #textDialog:has(.membership-redesign) {
    margin-top: 6px;
  }

  .membership-redesign {
    padding-top: 12px;
    gap: 8px;
  }

  .membership-billing-tabs {
    margin-top: 0;
  }

  .membership-tier-grid {
    margin-top: 2px;
  }
}

/* keep original close button sizing after position override */
.membership-redesign-close {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 22px;
  line-height: 1;
}

.membership-redesign-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.membership-redesign-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  padding-right: 64px;
  border: 0;
  white-space: nowrap;
}

.membership-account-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.membership-account-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, #7d5df0, #5333bd);
  color: #ffffff;
  font-size: 27px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(83, 51, 189, 0.34);
}

.membership-account-text {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 4px 10px;
}

.membership-account-text strong {
  grid-column: 1 / -1;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.membership-account-text span {
  width: max-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(246, 243, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.membership-account-text small {
  color: rgba(246, 243, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.membership-credit-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-left: 12px;
  padding: 0 11px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.86);
}

.membership-credit-chip span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 12px;
  font-weight: 800;
}

.membership-credit-chip strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.membership-credit-chip em {
  color: rgba(255, 255, 255, 0.44);
  font-size: 18px;
  font-style: normal;
}

.membership-billing-tabs {
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(126px, 1fr));
  gap: 4px;
  width: min(520px, 100%);
  padding: 4px;
  margin-top: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.membership-billing-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.membership-billing-tabs button strong,
.membership-billing-tabs button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-billing-tabs button.active {
  background: #ffffff;
  color: #17131f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
}

.membership-current-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: -10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.membership-current-status span,
.membership-current-status strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-current-status strong {
  color: #ffffff;
}

.membership-current-status button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #17131f;
  font-size: 12px;
  font-weight: 950;
}

.membership-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  min-height: 0;
  height: 100%;
  margin-top: 0;
  align-items: stretch;
}

.membership-redesign .membership-tier-card {
  align-content: start;
  gap: 12px;
  min-height: 0;
  height: 100%;
  padding: 22px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(24, 24, 30, 0.82);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.membership-redesign .membership-tier-card.active {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.045)),
    rgba(28, 28, 35, 0.9);
}

.membership-redesign .membership-tier-card.recommended:not(.active) {
  border-color: rgba(154, 119, 255, 0.46);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(154, 119, 255, 0.12) inset;
}

.membership-redesign .membership-tier-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.membership-redesign .membership-tier-card header div {
  display: grid;
  gap: 8px;
}

.membership-redesign .membership-tier-card header span {
  color: #ffffff;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 800;
}

.membership-redesign .membership-tier-card header b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(153, 122, 255, 0.16);
  color: #c9b7ff;
  font-size: 11px;
  font-weight: 950;
}

.membership-tier-price {
  display: grid;
  gap: 5px;
  min-height: 72px;
}

.membership-tier-price strong {
  color: #ffffff;
  font-size: 36px;
  font-weight: 950;
  line-height: 1.05;
}

.membership-tier-price strong small {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 850;
}

.membership-old-price {
  width: max-content;
  max-width: 100%;
  color: rgba(255, 255, 255, 0.36);
  font-size: 13px;
  font-weight: 800;
  text-decoration: line-through;
}

.membership-tier-price em {
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.membership-redesign .membership-tier-button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #17131f;
  font-size: 14px;
  font-weight: 950;
}

.membership-redesign .membership-tier-button:disabled {
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.46);
  cursor: default;
}

.membership-tier-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.membership-tier-stats div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.membership-tier-stats span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 850;
}

.membership-tier-stats strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-redesign .membership-tier-card p {
  min-height: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.48;
}

.membership-tier-features {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.membership-tier-features li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12.5px;
  line-height: 1.28;
}

.membership-tier-features li span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(118, 93, 214, 0.22);
  color: #c9b7ff;
  font-size: 11px;
  font-weight: 950;
}

.membership-tier-features li strong {
  color: inherit;
  font-size: inherit;
  font-weight: 850;
}

.wechat-pay-dialog-body {
  padding: 0;
  overflow: hidden;
}

#textDialog:has(.wechat-pay-dialog-body) {
  width: min(430px, calc(100vw - 40px));
  border-color: rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(24, 25, 30, 0.98), rgba(12, 13, 17, 0.98));
}

.wechat-pay-dialog {
  display: grid;
  gap: 18px;
  padding: 22px;
  color: #f5f5f6;
}

.wechat-pay-summary {
  display: grid;
  gap: 6px;
  text-align: center;
}

.wechat-pay-summary span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 850;
}

.wechat-pay-summary strong {
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
}

.wechat-pay-summary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 760;
}

.wechat-pay-qr {
  display: grid;
  place-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
}

.wechat-pay-qr img {
  display: block;
  width: min(260px, 70vw);
  height: min(260px, 70vw);
}

.alipay-pay-jump {
  display: grid;
  gap: 6px;
  min-height: 112px;
  place-items: center;
  padding: 18px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(22, 119, 255, 0.16), rgba(255, 255, 255, 0.055));
  text-align: center;
}

.alipay-pay-jump strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
}

.alipay-pay-jump span {
  max-width: 260px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
}

.wechat-pay-state {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
}

.wechat-pay-state strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.wechat-pay-state span {
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  font-weight: 760;
}

.wechat-pay-state[data-tone="success"] {
  border-color: rgba(111, 220, 151, 0.32);
  background: rgba(111, 220, 151, 0.12);
}

.wechat-pay-state[data-tone="warning"] {
  border-color: rgba(245, 196, 93, 0.34);
  background: rgba(245, 196, 93, 0.12);
}

.wechat-pay-checklist {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.wechat-pay-checklist span {
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 850;
}

.wechat-pay-checklist strong {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.wechat-pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wechat-pay-actions button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.wechat-pay-actions button:first-child {
  grid-column: 1 / -1;
  border: 0;
  background: #ffffff;
  color: #15161a;
  font-size: 14px;
}

.membership-flow-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.membership-flow-copy {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

.membership-flow-copy span {
  color: #ad96ff;
  font-size: 12px;
  font-weight: 950;
}

.membership-flow-copy strong {
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.membership-flow-copy p {
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-flow-steps {
  display: none;
}

.membership-flow-steps article {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 11px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.membership-flow-steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
}

.membership-flow-steps span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.5;
}

.membership-flow-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.membership-flow-actions button {
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
}

.membership-flow-entitlements {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.membership-flow-entitlements span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.membership-flow-entitlements span.enabled {
  border-color: rgba(113, 205, 143, 0.28);
  background: rgba(113, 205, 143, 0.1);
  color: #c8f4d5;
}

.membership-flow-entitlements span.locked {
  border-color: rgba(255, 120, 120, 0.2);
  background: rgba(255, 120, 120, 0.07);
  color: rgba(255, 210, 210, 0.78);
}

.membership-flow-entitlements small {
  flex: 0 0 auto;
  color: rgba(205, 185, 255, 0.92);
  font-size: 10px;
}

#textDialog:has(.membership-redesign) {
  border-color: rgba(209, 168, 92, 0.2);
  background:
    radial-gradient(circle at 18% 0%, rgba(209, 168, 92, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(20, 18, 14, 0.98), rgba(8, 8, 8, 0.98));
}

.membership-redesign {
  color: #f6efe2;
}

.membership-credit-chip,
.membership-current-status {
  display: none !important;
}

.membership-account-avatar {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 240, 195, 0.72), transparent 20%),
    linear-gradient(145deg, #d4a857, #7d5a26 58%, #21170b);
  color: #0c0905;
  box-shadow: 0 14px 30px rgba(190, 143, 66, 0.26);
}

.membership-account-text strong,
.membership-redesign .membership-tier-card header span,
.membership-tier-price strong,
.membership-tier-stats strong,
.membership-redesign .membership-tier-card p,
.membership-tier-features li strong {
  color: #fff8ea;
}

.membership-account-text span {
  background: rgba(209, 168, 92, 0.12);
  color: rgba(245, 222, 172, 0.76);
}

.membership-account-text small,
.membership-redesign .membership-tier-card header small,
.membership-tier-price strong small,
.membership-old-price,
.membership-tier-price em,
.membership-tier-stats span,
.membership-tier-features li {
  color: rgba(238, 220, 184, 0.58);
}

.membership-billing-tabs {
  border-color: rgba(209, 168, 92, 0.16);
  background: rgba(14, 13, 11, 0.82);
}

.membership-billing-tabs button {
  color: rgba(238, 220, 184, 0.58);
}

.membership-billing-tabs button.active {
  background: linear-gradient(180deg, #fff3d2, #cda15a);
  color: #120d06;
  box-shadow: 0 10px 30px rgba(165, 116, 42, 0.24);
}

.membership-redesign .membership-tier-card {
  border-color: rgba(209, 168, 92, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 232, 184, 0.075), rgba(255, 232, 184, 0.018)),
    rgba(27, 25, 22, 0.9);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.34);
}

.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.recommended:not(.active) {
  border-color: rgba(216, 174, 98, 0.42);
  background:
    linear-gradient(180deg, rgba(216, 174, 98, 0.14), rgba(255, 232, 184, 0.035)),
    rgba(31, 28, 23, 0.94);
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(216, 174, 98, 0.12) inset;
}

.membership-redesign .membership-tier-card header b,
.membership-tier-features li span {
  background: rgba(216, 174, 98, 0.18);
  color: #f2cf88;
}

.membership-redesign .membership-tier-button {
  background: linear-gradient(180deg, #fff6df, #d2a45b);
  color: #120d06;
}

.membership-redesign .membership-tier-card.active .membership-tier-button {
  background: linear-gradient(180deg, #a98449, #6f4f22);
  color: #100b05;
}

.membership-tier-stats div {
  background: rgba(0, 0, 0, 0.24);
}

#textDialog:has(.membership-redesign) {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  margin-top: max(8px, env(safe-area-inset-top));
  margin-bottom: auto;
  border-color: rgba(210, 170, 94, 0.12);
  background:
    radial-gradient(circle at 18% 0%, rgba(210, 170, 94, 0.055), transparent 30%),
    linear-gradient(180deg, rgba(18, 18, 18, 0.99), rgba(7, 7, 7, 0.99));
}

#dialogBody.membership-center-dialog:has(.membership-redesign) {
  height: min(100%, calc(100vh - 24px));
}

.membership-redesign {
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(8px, 1.35vh, 16px);
  padding: clamp(12px, 1.7vh, 18px) clamp(24px, 3vw, 40px) clamp(18px, 3vh, 34px);
}

.membership-redesign-top {
  min-height: clamp(44px, 5.4vh, 58px);
  align-items: flex-start;
}

.membership-account-avatar {
  width: clamp(44px, 6vh, 58px);
  height: clamp(44px, 6vh, 58px);
  background: linear-gradient(145deg, #4a4030, #171512);
  color: #f4e7c8;
  box-shadow: none;
}

.membership-account-text span {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(238, 232, 220, 0.66);
}

.membership-billing-tabs {
  margin-top: clamp(0px, 0.6vh, 8px);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.34);
}

.membership-billing-tabs button.active {
  background: #f4f0e8;
  color: #111111;
  box-shadow: none;
}

.membership-redesign .membership-tier-card {
  gap: clamp(7px, 1.35vh, 12px);
  padding: clamp(16px, 2vh, 22px) clamp(18px, 2vw, 26px);
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(26, 26, 26, 0.92);
  box-shadow: none;
}

.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.recommended:not(.active) {
  border-color: rgba(210, 170, 94, 0.28);
  background:
    linear-gradient(180deg, rgba(210, 170, 94, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(27, 27, 27, 0.94);
  box-shadow: inset 0 0 0 1px rgba(210, 170, 94, 0.06);
}

.membership-redesign .membership-tier-card header span {
  font-size: clamp(24px, 3.3vh, 30px);
}

.membership-redesign .membership-tier-card header b,
.membership-tier-features li span {
  background: rgba(210, 170, 94, 0.11);
  color: rgba(235, 203, 145, 0.82);
}

.membership-tier-price {
  min-height: clamp(56px, 8vh, 72px);
}

.membership-tier-price strong {
  font-size: clamp(30px, 4.3vh, 36px);
}

.membership-redesign .membership-tier-button {
  height: clamp(38px, 5vh, 46px);
  background: #f3efe6;
  color: #111111;
}

.membership-redesign .membership-tier-card.active .membership-tier-button {
  background: linear-gradient(180deg, #b58a43, #8a652d);
  color: #100b05;
}

.membership-tier-stats div {
  padding: clamp(7px, 1.2vh, 10px) 10px;
  background: rgba(0, 0, 0, 0.24);
}

.membership-tier-features {
  gap: clamp(4px, 0.85vh, 7px);
}

.membership-tier-features li {
  font-size: clamp(11px, 1.45vh, 12.5px);
}

@media (max-height: 780px) and (min-width: 900px) {
  #textDialog:has(.membership-redesign) {
    width: min(1240px, calc(100vw - 24px));
    max-height: calc(100vh - 16px);
  }

  .membership-redesign {
    padding: 16px 32px 18px;
    gap: 10px;
  }

  .membership-redesign-top {
    min-height: 46px;
  }

  .membership-account-text strong {
    font-size: 19px;
  }

  .membership-account-text span,
  .membership-account-text small {
    font-size: 11px;
  }

  .membership-billing-tabs button {
    height: 38px;
  }

.membership-tier-grid {
  margin-top: clamp(4px, 0.8vh, 10px);
  gap: 14px;
}

  .membership-redesign .membership-tier-card header div {
    gap: 4px;
  }

  .membership-redesign .membership-tier-card p {
    font-size: 12px;
    line-height: 1.25;
  }
}

@media (max-width: 1180px) {
  .membership-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .membership-flow-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .membership-flow-entitlements {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #textDialog:has(.membership-redesign) {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 18px;
  }

  #dialogBody.membership-center-dialog:has(.membership-redesign) {
    height: calc(100vh - 40px);
    overflow: auto;
  }

  .membership-redesign {
    gap: 18px;
    min-height: 0;
    padding: 20px 16px;
  }

  .membership-redesign-top,
  .membership-account-lockup,
  .membership-redesign-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .membership-redesign-top {
    padding-right: 42px;
  }

  .membership-account-lockup {
    gap: 10px;
  }

  .membership-credit-chip {
    margin-left: 0;
    justify-content: center;
  }

  .membership-current-status {
    grid-template-columns: 1fr;
  }

  .membership-billing-tabs,
  .membership-tier-grid,
  .membership-flow-steps,
  .membership-flow-entitlements {
    grid-template-columns: 1fr;
  }

  .membership-billing-tabs {
    border-radius: 18px;
  }

  .membership-billing-tabs button {
    border-radius: 14px;
  }

  .membership-redesign .membership-tier-card {
    min-height: 0;
  }
}

.delete-confirm {
  display: grid;
  gap: 16px;
  white-space: normal;
}

#textDialog:has(.membership-redesign) {
  margin-top: auto;
  margin-bottom: auto;
  max-height: calc(100vh - 36px);
}

.membership-redesign {
  gap: clamp(4px, 0.8vh, 10px);
  padding-top: clamp(8px, 1.1vh, 12px);
  padding-bottom: clamp(8px, 1.2vh, 14px);
}

.membership-redesign-top {
  min-height: clamp(38px, 4.8vh, 50px);
}

.membership-billing-tabs,
.membership-tier-grid {
  margin-top: 0;
}

@media (max-height: 780px) and (min-width: 900px) {
  #textDialog:has(.membership-redesign) {
    margin-top: auto;
    margin-bottom: auto;
  }

  .membership-redesign {
    gap: 5px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

.membership-redesign .membership-tier-card {
  position: relative;
}

.membership-redesign .membership-tier-card header {
  min-height: 54px;
}

.membership-redesign .membership-tier-card header div {
  gap: 10px;
  padding-right: 62px;
}

.membership-redesign .membership-tier-card header span {
  font-size: clamp(24px, 3vh, 28px);
  font-weight: 760;
  line-height: 1.05;
}

.membership-redesign .membership-tier-card header small {
  font-size: 11px;
  font-weight: 650;
  color: rgba(238, 232, 220, 0.46);
}

.membership-redesign .membership-tier-card header b {
  position: absolute;
  top: 18px;
  right: 22px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(235, 196, 123, 0.13);
  color: rgba(240, 211, 151, 0.92);
  font-size: 11px;
  font-weight: 760;
}

.membership-tier-price {
  gap: 4px;
  min-height: 82px;
}

.membership-tier-price strong {
  font-size: clamp(34px, 4.8vh, 44px);
  font-weight: 850;
  line-height: 0.98;
  letter-spacing: 0;
}

.membership-tier-price strong::first-letter {
  font-size: 0.52em;
}

.membership-tier-price strong small {
  margin-left: 4px;
  color: rgba(238, 232, 220, 0.64);
  font-size: 0.38em;
  font-weight: 650;
}

.membership-old-price {
  color: rgba(238, 232, 220, 0.32);
  font-size: 12px;
  font-weight: 560;
}

.membership-tier-price em {
  color: rgba(238, 232, 220, 0.54);
  font-size: 12px;
  font-weight: 650;
}

.membership-redesign .membership-tier-button {
  font-size: 13px;
  font-weight: 760;
}

.membership-tier-stats span {
  font-size: 10.5px;
  font-weight: 620;
}

.membership-tier-stats strong {
  font-size: 17px;
  font-weight: 760;
}

.membership-redesign .membership-tier-card p {
  font-size: 12px;
  font-weight: 720;
}

.membership-tier-features li {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  font-size: clamp(11px, 1.35vh, 12px);
  font-weight: 560;
  color: rgba(238, 232, 220, 0.74);
}

.membership-tier-features li span {
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 720;
}

.membership-tier-features li strong {
  font-weight: 650;
}

.membership-redesign .membership-tier-card header b {
  display: none;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  content: attr(data-discount);
  position: absolute;
  top: 18px;
  right: 22px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(238, 198, 124, 0.13);
  color: rgba(242, 214, 159, 0.9);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.membership-tier-stats {
  display: none !important;
}

.membership-redesign .membership-tier-card p,
.membership-tier-price em,
.membership-tier-features li,
.membership-tier-features li strong {
  font-weight: 400;
}

.membership-redesign .membership-tier-card p {
  color: rgba(238, 232, 220, 0.58);
}

.membership-redesign .membership-tier-card {
  grid-template-rows: auto auto auto auto 1fr;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #1f1f1f;
}

.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.recommended:not(.active) {
  background:
    linear-gradient(180deg, rgba(188, 139, 58, 0.16) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #202020;
}

.membership-redesign .membership-tier-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: 318px;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.065), transparent 34%),
    rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.membership-redesign .membership-tier-card.active::before,
.membership-redesign .membership-tier-card.recommended:not(.active)::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(238, 198, 124, 0.12), transparent 34%),
    rgba(188, 139, 58, 0.08);
}

.membership-redesign .membership-tier-card > * {
  position: relative;
  z-index: 1;
}

.membership-redesign .membership-tier-card header {
  order: 1;
  min-height: 44px;
}

.membership-redesign .membership-tier-card header div {
  gap: 8px;
}

.membership-redesign .membership-tier-card header span {
  color: #f0f0f0;
  font-size: clamp(21px, 2.5vh, 24px);
  font-weight: 700;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  font-weight: 500;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  content: "限时 " attr(data-discount);
  top: 18px;
  right: 22px;
  padding: 6px 10px;
  border-radius: 7px;
  background: #ffc978;
  color: #1b1308;
  font-size: 12px;
  font-weight: 700;
}

.membership-tier-price {
  order: 2;
  display: block;
  min-height: 88px;
}

.membership-tier-price strong {
  display: inline;
  color: #f3f3f3;
  font-size: clamp(38px, 5vh, 48px);
  font-weight: 760;
  line-height: 1;
}

.membership-tier-price strong::first-letter {
  font-size: 0.42em;
}

.membership-tier-price strong small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.34em;
  font-weight: 500;
}

.membership-old-price {
  display: inline;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 14px;
  font-weight: 400;
}

.membership-tier-price em {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 400;
}

.membership-redesign .membership-tier-card p {
  order: 3;
  margin: 4px 0 2px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.membership-redesign .membership-tier-button {
  order: 4;
  height: 40px;
  margin: 2px 0 18px;
  background: #f7f7f7;
  color: #0f0f0f;
  font-size: 13px;
  font-weight: 700;
}

.membership-redesign .membership-tier-card.active .membership-tier-button {
  background: #b9822f;
  color: #0f0f0f;
}

.membership-redesign .membership-tier-card.active .membership-tier-button:disabled {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  cursor: default;
}

.membership-tier-features {
  order: 5;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

@media (max-height: 780px) and (min-width: 900px) {
  .membership-redesign .membership-tier-card {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.075) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #1f1f1f;
  }

  .membership-redesign .membership-tier-card.active,
  .membership-redesign .membership-tier-card.recommended:not(.active) {
    background:
      linear-gradient(180deg, rgba(188, 139, 58, 0.16) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #202020;
  }

  .membership-redesign .membership-tier-card::before {
    height: 282px;
  }
}

.membership-tier-features li {
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.42;
}

.membership-tier-features li strong {
  font-weight: 500;
}

.membership-tier-features li span {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.delete-confirm p {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(220, 90, 90, 0.32);
  border-radius: 10px;
  background: rgba(120, 35, 35, 0.18);
  color: #ffd5d5;
  white-space: pre-wrap;
}

.membership-redesign .membership-tier-card {
  border-color: rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #1f1f1f;
}

.membership-redesign .membership-tier-card::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.07), transparent 34%),
    rgba(255, 255, 255, 0.036);
}

.membership-redesign .membership-tier-card.recommended:not(.active) {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.082) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #202020;
}

.membership-redesign .membership-tier-card.recommended:not(.active)::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 255, 255, 0.075), transparent 34%),
    rgba(255, 255, 255, 0.043);
}

.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"] {
  border-color: rgba(95, 145, 255, 0.5);
  background:
    linear-gradient(180deg, rgba(50, 86, 180, 0.36) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #171d2b;
}

.membership-redesign .membership-tier-card.active::before,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"]::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(151, 190, 255, 0.22), transparent 35%),
    linear-gradient(135deg, rgba(45, 78, 170, 0.36), rgba(15, 22, 44, 0.16));
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) {
  border-color: rgba(220, 167, 74, 0.46);
  background:
    linear-gradient(180deg, rgba(139, 86, 24, 0.34) 0 318px, rgba(255, 255, 255, 0.018) 318px 100%),
    #20180f;
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active)::before {
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 211, 128, 0.18), transparent 35%),
    linear-gradient(135deg, rgba(151, 94, 28, 0.34), rgba(32, 22, 11, 0.12));
}

.membership-redesign .membership-tier-card.active .membership-tier-button,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"] .membership-tier-button {
  background: #f5f8ff;
  color: #14234d;
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) .membership-tier-button {
  background: #f6d28d;
  color: #1f1509;
}

.membership-redesign .membership-tier-card.active header b,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"] header b {
  border-color: rgba(139, 181, 255, 0.42);
  background: rgba(105, 154, 255, 0.18);
  color: #dbe8ff;
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) header b {
  border-color: rgba(241, 193, 106, 0.42);
  background: rgba(214, 143, 43, 0.18);
  color: #ffe0a6;
}

@media (max-height: 780px) and (min-width: 900px) {
  .membership-redesign .membership-tier-card {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.072) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #1f1f1f;
  }

  .membership-redesign .membership-tier-card.recommended:not(.active) {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.082) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #202020;
  }

  .membership-redesign .membership-tier-card.active,
  .membership-redesign .membership-tier-card.active[data-plan="enterprise"] {
    background:
      linear-gradient(180deg, rgba(50, 86, 180, 0.36) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #171d2b;
  }

  .membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) {
    background:
      linear-gradient(180deg, rgba(139, 86, 24, 0.34) 0 282px, rgba(255, 255, 255, 0.018) 282px 100%),
      #20180f;
  }
}

.membership-redesign .membership-tier-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
  row-gap: 6px;
}

.membership-redesign .membership-tier-price strong {
  flex: 0 0 auto;
}

.membership-redesign .membership-old-price {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: clamp(16px, 2.1vh, 19px);
  font-weight: 450;
  line-height: 1;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(255, 255, 255, 0.44);
  text-decoration-skip-ink: none;
}

.membership-redesign .membership-tier-price em {
  flex: 0 0 100%;
}

.membership-redesign .membership-tier-card {
  padding: 34px 30px 28px;
  gap: 11px;
}

.membership-redesign .membership-tier-card header {
  min-height: 52px;
  align-items: flex-start;
  margin-bottom: 2px;
}

.membership-redesign .membership-tier-card header div {
  gap: 5px;
}

.membership-redesign .membership-tier-card header span {
  font-size: clamp(25px, 3vh, 29px);
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1.08;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.43);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.15;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 38px;
  right: 30px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.membership-redesign .membership-tier-price {
  min-height: 99px;
  align-items: baseline;
  column-gap: 9px;
  row-gap: 8px;
}

.membership-redesign .membership-tier-price strong {
  color: #f7f8fb;
  font-size: clamp(43px, 5.8vh, 55px);
  font-weight: 690;
  letter-spacing: 0;
  line-height: 0.96;
}

.membership-redesign .membership-tier-price strong::first-letter {
  font-size: 0.42em;
  font-weight: 620;
  vertical-align: 0.09em;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 3px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.34em;
  font-weight: 520;
  letter-spacing: 0;
}

.membership-redesign .membership-old-price {
  transform: translateY(-2px);
  color: rgba(255, 255, 255, 0.36);
  font-size: clamp(17px, 2.25vh, 21px);
  font-weight: 430;
  text-decoration-thickness: 1.6px;
  text-decoration-color: rgba(255, 255, 255, 0.42);
}

.membership-redesign .membership-tier-price em {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
}

.membership-redesign .membership-tier-card p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.membership-redesign .membership-tier-button {
  height: 46px;
  margin: 0 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 680;
}

.membership-tier-features {
  padding-top: 18px;
}

.membership-redesign .membership-tier-grid {
  gap: 18px;
}

.membership-redesign .membership-tier-card {
  grid-template-rows: auto auto minmax(68px, 1fr) auto auto;
  min-height: 438px;
  padding: 30px 30px 28px;
  border-radius: 16px;
  gap: 0;
}

.membership-redesign .membership-tier-card::before {
  height: 100%;
  border-radius: inherit;
}

.membership-redesign .membership-tier-card header {
  min-height: 72px;
  margin: 0;
  padding-right: 88px;
}

.membership-redesign .membership-tier-card header div {
  gap: 6px;
}

.membership-redesign .membership-tier-card header span {
  font-size: clamp(25px, 2.85vh, 30px);
  font-weight: 520;
  line-height: 1;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 13px;
  font-weight: 400;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 31px;
  right: 30px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #ffc578;
  color: #1d1205;
  font-size: 14px;
  font-weight: 720;
}

.membership-redesign .membership-tier-price {
  min-height: 116px;
  align-content: start;
  column-gap: 8px;
  row-gap: 9px;
}

.membership-redesign .membership-tier-price strong {
  font-size: clamp(49px, 6.35vh, 64px);
  font-weight: 640;
  line-height: 0.92;
}

.membership-redesign .membership-tier-price strong::first-letter {
  font-size: 0.34em;
  font-weight: 620;
  vertical-align: 0.18em;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 4px;
  font-size: 0.28em;
  font-weight: 540;
  vertical-align: 0.08em;
}

.membership-redesign .membership-old-price {
  transform: translateY(-6px);
  color: rgba(255, 255, 255, 0.35);
  font-size: clamp(17px, 2vh, 20px);
  font-weight: 420;
}

.membership-redesign .membership-tier-price em {
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  line-height: 1.25;
}

.membership-tier-quota {
  order: 3;
  align-self: end;
  margin: 0 0 16px;
}

.membership-tier-quota div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.membership-tier-quota strong {
  color: #f7f8fb;
  font-size: clamp(29px, 3.9vh, 38px);
  font-weight: 560;
  line-height: 1;
}

.membership-tier-quota span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 520;
}

.membership-tier-quota small {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.membership-redesign .membership-tier-button {
  order: 4;
  height: 48px;
  margin: 0;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 720;
}

.membership-redesign .membership-tier-card p {
  display: none;
}

.membership-tier-features {
  order: 5;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-top: 0;
  opacity: 0;
}

@media (max-height: 780px) and (min-width: 900px) {
  .membership-redesign .membership-tier-card {
    min-height: 390px;
    padding: 24px 28px 24px;
  }

  .membership-redesign .membership-tier-card header {
    min-height: 62px;
  }

  .membership-redesign .membership-tier-price {
    min-height: 100px;
  }

  .membership-redesign .membership-tier-price strong {
    font-size: clamp(43px, 6vh, 56px);
  }

  .membership-tier-quota {
    margin-bottom: 14px;
  }
}

.membership-redesign .membership-tier-card {
  grid-template-rows: auto auto auto auto 1fr;
  gap: 10px;
  min-height: 0;
  padding: 34px 30px 28px;
}

.membership-redesign .membership-tier-card::before {
  height: 318px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.membership-redesign .membership-tier-card header {
  min-height: 52px;
  margin-bottom: 2px;
  padding-right: 86px;
}

.membership-redesign .membership-tier-card header span {
  font-size: clamp(25px, 3vh, 29px);
  font-weight: 560;
  line-height: 1.08;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.43);
  font-size: 12px;
  font-weight: 400;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 38px;
  right: 30px;
  padding: 8px 11px;
  border-radius: 9px;
  background: #ffc978;
  color: #1b1308;
  font-size: 14px;
  font-weight: 700;
}

.membership-redesign .membership-tier-price {
  min-height: 99px;
  align-items: baseline;
  column-gap: 9px;
  row-gap: 8px;
}

.membership-redesign .membership-tier-price strong {
  font-size: clamp(43px, 5.8vh, 55px);
  font-weight: 690;
  line-height: 0.96;
}

.membership-redesign .membership-tier-price strong::first-letter {
  font-size: 0.42em;
  vertical-align: 0.09em;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 3px;
  font-size: 0.34em;
  vertical-align: baseline;
}

.membership-redesign .membership-old-price {
  transform: translateY(-2px);
  font-size: clamp(17px, 2.25vh, 21px);
}

.membership-redesign .membership-tier-card p {
  display: block;
  order: 3;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.membership-redesign .membership-tier-button {
  order: 4;
  height: 46px;
  margin: 0 0 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 680;
}

.membership-tier-quota {
  display: none !important;
}

.membership-tier-features {
  order: 5;
  max-height: none;
  margin: 0;
  padding-top: 18px;
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  opacity: 1;
}

@media (max-height: 780px) and (min-width: 900px) {
  .membership-redesign .membership-tier-card {
    padding: 24px 28px 24px;
  }

  .membership-redesign .membership-tier-card::before {
    height: 282px;
  }
}

.membership-redesign .membership-tier-card {
  padding-top: 34px;
}

.membership-redesign .membership-tier-card header {
  min-height: 48px;
  align-items: flex-start;
  margin-bottom: 6px;
  padding-right: 92px;
}

.membership-redesign .membership-tier-card header div {
  gap: 6px;
}

.membership-redesign .membership-tier-card header span {
  font-size: 24px;
  font-weight: 560;
  line-height: 1;
}

.membership-redesign .membership-tier-card header small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 32px;
  right: 30px;
  min-width: 82px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price {
  min-height: 108px;
  display: grid;
  grid-template-columns: max-content minmax(0, max-content);
  align-items: baseline;
  column-gap: 8px;
  row-gap: 8px;
}

.membership-redesign .membership-tier-price strong {
  min-width: 0;
  color: #f8f8fa;
  font-size: 50px;
  font-weight: 650;
  line-height: 0.94;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price strong::first-letter {
  font-size: 0.36em;
  font-weight: 620;
  vertical-align: 0.16em;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.3em;
  font-weight: 520;
  vertical-align: 0.06em;
}

.membership-redesign .membership-old-price {
  align-self: baseline;
  transform: translateY(-5px);
  color: rgba(255, 255, 255, 0.36);
  font-size: 18px;
  font-weight: 420;
  line-height: 1;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price em {
  grid-column: 1 / -1;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
}

.membership-redesign .membership-tier-card p {
  margin: -3px 0 22px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
}

@media (max-width: 1320px) {
  .membership-redesign .membership-tier-price strong {
    font-size: 46px;
  }

  .membership-redesign .membership-old-price {
    font-size: 16px;
  }
}

.membership-redesign .membership-tier-card {
  text-align: left;
}

.membership-redesign .membership-tier-card header {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 8px;
  padding-right: 118px;
}

.membership-redesign .membership-tier-card header span {
  display: block;
  font-size: 24px;
  font-weight: 560;
  line-height: 34px;
}

.membership-redesign .membership-tier-card header small {
  display: block;
  margin-top: 0;
  font-size: 12px;
  line-height: 16px;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 32px;
  right: 30px;
  width: 92px;
  min-width: 92px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  font-size: 14px;
  line-height: 34px;
  text-align: center;
}

.membership-redesign .membership-tier-price {
  min-height: 92px;
  display: block;
  text-align: left;
  white-space: normal;
}

.membership-redesign .membership-tier-price strong {
  display: inline;
  font-size: 50px;
  font-weight: 650;
  line-height: 0.95;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 4px;
  font-size: 0.3em;
}

.membership-redesign .membership-old-price {
  display: inline-block;
  margin-left: 8px;
  transform: translateY(-6px);
  font-size: 18px;
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price em {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.18;
  text-align: left;
}

.membership-redesign .membership-tier-card p {
  margin: -4px 0 18px;
  font-size: 13px;
  line-height: 1.18;
  text-align: left;
}

@media (max-width: 1320px) {
  .membership-redesign .membership-tier-card header {
    padding-right: 104px;
  }

  .membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
    width: 88px;
    min-width: 88px;
  }

  .membership-redesign .membership-tier-price strong {
    font-size: 46px;
  }

  .membership-redesign .membership-old-price {
    font-size: 16px;
  }
}

.delete-confirm-actions {
  display: flex;
  gap: 10px;
}

#textDialog:has(.membership-redesign) {
  width: min(1760px, calc(100vw - 72px));
}

.membership-redesign {
  padding-left: clamp(42px, 4vw, 72px);
  padding-right: clamp(42px, 4vw, 72px);
}

.membership-redesign .membership-tier-grid {
  grid-template-columns: repeat(4, minmax(326px, 1fr));
  gap: 22px;
}

.membership-redesign .membership-tier-card {
  --tier-x: 36px;
  padding-left: var(--tier-x);
  padding-right: var(--tier-x);
  text-align: left;
}

.membership-redesign .membership-tier-card header {
  min-height: 50px;
  display: block;
  margin: 0 0 14px;
  padding: 0 112px 0 0;
  text-align: left;
}

.membership-redesign .membership-tier-card header div {
  display: block;
  margin: 0;
  padding: 0;
}

.membership-redesign .membership-tier-card header span {
  display: block;
  margin: 0;
  color: #f7f7f8;
  font-size: 24px;
  font-weight: 560;
  line-height: 34px;
  text-align: left;
}

.membership-redesign .membership-tier-card header small {
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.47);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 34px;
  right: var(--tier-x);
  width: 96px;
  min-width: 96px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price {
  min-height: 92px;
  display: block;
  margin: 0;
  padding: 0;
  text-align: left;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price strong {
  display: inline-block;
  margin: 0;
  color: #f8f8fa;
  font-size: 48px;
  font-weight: 650;
  line-height: 0.95;
  vertical-align: baseline;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price strong::first-letter {
  font-size: 0.36em;
  font-weight: 620;
  vertical-align: 0.16em;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 4px;
  font-size: 0.31em;
  font-weight: 520;
  vertical-align: 0.06em;
}

.membership-redesign .membership-old-price {
  display: inline-block;
  margin-left: 8px;
  transform: translateY(-5px);
  color: rgba(255, 255, 255, 0.36);
  font-size: 17px;
  font-weight: 420;
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price em {
  display: block;
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.16;
  text-align: left;
  white-space: normal;
}

.membership-redesign .membership-tier-card p {
  margin: -5px 0 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.16;
  text-align: left;
}

@media (max-width: 1500px) {
  .membership-redesign .membership-tier-grid {
    grid-template-columns: repeat(4, minmax(300px, 1fr));
    gap: 18px;
  }

  .membership-redesign .membership-tier-card {
    --tier-x: 30px;
  }

  .membership-redesign .membership-tier-price strong {
    font-size: 44px;
  }

  .membership-redesign .membership-old-price {
    font-size: 16px;
  }
}

.membership-redesign .membership-tier-card header {
  position: relative;
  height: 50px;
  min-height: 50px;
  margin: 0 0 18px;
  padding: 0;
}

.membership-redesign .membership-tier-card header div {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  gap: 4px;
}

.membership-redesign .membership-tier-card header span {
  font-size: 24px;
  line-height: 28px;
}

.membership-redesign .membership-tier-card header small {
  font-size: 12px;
  line-height: 14px;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 34px;
  transform: none;
}

.membership-redesign .membership-tier-price {
  min-height: 82px;
}

.membership-redesign .membership-tier-price em {
  margin-top: 6px;
  line-height: 1.08;
}

.membership-redesign .membership-tier-card p {
  margin: -12px 0 18px;
  line-height: 1.08;
}

.membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong {
  font-size: 50px;
  letter-spacing: 0;
}

.membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong::first-letter {
  font-size: 1em;
  vertical-align: baseline;
}

@media (max-width: 1500px) {
  .membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong {
    font-size: 46px;
  }
}

/* 2026-05-29 membership dialog alignment pass */
#textDialog:has(.membership-redesign) {
  width: min(1760px, calc(100vw - 88px));
}

.membership-redesign {
  padding-left: clamp(34px, 4vw, 64px);
  padding-right: clamp(34px, 4vw, 64px);
}

.membership-redesign .membership-tier-grid {
  grid-template-columns: repeat(4, minmax(270px, 318px));
  justify-content: center;
  align-content: start;
  gap: 22px;
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.membership-redesign .membership-tier-card {
  --tier-x: 30px;
  width: 100%;
  min-width: 0;
}

.membership-redesign .membership-tier-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 8px;
  min-height: 82px;
  white-space: normal;
}

.membership-redesign .membership-tier-price strong,
.membership-redesign .membership-old-price {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price strong {
  font-size: 44px;
}

.membership-redesign .membership-old-price {
  margin-left: 0;
  transform: translateY(-5px);
  font-size: 16px;
}

.membership-redesign .membership-tier-price em {
  flex: 0 0 100%;
  margin-top: 0;
}

@media (max-width: 1500px) {
  .membership-redesign .membership-tier-grid {
    grid-template-columns: repeat(4, minmax(248px, 292px));
    gap: 16px;
  }

  .membership-redesign .membership-tier-card {
    --tier-x: 24px;
  }

  .membership-redesign .membership-tier-price strong,
  .membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong {
    font-size: 40px;
  }

  .membership-redesign .membership-old-price {
    font-size: 15px;
  }
}

/* 2026-05-29 membership dialog flat compact pass */
#textDialog:has(.membership-redesign) {
  width: min(1720px, calc(100vw - 104px));
}

.membership-redesign {
  padding-left: clamp(28px, 3.6vw, 58px);
  padding-right: clamp(28px, 3.6vw, 58px);
}

.membership-redesign .membership-tier-grid {
  grid-template-columns: repeat(4, minmax(230px, 276px));
  gap: 18px;
  justify-content: center;
  align-items: stretch;
  margin-top: 20px;
}

.membership-redesign .membership-tier-card {
  --tier-x: 24px;
  --tier-top-h: 272px;
  display: grid;
  grid-template-rows: 54px 88px 38px 64px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 512px;
  padding: 28px 0 0;
  overflow: hidden;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #1b1b1b;
  box-shadow: none;
  text-align: left;
}

.membership-redesign .membership-tier-card::before {
  height: var(--tier-top-h);
  border-radius: 12px 12px 0 0;
  background: #353535;
}

.membership-redesign .membership-tier-card.recommended:not(.active)::before {
  background: #263969;
}

.membership-redesign .membership-tier-card.active::before,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"]::before {
  background: #263969;
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active)::before {
  background: #563713;
}

.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.recommended:not(.active),
.membership-redesign .membership-tier-card.active[data-plan="enterprise"],
.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) {
  background: #1b1b1b;
  box-shadow: none;
}

.membership-redesign .membership-tier-card.active {
  border-color: rgba(91, 125, 205, 0.72);
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) {
  border-color: rgba(185, 123, 39, 0.68);
}

.membership-redesign .membership-tier-card header {
  height: 54px;
  min-height: 54px;
  margin: 0;
  padding: 0 var(--tier-x);
}

.membership-redesign .membership-tier-card header div {
  position: static;
  display: grid;
  gap: 4px;
}

.membership-redesign .membership-tier-card header span {
  font-size: 22px;
  font-weight: 540;
  line-height: 1.1;
}

.membership-redesign .membership-tier-card header small {
  font-size: 12px;
  line-height: 1.15;
}

.membership-redesign .membership-tier-card[data-discount]:not([data-discount=""])::after {
  top: 34px;
  right: var(--tier-x);
  width: auto;
  min-width: 78px;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  background: #ffc777;
  color: #1f1306;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
}

.membership-redesign .membership-tier-price {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  align-items: baseline;
  min-height: 88px;
  height: 88px;
  padding: 8px var(--tier-x) 0;
  gap: 5px 7px;
  white-space: normal;
}

.membership-redesign .membership-tier-price strong {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  font-size: 38px;
  font-weight: 560;
  line-height: 1;
  white-space: nowrap;
}

.membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong {
  font-size: 42px;
}

.membership-redesign .membership-tier-price strong small {
  margin-left: 3px;
  font-size: 0.34em;
}

.membership-redesign .membership-old-price {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  margin-left: 0;
  transform: translateY(-2px);
  font-size: 14px;
  white-space: nowrap;
}

.membership-redesign .membership-tier-price em {
  flex: 0 0 100%;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.15;
}

.membership-redesign .membership-tier-card p {
  height: 38px;
  margin: 0;
  padding: 0 var(--tier-x);
  font-size: 12px;
  line-height: 1.25;
}

.membership-redesign .membership-tier-button {
  width: auto;
  height: 38px;
  margin: 8px var(--tier-x) 18px;
  border-radius: 999px;
  background: #f3f3f3;
  color: #111111;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.membership-redesign .membership-tier-card.active .membership-tier-button,
.membership-redesign .membership-tier-card.active[data-plan="enterprise"] .membership-tier-button {
  background: #f3f3f3;
  color: #13224b;
}

.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) .membership-tier-button {
  background: #f4d28d;
  color: #1d1307;
}

.membership-tier-features {
  align-self: stretch;
  min-height: 0;
  margin: 0;
  padding: 14px var(--tier-x) 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(0, 0, 0, 0.19);
}

.membership-tier-features li {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.38;
}

.membership-tier-features li span {
  width: 16px;
  height: 16px;
  font-size: 11px;
}

@media (max-width: 1500px) {
  .membership-redesign .membership-tier-grid {
    grid-template-columns: repeat(4, minmax(218px, 258px));
    gap: 14px;
  }

  .membership-redesign .membership-tier-card {
    --tier-x: 20px;
  }

  .membership-redesign .membership-tier-price strong {
    font-size: 34px;
  }

  .membership-redesign .membership-tier-card[data-plan="free"] .membership-tier-price strong {
    font-size: 38px;
  }

  .membership-redesign .membership-old-price {
    font-size: 13px;
  }
}

/* 2026-05-29 membership grouped top-panel layout */
.membership-redesign .membership-tier-card {
  --tier-top-pad: 28px;
  --tier-title-h: 58px;
  --tier-price-h: 50px;
  --tier-copy-h: 54px;
  --tier-action-h: 110px;
  --tier-top-h: calc(var(--tier-top-pad) + var(--tier-title-h) + var(--tier-price-h) + var(--tier-copy-h) + var(--tier-action-h));
  grid-template-rows: var(--tier-title-h) var(--tier-price-h) var(--tier-copy-h) var(--tier-action-h) minmax(0, 1fr);
  padding-top: var(--tier-top-pad);
}

.membership-redesign .membership-tier-card header {
  grid-row: 1;
  height: var(--tier-title-h);
  min-height: var(--tier-title-h);
}

.membership-redesign .membership-tier-price {
  grid-row: 2;
  height: var(--tier-price-h);
  min-height: var(--tier-price-h);
  padding-top: 0;
}

.membership-redesign .membership-tier-card p {
  grid-row: 3;
  height: var(--tier-copy-h);
  padding-top: 10px;
  line-height: 1.22;
}

.membership-redesign .membership-tier-button {
  grid-row: 4;
  align-self: start;
  margin-top: 22px;
}

.membership-tier-features {
  grid-row: 5;
}

/* 2026-05-29 final price/copy vertical nudge */
.membership-redesign .membership-tier-price {
  padding-top: 8px;
}

.membership-redesign .membership-tier-card p {
  padding-top: 16px;
}

/* 2026-05-29 membership price/copy vertical nudge */
.membership-redesign .membership-tier-price {
  padding-top: 8px;
}

.membership-redesign .membership-tier-card p {
  padding-top: 16px;
}

/* 2026-05-29 membership compact copy and rounded color panels */
.membership-redesign .membership-tier-card {
  grid-template-rows: 54px 62px 30px 98px minmax(0, 1fr);
}

.membership-redesign .membership-tier-card::before {
  border-radius: 12px;
}

.membership-redesign .membership-tier-price {
  min-height: 62px;
  height: 62px;
  padding-top: 4px;
  row-gap: 2px;
}

.membership-redesign .membership-tier-price em {
  margin-top: 0;
  line-height: 1.05;
}

.membership-redesign .membership-tier-card p {
  height: 30px;
  line-height: 1.12;
}

.membership-redesign .membership-tier-button {
  margin-top: 6px;
}

/* 2026-05-29 membership flat borderless refinement */
#textDialog:has(.membership-redesign) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

#dialogBody.membership-center-dialog:has(.membership-redesign) {
  background: transparent;
}

.membership-redesign .membership-tier-card,
.membership-redesign .membership-tier-card.active,
.membership-redesign .membership-tier-card.recommended:not(.active),
.membership-redesign .membership-tier-card.active[data-plan="enterprise"],
.membership-redesign .membership-tier-card[data-plan="enterprise"]:not(.active) {
  border-color: transparent;
  box-shadow: none;
}

.membership-redesign .membership-tier-price strong {
  align-items: baseline;
}

.membership-redesign .membership-tier-price strong small {
  align-self: baseline;
  margin-left: 4px;
  line-height: 1;
  vertical-align: baseline;
  transform: none;
}

/* 2026-05-29 final membership grouped top-panel controls */
.membership-redesign .membership-tier-card {
  --tier-title-h: 58px;
  --tier-price-h: 50px;
  --tier-copy-h: 54px;
  --tier-action-h: 110px;
  --tier-top-h: calc(var(--tier-title-h) + var(--tier-price-h) + var(--tier-copy-h) + var(--tier-action-h));
  grid-template-rows: var(--tier-title-h) var(--tier-price-h) var(--tier-copy-h) var(--tier-action-h) minmax(0, 1fr);
}

.membership-redesign .membership-tier-card header {
  grid-row: 1;
  height: var(--tier-title-h);
  min-height: var(--tier-title-h);
}

.membership-redesign .membership-tier-price {
  grid-row: 2;
  height: var(--tier-price-h);
  min-height: var(--tier-price-h);
  padding-top: 0;
}

.membership-redesign .membership-tier-card p {
  grid-row: 3;
  height: var(--tier-copy-h);
  padding-top: 10px;
  line-height: 1.22;
}

.membership-redesign .membership-tier-button {
  grid-row: 4;
  align-self: start;
  margin-top: 22px;
}

.membership-tier-features {
  grid-row: 5;
}

.delete-confirm-actions button {
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #f1f3f8;
}

.delete-confirm-actions button:first-child {
  border-color: rgba(220, 90, 90, 0.55);
  background: rgba(150, 45, 45, 0.42);
  color: #ffd1d1;
}

.toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 86px;
  min-width: 280px;
  max-width: min(720px, calc(100vw - 48px));
  display: flex;
  align-items: center;
  gap: 11px;
  transform: translate(-50%, -18px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  padding: 13px 18px 13px 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 214, 137, 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 196, 98, 0.22), rgba(96, 151, 255, 0.16)),
    rgba(20, 22, 28, 0.96);
  color: #fff4df;
  box-shadow:
    0 18px 70px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 34px rgba(212, 155, 85, 0.18);
  backdrop-filter: blur(18px);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toast::before {
  content: "";
  width: 8px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffd073, #6fa2ff);
  box-shadow: 0 0 22px rgba(255, 208, 115, 0.45);
}

.toast::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), transparent 34%);
  opacity: 0.28;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}

.asset-library-dialog {
  width: min(1180px, calc(100vw - 44px));
  height: min(720px, calc(100vh - 116px));
  max-height: min(820px, calc(100vh - 44px));
  padding: 0 !important;
  overflow: hidden !important;
  line-height: 1.45;
}

.asset-library-floating {
  position: absolute;
  z-index: 9;
  left: clamp(70px, 5.8vw, 88px);
  top: 50%;
  width: clamp(336px, 25vw, 430px);
  height: min(690px, calc(100% - 44px));
  max-height: calc(100% - 44px);
  min-width: 300px;
  min-height: 360px;
  max-width: calc(100% - 96px);
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 14px;
  background: rgba(15, 16, 20, 0.9);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  transform: translateY(-50%);
}

.asset-library-floating[hidden] {
  display: none;
}

.asset-editor-floating {
  position: absolute;
  z-index: 10;
  left: clamp(410px, 31vw, 500px);
  top: 50%;
  width: clamp(420px, 32vw, 540px);
  height: min(650px, calc(100% - 58px));
  max-height: calc(100% - 76px);
  min-width: 390px;
  min-height: 430px;
  max-width: calc(100% - 116px);
  overflow: hidden;
  resize: both;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(15, 16, 20, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  transform: translateY(-50%);
}

.asset-editor-floating[hidden] {
  display: none;
}

.asset-editor-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #e9edf5;
}

.asset-editor-float-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: move;
  user-select: none;
}

.asset-editor-float-head div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.asset-editor-float-head span {
  color: #9fa8b8;
  font-size: 12px;
}

.asset-editor-float-head strong {
  min-width: 0;
  overflow: hidden;
  color: #f4f4f5;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-editor-float-head button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #c7ceda;
  font-size: 18px;
}

.asset-editor-shell > .asset-editor-float-head {
  min-height: 18px;
  grid-template-columns: minmax(0, 1fr) 24px;
  padding: 4px 6px 0 14px;
  border-bottom: 0;
}

.asset-editor-shell > .asset-editor-float-head div {
  opacity: 0;
}

.asset-editor-shell > .asset-editor-float-head button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 18px;
}

#textDialog:has(.asset-library-dialog) {
  width: min(1180px, calc(100vw - 44px));
  max-height: min(900px, calc(100vh - 32px));
}

#textDialog:has(.asset-library-dialog) form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(900px, calc(100vh - 32px));
}

.asset-library-shell {
  height: 100%;
  min-height: 560px;
  display: grid;
  background: linear-gradient(180deg, rgba(24, 25, 31, 0.98), rgba(13, 14, 18, 0.98));
  color: #e9edf5;
}

.asset-library-floating .asset-library-shell {
  min-height: 0;
  background: transparent;
}

.asset-library-main {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.asset-library-top {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.asset-library-floating .asset-library-top {
  min-height: 46px;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 8px;
  padding: 9px 9px 8px;
  cursor: move;
  user-select: none;
}

#textDialog .asset-library-top {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.asset-library-tabs {
  min-width: 0;
  display: flex;
  gap: 8px;
}

.asset-library-floating .asset-library-tabs {
  gap: 6px;
}

.asset-library-tabs button,
.asset-library-close,
.asset-library-categories button,
.asset-group-title,
.asset-card-main,
.asset-item-actions button,
.asset-editor-actions button,
.asset-library-footer button {
  border: 1px solid rgba(255, 255, 255, 0.09);
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe4ec;
  cursor: pointer;
}

.asset-library-tabs button {
  min-width: 122px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 900;
}

.asset-library-floating .asset-library-tabs button {
  min-width: 0;
  height: 34px;
  flex: 1 1 0;
  padding: 0 7px;
  font-size: 18px;
}

#textDialog .asset-library-tabs button {
  width: auto;
  min-width: 122px;
  height: 34px;
  display: inline-flex;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
}

.asset-library-tabs button small {
  min-width: 20px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: #aeb6c2;
  font-size: 10px;
  font-weight: 700;
}

.asset-library-tabs button.active {
  border-color: rgba(240, 193, 116, 0.48);
  background: rgba(240, 193, 116, 0.13);
  color: #ffe7b9;
}

#textDialog .asset-library-tabs button.active {
  background: rgba(240, 193, 116, 0.13);
}

.asset-library-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #c7ceda;
  font-size: 18px;
}

.asset-library-floating .asset-library-close {
  width: 30px;
  height: 30px;
}

#textDialog .asset-library-close {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.asset-library-tip {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #9fa8b8;
  font-size: 12px;
}

.asset-library-floating .asset-library-tip {
  min-height: 34px;
  padding: 6px 9px;
  gap: 5px;
}

.asset-library-tip span {
  min-width: 0;
  overflow: hidden;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-library-content {
  min-height: 0;
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) minmax(286px, 320px);
  gap: 0;
}

.asset-library-floating .asset-library-content,
.asset-library-floating .asset-library-content.no-editor {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.asset-library-floating .asset-library-content.has-editor {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.asset-library-content.no-editor {
  grid-template-columns: 184px minmax(0, 1fr);
}

.asset-library-categories {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px 10px;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.asset-library-floating .asset-library-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 0;
  overflow: visible;
  border-right: 0;
  background: transparent;
}

.asset-library-categories button {
  min-height: 38px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  text-align: left;
}

.asset-library-floating .asset-library-categories button {
  min-height: 34px;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px;
  padding: 5px 6px;
}

.asset-library-floating .asset-library-categories button span {
  width: 20px;
  height: 20px;
  border-radius: 7px;
}

.asset-library-floating .asset-library-categories button small {
  display: none;
}

.asset-library-categories button span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(240, 193, 116, 0.12);
  color: #f0c174;
  font-size: 12px;
  font-weight: 800;
}

.asset-library-categories button strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(223, 228, 236, 0.82);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-library-categories button small {
  color: #8f929a;
  font-size: 11px;
}

.asset-library-categories button.active {
  border-color: rgba(240, 193, 116, 0.5);
  background: rgba(240, 193, 116, 0.1);
}

.asset-library-browser {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  overflow: auto;
}

.asset-library-floating .asset-library-browser {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  padding: 9px;
}

.asset-library-expanded {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.asset-library-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #8f929a;
  font-size: 13px;
}

.asset-empty-preview {
  width: min(260px, 82%);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #686f7d;
  font-size: 12px;
}

.asset-library-group {
  display: grid;
  gap: 8px;
}

.asset-group-title {
  height: 32px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.asset-group-title strong {
  overflow: hidden;
  color: #f1f3f8;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-group-title span,
.asset-group-title small {
  color: #9fa8b8;
  font-size: 11px;
}

.asset-library-group.collapsed .asset-group-grid {
  display: none;
}

.asset-library-group.collapsed .asset-group-title span {
  transform: rotate(-90deg);
}

.asset-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.asset-library-floating .asset-group-grid {
  grid-template-columns: 1fr;
}

.asset-item {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.asset-library-shell.asset-reorder-active,
.asset-library-shell.asset-reorder-active * {
  cursor: grabbing !important;
  user-select: none;
}

.asset-item.reorder-source {
  opacity: 0.56;
  border-color: rgba(240, 193, 116, 0.72);
  transform: scale(0.985);
}

.asset-item.reorder-before,
.asset-item.reorder-after {
  position: relative;
}

.asset-item.reorder-before::before,
.asset-item.reorder-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(240, 193, 116, 0), rgba(240, 193, 116, 0.98), rgba(240, 193, 116, 0));
  box-shadow: 0 0 14px rgba(240, 193, 116, 0.35);
  pointer-events: none;
}

.asset-item.reorder-before::before {
  top: -7px;
}

.asset-item.reorder-after::after {
  bottom: -7px;
}

.asset-item.editing {
  border-color: rgba(240, 193, 116, 0.62);
  background: rgba(240, 193, 116, 0.1);
  box-shadow: 0 0 0 2px rgba(240, 193, 116, 0.08);
}

.asset-card-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: stretch;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.asset-library-floating .asset-card-main {
  grid-template-columns: 58px minmax(0, 1fr);
}

.asset-thumb {
  width: 80px;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.asset-library-floating .asset-thumb {
  width: 58px;
}

.asset-library-floating .asset-main p {
  min-height: 0;
  max-height: 34px;
}

.asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-thumb b {
  color: #f0c174;
  font-size: 18px;
}

.asset-thumb.video b {
  color: #c7efff;
}

.asset-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
}

.asset-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.asset-title strong {
  min-width: 0;
  overflow: hidden;
  color: #edf1f7;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-title small {
  margin-left: auto;
  color: #9fa8b8;
  font-size: 11px;
}

.asset-main p {
  min-height: 34px;
  margin: 0;
  overflow: hidden;
  color: #aeb5c0;
  font-size: 12px;
  line-height: 1.42;
}

.asset-main em {
  color: #d7b27a;
  font-size: 11px;
  font-style: normal;
}

.asset-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-item-actions button {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
}

.asset-item-actions button[data-asset-action="insert-mention"] {
  border-color: rgba(240, 193, 116, 0.36);
  background: rgba(240, 193, 116, 0.1);
  color: #ffe2ae;
}

.asset-item-actions .asset-action-common {
  border-color: rgba(89, 201, 139, 0.3);
  background: rgba(89, 201, 139, 0.12);
  color: #c6ffdc;
}

.asset-item-actions .asset-action-common:hover {
  background: rgba(89, 201, 139, 0.22);
  color: #fff;
}

.asset-item-actions .asset-action-project {
  border-color: rgba(240, 193, 116, 0.32);
  background: rgba(240, 193, 116, 0.12);
  color: #ffe4b6;
}

.asset-item-actions .asset-action-project:hover {
  background: rgba(240, 193, 116, 0.22);
  color: #fff;
}

.asset-item-actions button[data-asset-action="delete"] {
  color: #ffb8a6;
}

.asset-editor-panel {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  overflow: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  scrollbar-gutter: stable;
}

.asset-editor-panel-floating {
  height: 100%;
  max-height: none;
  grid-template-columns: minmax(0, 1fr);
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 16px 16px 12px;
  overflow: auto;
  border-left: 0;
  background: transparent;
}

.asset-library-floating .asset-editor-panel {
  grid-column: 1 / -1;
  max-height: min(280px, 38vh);
  border-left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.asset-editor-media,
.asset-editor-form {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.asset-editor-panel-floating .asset-editor-preview {
  height: auto;
  aspect-ratio: 16 / 11;
}

.asset-editor-gallery {
  min-width: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: 3px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.26);
}

.asset-editor-main-wrap,
.asset-image-slot-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  contain: layout paint size;
}

.asset-editor-main-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 7px 0 0 7px;
  background: rgba(255, 255, 255, 0.04);
  color: #f0c174;
  cursor: pointer;
  line-height: 0;
}

.asset-editor-main-wrap .asset-editor-main-preview {
  height: 100%;
}

.asset-editor-main-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-editor-main-preview b {
  color: #f0c174;
  font-size: 38px;
}

.asset-editor-preview-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.asset-editor-preview-tool {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(10, 12, 18, 0.48);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(9px);
  opacity: 0.76;
}

.asset-editor-preview-tool:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(18, 22, 30, 0.68);
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
}

.asset-editor-media-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.asset-image-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.asset-image-slot-rail {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 3px;
  width: 78px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}

.asset-image-slot {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe4ec;
}

.asset-image-slot-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  background: rgba(15, 17, 23, 0.78);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 0.14s ease, transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

.asset-image-slot-delete:hover {
  border-color: rgba(255, 120, 120, 0.7);
  background: rgba(224, 72, 72, 0.92);
}

.asset-editor-main-wrap:hover .asset-image-slot-delete,
.asset-image-slot-wrap:hover .asset-image-slot-delete,
.asset-image-slot-delete:focus-visible {
  opacity: 1;
  transform: scale(1);
}

.asset-image-slot-delete.main {
  top: 8px;
  right: auto;
  left: 8px;
  width: 24px;
  height: 24px;
  font-size: 16px;
}

.asset-image-slot-rail .asset-image-slot {
  min-height: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
}

.asset-image-slot span {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
  color: #9fa8b8;
  font-size: 11px;
  font-weight: 800;
}

.asset-image-slot-rail .asset-image-slot span {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.055);
  color: #f4f4f5;
  font-size: 24px;
}

.asset-image-slot-hint {
  display: none;
}

.asset-image-slot img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

.asset-image-slot small {
  color: #9fa8b8;
  font-size: 10px;
}

.asset-image-slot-rail .asset-image-slot small {
  display: none;
}

.asset-editor-media-actions button {
  min-height: 29px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #dfe4ec;
  font-size: 11px;
}

.asset-voice-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(143, 210, 255, 0.16);
  border-radius: 10px;
  background: rgba(143, 210, 255, 0.055);
}

.asset-voice-panel > div {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.asset-voice-panel strong {
  color: #edf7ff;
  font-size: 12px;
}

.asset-voice-panel small,
.asset-voice-panel p {
  margin: 0;
  overflow: hidden;
  color: #9fb3c8;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.asset-voice-panel button {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(143, 210, 255, 0.26);
  border-radius: 8px;
  background: rgba(143, 210, 255, 0.1);
  color: #dff3ff;
  font-size: 11px;
}

.asset-voice-panel audio {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
}

.asset-voice-panel label {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.asset-voice-panel label span {
  color: #9fb3c8;
  font-size: 11px;
  white-space: nowrap;
}

.asset-voice-grid {
  width: max-content;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 68px);
  align-items: start;
  gap: 10px;
}

.asset-voice-tile {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #f4f4f5;
  cursor: pointer;
  text-align: center;
}

.asset-voice-tile span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}

.asset-voice-play span {
  border-color: rgba(255, 255, 255, 0.26);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-size: 22px;
}

.asset-voice-play.filled span {
  border-color: rgba(255, 255, 255, 0.82);
}

.asset-voice-tile strong {
  max-width: 70px;
  overflow: hidden;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-voice-tile:disabled {
  cursor: default;
  opacity: 0.48;
}

.asset-editor-audio {
  display: none;
}

.asset-editor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.asset-editor-inline-meta {
  gap: 5px;
  margin-top: -6px;
}

.asset-editor-meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #aeb5c0;
  font-size: 11px;
}

.asset-editor-inline-meta span {
  min-height: 20px;
  padding: 0 7px;
  font-size: 10px;
}

.asset-editor-float-actions {
  min-height: 48px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 0 24px 18px;
  border-top: 0;
}

.asset-editor-float-actions button {
  height: 36px;
  min-width: 82px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3f6fb;
  font-size: 13px;
}

.asset-editor-float-actions button.primary {
  background: #f4f8ff;
  color: #111827;
}

.asset-editor-float-actions .asset-precheck-button,
.asset-editor-actions button[data-asset-action="seedance-precheck"] {
  border: 1px solid rgba(240, 193, 116, 0.3);
  background: rgba(240, 193, 116, 0.1);
  color: #ffe1a7;
}

.asset-audit-dialog {
  display: grid;
  gap: 12px;
}

.asset-audit-dialog strong {
  color: #f4f8ff;
  font-size: 16px;
}

.asset-audit-dialog p {
  margin: 0;
  color: #aeb5c0;
  font-size: 13px;
}

.asset-audit-dialog .asset-audit-warnings {
  display: grid;
  gap: 8px;
}

.asset-audit-dialog .asset-audit-warnings span {
  padding: 9px 10px;
  border: 1px solid rgba(240, 193, 116, 0.22);
  border-radius: 8px;
  background: rgba(240, 193, 116, 0.08);
  color: #ffe0a6;
  line-height: 1.45;
}

.asset-editor-panel header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
}

#textDialog .asset-editor-panel header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 30px;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  padding: 0;
  border-bottom: 0;
}

.asset-editor-panel header span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(240, 193, 116, 0.14);
  color: #f0c174;
  font-size: 12px;
  font-weight: 800;
}

.asset-editor-panel header strong {
  color: #f4f4f5;
  font-size: 14px;
}

.asset-editor-panel header button {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #c7ceda;
}

#textDialog .asset-editor-panel header button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.asset-editor-preview {
  height: 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.24);
}

.asset-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-editor-preview b {
  color: #f0c174;
  font-size: 28px;
}

.asset-editor-panel label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #c9d0dc;
  font-size: 12px;
}

.asset-editor-field {
  gap: 8px;
}

.asset-editor-field > span,
.asset-editor-textarea > span {
  color: #f3f6fb;
  font-size: 14px;
  font-weight: 800;
}

.asset-editor-field > span i {
  color: #ff6b7a;
  font-style: normal;
}

.asset-editor-input-wrap {
  position: relative;
  min-width: 0;
}

.asset-editor-input-wrap small {
  position: absolute;
  right: 12px;
  top: 50%;
  color: #7e8796;
  font-size: 13px;
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}

.asset-name-field input {
  padding-right: 54px;
}

.asset-editor-hidden-notes {
  display: none;
}

.asset-editor-panel-floating .asset-editor-form label,
.asset-editor-panel-floating .asset-voice-panel label {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.asset-editor-panel-floating .asset-voice-panel label {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 7px;
}

.asset-editor-panel-floating .asset-editor-form label > span,
.asset-editor-panel-floating .asset-voice-panel label > span {
  display: block;
  overflow: hidden;
  color: #9fa8b8;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-editor-panel-floating .asset-editor-form label.asset-editor-textarea {
  align-items: start;
}

.asset-editor-panel-floating .asset-editor-form label.asset-editor-textarea > span {
  padding-top: 7px;
}

.asset-editor-row {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.asset-editor-panel input,
.asset-editor-panel select,
.asset-editor-panel textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  outline: none;
  background: rgba(0, 0, 0, 0.22);
  color: #f4f4f5;
  font-size: 12px;
}

.asset-editor-panel input,
.asset-editor-panel select {
  height: 40px;
  padding: 0 12px;
}

.asset-editor-panel textarea {
  min-height: 64px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.asset-editor-panel-floating .asset-editor-form input,
.asset-editor-panel-floating .asset-editor-form textarea {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  font-size: 14px;
}

.asset-editor-panel-floating .asset-editor-form input[type="hidden"],
.asset-editor-panel-floating .asset-editor-form textarea.asset-editor-hidden-notes {
  display: none;
}

.asset-editor-panel-floating .asset-editor-form textarea::placeholder {
  color: #7f8795;
}

.asset-editor-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.asset-editor-actions button {
  min-height: 30px;
  border-radius: 8px;
  font-size: 12px;
}

.asset-editor-actions button.primary {
  border-color: rgba(240, 193, 116, 0.5);
  background: linear-gradient(180deg, rgba(212, 155, 85, 0.68), rgba(151, 94, 40, 0.68));
  color: #fff6df;
}

.asset-audit-warnings,
.asset-audit-pass {
  display: grid;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 9px;
  font-size: 10.5px;
  line-height: 1.42;
}

.asset-audit-warnings {
  border: 1px solid rgba(255, 199, 107, 0.22);
  background: rgba(255, 199, 107, 0.08);
}

.asset-audit-warnings strong {
  color: #ffe0a3;
  font-size: 12px;
}

.asset-audit-warnings span {
  color: #d9c5a2;
}

.asset-audit-pass {
  border: 1px solid rgba(122, 223, 170, 0.2);
  background: rgba(122, 223, 170, 0.07);
  color: #b8f0d0;
}

.asset-library-footer {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.asset-library-floating .asset-library-footer {
  min-height: 46px;
  padding: 8px 9px;
  gap: 6px;
  overflow-x: auto;
}

.asset-library-floating .asset-library-footer button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 10px;
}

.asset-library-footer button {
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

.asset-library-footer button:first-child {
  border-color: rgba(240, 193, 116, 0.5);
  background: rgba(240, 193, 116, 0.13);
  color: #ffe2ae;
}

.asset-library-footer button span {
  margin-right: 4px;
}

@media (max-width: 980px) {
  .asset-library-floating {
    left: 12px;
    right: 12px;
    top: 50%;
    width: auto;
    height: min(680px, calc(100% - 120px));
    max-height: calc(100% - 120px);
  }

  .asset-library-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .asset-editor-panel {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .asset-editor-floating {
    left: 12px;
    right: 12px;
    top: 50%;
    width: auto;
    height: min(700px, calc(100% - 96px));
    max-height: calc(100% - 96px);
  }

  .asset-editor-panel-floating {
    grid-template-columns: minmax(0, 1fr);
  }

  .asset-editor-gallery {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .asset-image-slot-rail {
    width: 64px;
  }
}

.asset-mention-menu {
  position: fixed;
  z-index: 2100;
  width: 274px;
  max-height: 248px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(240, 193, 116, 0.3);
  border-radius: 10px;
  background: rgba(18, 19, 24, 0.98);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(16px);
}

.asset-mention-menu[hidden] {
  display: none;
}

.asset-mention-menu button {
  width: 100%;
  min-height: 34px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dfe4ec;
  text-align: left;
}

.asset-mention-menu button.active,
.asset-mention-menu button:hover {
  background: rgba(240, 193, 116, 0.12);
}

.asset-mention-menu button span {
  width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(240, 193, 116, 0.13);
  color: #f0c174;
  font-size: 11px;
  font-weight: 800;
}

.asset-mention-menu button strong {
  min-width: 0;
  overflow: hidden;
  color: #f4f4f5;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-mention-menu button small,
.asset-mention-empty {
  color: #8f929a;
  font-size: 11px;
}

.asset-mention-empty {
  padding: 10px;
  text-align: center;
}

.asset-hover-card {
  position: fixed;
  z-index: 2140;
  width: 238px;
  padding: 8px;
  border: 1px solid rgba(240, 193, 116, 0.26);
  border-radius: 12px;
  background: rgba(18, 19, 24, 0.98);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.asset-hover-card[hidden] {
  display: none;
}

.asset-hover-preview {
  height: 128px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.24);
}

.asset-hover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-hover-preview b {
  color: #f0c174;
  font-size: 28px;
}

.asset-hover-edit {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff1cf;
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
}

.asset-hover-edit:hover {
  border-color: rgba(240, 193, 116, 0.52);
  background: rgba(240, 193, 116, 0.22);
}

.asset-hover-meta {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.asset-hover-meta strong {
  min-width: 0;
  overflow: hidden;
  color: #f4f4f5;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-hover-meta small {
  margin-left: auto;
  color: #9fa8b8;
  font-size: 11px;
  white-space: nowrap;
}

.asset-hover-card p {
  margin: 6px 0 0;
  color: #aeb5c0;
  font-size: 12px;
  line-height: 1.45;
}

/* 2026-05-29 final membership price/copy vertical nudge */
.membership-redesign .membership-tier-card {
  --tier-top-pad: 28px;
  --tier-copy-h: 58px;
  --tier-copy-shift: 12px;
  --tier-action-h: 116px;
  --tier-top-h: calc(var(--tier-top-pad) + var(--tier-title-h) + var(--tier-price-h) + var(--tier-copy-h) + var(--tier-action-h));
}

.membership-redesign .membership-tier-price {
  padding-top: 8px;
}

#textDialog .membership-redesign .membership-tier-card header {
  padding: 0 var(--tier-x);
}

.membership-redesign .membership-tier-price em {
  transform: translateY(var(--tier-copy-shift));
}

.membership-redesign .membership-tier-card p {
  padding-top: 28px;
  transform: translateY(var(--tier-copy-shift));
}

.membership-redesign .membership-tier-button {
  align-self: end;
  margin-top: 0;
  margin-bottom: 18px;
}

.membership-redesign .membership-tier-card::before {
  height: calc(var(--tier-top-h) + 1px);
}

/* 2026-05-29 membership feature matrix states */
.membership-redesign .membership-tier-card {
  min-height: 1070px;
}

/* 2026-05-29 membership page-level scrolling */
#dialogBody.membership-center-dialog:has(.membership-redesign) {
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
  scrollbar-width: thin;
}

#dialogBody.membership-center-dialog:has(.membership-redesign)::-webkit-scrollbar {
  width: 14px;
}

#dialogBody.membership-center-dialog:has(.membership-redesign)::-webkit-scrollbar-track {
  background:
    linear-gradient(90deg, transparent 0 6px, rgba(255, 255, 255, 0.18) 6px 7px, transparent 7px 100%);
}

#dialogBody.membership-center-dialog:has(.membership-redesign)::-webkit-scrollbar-thumb {
  min-height: 112px;
  border: 5px solid transparent;
  border-right-width: 4px;
  border-left-width: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  background-clip: content-box;
}

#dialogBody.membership-center-dialog:has(.membership-redesign)::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

#textDialog .membership-redesign {
  height: auto;
  min-height: 100%;
  grid-template-rows: 58px auto auto;
}

#textDialog:has(.membership-redesign) form {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#textDialog .membership-redesign .membership-tier-grid {
  height: auto;
  align-items: start;
}

#textDialog .membership-redesign .membership-tier-card {
  height: auto;
  grid-template-rows: var(--tier-title-h) var(--tier-price-h) var(--tier-copy-h) var(--tier-action-h) auto;
}

#textDialog .membership-redesign .membership-tier-features {
  gap: 8px;
  align-self: start;
  height: auto;
  max-height: none;
  overflow: visible !important;
  padding-top: 16px;
  padding-right: var(--tier-x);
}

/* 2026-05-29 membership maximum viewport height */
#textDialog:has(.membership-redesign) {
  height: calc(100dvh - 12px) !important;
  max-height: calc(100dvh - 12px) !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}

#textDialog:has(.membership-redesign) form,
#dialogBody.membership-center-dialog:has(.membership-redesign) {
  height: 100% !important;
  max-height: 100% !important;
}

/* 2026-05-29 membership billing tabs stronger outline */
#textDialog .membership-redesign .membership-billing-tabs {
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 0 1px rgba(0, 0, 0, 0.72);
}

#textDialog .membership-redesign .membership-billing-tabs button {
  position: relative;
}

#textDialog .membership-redesign .membership-billing-tabs button + button::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -3px;
  width: 1px;
  background: rgba(255, 255, 255, 0.16);
}

#textDialog .membership-redesign .membership-billing-tabs button.active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.membership-redesign .membership-tier-features li {
  gap: 9px;
  font-size: 14px;
  line-height: 1.42;
}

.membership-redesign .membership-tier-features li span {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.membership-redesign .membership-tier-features li.unavailable {
  color: rgba(255, 255, 255, 0.42);
}

.membership-redesign .membership-tier-features li.unavailable span {
  color: rgba(255, 255, 255, 0.44);
}

.membership-redesign .membership-tier-features li.unavailable strong {
  color: rgba(255, 255, 255, 0.42);
}
