/* Visitor-created nodes + canvas context menu — 2026-09-21 */

.hero--node-canvas,
.hero-node-camera,
.hero-node-stage,
.hero-custom-node-layer {
  -webkit-tap-highlight-color: transparent;
}

.hero-node-stage,
.hero-custom-node-layer {
  user-select: none;
  -webkit-user-select: none;
}

.hero-custom-node-mesh {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.hero-custom-node-line,
.hero-custom-node-line--preview {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.hero-custom-node-line {
  stroke: var(--line-color);
  stroke-width: 2;
  opacity: .86;
  transition: stroke .2s ease, opacity .2s ease;
}

.hero-custom-node-line.is-hovered,
.hero-custom-node-line.is-selected {
  stroke: var(--line-color-hover);
  opacity: 1;
}

.hero-custom-node-line--preview {
  stroke: rgba(255,255,255,.48);
  stroke-width: 2;
  stroke-dasharray: 7 8;
  opacity: .76;
}

.hero-custom-node-line-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: pointer;
}

.hero-custom-node-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hero-custom-node {
  --custom-node-scale: 1;
  position: absolute;
  left: var(--custom-node-x, 50%);
  top: var(--custom-node-y, 50%);
  width: clamp(11.25rem, 18vw, 16.25rem);
  min-width: 11.25rem;
  max-width: 20rem;
  min-height: 6rem;
  padding: .82rem .92rem .88rem;
  border: 1px solid var(--node-border);
  border-radius: var(--node-radius);
  background: var(--node-bg);
  color: var(--node-title);
  box-shadow: var(--node-inner-light), var(--node-shadow);
  transform: translate(-50%, -50%) scale(var(--custom-node-scale));
  transform-origin: center;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  resize: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition:
    transform .22s cubic-bezier(.22,1,.36,1),
    opacity .18s ease,
    border-color .2s ease,
    background-color .2s ease,
    box-shadow .2s ease;
}

.hero-custom-node.is-entering {
  --custom-node-scale: .92;
  opacity: 0;
}

.hero-custom-node.is-removing {
  --custom-node-scale: .92;
  opacity: 0;
  pointer-events: none;
}

.hero-custom-node:hover,
.hero-custom-node.is-connect-target {
  border-color: var(--node-border-hover);
  background: var(--node-bg-hover);
  box-shadow: var(--node-inner-light), var(--node-shadow-hover);
}

.hero-custom-node.is-selected,
.hero-custom-node.is-dragging {
  background: var(--node-bg);
  border-color: rgba(255,255,255,.22);
  box-shadow: var(--node-inner-light), 0 24px 48px -14px rgba(0,0,0,.72);
}

.hero-custom-node.is-dragging {
  --custom-node-scale: 1.008;
  cursor: grabbing;
}

.hero-custom-node:focus,
.hero-custom-node:focus-within {
  outline: none;
}

.hero-custom-node:focus-visible {
  outline: 2px solid rgba(255,255,255,.88);
  outline-offset: 3px;
}

.hero-custom-node::before,
.hero-custom-node::after {
  display: none !important;
  content: none !important;
}

.hero-custom-node__resize-handle {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 18;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: nwse-resize;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity .14s ease;
}

.hero-custom-node__resize-handle::before {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 11px;
  height: 11px;
  border-right: 1px solid rgba(255,255,255,.7);
  border-bottom: 1px solid rgba(255,255,255,.7);
  border-radius: 0 0 9px 0;
  content: "";
  transition: border-color .14s ease, transform .14s ease;
}

.hero-custom-node:hover .hero-custom-node__resize-handle,
.hero-custom-node.is-selected .hero-custom-node__resize-handle,
.hero-custom-node.is-resizing .hero-custom-node__resize-handle {
  opacity: .82;
  pointer-events: auto;
}

.hero-custom-node__resize-handle:hover::before,
.hero-custom-node__resize-handle:focus-visible::before,
.hero-custom-node.is-resizing .hero-custom-node__resize-handle::before {
  border-color: rgba(255,255,255,.98);
  transform: translate(-1px, -1px);
}

.hero-custom-node.is-resizing {
  cursor: nwse-resize;
}
.hero-custom-node__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 1rem;
  margin-bottom: .55rem;
  color: var(--node-meta);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .53rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .12em;
  cursor: grab;
}

