/* Keep the main website out of layout until its entry runtime is activated. */
#deferred-site { display: contents; }
body[data-entry-runtime="lightweight"] #deferred-site { display: none; }
.entry-gate[hidden] { display: none; }
/* This start value preserves the original fade when reopening a dismissed gate. */
@starting-style {
  .entry-gate:not(.is-dismissed) { opacity: 0; transform: scale(1.035); }
}
/* These effects are invisible in Refined; remove their hidden animations too. */
body:not(.unrestrained) :is(.effects-canvas, .vanta-background, .chaos-field, .magnetic-cursor, .cursor-trail) {
  display: none !important;
}
/* Refined's browser-drawn crosshair avoids document mousemove rendering. */
body:not(.unrestrained) #cursor { display: none !important; }
body:not(.unrestrained) {
  --refined-pointer-rest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M0 15H30M15 0V30' stroke='%231A1D36' stroke-width='2'/%3E%3C/svg%3E") 15 15, crosshair;
  --refined-pointer-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 25H50M25 0V50' stroke='%231A1D36' stroke-width='2' opacity='.6'/%3E%3C/svg%3E") 25 25, crosshair;
  --refined-pointer: var(--refined-pointer-rest);
}
[data-theme="dark"] body:not(.unrestrained),
body[data-theme="dark"]:not(.unrestrained) {
  --refined-pointer-rest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M0 15H30M15 0V30' stroke='%2300f0ff' stroke-width='2'/%3E%3C/svg%3E") 15 15, crosshair;
  --refined-pointer-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 25H50M25 0V50' stroke='%2300f0ff' stroke-width='2' opacity='.6'/%3E%3C/svg%3E") 25 25, crosshair;
}
body:not(.unrestrained) :is(.interactive, button, a, label, input, .thumb-wrapper) {
  --refined-pointer: var(--refined-pointer-active);
}
body:not(.unrestrained).using-mouse,
body:not(.unrestrained).using-mouse * {
  cursor: var(--refined-pointer) !important;
}

/* The browser draws the gate crosshair, avoiding document mousemove rendering. */
body[data-entry-runtime="lightweight"] #cursor { display: none !important; }
body[data-entry-runtime="lightweight"] .entry-gate {
  --entry-white-rest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M0 15H30M15 0V30' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E") 15 15, crosshair;
  --entry-white-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 25H50M25 0V50' stroke='%23ffffff' stroke-width='2' opacity='.6'/%3E%3C/svg%3E") 25 25, crosshair;
  --entry-black-rest: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M0 15H30M15 0V30' stroke='%23080a12' stroke-width='2'/%3E%3C/svg%3E") 15 15, crosshair;
  --entry-black-active: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='50' height='50' viewBox='0 0 50 50'%3E%3Cpath d='M0 25H50M25 0V50' stroke='%23080a12' stroke-width='2' opacity='.6'/%3E%3C/svg%3E") 25 25, crosshair;
  --entry-pointer-rest: var(--entry-white-rest);
  --entry-pointer-active: var(--entry-white-active);
  --entry-pointer: var(--entry-pointer-rest);
}
body[data-entry-runtime="lightweight"] .entry-gate .studio-panel {
  --entry-pointer-rest: var(--entry-black-rest);
  --entry-pointer-active: var(--entry-black-active);
  --entry-pointer: var(--entry-pointer-rest);
}
body[data-entry-runtime="lightweight"] .entry-gate :is(.interactive, button, a, label, input) {
  --entry-pointer: var(--entry-pointer-active);
}
body[data-entry-runtime="lightweight"] .entry-gate,
body[data-entry-runtime="lightweight"] .entry-gate * {
  cursor: var(--entry-pointer) !important;
}

/* Original plate geometry and hover color/opacity rules remain in the page CSS. */
.entry-gate video.network-constellation-canvas {
  display: block;
  object-fit: fill;
  user-select: none;
}

/* Preserve the grain tile's size, origin and step trajectory in a smaller box. */
.entry-gate .gate-noise {
  inset: -6%;
  background-size: 300vmin 300vmin;
  background-position: -94vw -94vh;
  background-repeat: repeat;
  animation-name: entryBoundedGrain;
}
@keyframes entryBoundedGrain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(6vw, -3vh); }
  50% { transform: translate(-3vw, 6vh); }
  75% { transform: translate(3vw, 3vh); }
}
body[data-entry-visible="false"] .entry-gate .gate-noise {
  animation-play-state: paused !important;
}

body:not(.unrestrained)[data-cursor-effect="off"],
body:not(.unrestrained)[data-cursor-effect="off"] * {
  cursor: auto !important;
}

