:root {
  color-scheme: dark;
  --bg: #060915;
  --panel: rgba(12, 16, 29, 0.62);
  --panel-soft: rgba(19, 25, 43, 0.52);
  --rail: rgba(5, 8, 18, 0.48);
  --line: rgba(225, 245, 255, 0.14);
  --line-strong: rgba(44, 230, 255, 0.48);
  --text: #f4faff;
  --muted: #94b6c9;
  --cyan: #2ce6ff;
  --red: #ff304c;
  --green: #43ff9d;
  --amber: #ffbb4a;
  --stage-w: 1920px;
  --stage-h: 1080px;
  --left-rail-width: 260px;
  --right-rail-width: 320px;
  font-family: Bahnschrift, "Arial Narrow", Impact, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(67, 255, 157, 0.06), transparent 28%),
    radial-gradient(circle at 18% 12%, rgba(44, 230, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 78% 88%, rgba(255, 48, 76, 0.14), transparent 38rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    var(--bg);
  color: var(--text);
}

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

button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

select option,
select optgroup {
  background: #0b1020;
  color: #f4faff;
}

button {
  min-height: 32px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  border-color: transparent;
  background: rgba(44, 230, 255, 0.08);
}

button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(67, 255, 157, 0.9), rgba(44, 230, 255, 0.72));
  color: #041116;
  font-weight: 800;
}

button.danger {
  border-color: rgba(255, 48, 76, 0.45);
  color: #ffd8df;
}

button.subtle {
  background: rgba(255, 48, 76, 0.06);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  outline: none;
}

textarea {
  resize: vertical;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--left-rail-width) 8px minmax(520px, 1fr) 8px var(--right-rail-width);
  height: 100vh;
}

.member-mode [data-inspector-section="data"],
.member-mode [data-inspector-section="syntra"] {
  display: none !important;
}

.member-auth-blocked .app-shell {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

.member-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 18%, rgba(44, 230, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 76% 80%, rgba(67, 255, 157, 0.16), transparent 30rem),
    rgba(3, 6, 14, 0.76);
}

.member-auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid rgba(244, 250, 255, 0.14);
  border-radius: 28px;
  background: rgba(8, 13, 26, 0.88);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.member-auth-logo {
  display: block;
  width: clamp(82px, 18vw, 124px);
  height: auto;
  margin: 0 auto 16px;
  filter: drop-shadow(0 16px 36px rgba(44, 230, 255, 0.22));
}

.member-auth-card h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  letter-spacing: -0.04em;
}

.member-auth-card p {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.member-auth-card small {
  display: block;
  margin-top: 16px;
  color: rgba(244, 250, 255, 0.56);
  line-height: 1.45;
}

.member-auth-button {
  display: inline-grid;
  min-height: 42px;
  place-items: center;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(67, 255, 157, 0.94), rgba(44, 230, 255, 0.82));
  color: #041116;
  font-weight: 900;
  text-decoration: none;
}

.member-mode-badge {
  display: block;
  margin-top: 3px;
  color: var(--green);
}

.member-connections {
  flex: 0 0 auto;
}

.member-connections-gate {
  margin: 18px 0 4px;
  text-align: left;
}

.member-connections .panel-title button {
  min-height: 24px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
}

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

.connection-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(244, 250, 255, 0.08);
}

.connection-row:first-child {
  border-top: 0;
}

.connection-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.connection-platform {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

.connection-platform svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connection-platform .platform-logo {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.connection-platform .platform-logo-fallback {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(44, 230, 255, 0.16);
  color: var(--cyan);
  font-size: 10px;
  line-height: 1;
}

.connection-row.connected .connection-platform {
  color: var(--green);
}

.connection-row button {
  min-height: 26px;
  padding: 0 6px;
  color: var(--cyan);
  font-size: 12px;
}

.connection-error {
  display: block;
  margin-bottom: 8px;
  color: #ffd8df;
  line-height: 1.35;
}

.left-rail,
.right-rail {
  padding: 16px 14px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18rem),
    var(--rail);
  overflow: auto;
}

.left-rail {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.right-rail {
  border-left: 1px solid var(--line);
}

.right-rail {
  padding: 10px 12px;
  background: rgba(4, 7, 15, 0.34);
}

.rail-resizer {
  position: relative;
  z-index: 20;
  width: 8px;
  min-width: 8px;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
}

.rail-resizer::before {
  position: absolute;
  inset: 0 3px;
  background: rgba(44, 230, 255, 0.14);
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
  content: "";
}

.rail-resizer:hover::before,
.rail-resizer:focus-visible::before,
.rail-resizer.active::before {
  background: rgba(67, 255, 157, 0.46);
  opacity: 1;
}

body.rail-resizing,
body.rail-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.right-rail .panel {
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.right-rail .panel-title {
  margin: 0;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, var(--red), transparent 42%),
    linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 0 30px rgba(44, 230, 255, 0.28);
}

.brand strong {
  display: block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand small {
  font-size: 11px;
}

.brand small,
.scene-meta,
.output-panel p,
.empty-inspector {
  color: var(--muted);
}

.panel {
  margin-bottom: 8px;
  padding: 12px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: #dff7ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
}

.panel-title button {
  min-height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.panel-title button:hover {
  color: var(--cyan);
  background: transparent;
}

.mini-actions {
  display: flex;
  gap: 6px;
}

.mini-actions button,
.mini-actions button.danger,
.mini-actions button.subtle {
  border-color: transparent;
  background: transparent;
}

.mini-actions button.danger:hover {
  color: #ffd8df;
}

.scene-details {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.layers-panel {
  display: flex;
  min-height: 180px;
  flex: 1 1 auto;
  flex-direction: column;
  position: relative;
}

.add-layer-panel {
  margin-top: auto;
}

.add-layer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  cursor: pointer;
  color: #dff7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.add-layer-summary::-webkit-details-marker {
  display: none;
}

.add-layer-summary:hover {
  color: var(--green) !important;
}

.add-layer-summary:focus,
.add-layer-summary:focus-visible {
  outline: none;
  box-shadow: none !important;
}

.add-layer-summary svg,
.icon-command svg,
.add-menu svg,
.layer-icon svg,
.layer-toggle svg,
.context-menu svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.add-menu {
  display: grid;
  gap: 1px;
  max-height: min(40vh, 420px);
  padding: 2px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: auto;
}

.add-menu-heading {
  margin-top: 7px;
  color: rgba(216, 245, 255, 0.54);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.add-menu-heading:first-child {
  margin-top: 0;
}

.add-menu button {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  justify-content: start;
  gap: 8px;
  min-height: 31px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dff7ff;
  text-align: left;
}

.add-menu button:hover {
  background: transparent;
  color: var(--cyan);
}

.add-menu svg {
  color: var(--cyan);
}

.layer-list {
  display: grid;
  gap: 3px;
  min-height: 0;
  align-content: start;
  overflow: auto;
}

.empty-layers {
  padding: 8px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.layer-row {
  display: grid;
  grid-template-columns: 1fr 23px 23px;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  margin-left: calc(var(--layer-depth, 0) * 14px);
  border-radius: 12px;
  opacity: 0.92;
}

.layer-row.group {
  color: #f4faff;
}

.layer-row.group .layer-icon {
  color: var(--green);
}

.layer-row.group.drop-target {
  box-shadow: inset 0 0 0 1px rgba(67, 255, 157, 0.58);
}

.layer-row.selected {
  background: linear-gradient(90deg, rgba(67, 255, 157, 0.18), rgba(44, 230, 255, 0.06) 54%, transparent 96%);
  box-shadow: inset 0 0 0 1px rgba(67, 255, 157, 0.54), 0 10px 26px rgba(0, 0, 0, 0.12);
}

.layer-row.disabled {
  opacity: 0.48;
}

.layer-row.locked .layer-icon {
  color: var(--amber);
}

.layer-row.dragging {
  opacity: 0.36;
}

.layer-row.drop-target {
  background: linear-gradient(90deg, rgba(44, 230, 255, 0.18), transparent 92%);
}

.layer-main {
  display: grid;
  grid-template-columns: 14px 24px 1fr;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 0 6px;
  color: #dff7ff;
  text-align: left;
  cursor: grab;
}

.layer-main:hover,
.layer-toggle:hover {
  background: rgba(255, 255, 255, 0.045);
}

.layer-expander {
  display: grid;
  place-items: center;
  width: 14px;
  height: 24px;
  color: var(--muted);
}

.layer-expander svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 120ms ease;
}

.layer-row.group:not(.collapsed) .layer-expander svg {
  transform: rotate(90deg);
}

.layer-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: var(--cyan);
  background: transparent;
}

.layer-icon svg,
.layer-toggle svg {
  width: 15px;
  height: 15px;
}

.layer-copy {
  min-width: 0;
}

.layer-copy strong,
.layer-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-copy strong {
  font-size: 12px;
}

.layer-copy small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.layer-toggle {
  display: grid;
  place-items: center;
  width: 23px;
  min-height: 23px !important;
  padding: 0;
  color: var(--muted);
}

.layer-toggle[aria-pressed="true"].layer-visibility {
  color: var(--green);
}

.layer-toggle[aria-pressed="true"].layer-lock {
  color: var(--amber);
}

.layer-toggle .icon-slash {
  stroke: var(--red);
  opacity: 1;
}

.layer-toggle[aria-pressed="true"] .icon-slash {
  opacity: 0;
}

.tool-grid {
  display: grid;
  gap: 3px;
}

.tool-grid button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dff7ff;
  letter-spacing: 0.02em;
}

.tool-grid button::before {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(44, 230, 255, 0.08);
  color: var(--cyan);
  font-size: 12px;
  content: "+";
}

.tool-grid button[data-add="text"]::before { content: "T"; }
.tool-grid button[data-add="image"]::before { content: "I"; }
.tool-grid button[data-add="video"]::before { content: "V"; }
.tool-grid button[data-add="shape"]::before { content: "S"; }

.tool-grid button:hover {
  background: rgba(255, 255, 255, 0.045);
}

.context-menu {
  position: fixed;
  z-index: 100;
  display: grid;
  min-width: 126px;
  padding: 3px;
  border: 0;
  border-radius: 0;
  background: rgba(7, 10, 22, 0.86);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.context-menu button {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 7px;
  align-items: center;
  justify-content: flex-start;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dff7ff;
  text-align: left;
}

.context-menu button:hover {
  background: transparent;
  color: var(--cyan);
}

.context-menu button.danger {
  color: #ffd8df;
}

.workspace {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 17, 0.42);
}

.scene-name {
  width: min(460px, 34vw);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.scene-meta {
  display: flex;
  gap: 16px;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.snap-control {
  min-height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dff7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.snap-size {
  display: grid;
  grid-template-columns: auto 48px;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.snap-size input {
  width: 48px;
  min-height: 30px;
  padding: 5px;
}

.topbar-actions select {
  width: 126px;
  min-height: 32px;
}

.topbar-actions button {
  min-height: 32px;
  border-radius: 10px;
}

#publishScene {
  color: var(--muted);
}

#undoEdit,
#redoEdit,
#copyObsUrl,
#copyVariantUrl {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 36px;
  padding: 0;
}

#undoEdit svg,
#redoEdit svg,
#copyObsUrl svg,
#copyVariantUrl svg {
  width: 19px;
  height: 19px;
}

#copyObsUrl.working,
#copyVariantUrl.working {
  opacity: 0.7;
}

#copyObsUrl.copied,
#copyVariantUrl.copied {
  box-shadow: 0 0 0 2px rgba(67, 255, 157, 0.32);
}

.canvas-wrap {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
}

.stage-shell {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid rgba(225, 245, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.055) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.055) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.055) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.055) 75%),
    rgba(5, 8, 17, 0.5);
  background-position: 0 0, 0 1px, 1px -1px, -1px 0;
  background-size: 2px 2px;
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.45);
  overflow: visible;
}