.hero-custom-node.is-editing .hero-custom-node__meta {
  cursor: grab;
}

.hero-custom-node__label {
  pointer-events: none;
}

.hero-custom-node__delete {
  position: absolute;
  top: .48rem;
  right: .5rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255,255,255,.55);
  font: 300 1rem/1 Inter, sans-serif;
  opacity: 0;
  cursor: pointer;
  transition: opacity .16s ease, color .16s ease, background-color .16s ease, transform .12s ease;
}

.hero-custom-node:hover .hero-custom-node__delete,
.hero-custom-node__delete:focus-visible,
.hero-custom-node.is-selected .hero-custom-node__delete {
  opacity: 1;
}

.hero-custom-node__delete:hover,
.hero-custom-node__delete:focus-visible {
  background: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
}

.hero-custom-node__delete:active {
  transform: scale(.94);
}

.hero-custom-node__format-toolbar {
  position: absolute;
  left: 50%;
  top: -.62rem;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .08rem;
  width: max-content;
  min-width: 14rem;
  height: 3.05rem;
  padding: .34rem .42rem;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 15px;
  background: #242426;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035), 0 15px 32px -13px rgba(0,0,0,.82);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -100%) scale(.97);
  transform-origin: 50% 100%;
  transition: opacity .14s ease, transform .17s cubic-bezier(.22,1,.36,1), visibility 0s linear .17s;
}

.hero-custom-node.is-selected .hero-custom-node__format-toolbar,
.hero-custom-node.is-editing .hero-custom-node__format-toolbar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -100%) scale(1);
  transition-delay: 0s;
}

.hero-custom-node__format-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.08rem;
  height: 2.08rem;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255,255,255,.86);
  font: inherit;
  cursor: pointer;
  outline: none;
  transition: background-color .14s ease, color .14s ease, transform .12s ease;
}

.hero-custom-node__format-button:hover,
.hero-custom-node__format-button:focus-visible,
.hero-custom-node__format-button.is-active {
  background: rgba(255,255,255,.09);
  color: #fff;
}

.hero-custom-node__format-button:active { transform: scale(.94); }

.hero-custom-node__format-button::after {
  position: absolute;
  left: 50%;
  bottom: calc(100% + .48rem);
  z-index: 5;
  padding: .34rem .48rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 7px;
  background: #f0f0f1;
  color: #171719;
  box-shadow: 0 8px 22px -10px rgba(0,0,0,.72);
  content: attr(data-tooltip) "  " attr(data-shortcut);
  font: 500 .61rem/1.2 Inter, sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) scale(.96);
  transform-origin: 50% 100%;
  transition: opacity .12s ease, transform .15s cubic-bezier(.22,1,.36,1);
}

.hero-custom-node__format-button:hover::after,
.hero-custom-node__format-button:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.hero-custom-node__format-glyph {
  display: inline-grid;
  place-items: center;
  min-width: 1.05rem;
  color: currentColor;
  font-family: Inter, sans-serif;
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1;
}

.hero-custom-node__format-glyph.is-bold { font-weight: 600; }
.hero-custom-node__format-glyph.is-italic { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; font-style: italic; }
.hero-custom-node__format-glyph.is-underline { text-decoration: underline; text-underline-offset: .18em; }
.hero-custom-node__format-glyph.is-strike { text-decoration: line-through; }
.hero-custom-node__format-glyph.is-link { font-size: 1.34rem; font-weight: 300; transform: rotate(-28deg); }

.hero-custom-node__format-glyph.is-image {
  position: relative;
  width: 1.08rem;
  height: .92rem;
  min-width: 0;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-size: 0;
}