@media (hover: none), (pointer: coarse), (max-width: 700px) {
  body:not(.unrestrained).using-mouse,
  body:not(.unrestrained).using-mouse *,
  body[data-entry-runtime="lightweight"] .entry-gate,
  body[data-entry-runtime="lightweight"] .entry-gate * {
    cursor: auto !important;
  }
}

/* Unrestrained crosshair: browser drawn; its separate pointer effects stay live. */
body.unrestrained #cursor { display: none !important; }
body.unrestrained {
  --unrestrained-pointer-rest: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cpath%20d%3D%22M0%2015H30M15%200V30%22%20stroke%3D%22%23ec00b7%22%20stroke-width%3D%222%22%20opacity%3D%221%22%2F%3E%3C%2Fsvg%3E") 15 15, crosshair;
  --unrestrained-pointer-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%2250%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M0%2025H50M25%200V50%22%20stroke%3D%22%23ec00b7%22%20stroke-width%3D%222%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") 25 25, crosshair;
  --unrestrained-pointer: var(--unrestrained-pointer-rest);
}
body.unrestrained[data-chaos-theme="voidwave"] {
  --unrestrained-pointer-rest: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cpath%20d%3D%22M0%2015H30M15%200V30%22%20stroke%3D%22%2375ff38%22%20stroke-width%3D%222%22%20opacity%3D%221%22%2F%3E%3C%2Fsvg%3E") 15 15, crosshair;
  --unrestrained-pointer-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%2250%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M0%2025H50M25%200V50%22%20stroke%3D%22%2375ff38%22%20stroke-width%3D%222%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") 25 25, crosshair;
}
body.unrestrained :is(.interactive, button, a, label, input, .thumb-wrapper) {
  --unrestrained-pointer: var(--unrestrained-pointer-active);
}
body.unrestrained.using-mouse,
body.unrestrained.using-mouse * {
  cursor: var(--unrestrained-pointer) !important;
}
body.unrestrained[data-entry-runtime="lightweight"] .entry-gate {
  --unrestrained-pointer-rest: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cpath%20d%3D%22M0%2015H30M15%200V30%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20opacity%3D%221%22%2F%3E%3C%2Fsvg%3E") 15 15, crosshair;
  --unrestrained-pointer-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%2250%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M0%2025H50M25%200V50%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") 25 25, crosshair;
  --unrestrained-pointer: var(--unrestrained-pointer-rest);
}
body.unrestrained.gate-open .entry-gate .studio-panel {
  --unrestrained-pointer-rest: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cpath%20d%3D%22M0%2015H30M15%200V30%22%20stroke%3D%22%23080a12%22%20stroke-width%3D%222%22%20opacity%3D%221%22%2F%3E%3C%2Fsvg%3E") 15 15, crosshair;
  --unrestrained-pointer-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%2250%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M0%2025H50M25%200V50%22%20stroke%3D%22%23080a12%22%20stroke-width%3D%222%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") 25 25, crosshair;
  --unrestrained-pointer: var(--unrestrained-pointer-active);
}
body.unrestrained.gate-open .entry-gate .network-panel {
  --unrestrained-pointer-rest: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2230%22%20height%3D%2230%22%20viewBox%3D%220%200%2030%2030%22%3E%3Cpath%20d%3D%22M0%2015H30M15%200V30%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20opacity%3D%221%22%2F%3E%3C%2Fsvg%3E") 15 15, crosshair;
  --unrestrained-pointer-active: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2250%22%20height%3D%2250%22%20viewBox%3D%220%200%2050%2050%22%3E%3Cpath%20d%3D%22M0%2025H50M25%200V50%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20opacity%3D%220.6%22%2F%3E%3C%2Fsvg%3E") 25 25, crosshair;
  --unrestrained-pointer: var(--unrestrained-pointer-active);
}
body.unrestrained[data-cursor-effect="off"].using-mouse,
body.unrestrained[data-cursor-effect="off"].using-mouse * {
  cursor: auto !important;
}
@media (hover: none), (pointer: coarse), (max-width: 700px) {
  body.unrestrained.using-mouse,
  body.unrestrained.using-mouse * {
    cursor: auto !important;
  }
}
/* Hidden magnetic decorations resume from their last phase when selected. */
.magnetic-cursor[data-magnetic-paused="true"] i,
.magnetic-cursor[data-magnetic-paused="true"]::before,
.magnetic-cursor[data-magnetic-paused="true"]::after {
  animation-play-state: paused !important;
}