.stage {
  position: relative;
  width: var(--stage-w);
  height: var(--stage-h);
  transform-origin: top left;
  outline: 1px solid rgba(236, 250, 255, 0.26);
  background: transparent;
}

.stage.snap-grid::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(44, 230, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 230, 255, 0.18) 1px, transparent 1px);
  background-size: var(--snap-size, 20px) var(--snap-size, 20px);
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}

.element {
  position: absolute;
  z-index: 1;
  user-select: none;
  touch-action: none;
}

.element.selected {
  outline: 3px solid rgba(67, 255, 157, 0.82);
  box-shadow: 0 0 0 1px rgba(7, 9, 19, 0.9), 0 0 28px rgba(67, 255, 157, 0.36);
}

.group-selection {
  position: absolute;
  z-index: 10000;
  user-select: none;
  touch-action: none;
  outline: 3px dashed rgba(44, 230, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(7, 9, 19, 0.9), 0 0 34px rgba(44, 230, 255, 0.28);
}

.group-selection::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(44, 230, 255, 0.035);
  content: "";
}

.group-selection.locked {
  outline-color: rgba(255, 187, 74, 0.85);
}

.element-frame {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.scroll-frame {
  overflow: hidden !important;
}

.scroll-content {
  flex: 0 0 auto;
  transform: translateZ(0);
}

.scroll-track {
  display: flex;
  width: max-content;
  height: 100%;
  gap: var(--scroll-gap, 0px);
  will-change: transform;
}

.scroll-axis-y {
  width: 100%;
  height: max-content;
  flex-direction: column;
}

.scroll-axis-x .scroll-item {
  flex: 0 0 auto;
  min-width: 0;
  height: 100%;
}

.scroll-axis-y .scroll-item {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
}

.scroll-item > * {
  height: 100%;
}

.element iframe,
.element img,
.element video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  object-fit: contain;
  pointer-events: none;
}

.transport-preview {
  --preview-red: #ff304c;
  --preview-cyan: #2ce6ff;
  --preview-green: #43ff9d;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  width: 100%;
  height: 100%;
  color: #f4faff;
}

.transport-preview svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.preview-icon {
  flex: 0 0 154px;
  width: 154px;
  height: 154px;
}

.preview-core {
  fill: #f4faff;
}

.preview-red {
  fill: var(--preview-red);
  opacity: 0.68;
  transform: translate(-3px, 3px);
}

.preview-cyan {
  fill: var(--preview-cyan);
  opacity: 0.68;
  transform: translate(3px, -3px);
}

.preview-lines,
.preview-cyan-stroke {
  fill: none;
  stroke: var(--preview-cyan);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preview-hud {
  position: relative;
  flex: 1 1 560px;
  max-width: 560px;
  min-width: 340px;
  height: 138px;
  padding: 22px 26px 18px;
  border: 3px solid rgba(236, 250, 255, 0.36);
  border-radius: 18px;
  background:
    repeating-linear-gradient(0deg, rgba(244, 250, 255, 0.04) 0 1px, transparent 1px 8px),
    linear-gradient(135deg, rgba(7, 9, 19, 0.86), rgba(21, 24, 38, 0.72));
  box-shadow: inset 0 0 20px rgba(44, 230, 255, 0.09), 0 18px 45px rgba(0, 0, 0, 0.28);
}

.preview-topline {
  position: absolute;
  top: 16px;
  left: 18px;
  width: 42px;
  height: 3px;
  background: rgba(244, 250, 255, 0.78);
}

.preview-row,
.preview-meta,
.preview-progress {
  display: flex;
  align-items: center;
}

.preview-row {
  gap: 12px;
}

.preview-row strong {
  flex: 1;
  overflow: hidden;
  font-size: 46px;
  line-height: 0.9;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-row b {
  color: #d8f5ff;
  font-size: 28px;
}

.preview-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--preview-red);
  box-shadow: 0 0 18px rgba(255, 48, 76, 0.8);
}

.preview-meta {
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  color: rgba(189, 223, 241, 0.82);
  font-family: Consolas, "Courier New", monospace;
  font-size: 16px;
  letter-spacing: 0.05em;
}

.preview-progress {
  position: relative;
  margin-top: 12px;
  height: 5px;
  border-radius: 999px;
  background: rgba(236, 250, 255, 0.2);
}

.preview-progress i,
.preview-progress em {
  position: absolute;
  top: -8px;
  width: 9px;
  height: 26px;
  border-radius: 999px;
  content: "";
}

.preview-progress i {
  left: 72%;
  background: var(--preview-red);
  box-shadow: 0 0 18px rgba(255, 48, 76, 0.72);
}

.preview-progress em {
  right: 1%;
  background: var(--preview-green);
  box-shadow: 0 0 18px rgba(67, 255, 157, 0.72);
}

.layout-icon .preview-hud {
  display: none;
}

.layout-icon.transport-preview {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.layout-icon .preview-icon {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.layout-hud .preview-icon {
  display: none;
}

.layout-hud .preview-hud {
  max-width: calc(100% - 12px);
}

.text-element {
  display: flex;
  width: 100%;
  height: 100%;
  white-space: pre-wrap;
  overflow: visible;
  word-break: break-word;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.72);
}

.shape-element {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.syntra-preview {
  width: 100%;
  height: 100%;
}

.syntra-widget {
  --syntra-accent: var(--cyan);
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  gap: clamp(6px, 1.5vw, 14px);
  padding: clamp(12px, 3.4%, 28px);
  border-radius: clamp(12px, 2.3vw, 28px);
  background: rgba(5, 8, 18, 0.74);
  box-shadow: inset 0 0 0 1px rgba(44, 230, 255, 0.26), 0 18px 46px rgba(0, 0, 0, 0.26);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--syntra-accent) 22%, transparent), transparent 36%),
    linear-gradient(180deg, rgba(5, 8, 18, 0.82), rgba(5, 8, 18, 0.48));
  color: #f4faff;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--syntra-accent) 42%, transparent), 0 18px 46px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.syntra-widget.compact {
  gap: 5px;
  padding: clamp(8px, 2.4%, 16px);
  border-radius: 16px;
}