.hero-custom-node__format-glyph.is-image::before {
  position: absolute;
  top: .2rem;
  left: .24rem;
  width: .15rem;
  height: .15rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.hero-custom-node__format-glyph.is-image::after {
  position: absolute;
  left: .25rem;
  bottom: .14rem;
  width: .54rem;
  height: .34rem;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.hero-custom-node__format-more-glyph { margin-top: -.16rem; font-size: 1.05rem; font-weight: 600; letter-spacing: .08em; }
.hero-custom-node__format-glyph.is-clear,
.hero-custom-node__format-glyph.is-unlink { font-size: .72rem; font-weight: 600; }

.hero-custom-node__format-popover,
.hero-custom-node__format-more-panel {
  position: absolute;
  top: calc(100% + .42rem);
  right: .16rem;
  z-index: 20;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px;
  background: #202022;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 32px -12px rgba(0,0,0,.86);
}

.hero-custom-node__format-popover[hidden],
.hero-custom-node__format-more-panel[hidden] { display: none !important; }

.hero-custom-node__format-popover {
  display: grid;
  grid-template-columns: minmax(0,1fr) 1.85rem;
  gap: .32rem;
  width: 15.2rem;
  padding: .35rem;
}

.hero-custom-node__format-url {
  min-width: 0;
  height: 2rem;
  padding: 0 .55rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px;
  outline: none;
  background: rgba(0,0,0,.24);
  color: rgba(255,255,255,.9);
  font: 400 .65rem/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.hero-custom-node__format-url:focus { border-color: rgba(255,255,255,.24); }

.hero-custom-node__format-apply {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  color: #151517;
  font: 500 .78rem/1 Inter, sans-serif;
  cursor: pointer;
}

.hero-custom-node__format-more-panel { display: flex; align-items: center; gap: .08rem; padding: .25rem; }

.hero-custom-node__editor {
  min-height: 3.45rem;
  max-height: 14rem;
  overflow-y: auto;
  padding: .02rem .28rem .02rem 0;
  color: rgba(255,255,255,.9);
  font-family: "Inter", sans-serif;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -.005em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  caret-color: #fff;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
  outline: none;
  border: 0;
  box-shadow: none;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
  -webkit-appearance: none;
  appearance: none;
}

.hero-custom-node__editor::-webkit-scrollbar {
  width: 4px;
}

.hero-custom-node__editor::-webkit-scrollbar-track {
  background: transparent;
}

.hero-custom-node__editor::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(255,255,255,.18);
}

.hero-custom-node__editor:hover::-webkit-scrollbar-thumb,
.hero-custom-node.is-editing .hero-custom-node__editor::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.28);
}

.hero-custom-node__editor::selection {
  background: rgba(255,255,255,.24);
  color: #fff;
}

.hero-custom-node.is-editing .hero-custom-node__editor {
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
  touch-action: auto;
}

.hero-custom-node__editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(255,255,255,.3);
  pointer-events: none;
}

.hero-custom-node__counter {
  display: block;
  min-height: .7rem;
  margin-top: .35rem;
  color: rgba(255,255,255,.32);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .48rem;
  line-height: 1;
  letter-spacing: .04em;
  text-align: right;
  opacity: 0;
  transition: opacity .16s ease;
}

.hero-custom-node.is-near-limit .hero-custom-node__counter {
  opacity: 1;
}