.syntra-kicker,
.syntra-meta,
.syntra-feed-row span,
.syntra-chat-row small,
.syntra-destination small {
  color: rgba(221, 246, 255, 0.72);
  font-size: clamp(11px, 1.3vw, 16px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.syntra-widget h2,
.syntra-widget h3 {
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 0.95;
  text-transform: uppercase;
  text-wrap: balance;
}

.syntra-widget h2 {
  font-size: clamp(30px, 8vw, 78px);
}

.syntra-widget h3 {
  font-size: clamp(21px, 4.8vw, 46px);
}

.syntra-status-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}

.syntra-status-head strong,
.syntra-big-number {
  color: var(--syntra-accent);
  font-size: clamp(34px, 8vw, 86px);
  font-weight: 900;
  line-height: 0.85;
}

.syntra-live-dot {
  width: clamp(15px, 2.6vw, 28px);
  height: clamp(15px, 2.6vw, 28px);
  border-radius: 999px;
  background: rgba(148, 182, 201, 0.44);
  box-shadow: 0 0 0 5px rgba(148, 182, 201, 0.08);
}

.syntra-live-dot.on {
  background: #ff304c;
  box-shadow: 0 0 0 5px rgba(255, 48, 76, 0.16), 0 0 30px rgba(255, 48, 76, 0.75);
}

.syntra-pills,
.syntra-destination-strip,
.syntra-feed {
  display: grid;
  gap: 8px;
}

.syntra-pills,
.syntra-destination-strip {
  display: flex;
  flex-wrap: wrap;
}

.syntra-pill,
.syntra-destination {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e9fbff;
  font-size: clamp(11px, 1.5vw, 17px);
  font-weight: 900;
  text-transform: uppercase;
}

.syntra-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(148, 182, 201, 0.76);
}

.syntra-pill.is-live i,
.syntra-destination.is-live {
  background: color-mix(in srgb, var(--syntra-accent) 24%, rgba(255, 255, 255, 0.08));
}

.syntra-destination {
  flex: 1 1 130px;
  justify-content: space-between;
  border-radius: 15px;
}

.syntra-feed-row,
.syntra-chat-row,
.syntra-rank-row,
.syntra-poll-row {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(225, 245, 255, 0.12);
}

.syntra-chat-row,
.syntra-rank-row,
.syntra-poll-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.syntra-feed-row strong,
.syntra-chat-row strong,
.syntra-rank-row strong,
.syntra-poll-row span {
  min-width: 0;
  overflow: hidden;
  color: #f4faff;
  font-size: clamp(15px, 2.4vw, 25px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.syntra-chat-row span,
.syntra-rank-row b {
  color: var(--syntra-accent);
  font-weight: 900;
}

.syntra-progress,
.syntra-poll-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.syntra-progress i,
.syntra-poll-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--syntra-accent), #43ff9d);
}

.syntra-poll-row i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 100%;
  opacity: 0.58;
}

.syntra-empty,
.syntra-loading {
  color: rgba(221, 246, 255, 0.72);
  font-size: clamp(16px, 2.5vw, 26px);
  font-weight: 800;
}

.syntra-loading span {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.45em;
  border-radius: 999px;
  background: var(--syntra-accent);
  box-shadow: 0 0 22px var(--syntra-accent);
}

@keyframes overlay-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

@keyframes overlay-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.055); }
}

@keyframes overlay-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes overlay-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-18px) scale(1.015); }
  55% { transform: translateY(3px) scale(0.995); }
  72% { transform: translateY(-7px) scale(1.006); }
}

@keyframes overlay-heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.08); }
  28% { transform: scale(1); }
  42% { transform: scale(1.045); }
  70% { transform: scale(1); }
}

@keyframes overlay-shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-8px); }
  36% { transform: translateX(7px); }
  54% { transform: translateX(-5px); }
  72% { transform: translateX(4px); }
}

@keyframes overlay-blink {
  0%, 46%, 100% { opacity: 1; }
  52%, 62% { opacity: 0; }
}

@keyframes overlay-pop {
  0% { opacity: 0; transform: scale(0.72); }
  62% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes overlay-tilt {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}

@keyframes overlay-spin {
  to { transform: rotate(360deg); }
}

@keyframes overlay-wiggle {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-2.5deg); }
  40% { transform: rotate(2.5deg); }
  60% { transform: rotate(-1.4deg); }
  80% { transform: rotate(1.4deg); }
}

@keyframes overlay-transport-glitch {
  0%, 100% { transform: translate(0, 0); opacity: 1; }
  12% { transform: translate(3px, -1.8px) skewX(3deg); opacity: 0.7; }
  15% { transform: translate(-2.4px, 1.6px) skewX(-3deg); opacity: 1; }
  22% { transform: translate(1.6px, 0) skewX(1deg); opacity: 0.82; }
  26% { transform: translate(0, 0); }
  62% { transform: translate(-2px, 1px) skewX(-2deg); opacity: 0.78; }
  66% { transform: translate(0, 0); opacity: 1; }
}

@keyframes overlay-transport-speed-line {
  0% { opacity: 0; transform: translateX(-22px) scaleX(0.25); }
  22% { opacity: 1; transform: translateX(-2px) scaleX(1.08); }
  58% { opacity: 0.78; transform: translateX(16px) scaleX(1.38); }
  100% { opacity: 0; transform: translateX(34px) scaleX(0.35); }
}

@keyframes overlay-transport-ring {
  0% { opacity: 0.48; transform: scale(0.58); }
  50% { opacity: 0.3; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.72); }
}

@keyframes overlay-transport-rec-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  34% { opacity: 0.58; transform: scale(0.68); }
  58% { opacity: 1; transform: scale(1.34); }
  76% { transform: scale(0.94); }
}

@keyframes overlay-transport-core-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  48% { transform: scale(1.085) rotate(-0.8deg); opacity: 0.74; }
  66% { transform: scale(0.97) rotate(0.4deg); opacity: 1; }
}

@keyframes overlay-scroll-left {
  from { transform: translateX(var(--scroll-start-x, 100%)); }
  to { transform: translateX(var(--scroll-end-x, -100%)); }
}

@keyframes overlay-scroll-right {
  from { transform: translateX(var(--scroll-end-x, -100%)); }
  to { transform: translateX(var(--scroll-start-x, 100%)); }
}

@keyframes overlay-scroll-up {
  from { transform: translateY(var(--scroll-start-y, 100%)); }
  to { transform: translateY(var(--scroll-end-y, -100%)); }
}

@keyframes overlay-scroll-down {
  from { transform: translateY(var(--scroll-end-y, -100%)); }
  to { transform: translateY(var(--scroll-start-y, 100%)); }
}

@keyframes overlay-scroll-loop-left {
  from { transform: translateX(0); }
  to { transform: translateX(var(--scroll-distance-x, -50%)); }
}

@keyframes overlay-scroll-loop-right {
  from { transform: translateX(var(--scroll-distance-x, -50%)); }
  to { transform: translateX(0); }
}

@keyframes overlay-scroll-loop-up {
  from { transform: translateY(0); }
  to { transform: translateY(var(--scroll-distance-y, -50%)); }
}

@keyframes overlay-scroll-loop-down {
  from { transform: translateY(var(--scroll-distance-y, -50%)); }
  to { transform: translateY(0); }
}

.resize-handle {
  position: absolute;
  display: none;
  z-index: 6;
  width: 14px;
  height: 14px;
  border: 2px solid #061016;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 1px rgba(67, 255, 157, 0.5), 0 0 16px rgba(67, 255, 157, 0.35);
  transform: translate(-50%, -50%);
}

.resize-handle[data-resize="nw"] {
  left: 0;
  top: 0;
  cursor: nwse-resize;
}

.resize-handle[data-resize="n"] {
  left: 50%;
  top: 0;
  cursor: ns-resize;
}

.resize-handle[data-resize="ne"] {
  left: 100%;
  top: 0;
  cursor: nesw-resize;
}

.resize-handle[data-resize="e"] {
  left: 100%;
  top: 50%;
  cursor: ew-resize;
}

.resize-handle[data-resize="se"] {
  left: 100%;
  top: 100%;
  cursor: nwse-resize;
}

.resize-handle[data-resize="s"] {
  left: 50%;
  top: 100%;
  cursor: ns-resize;
}

.resize-handle[data-resize="sw"] {
  left: 0;
  top: 100%;
  cursor: nesw-resize;
}

.resize-handle[data-resize="w"] {
  left: 0;
  top: 50%;
  cursor: ew-resize;
}

.element.selected .resize-handle,
.group-selection .resize-handle {
  display: block;
}

.element.locked .resize-handle,
.group-selection.locked .resize-handle {
  display: none;
}

.element.disabled {
  opacity: 0.32 !important;
}

.element.disabled .element-frame {
  filter: grayscale(1) opacity(0.7);
}

.element.disabled::after {
  position: absolute;
  inset: -1px;
  border: 1px dashed rgba(255, 48, 76, 0.7);
  content: "";
  pointer-events: none;
}

.inspector-form {
  display: grid;
  gap: 0;
}

.inspector-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.right-rail input,
.right-rail select,
.right-rail textarea {
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.038);
}

.right-rail input:disabled,
.right-rail select:disabled,
.right-rail textarea:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.right-rail button {
  min-height: 28px;
  border-radius: 7px;
}

.inspector-group {
  border-top: 1px solid var(--line);
}

.inspector-group:last-child {
  border-bottom: 1px solid var(--line);
}

.inspector-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 5px 2px;
  color: #dff7ff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.inspector-group summary::-webkit-details-marker {
  display: none;
}

.inspector-group summary::after {
  color: var(--muted);
  content: "+";
  font-size: 16px;
  line-height: 1;
}

.inspector-group[open] summary::after {
  content: "-";
}