.hero-custom-node__port {
  --port-proximity: 0;
  --port-transform: translateY(-50%);
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: var(--node-port);
  box-shadow: 0 0 0 2px var(--node-bg);
  transform: var(--port-transform) scale(calc(1 + var(--port-proximity) * .08));
  cursor: crosshair;
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.hero-custom-node__port--in {
  left: -5px;
}

.hero-custom-node__port--out {
  right: -5px;
}

.hero-custom-node__port--up,
.hero-custom-node__port--down {
  --port-transform: translateX(-50%);
  left: 50%;
}

.hero-custom-node__port--up {
  top: -5px;
}

.hero-custom-node__port--down {
  top: auto;
  bottom: -5px;
}

.hero-custom-node:hover .hero-custom-node__port,
.hero-custom-node.is-selected .hero-custom-node__port,
.hero-custom-node__port.is-active,
.hero-custom-node__port.is-near {
  background: var(--node-port-active);
  box-shadow: 0 0 0 2px var(--node-bg), 0 0 10px rgba(255,255,255,.14);
}

.hero-custom-node-context {
  position: fixed;
  z-index: 30000;
  width: min(12.5rem, calc(100vw - 1.5rem));
  padding: .38rem;
  border: 1px solid var(--node-border);
  border-radius: 15px;
  background: var(--node-bg);
  color: var(--node-title);
  box-shadow: var(--node-inner-light), 0 18px 44px -12px rgba(0,0,0,.72);
  font-family: "Inter", sans-serif;
  font-size: .8125rem;
  line-height: 1.2;
  opacity: 0;
  transform: scale(.96);
  transform-origin: var(--menu-origin-x, 50%) var(--menu-origin-y, 50%);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s cubic-bezier(.22,1,.36,1);
}

.hero-custom-node-context.is-open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-custom-node-context__heading {
  padding: .56rem .62rem .46rem;
  color: rgba(255,255,255,.82);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .01em;
}

.hero-custom-node-context__separator {
  height: 1px;
  margin: .3rem .38rem;
  background: rgba(255,255,255,.08);
}

.hero-custom-node-context__item {
  display: grid;
  grid-template-columns: 1rem minmax(0,1fr);
  align-items: center;
  gap: .55rem;
  width: 100%;
  min-height: 2.3rem;
  padding: .52rem .62rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,.74);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, opacity .16s ease;
}

.hero-custom-node-context__item:hover,
.hero-custom-node-context__item:focus-visible {
  background: rgba(255,255,255,.07);
  color: #fff;
  outline: none;
}

.hero-custom-node-context__item[aria-disabled="true"] {
  color: rgba(255,255,255,.27);
  cursor: default;
}

.hero-custom-node-context__item[aria-disabled="true"]:hover,
.hero-custom-node-context__item[aria-disabled="true"]:focus-visible {
  background: transparent;
  color: rgba(255,255,255,.27);
}

.hero-custom-node-context__icon {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  color: currentColor;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .72rem;
  font-weight: 500;
}

.hero-custom-node-context__item.is-confirming {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.hero-custom-node-context__note {
  padding: .44rem .62rem .54rem 2.17rem;
  color: rgba(255,255,255,.32);
  font-size: .64rem;
}

.hero-custom-node-hint {
  position: absolute;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 18;
  color: rgba(255,255,255,.31);
  font-family: "Inter", sans-serif;
  font-size: .5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .09em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 1;
  transition: opacity .24s ease;
}

.hero-custom-node-hint.is-hidden {
  opacity: 0;
}

.hero-custom-connection-delete {
  position: absolute;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  background: var(--node-bg);
  color: rgba(255,255,255,.7);
  font: 300 .9rem/1 Inter, sans-serif;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.92);
  cursor: pointer;
  transition: opacity .14s ease, transform .14s ease, background-color .14s ease, color .14s ease;
}

.hero-custom-connection-delete.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.hero-custom-connection-delete:hover,
.hero-custom-connection-delete:focus-visible {
  background: #fff;
  color: #0c0c0d;
  outline: none;
}

.hero-custom-connection-delete svg {
  display: block;
  width: .78rem;
  height: .78rem;
  pointer-events: none;
}

.hero-custom-connection-cut-particle {
  position: absolute;
  z-index: 89;
  width: 2px;
  height: 2px;
  border-radius: 1px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 0 4px rgba(255,255,255,.18);
  pointer-events: none;
  will-change: transform, opacity;
}

.hero-custom-node-live {
  position: fixed;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero-custom-node__editor strong,
.hero-custom-node__editor b { font-weight: 700; }

.hero-custom-node__editor a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}

.hero-custom-node__editor s,
.hero-custom-node__editor strike { opacity: .7; }