.group-body {
  display: grid;
  gap: 5px;
  padding: 0 2px 7px;
}

.gradient-controls {
  display: grid;
  gap: 5px;
}

.layout-name-row,
.layout-pivot-row,
.size-row,
.compact-pair {
  display: grid;
  gap: 5px;
}

.layout-name-row {
  grid-template-columns: 1fr;
  align-items: center;
}

.layout-pivot-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

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

.size-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.compact-pair label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px;
}

.layout-name-row input,
.compact-pair input {
  min-height: 25px;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.icon-toggle {
  display: grid;
  place-items: center;
  min-height: 22px !important;
  width: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.icon-toggle:hover {
  background: transparent;
  color: var(--cyan);
}

.icon-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

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

.visibility-toggle.active {
  color: var(--green);
}

.visibility-toggle .icon-slash {
  stroke: var(--red);
  opacity: 1;
}

.visibility-toggle.active .icon-slash {
  opacity: 0;
}

.lock-toggle.active {
  color: var(--amber);
  filter: drop-shadow(0 0 6px rgba(255, 187, 74, 0.4));
}

.ratio-toggle.active {
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(67, 255, 157, 0.36));
}

.opacity-control {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.opacity-control input {
  min-height: 20px;
  padding: 0;
}

.pivot-control {
  display: flex;
  justify-content: flex-start;
}

.pivot-grid {
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 3px;
  padding: 1px;
}

.pivot-grid button {
  min-height: 8px;
  width: 8px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--muted);
  opacity: 0.58;
}

.pivot-grid button.active {
  background: var(--green);
  box-shadow: 0 0 7px rgba(67, 255, 157, 0.9);
  opacity: 1;
}

.pivot-grid button:hover {
  background: var(--cyan);
  opacity: 1;
}

.pivot-grid button:disabled {
  cursor: not-allowed;
  opacity: 0.25;
}

.pivot-grid button.active:disabled {
  background: var(--green);
  box-shadow: none;
  opacity: 0.55;
}

.output-panel .group-body {
  padding-bottom: 0;
}

.quad,
.dual,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.button-row button {
  justify-content: flex-start;
  min-height: 28px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.button-row button:hover {
  color: var(--cyan);
  background: transparent;
}

.button-row button.danger:hover {
  color: #ffd8df;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  grid-template-columns: none;
}

.checkbox-row input {
  width: auto;
}

.hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.hint code {
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.variable-help {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  color: var(--muted);
  font-size: 12px;
}

.info-dot {
  display: grid;
  place-items: center;
  width: 18px;
  min-height: 18px !important;
  padding: 0;
  border: 1px solid rgba(44, 230, 255, 0.62);
  border-radius: 999px;
  background: transparent;
  color: var(--cyan);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.info-dot:hover,
.info-dot:focus-visible {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.variable-tooltip {
  position: absolute;
  right: 0;
  top: 24px;
  z-index: 60;
  display: none;
  width: min(360px, 82vw);
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(44, 230, 255, 0.34);
  border-radius: 10px;
  background: rgba(7, 10, 22, 0.96);
  color: #dff7ff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.42);
  font-size: 12px;
  line-height: 1.42;
  text-transform: none;
  letter-spacing: 0;
}

.variable-help:hover .variable-tooltip,
.variable-help:focus-within .variable-tooltip {
  display: block;
}

.variable-tooltip code {
  color: var(--cyan);
  font-family: Consolas, "Courier New", monospace;
}

input[type="color"] {
  min-height: 30px;
  padding: 5px;
}

.text-editor {
  gap: 6px;
}

.text-tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 1px 0;
}

.text-tool {
  display: grid;
  place-items: center;
  width: 24px;
  min-height: 24px !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.text-tool:hover,
.text-tool.active {
  background: transparent;
  color: var(--cyan);
}

.text-tool svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.type-props {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.section-label {
  color: #dff7ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hidden {
  display: none !important;
}

.output-panel textarea {
  min-height: 92px;
  color: #b8f7ff;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

/* StreamElements-style editor chrome: quiet panels, icon-led commands, floating tools. */
:root {
  color-scheme: light;
  --bg: #edf2fb;
  --panel: #ffffff;
  --panel-soft: #f7f9fd;
  --rail: #ffffff;
  --line: #dde5f2;
  --line-strong: rgba(78, 125, 238, 0.5);
  --text: #11182d;
  --muted: #66728a;
  --cyan: #4f7dea;
  --red: #ef3653;
  --green: #4f7dea;
  --amber: #d98916;
  --topbar: #020927;
  --toolbar-shadow: 0 14px 34px rgba(20, 30, 64, 0.18);
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

button,
select,
input,
textarea {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
}

select option,
select optgroup {
  background: #fff;
  color: var(--text);
}

button:hover {
  background: rgba(79, 125, 234, 0.08);
}

button.primary {
  background: #5b8def;
  color: #fff;
}

.left-rail,
.right-rail {
  padding: 0 14px 18px;
  border-color: var(--line);
  background: var(--rail);
  color: var(--text);
  box-shadow: 8px 0 24px rgba(24, 33, 61, 0.06);
}

.right-rail {
  background: #fbfcff;
  box-shadow: -8px 0 24px rgba(24, 33, 61, 0.05);
}

.brand {
  min-height: 52px;
  margin: 0 -14px 14px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--topbar);
  color: #fff;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  box-shadow: none;
}

.brand strong {
  letter-spacing: 0.01em;
  text-transform: none;
}

.brand small {
  color: rgba(230, 238, 255, 0.7);
}

.panel {
  margin-bottom: 8px;
  padding: 9px 0 11px;
  border-bottom-color: #edf1f7;
}

.panel-title {
  color: #303a50;
  letter-spacing: 0.09em;
}

.mini-actions {
  gap: 2px;
}

.mini-actions button {
  display: grid;
  place-items: center;
  width: 24px;
  min-height: 24px;
  padding: 0;
  color: var(--muted);
}

.mini-actions svg,
.toolbar-icon svg,
.toolbar-toggle svg,
.topbar-actions svg,
.help-command svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.workspace {
  position: relative;
  background: #eef3ff;
}

.topbar {
  min-height: 52px;
  padding: 0 10px 0 18px;
  border-bottom: 0;
  background: var(--topbar);
  color: #fff;
  gap: 12px;
}

.scene-name {
  width: min(320px, 26vw);
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.scene-meta {
  color: rgba(230, 238, 255, 0.62);
  font-size: 10px;
}

.topbar-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}

.topbar-actions .icon-command {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(235, 241, 255, 0.9);
}

.topbar-actions #copyObsUrl,
.topbar-actions #copyVariantUrl,
.topbar-actions #copyObsUrl.primary {
  width: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: rgba(235, 241, 255, 0.9);
  box-shadow: none;
}

.topbar-actions .icon-command:hover,
.topbar-actions .icon-command.copied,
.topbar-actions #copyObsUrl.primary:hover,
.topbar-actions #copyVariantUrl:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.outline-action,
.save-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.outline-action {
  border: 1px solid rgba(91, 141, 239, 0.9);
  background: transparent;
  color: #8db2ff;
}

.outline-action:hover {
  background: rgba(91, 141, 239, 0.12);
  color: #fff;
}

.save-action,
#publishScene.save-action {
  min-width: 86px;
  border: 0;
  background: #5b8def;
  color: #fff;
}

#publishScene.save-action:hover {
  background: #6b99f2;
  color: #fff;
}

.canvas-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 24px 24px 104px;
  background-color: #edf3ff;
  background-image: radial-gradient(circle, rgba(79, 125, 234, 0.18) 1px, transparent 1px);
  background-size: 10px 10px;
}

.stage-shell {
  flex: 0 0 auto;
  max-width: none;
  max-height: none;
  margin: auto;
  border: 1px solid rgba(86, 104, 139, 0.18);
  border-radius: 3px;
  background:
    linear-gradient(45deg, rgba(30, 42, 69, 0.045) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(30, 42, 69, 0.045) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(30, 42, 69, 0.045) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(30, 42, 69, 0.045) 75%),
    rgba(255, 255, 255, 0.78);
  background-position: 0 0, 0 1px, 1px -1px, -1px 0;
  background-size: 2px 2px;
  box-shadow: 0 20px 55px rgba(23, 36, 70, 0.18);
}

.stage {
  outline: 1px solid rgba(26, 37, 66, 0.24);
}

.stage.snap-grid::before {
  background:
    linear-gradient(rgba(79, 125, 234, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 125, 234, 0.2) 1px, transparent 1px);
  mask-image: none;
}

.editor-bottom-toolbar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: stretch;
  min-height: 58px;
  border: 1px solid rgba(25, 39, 75, 0.1);
  border-radius: 12px;
  background: #fff;
  color: #5a6478;
  box-shadow: var(--toolbar-shadow);
  transform: translateX(-50%);
}

.toolbar-grip {
  position: absolute;
  left: 50%;
  top: -16px;
  width: 52px;
  height: 18px;
  border: 1px solid rgba(25, 39, 75, 0.1);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #fff;
  transform: translateX(-50%);
}

.toolbar-grip::before {
  position: absolute;
  inset: 7px 16px;
  border-top: 2px solid #9aa4b8;
  border-bottom: 2px solid #9aa4b8;
  content: "";
}

.toolbar-segment {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 9px;
  border-left: 1px solid #edf1f7;
}

.toolbar-segment:first-of-type {
  border-left: 0;
}

.toolbar-icon,
.toolbar-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px !important;
  min-height: 38px !important;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #7b8496;
}

.toolbar-icon:hover,
.toolbar-icon.active,
.toolbar-toggle:hover,
.toolbar-toggle:has(input:checked) {
  background: #eef3ff;
  color: #4f7dea;
}

.toolbar-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toolbar-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.toolbar-number {
  display: inline-grid;
  grid-template-columns: auto 46px;
  align-items: center;
  gap: 6px;
  min-width: 86px;
  color: #7b8496;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-number input {
  width: 46px;
  min-height: 30px;
  padding: 4px;
  border-radius: 8px;
  background: #f7f9fd;
  text-align: center;
}

.toolbar-select {
  display: grid;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid #edf1f7;
}

.toolbar-select select {
  width: 126px;
  min-height: 32px;
  border-radius: 9px;
  background: #f7f9fd;
  font-size: 12px;
}

.zoom-label {
  display: grid;
  place-items: center;
  min-width: 36px;
  color: #7b8496;
  font-size: 11px;
  font-weight: 900;
}

.add-layer-panel {
  position: fixed;
  left: 14px;
  bottom: 20px;
  z-index: 90;
  margin: 0;
  padding: 0;
  border: 0;
}

.add-layer-summary {
  display: grid;
  place-items: center;
  width: 54px;
  min-height: 54px;
  border-radius: 999px;
  background: #5b8def;
  color: #fff;
  box-shadow: 0 13px 26px rgba(47, 90, 190, 0.28);
}

.add-layer-summary span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.add-layer-summary svg {
  width: 24px;
  height: 24px;
  transition: transform 140ms ease;
}

.add-layer-panel[open] .add-layer-summary svg {
  transform: rotate(45deg);
}

.add-layer-summary:hover {
  background: #6b99f2;
  color: #fff !important;
}

.add-menu {
  position: fixed;
  left: 78px;
  bottom: 24px;
  display: grid;
  width: 292px;
  max-height: min(72vh, 640px);
  gap: 6px;
  padding: 0;
  background: transparent;
  overflow: auto;
}

.add-menu-heading {
  margin: 8px 0 0;
  padding: 0 4px;
  color: #66728a;
  font-size: 10px;
}

.add-menu button {
  grid-template-columns: 30px 1fr;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #edf1f7;
  border-radius: 3px;
  background: #fff;
  color: #11182d;
  box-shadow: 0 8px 24px rgba(24, 33, 61, 0.08);
}

.add-menu button:hover {
  background: #f8fbff;
  color: #4f7dea;
}

.add-menu svg {
  color: #4f7dea;
}

.layer-list {
  gap: 2px;
}

.layer-row {
  min-height: 34px;
  border-radius: 8px;
}

.layer-row.selected {
  background: #eef3ff;
  box-shadow: inset 3px 0 0 #5b8def;
}

.layer-main {
  min-height: 34px;
  color: #303a50;
}

.layer-main:hover,
.layer-toggle:hover {
  background: #f3f6fb;
}

.layer-copy strong {
  font-size: 12px;
}

.layer-copy small,
.empty-layers,
.scene-details,
.empty-inspector,
.hint {
  color: var(--muted);
}

.right-rail .panel-title {
  border-bottom-color: #edf1f7;
  color: #303a50;
}

.right-rail input,
.right-rail select,
.right-rail textarea {
  border-color: #dde5f2;
  background: #fff;
  color: #11182d;
}

.inspector-form label {
  color: #66728a;
}

.inspector-group {
  border-top-color: #edf1f7;
}

.inspector-group:last-child {
  border-bottom-color: #edf1f7;
}

.inspector-group summary {
  color: #303a50;
}

.group-body {
  gap: 6px;
}

.icon-toggle,
.text-tool,
.layer-toggle {
  color: #7b8496;
}

.pivot-grid button {
  background: #a7b1c2;
}

.pivot-grid button.active,
.ratio-toggle.active,
.visibility-toggle.active {
  color: #4f7dea;
}

.pivot-grid button.active {
  background: #4f7dea;
  box-shadow: 0 0 7px rgba(79, 125, 234, 0.7);
}

.variable-tooltip {
  border-color: rgba(20, 30, 64, 0.16);
  background: rgba(18, 24, 42, 0.96);
  color: #f6f8ff;
}

.context-menu {
  border: 1px solid rgba(25, 39, 75, 0.1);
  border-radius: 3px;
  background: #fff;
  color: #11182d;
  box-shadow: 0 16px 38px rgba(24, 33, 61, 0.16);
}

.context-menu button {
  color: #303a50;
}

.context-menu button:hover {
  background: #f3f6fb;
  color: #4f7dea;
}

.topbar-actions .icon-command,
.toolbar-icon,
.toolbar-toggle,
.add-layer-summary,
.mini-actions button,
.layer-toggle {
  position: relative;
}

.topbar-actions .icon-command:hover::after,
.toolbar-icon:hover::after,
.toolbar-toggle:hover::after,
.add-layer-summary:hover::after,
.mini-actions button:hover::after,
.layer-toggle:hover::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 200;
  width: max-content;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(22, 28, 44, 0.94);
  color: #fff;
  content: attr(title);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  white-space: normal;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  transform: translateX(-50%);
}

.topbar-actions .icon-command:hover::after {
  bottom: auto;
  top: calc(100% + 9px);
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: var(--left-rail-width) 8px minmax(420px, 1fr);
  }

  .right-resizer,
  .right-rail {
    display: none;
  }
}

/* Syntra dark console pass. Keep the StreamElements ergonomics, but bring it back on brand. */
:root {
  color-scheme: dark;
  --bg: #050814;
  --panel: rgba(9, 14, 28, 0.96);
  --panel-soft: rgba(14, 21, 40, 0.92);
  --rail: rgba(6, 10, 22, 0.96);
  --line: rgba(141, 172, 219, 0.18);
  --line-strong: rgba(44, 230, 255, 0.5);
  --text: #f4faff;
  --muted: #8fa4c0;
  --cyan: #2ce6ff;
  --red: #ff304c;
  --green: #43ff9d;
  --amber: #ffbb4a;
  --topbar: #030716;
  --toolbar-shadow: 0 20px 58px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(44, 230, 255, 0.08);
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(111, 60, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 82% 92%, rgba(44, 230, 255, 0.14), transparent 36rem),
    linear-gradient(135deg, rgba(67, 255, 157, 0.045), transparent 34%),
    var(--bg);
  color: var(--text);
}

button,
select,
input,
textarea {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

select option,
select optgroup {
  background: #0b1020;
  color: #f4faff;
}

button:hover {
  background: rgba(44, 230, 255, 0.09);
}

.left-rail,
.right-rail {
  background:
    linear-gradient(180deg, rgba(44, 230, 255, 0.045), transparent 12rem),
    var(--rail);
  color: var(--text);
  box-shadow: 12px 0 34px rgba(0, 0, 0, 0.3);
}

.right-rail {
  background:
    linear-gradient(180deg, rgba(111, 60, 255, 0.07), transparent 16rem),
    rgba(5, 8, 18, 0.94);
}

.brand {
  background:
    linear-gradient(90deg, rgba(44, 230, 255, 0.1), transparent 68%),
    var(--topbar);
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 12px;
  filter: drop-shadow(0 0 18px rgba(44, 230, 255, 0.35));
}

.brand strong,
.panel-title,
.right-rail .panel-title,
.inspector-group summary,
.layer-main {
  color: #eef8ff;
}

.brand small,
.scene-meta,
.layer-copy small,
.empty-layers,
.scene-details,
.empty-inspector,
.hint,
.inspector-form label {
  color: var(--muted);
}

.panel {
  border-bottom-color: rgba(141, 172, 219, 0.14);
}

.mini-actions button,
.layer-toggle,
.icon-toggle,
.text-tool {
  color: var(--muted);
}

.mini-actions button,
.layer-toggle,
.toolbar-icon,
.toolbar-toggle,
.topbar-actions .icon-command {
  display: grid;
  place-items: center;
  align-items: center;
  justify-items: center;
}

.workspace {
  background: #070b18;
}

.topbar {
  background:
    linear-gradient(90deg, rgba(44, 230, 255, 0.08), transparent 46%),
    var(--topbar);
}

.scene-name {
  color: #f4faff;
}

.outline-action {
  border-color: rgba(44, 230, 255, 0.5);
  color: #bff8ff;
}

.outline-action:hover {
  background: rgba(44, 230, 255, 0.1);
}

.save-action,
#publishScene.save-action {
  background: linear-gradient(135deg, rgba(44, 230, 255, 0.92), rgba(111, 60, 255, 0.82));
  color: #fff;
}

#publishScene.save-action:hover {
  background: linear-gradient(135deg, rgba(67, 255, 157, 0.9), rgba(44, 230, 255, 0.82));
}

.topbar-actions #copyObsUrl,
.topbar-actions #copyVariantUrl,
.topbar-actions #copyObsUrl.primary,
.topbar-actions .icon-command {
  background: transparent;
  color: rgba(239, 248, 255, 0.88);
}