.hero-custom-node__editor img {
  display: block;
  width: 100%;
  max-height: 10rem;
  margin: .62rem 0;
  border-radius: 10px;
  background: rgba(0,0,0,.2);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-custom-node--link {
  width: clamp(13rem, 20vw, 18rem);
}

.hero-custom-node__link-body {
  display: grid;
  gap: .36rem;
  min-width: 0;
}

.hero-custom-node__domain {
  min-width: 0;
  overflow: hidden;
  color: rgba(255,255,255,.92);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-custom-node__url {
  overflow: hidden;
  color: rgba(255,255,255,.42);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .58rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-custom-node__open-link,
.hero-custom-node__media-open,
.hero-custom-node__edit-url {
  color: rgba(255,255,255,.66);
  font: 500 .66rem/1.2 Inter, sans-serif;
  text-decoration: none;
}

.hero-custom-node__open-link {
  width: fit-content;
  margin-top: .3rem;
  padding: .34rem .48rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.hero-custom-node__open-link:hover,
.hero-custom-node__open-link:focus-visible,
.hero-custom-node__media-open:hover,
.hero-custom-node__media-open:focus-visible,
.hero-custom-node__edit-url:hover,
.hero-custom-node__edit-url:focus-visible {
  color: #fff;
  outline: none;
}

.hero-custom-node--media {
  width: min(var(--custom-media-width, 300px), 420px);
  min-width: 220px;
  max-width: 420px;
  padding: .76rem .78rem .7rem;
}

/* When the user gives a media node an explicit height, let the preview consume
   only the space that is actually available inside the card instead of keeping
   its width-derived aspect height and visually spilling below the node. */
.hero-custom-node--media.has-user-height {
  display: flex;
  flex-direction: column;
}

.hero-custom-node--media.has-user-height .hero-custom-node__meta,
.hero-custom-node--media.has-user-height .hero-custom-node__media-footer {
  flex: 0 0 auto;
}

.hero-custom-node--media.has-user-height .hero-custom-node__media-frame {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
}

.hero-custom-node--instagram,
.hero-custom-node--youtube {
  width: min(320px, calc(100vw - 2rem));
  min-width: 240px;
  max-width: 380px;
  padding: .76rem .78rem .7rem;
}

.hero-custom-node__embed-frame {
  --embed-aspect: 1.77778;
  position: relative;
  width: 100%;
  aspect-ratio: var(--embed-aspect);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 14px;
  background: #050505;
}

.hero-custom-node--instagram .hero-custom-node__embed-frame {
  background: #fff;
}

.hero-custom-node__embed {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.hero-custom-node__media-frame {
  --media-aspect: 1.35;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--media-aspect);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 14px;
  background: rgba(0,0,0,.32);
}

.hero-custom-node__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  clip-path: inset(48% 0 48% 0 round 10px);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition:
    opacity .12s linear,
    clip-path .34s cubic-bezier(.22,1,.36,1);
}

.hero-custom-node__media.is-ready {
  opacity: 1;
  clip-path: inset(0 0 0 0 round 10px);
}

.hero-custom-node__media-status {
  z-index: 1;
  max-width: 84%;
  color: rgba(255,255,255,.38);
  font: 500 .58rem/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  text-align: center;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.hero-custom-node.is-media-ready .hero-custom-node__media-status:empty {
  display: none;
}

.hero-custom-node.is-media-error .hero-custom-node__media-frame {
  border-color: rgba(255,255,255,.09);
}

.hero-custom-node__media-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  min-width: 0;
  margin-top: .58rem;
}

.hero-custom-node__media-footer .hero-custom-node__domain {
  font-size: .66rem;
  color: rgba(255,255,255,.48);
}

.hero-custom-node__media-actions {
  display: flex;
  align-items: center;
  gap: .48rem;
  flex: none;
}

.hero-custom-node__edit-url {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero-custom-node.is-materializing {
  --custom-node-scale: .94;
  opacity: 0;
  filter: blur(3px);
  border-color: rgba(255,255,255,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(255,255,255,.08),
    0 18px 40px -12px rgba(0,0,0,.6);
}

.hero-custom-node--media,
.hero-custom-node--instagram,
.hero-custom-node--youtube {
  transition:
    transform .36s cubic-bezier(.22,1,.36,1),
    opacity .3s ease,
    filter .34s cubic-bezier(.22,1,.36,1),
    border-color .2s ease,
    background-color .2s ease,
    box-shadow .2s ease;
}

.hero-custom-node.is-materializing .hero-custom-node__port {
  opacity: .2;
  transform: var(--port-transform) scale(.6);
}

.hero-custom-node__port,
.hero-node__port {
  transition: background-color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .18s ease;
}

.hero-custom-node__port.is-connect-pulse,
.hero-node__port.is-connect-pulse {
  animation: custom-port-connect-pulse .4s cubic-bezier(.22,1,.36,1) both;
}

@keyframes custom-port-connect-pulse {
  0% { transform: var(--port-transform, translateY(-50%)) scale(1); }
  45% { transform: var(--port-transform, translateY(-50%)) scale(1.42); }
  100% { transform: var(--port-transform, translateY(-50%)) scale(1); }
}

.hero-custom-node-context.is-url-form {
  width: min(17rem, calc(100vw - 1.5rem));
}

.hero-custom-node-context.is-workspace-form {
  width: min(21rem, calc(100vw - 1.5rem));
}

.hero-custom-node-context__url-form {
  display: grid;
  gap: .5rem;
  padding: .2rem .4rem .42rem;
}

.hero-custom-node-context__url-input {
  width: 100%;
  min-height: 2.2rem;
  padding: .5rem .58rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 9px;
  outline: none;
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.9);
  font: 400 .72rem/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.hero-custom-node-context__url-input:focus {
  border-color: rgba(255,255,255,.28);
}

.hero-custom-node-context__url-message {
  min-height: .85rem;
  color: rgba(255,255,255,.42);
  font-size: .6rem;
  line-height: 1.35;
}

.hero-custom-node-context__url-actions {
  display: flex;
  justify-content: flex-end;
  gap: .38rem;
}

.hero-custom-node-context__url-button {
  min-height: 1.9rem;
  padding: .38rem .58rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,.58);
  font: 500 .68rem/1 Inter, sans-serif;
  cursor: pointer;
}

.hero-custom-node-context__url-button.is-primary {
  background: rgba(255,255,255,.9);
  color: #0c0c0d;
}

.hero-custom-node-context__url-button:hover,
.hero-custom-node-context__url-button:focus-visible {
  border-color: rgba(255,255,255,.22);
  outline: none;
}

.hero-custom-node-context__workspace-form {
  display: grid;
  gap: .5rem;
  padding: .2rem .4rem .42rem;
}

.hero-custom-node-context__workspace-code {
  width: 100%;
  min-height: 6.5rem;
  max-height: 12rem;
  resize: vertical;
  padding: .58rem .62rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 9px;
  outline: none;
  background: rgba(0,0,0,.22);
  color: rgba(255,255,255,.86);
  font: 400 .66rem/1.45 ui-monospace, "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
}

.hero-custom-node-context__workspace-code:focus {
  border-color: rgba(255,255,255,.28);
}

.hero-custom-node-context__import-status {
  --workspace-import-surface: #27272a;
  --workspace-import-done: #22c55e;
  --workspace-import-error: #ef4444;
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 10px;
  background: var(--workspace-import-surface);
  color: rgba(255,255,255,.9);
  font: 400 11px/1 Inter, sans-serif;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.hero-custom-node-context__import-status[hidden] {
  display: none;
}

.hero-custom-node-context__import-status-fill {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.hero-custom-node-context__import-status[data-status='done'] .hero-custom-node-context__import-status-fill {
  background: rgba(34,197,94,.14);
}

.hero-custom-node-context__import-status[data-status='error'] .hero-custom-node-context__import-status-fill {
  background: rgba(239,68,68,.14);
}

.hero-custom-node-context__import-status-slot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 15px;
  height: 15px;
  overflow: hidden;
}

.hero-custom-node-context__import-status-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(70%);
  filter: blur(3px);
}

.hero-custom-node-context__import-status-glyph svg {
  display: block;
  width: 15px;
  height: 15px;
}

.hero-custom-node-context__import-status[data-status='running'] .hero-custom-node-context__import-status-glyph.is-tool,
.hero-custom-node-context__import-status[data-status='done'] .hero-custom-node-context__import-status-glyph.is-done,
.hero-custom-node-context__import-status[data-status='error'] .hero-custom-node-context__import-status-glyph.is-error {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 240ms cubic-bezier(.23,1,.32,1),
    transform 240ms cubic-bezier(.23,1,.32,1),
    filter 240ms cubic-bezier(.23,1,.32,1);
}

.hero-custom-node-context__import-status[data-status='done'] .hero-custom-node-context__import-status-glyph.is-done {
  color: var(--workspace-import-done);
}

.hero-custom-node-context__import-status[data-status='error'] .hero-custom-node-context__import-status-glyph.is-error {
  color: var(--workspace-import-error);
  animation: workspace-import-shake 450ms cubic-bezier(.77,0,.175,1);
}

.hero-custom-node-context__import-status-name,
.hero-custom-node-context__import-status-arg,
.hero-custom-node-context__import-status-timer {
  position: relative;
  z-index: 1;
}

.hero-custom-node-context__import-status-name {
  font-weight: 500;
}

.hero-custom-node-context__import-status-arg {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .72;
}

.hero-custom-node-context__import-status-timer {
  min-width: 5.7ch;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  text-align: right;
  opacity: .5;
}

@keyframes workspace-import-shake {
  0%, 100% { transform: translateX(0); }
  16% { transform: translateX(-6px); }
  32% { transform: translateX(6px); }
  48% { transform: translateX(-4px); }
  64% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

.hero-custom-node-context__workspace-message {
  min-height: .9rem;
  color: rgba(255,255,255,.42);
  font-size: .6rem;
  line-height: 1.35;
}

.hero-custom-node-context__workspace-actions {
  display: flex;
  justify-content: flex-end;
  gap: .38rem;
}

@media (max-width: 640px) {
  .hero-custom-node {
    width: min(15rem, calc(100vw - 2rem));
    min-width: 10.5rem;
    max-width: calc(100vw - 2rem);
    min-height: 5.6rem;
    padding: .72rem .8rem .78rem;
    border-radius: 20px;
  }

  .hero-custom-node__editor {
    min-height: 3rem;
    font-size: .875rem;
  }

  .hero-custom-node-context {
    width: min(13.5rem, calc(100vw - 1.25rem));
  }

  .hero-custom-node-context.is-workspace-form {
    width: min(20rem, calc(100vw - 1.25rem));
  }

  .hero-custom-node--media,
  .hero-custom-node--link {
    width: min(var(--custom-media-width, 15rem), calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
  }

  .hero-custom-node-hint {
    left: max(.8rem, env(safe-area-inset-left));
    bottom: max(.8rem, env(safe-area-inset-bottom));
    font-size: .46rem;
  }
}

@media (pointer: coarse) {
  .hero-custom-node__delete {
    opacity: .7;
  }

  .hero-custom-node:hover {
    background: var(--node-bg);
    box-shadow: var(--node-inner-light), var(--node-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-custom-node,
  .hero-custom-node-context,
  .hero-custom-node-hint,
  .hero-custom-connection-delete {
    transition: opacity .01s linear !important;
  }

  .hero-custom-node.is-entering,
  .hero-custom-node.is-removing,
  .hero-custom-node.is-materializing {
    --custom-node-scale: 1;
    filter: none;
  }

  .hero-custom-node__media,
  .hero-custom-node__media.is-ready {
    clip-path: none;
    transition: none;
  }

  .hero-custom-node__port.is-connect-pulse,
  .hero-node__port.is-connect-pulse {
    animation: none;
  }

  .hero-custom-node-context__import-status-glyph {
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
}