.topbar-actions .icon-command:hover,
.topbar-actions .icon-command.copied,
.topbar-actions #copyObsUrl.primary:hover,
.topbar-actions #copyVariantUrl:hover {
  background: rgba(244, 250, 255, 0.11);
}

.canvas-wrap {
  background-color: #0a1020;
  background-image:
    radial-gradient(circle, rgba(44, 230, 255, 0.18) 1px, transparent 1px),
    radial-gradient(circle at 30% 10%, rgba(111, 60, 255, 0.12), transparent 24rem);
}

.stage-shell {
  border-color: rgba(225, 245, 255, 0.14);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    rgba(5, 8, 17, 0.6);
  background-position: 0 0, 0 1px, 1px -1px, -1px 0;
  background-size: 2px 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.54);
}

.stage {
  outline-color: rgba(236, 250, 255, 0.24);
}

.stage.snap-grid::before {
  background:
    linear-gradient(rgba(44, 230, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 230, 255, 0.16) 1px, transparent 1px);
}

.editor-bottom-toolbar {
  background: rgba(8, 13, 27, 0.94);
  border-color: rgba(225, 245, 255, 0.12);
  color: #dff7ff;
  backdrop-filter: blur(14px);
}

.editor-bottom-toolbar.dragging {
  cursor: grabbing;
}

.toolbar-grip {
  background: rgba(8, 13, 27, 0.96);
  border-color: rgba(225, 245, 255, 0.12);
  cursor: grab;
}

.toolbar-grip::before {
  border-color: rgba(223, 247, 255, 0.52);
}

.toolbar-segment,
.toolbar-select {
  border-left-color: rgba(225, 245, 255, 0.1);
}

.toolbar-icon,
.toolbar-toggle {
  color: var(--muted);
}

.toolbar-icon:hover,
.toolbar-icon.active,
.toolbar-toggle:hover,
.toolbar-toggle:has(input:checked) {
  background: rgba(44, 230, 255, 0.12);
  color: var(--cyan);
}

.toolbar-number,
.zoom-label {
  color: var(--muted);
}

.toolbar-number input,
.toolbar-select select {
  background: rgba(255, 255, 255, 0.065);
  color: var(--text);
}

.emulate-segment {
  position: relative;
}

.emulate-menu,
.profile-popover {
  position: absolute;
  z-index: 260;
  min-width: 236px;
  padding: 8px;
  border: 1px solid rgba(225, 245, 255, 0.14);
  border-radius: 16px;
  background: rgba(7, 11, 24, 0.98);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
}

.emulate-menu {
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  display: grid;
  gap: 4px;
  overflow: visible;
}

.emulate-menu label,
.emulate-menu button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #dff7ff;
  text-align: left;
}

.emulate-menu button:hover {
  background: rgba(44, 230, 255, 0.1);
}

.profile-menu {
  position: relative;
}

.profile-button {
  display: grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(44, 230, 255, 0.45);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(111, 60, 255, 0.8), rgba(44, 230, 255, 0.82)),
    #111a30;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar.large {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.profile-popover {
  top: calc(100% + 10px);
  right: 0;
  width: 310px;
}

.profile-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 4px 10px;
  border-bottom: 1px solid rgba(225, 245, 255, 0.1);
}

.profile-head strong {
  display: block;
  color: #f4faff;
}

.profile-head small,
.profile-section-title,
.connection-row small {
  color: var(--muted);
}

.profile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-section-title button,
.profile-actions a {
  min-height: 26px;
  color: var(--cyan);
  font-size: 12px;
  text-decoration: none;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(225, 245, 255, 0.1);
}

.member-connections.compact {
  margin: 0;
}

.connection-row {
  border-top-color: rgba(225, 245, 255, 0.08);
}

.connection-row button {
  color: var(--cyan);
}

.add-layer-summary {
  background:
    linear-gradient(135deg, rgba(111, 60, 255, 0.96), rgba(44, 230, 255, 0.88));
  box-shadow: 0 18px 44px rgba(44, 230, 255, 0.24);
}

.add-layer-summary:hover {
  background:
    linear-gradient(135deg, rgba(67, 255, 157, 0.96), rgba(44, 230, 255, 0.88));
}

.widget-menu {
  left: 14px;
  bottom: 82px;
  width: 348px;
  width: calc(var(--left-rail-width) - 28px);
  max-height: min(78vh, 720px);
  max-height: min(62vh, 620px);
  gap: 7px;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(4, 7, 17, 0.98), rgba(4, 7, 17, 0.92));
  backdrop-filter: blur(10px);
  z-index: 220;
}

.widget-search {
  display: grid;
  gap: 6px;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.widget-search span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.widget-search input {
  min-height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.widget-category {
  border: 0;
  border-top: 1px solid rgba(225, 245, 255, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.widget-category summary {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0;
  color: #f4faff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  list-style: none;
  text-transform: uppercase;
}

.widget-category summary::-webkit-details-marker {
  display: none;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(44, 230, 255, 0.12);
  color: var(--cyan);
  font-size: 11px;
}

.category-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.widget-category button {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 7px 0 8px 39px;
  border: 0;
  border-top: 1px solid rgba(225, 245, 255, 0.08);
  border-radius: 0;
  background: transparent;
  color: #dff7ff;
  box-shadow: none;
  text-align: left;
}

.widget-category button:hover {
  background: rgba(44, 230, 255, 0.08);
  color: #fff;
}

.widget-category button span {
  font-size: 13px;
  font-weight: 900;
}

.widget-category button small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.layer-row.selected {
  background: linear-gradient(90deg, rgba(44, 230, 255, 0.16), rgba(111, 60, 255, 0.08) 58%, transparent);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.layer-main:hover,
.layer-toggle:hover {
  background: rgba(255, 255, 255, 0.045);
}

.right-rail input,
.right-rail select,
.right-rail textarea,
.layout-name-row input,
.compact-pair input {
  border-color: rgba(141, 172, 219, 0.22);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.inspector-group,
.inspector-group:last-child,
.right-rail .panel-title {
  border-color: rgba(141, 172, 219, 0.14);
}

.context-menu {
  border-color: rgba(225, 245, 255, 0.12);
  background: rgba(7, 11, 24, 0.98);
  color: var(--text);
}

.context-menu button {
  color: #dff7ff;
}

.context-menu button:hover {
  background: rgba(44, 230, 255, 0.1);
  color: var(--cyan);
}

/* Syntra icon system: Lucide sprite, local-only, no hand-drawn one-offs. */
.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-actions .ui-icon,
.toolbar-icon .ui-icon,
.toolbar-toggle .ui-icon {
  width: 17px;
  height: 17px;
}

.add-layer-summary {
  width: 46px;
  min-height: 46px;
  border: 1px solid rgba(44, 230, 255, 0.28);
  background: rgba(8, 13, 27, 0.86);
  color: var(--cyan);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.add-layer-summary:hover {
  border-color: rgba(67, 255, 157, 0.45);
  background: rgba(12, 22, 38, 0.94);
  color: var(--green) !important;
}

.add-layer-summary .ui-icon {
  width: 23px;
  height: 23px;
}

.editor-bottom-toolbar {
  min-height: 52px;
  border-radius: 11px;
  background: rgba(6, 10, 21, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.toolbar-segment {
  padding: 0 10px;
  gap: 4px;
}

.toolbar-icon,
.toolbar-toggle {
  width: 34px !important;
  min-height: 34px !important;
}

.toolbar-icon:hover,
.toolbar-icon.active,
.toolbar-toggle:hover,
.toolbar-toggle:has(input:checked) {
  background: rgba(44, 230, 255, 0.14);
  color: var(--cyan);
}

.emulate-toggle {
  width: auto !important;
  min-width: 78px;
  grid-template-columns: auto auto;
  gap: 6px;
  padding: 0 10px;
  border-radius: 9px;
}

.emulate-toggle span {
  display: block;
  color: currentColor;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.emulate-menu button .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--cyan);
}

.save-action.icon-action,
.outline-action {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.save-action.icon-action {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  box-shadow: none;
}

.profile-popover {
  width: 300px;
  padding: 10px;
}

.profile-head {
  grid-template-columns: 40px 1fr;
  min-height: 52px;
  padding: 4px 2px 10px;
}

.profile-identity {
  min-width: 0;
}

.profile-section-title {
  margin: 9px 0 4px;
}

.profile-section-title button,
.connection-row button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.connection-row {
  grid-template-columns: 22px 1fr auto;
  gap: 2px 8px;
  min-height: 44px;
  padding: 7px 0;
}

.connection-platform {
  display: contents;
}

.connection-platform .platform-logo,
.connection-platform .platform-logo-fallback {
  grid-row: 1 / span 2;
  align-self: center;
  width: 16px;
  height: 16px;
}

.connection-label {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  font-size: 12px;
  font-weight: 900;
}

.connection-platform + small {
  grid-column: 2 / 3;
  grid-row: 2;
}

.connection-row button {
  grid-column: 3;
  grid-row: 1 / span 2;
  min-height: 28px;
  padding: 0 2px;
}

.profile-actions {
  display: grid;
  gap: 0;
  margin-top: 8px;
  padding-top: 7px;
}

.profile-menu-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #dff7ff;
  text-decoration: none;
}

.profile-menu-item span {
  justify-self: start;
  text-align: left;
}

.profile-menu-item small {
  grid-column: 2 / -1;
  justify-self: start;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
}

.profile-menu-item:hover {
  color: var(--cyan);
}

/* Creator menu DNA: compact root menu, cascading flyouts, and icon-first rows.
   The markup is data-rendered in studio.js so future Syntra widgets can be
   added by editing the catalog instead of copy/pasting sidebar HTML. */
.widget-menu {
  overflow: visible !important;
  width: 330px !important;
  max-height: none !important;
  padding: 8px !important;
}

.widget-search {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 6px;
  padding: 0 10px !important;
  border: 1px solid rgba(225, 245, 255, 0.1) !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045) !important;
}

.widget-search .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--cyan);
}

.widget-search input {
  width: 100%;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.widget-access-note {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  margin: 0 0 6px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 196, 87, 0.08);
  color: #ffdca0;
  font-size: 11px;
  line-height: 1.35;
}

.widget-cascade,
.widget-menu-column {
  position: relative;
}

.widget-menu-column {
  display: grid;
  gap: 2px;
  min-width: 310px;
  padding: 4px;
  border: 1px solid rgba(225, 245, 255, 0.09);
  border-radius: 14px;
  background: rgba(7, 10, 20, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.widget-menu-column.flyout {
  position: absolute;
  left: calc(100% + 8px);
  top: -4px;
  display: none;
  z-index: 5;
}

.widget-menu-column.flyout.depth-2 {
  z-index: 6;
}

.widget-menu-node {
  position: relative;
}

.widget-menu-node:hover > .widget-menu-column,
.widget-menu-node:focus-within > .widget-menu-column {
  display: grid;
}

.widget-menu-row,
.widget-add-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 4px 9px;
  width: 100%;
  min-height: 44px;
  padding: 6px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #eafaff;
  box-shadow: none;
  text-align: left;
}

.widget-add-option {
  cursor: pointer;
}

.widget-menu-row:hover,
.widget-add-option:hover {
  background: rgba(44, 230, 255, 0.1);
  color: #fff;
}

.widget-menu-row > .ui-icon:first-child,
.widget-add-option > .ui-icon:first-child {
  grid-row: 1 / span 2;
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.widget-menu-row span,
.widget-add-option span {
  grid-column: 2;
  overflow: hidden;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-menu-row small,
.widget-add-option small {
  grid-column: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-chevron,
.widget-lock {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  width: 14px !important;
  height: 14px !important;
  color: rgba(225, 245, 255, 0.48);
}

.widget-lock {
  color: #ffd27a;
}

.widget-menu-row:disabled,
.widget-add-option:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.widget-empty-search {
  padding: 14px 12px;
  color: var(--muted);
  font-size: 12px;
}

/* Emulation mirrors the compact StreamElements pattern: one small launcher,
   nested event presets, and no oversized cards interrupting the canvas. */
.emulate-node {
  position: relative;
}

.emulate-node > button {
  grid-template-columns: 18px 1fr 14px !important;
}

.emulate-node .chevron {
  justify-self: end;
  width: 13px;
  height: 13px;
  color: rgba(225, 245, 255, 0.5);
}

.emulate-submenu {
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  display: none;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(225, 245, 255, 0.11);
  border-radius: 13px;
  background: rgba(7, 10, 20, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.emulate-node:hover .emulate-submenu,
.emulate-node.open .emulate-submenu,
.emulate-node:focus-within .emulate-submenu {
  display: grid;
}

.emulate-submenu button {
  min-height: 34px !important;
  padding: 0 10px !important;
}

.studio-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(6px);
}

.studio-modal.hidden {
  display: none;
}

.studio-modal-card {
  width: min(760px, calc(100vw - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(225, 245, 255, 0.11);
  border-radius: 18px;
  background: rgba(7, 10, 20, 0.98);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.58);
}

.studio-modal-head {
  display: grid;
  grid-template-columns: 1fr 36px;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(225, 245, 255, 0.09);
}

.studio-modal-head strong {
  display: block;
  color: #f5fbff;
  font-size: 16px;
}

.studio-modal-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.data-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(225, 245, 255, 0.08);
  overflow-x: auto;
}

.data-tabs button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  white-space: nowrap;
}

.data-tabs button.active,
.data-tabs button:hover {
  background: rgba(44, 230, 255, 0.12);
  color: var(--cyan);
}

.data-tabs .ui-icon {
  width: 14px;
  height: 14px;
}

.data-workbench-body {
  display: grid;
  gap: 8px;
  max-height: 560px;
  overflow: auto;
  padding: 14px;
}

.data-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.data-row .ui-icon {
  width: 17px;
  height: 17px;
  color: var(--cyan);
}

.data-row strong,
.data-row small {
  display: block;
}

.data-row strong {
  color: #f5fbff;
  font-size: 12px;
}

.data-row small,
.data-note,
.data-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.data-row b {
  max-width: 260px;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

.data-empty.danger {
  color: #ff6b84;
}

.production-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
}

.production-toolbar strong,
.production-toolbar small {
  display: block;
}

.production-toolbar small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.production-toolbar button,
.production-mode-strip button {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: #dff7ff;
  box-shadow: none;
}

.production-toolbar button:hover,
.production-mode-strip button:hover,
.production-mode-strip button.active {
  background: rgba(44, 230, 255, 0.14);
  color: var(--cyan);
}

.production-mode-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.production-section {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.production-section h4 {
  margin: 4px 0;
  color: #f5fbff;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.production-map-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.production-map-row select {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(225, 245, 255, 0.1);
  border-radius: 10px;
  background: rgba(3, 8, 18, 0.92);
  color: #f5fbff;
}

.profile-menu-item.danger {
  color: #ff6b84;
}

/* StreamElements-inspired polish pass: icons first, compact rows, real panels. */
.brand {
  min-height: 70px;
  gap: 12px;
  background: transparent !important;
}

.brand-mark {
  width: 48px !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(44, 230, 255, 0.42));
}

.add-layer-summary {
  width: 48px;
  min-height: 48px;
  border-color: rgba(44, 230, 255, 0.35);
  background: rgba(3, 8, 18, 0.72) !important;
  color: var(--cyan);
}

.add-layer-panel[open] .add-layer-summary {
  color: var(--green);
}

.add-layer-panel[open] .add-layer-summary svg {
  transform: rotate(0deg);
}

.widget-menu {
  left: calc(var(--left-rail-width) + 18px) !important;
  bottom: 22px !important;
  width: min(410px, calc(100vw - var(--left-rail-width) - var(--right-rail-width) - 72px)) !important;
  max-height: min(78vh, 760px) !important;
  padding: 0 !important;
  overflow: auto;
  border: 1px solid rgba(225, 245, 255, 0.1);
  border-radius: 18px;
  background: rgba(7, 10, 20, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
}

.widget-menu-head {
  display: grid;
  gap: 2px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(225, 245, 255, 0.1);
}

.widget-menu-head strong {
  color: #f4faff;
  font-size: 15px;
}

.widget-menu-head small {
  color: var(--muted);
  font-size: 11px;
}

.widget-search {
  padding: 12px 16px !important;
}

.widget-category summary {
  grid-template-columns: 28px 1fr;
  min-height: 40px;
  padding: 0 16px;
}

.category-icon {
  background: transparent;
  color: var(--cyan);
}

.widget-category button {
  grid-template-columns: 24px minmax(0, 1fr) !important;
  gap: 3px 10px !important;
  min-height: 46px;
  padding: 7px 16px !important;
}

.widget-category button > .ui-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 18px;
  height: 18px;
  color: var(--cyan);
}

.widget-category button small {
  grid-column: 2;
}

.profile-popover {
  width: 318px !important;
  padding: 0 !important;
  border-color: rgba(225, 245, 255, 0.08);
  border-radius: 9px;
  background: #202327;
  overflow: hidden;
}

.channel-popover-title {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 248, 255, 0.78);
}

.channel-popover-title strong {
  font-size: 13px;
  font-weight: 900;
}

.profile-head {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 64px;
  padding: 10px 14px;
  border-bottom: 0;
}

.profile-avatar.large {
  width: 38px;
  height: 38px;
}

.channel-list {
  display: grid;
  padding: 4px 8px 8px;
}

.channel-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 248, 255, 0.82);
  text-align: left;
}

.channel-row:hover,
.channel-row.selected,
.channel-row.verified {
  background: rgba(91, 141, 239, 0.22);
  color: #fff;
}

.channel-row:disabled {
  cursor: default;
  opacity: 0.54;
}

.channel-avatar,
.channel-avatar .platform-logo,
.channel-avatar .platform-logo-fallback {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  overflow: hidden;
}

.channel-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.channel-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-copy small,
.channel-empty {
  overflow: hidden;
  color: rgba(221, 228, 240, 0.58);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-tier {
  color: rgba(221, 228, 240, 0.62);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.channel-tier.basic {
  color: var(--cyan);
}

.channel-tier.premium,
.channel-tier.owner {
  color: var(--green);
}

.profile-footer-action,
.profile-actions {
  border-top: 1px solid rgba(225, 245, 255, 0.08);
}

.profile-footer-action {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 248, 255, 0.78);
  text-align: left;
}

.profile-actions {
  margin: 0;
  padding: 5px 8px 8px;
}

.profile-menu-item {
  min-height: 36px;
  padding: 0 8px;
  border-radius: 6px;
}

.profile-menu-item:hover {
  background: rgba(255, 255, 255, 0.055);
}

.syntra-widget.syntra-alert {
  display: grid;
  grid-template-columns: clamp(58px, 13%, 96px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  padding: clamp(14px, 3%, 26px);
}

.syntra-alert-mark {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255, 255, 255, 0.36), transparent 34%),
    color-mix(in srgb, var(--syntra-accent) 38%, rgba(5, 8, 18, 0.9));
  box-shadow: 0 0 34px color-mix(in srgb, var(--syntra-accent) 32%, transparent);
  overflow: hidden;
}

.syntra-alert-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.syntra-alert-mark span {
  color: #fff;
  font-size: clamp(20px, 4vw, 44px);
  font-weight: 900;
}

.syntra-alert-copy {
  min-width: 0;
}

.syntra-label-widget {
  gap: 4px;
  padding: clamp(10px, 2.4%, 22px);
}

.syntra-label-text {
  overflow: hidden;
  color: #f4faff;
  font-size: clamp(24px, 5.2vw, 58px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 0.98;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Final cascade guard for the JS-rendered add menu. Older accordion-menu rules
   remain above for backwards compatibility, so this block wins the cascade. */
.widget-menu {
  overflow: visible !important;
  width: 330px !important;
  max-height: none !important;
  padding: 8px !important;
}

.widget-menu .widget-search {
  display: grid !important;
  grid-template-columns: 18px 1fr !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 6px;
  padding: 0 10px !important;
  border: 1px solid rgba(225, 245, 255, 0.1) !important;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045) !important;
}

.widget-menu .widget-search input {
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.widget-menu-column {
  min-width: 310px;
}

.widget-menu-column.flyout {
  position: absolute;
  left: calc(100% + 8px);
  top: -4px;
}

/* Regression fix after visual review: old `.add-menu button` rules were still
   painting widget rows white. These scoped rules intentionally win late in the
   cascade and make the add flow feel like one dark, stable creator surface. */
.add-layer-panel {
  position: fixed;
  left: 14px;
  bottom: 18px;
  z-index: 230;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.add-layer-summary {
  width: 42px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: var(--cyan) !important;
  box-shadow: none !important;
}

.add-layer-summary:hover,
.add-layer-panel[open] .add-layer-summary {
  background: rgba(44, 230, 255, 0.1) !important;
  color: #fff !important;
}

.add-layer-summary .ui-icon {
  width: 27px !important;
  height: 27px !important;
  filter: drop-shadow(0 0 12px rgba(44, 230, 255, 0.45));
}

.add-layer-summary:hover::after {
  display: none;
}

.widget-menu {
  left: 66px !important;
  bottom: 18px !important;
  overflow: visible !important;
  width: 328px !important;
  max-height: none !important;
  padding: 8px !important;
  border-color: rgba(225, 245, 255, 0.12) !important;
  border-radius: 16px !important;
  background: rgba(6, 10, 21, 0.98) !important;
}

.widget-menu .widget-menu-column {
  gap: 3px !important;
  min-width: 306px;
  max-height: min(72vh, 680px);
  overflow: visible;
  border: 1px solid rgba(225, 245, 255, 0.08);
  border-radius: 12px;
  background: rgba(6, 10, 21, 0.98);
}

/* Flyouts live inside the root column, so the root must not clip them. Only
   filtered search results need their own scroll area because they do not
   contain cascading child panels. */
.widget-menu .widget-menu-column.root {
  overflow: visible !important;
}

.widget-menu .widget-menu-column.search-results {
  overflow: auto !important;
}

.widget-menu .widget-menu-column.flyout {
  left: var(--flyout-left, calc(100% - 1px)) !important;
  top: var(--flyout-top, -4px) !important;
  display: none;
  max-height: var(--flyout-max-height, min(72vh, 680px));
  overflow: visible;
  overscroll-behavior: contain;
  padding: 5px;
  z-index: 260;
}

.widget-menu-node.open > .widget-menu-column,
.widget-menu-node:hover > .widget-menu-column,
.widget-menu-node:focus-within > .widget-menu-column {
  display: grid !important;
}

.widget-menu-node::after {
  content: "";
  position: absolute;
  top: 0;
  right: -10px;
  width: 14px;
  height: 100%;
}

.widget-menu-node[data-flyout-side="left"]::after {
  right: auto;
  left: -10px;
}

.widget-menu .widget-menu-row,
.widget-menu .widget-add-option {
  min-height: 44px !important;
  padding: 7px 9px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #eafaff !important;
  box-shadow: none !important;
}

.widget-menu .widget-menu-row:hover,
.widget-menu-node.open > .widget-menu-row,
.widget-menu .widget-add-option:hover {
  background: rgba(44, 230, 255, 0.11) !important;
  color: #fff !important;
}

.widget-menu .widget-menu-row small,
.widget-menu .widget-add-option small {
  color: rgba(181, 214, 230, 0.72) !important;
}

/* Inspector cleanup: thin dividers and inset bodies make sections readable
   without bringing back the bulky card stack the studio moved away from. */
.right-rail .inspector {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.inspector-form {
  gap: 8px !important;
}

.inspector-group {
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(141, 172, 219, 0.2) !important;
  background: transparent !important;
}

.inspector-group:not(.hidden) + .inspector-group:not(.hidden) {
  margin-top: 2px !important;
}

.inspector-group summary {
  min-height: 34px !important;
  padding: 0 2px !important;
  color: #eef8ff !important;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
}

.inspector-group[open] summary {
  color: var(--cyan) !important;
}

.inspector-group[open] .group-body {
  margin: 0 0 10px 4px !important;
  padding: 2px 0 2px 10px !important;
  border-left: 2px solid rgba(44, 230, 255, 0.18);
}

.inspector-group.hidden {
  display: none !important;
}

.group-body .hint {
  line-height: 1.35;
}

.element.alert-child {
  outline-color: rgba(67, 255, 157, 0.35);
}

.element.alert-preview-active {
  animation: studio-alert-fire var(--alert-duration, 6500ms) cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes studio-alert-fire {
  0% { opacity: 0.4; transform: translateY(12px) scale(0.96); }
  5% { opacity: 1; transform: translateY(0) scale(1.02); }
  12%, 92% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0.58; transform: translateY(-10px) scale(0.99); }
}

/* Keep Overlay chat visually aligned with Recast instead of maintaining a
   second weaker chat design. These classes mirror the Recast cockpit markup
   generated by syntra-widgets.js, trimmed for OBS overlay rendering. */
.syntra-chat-widget {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(127, 255, 224, 0.13), transparent 18rem),
    radial-gradient(circle at 92% 20%, rgba(255, 91, 88, 0.1), transparent 16rem),
    linear-gradient(135deg, rgba(13, 27, 35, 0.94), rgba(6, 18, 25, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
}

.syntra-chat-cockpit,
.syntra-chat-feed {
  min-height: 0;
}

.chat-cockpit__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.chat-cockpit__summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  color: rgba(221, 246, 255, 0.78);
  font-size: clamp(9px, 1.1vw, 13px);
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid color-mix(in srgb, var(--chat-platform, #2ce6ff) 34%, rgba(255, 255, 255, 0.12));
}

.platform-icon {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.platform-icon--text {
  color: var(--chat-platform, #2ce6ff);
  font-size: 9px;
}

.chat-feed {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: hidden;
}

.chat-message {
  --chat-platform: #2ce6ff;
  --chat-platform-soft: rgba(44, 230, 255, 0.16);
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 8px;
  background:
    linear-gradient(135deg, var(--chat-platform-soft), rgba(4, 14, 20, 0.74) 44%),
    rgba(4, 14, 20, 0.66);
}

.chat-message::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--chat-platform);
  box-shadow: 0 0 16px color-mix(in srgb, var(--chat-platform) 64%, transparent);
}

.chat-message--lisa {
  border: 1px dashed color-mix(in srgb, var(--chat-platform) 45%, rgba(255, 255, 255, 0.08));
}

.chat-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 50%;
  color: color-mix(in srgb, var(--chat-platform) 50%, #f4faff);
  font-size: 11px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.24);
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-message__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.chat-message__name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f4faff;
  font-size: clamp(12px, 1.3vw, 16px);
  font-weight: 900;
}

.chat-platform-pill,
.chat-badge,
.chat-linked-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  color: color-mix(in srgb, var(--chat-platform) 38%, rgba(221, 246, 255, 0.78));
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.2);
}

.chat-platform-pill {
  padding: 0;
  background: transparent;
}

.chat-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
}

.chat-badge__image {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.chat-message__time {
  margin-left: auto;
  color: rgba(148, 182, 201, 0.9);
  font-size: 9px;
  font-weight: 800;
}

.chat-message__text {
  margin-top: 3px;
  color: #f4faff;
  font-size: clamp(12px, 1.35vw, 17px);
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.chat-emote {
  display: inline-block;
  width: auto;
  max-width: 34px;
  height: 22px;
  margin: 0 1px;
  object-fit: contain;
  vertical-align: -5px;
}

.chat-emote--sticker {
  max-width: 46px;
  height: 32px;
  vertical-align: -10px;
}
