/* V8 reuses the V4 stage shell and adds a calibrated Alpha/flow-map layer. */
/* The shared selector keeps all six version buttons on one row. */
.fantasy-tree-visual-version[data-tree-visual-version-switcher="v7"] {
    grid-template-columns: repeat(6, 38px);
    grid-template-rows: 36px;
    grid-auto-flow: column;
}

body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-scene {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #01030d;
}

body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-backdrop,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-viewport,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-hud-layer {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/*
 * Older V8 bundles briefly mounted a duplicate generation panel in the lower
 * right corner. The Life Forge console already owns these actions, so keep a
 * CSS guard for stale DOM while cached scripts roll forward.
 */
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    :is(.fantasy-tree-v8-action-panel, [data-fantasy-tree-v8-actions]) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-toolbar,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-version,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-more,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-timeline,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-preview,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-jobs,
body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-story-drawer {
    z-index: 30;
}

body.fantasy-tree-v8-active
    .fantasy-tree-v8-root
    .fantasy-tree-v4-preview {
    visibility: hidden;
    pointer-events: none;
}

body.fantasy-tree-v8-active .fantasy-tree-v8-artboard {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    contain: layout paint;
    pointer-events: none;
    background: #01030d;
}

.fantasy-tree-v8-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.fantasy-tree-v8-scene-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 1672px;
    height: 941px;
    overflow: hidden;
    transform-origin: 0 0;
    will-change: transform;
    pointer-events: none;
}

.fantasy-tree-v8-base {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 1672px;
    height: 941px;
    max-width: none;
    object-fit: fill;
    user-select: none;
    pointer-events: none;
}

.fantasy-tree-v8-flow-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 1672px;
    height: 941px;
    max-width: none;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.96;
    image-rendering: auto;
}

.fantasy-tree-v8-alpha-static {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 1672px;
    height: 941px;
    max-width: none;
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

.fantasy-tree-v8-artboard[data-v8-flow-fallback="static-alpha"] .fantasy-tree-v8-alpha-static {
    opacity: 0.20;
}

.fantasy-tree-v8-energy {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    width: 1672px;
    height: 941px;
    overflow: hidden;
    color: #d8ffff;
    mix-blend-mode: screen;
    pointer-events: none;
    shape-rendering: geometricPrecision;
}

.fantasy-tree-v8-energy-group {
    --v8-energy-core: rgba(232, 255, 255, 0.98);
    --v8-energy-tail: rgba(108, 246, 255, 0.9);
    --v8-energy-glow: rgba(0, 234, 255, 0.68);
    --v8-energy-rest: rgba(112, 230, 255, 0.56);
    --v8-rest-width: 1.15;
    --v8-bloom-width: 8;
    --v8-tail-width: 3.2;
    --v8-head-width: 2;
}

.fantasy-tree-v8-energy-group.is-violet {
    --v8-energy-core: rgba(226, 250, 255, 0.98);
    --v8-energy-tail: rgba(183, 157, 255, 0.86);
    --v8-energy-glow: rgba(137, 87, 255, 0.62);
    --v8-energy-rest: rgba(141, 112, 255, 0.44);
}

.fantasy-tree-v8-energy-group[data-v8-energy-tier="0"] {
    --v8-rest-width: 1.8;
    --v8-bloom-width: 13;
    --v8-tail-width: 5.3;
    --v8-head-width: 2.8;
}

.fantasy-tree-v8-energy-group[data-v8-energy-tier="1"] {
    --v8-rest-width: 1.9;
    --v8-bloom-width: 15;
    --v8-tail-width: 5.8;
    --v8-head-width: 3;
}

.fantasy-tree-v8-energy-group[data-v8-energy-tier="2"] {
    --v8-rest-width: 1.35;
    --v8-bloom-width: 10;
    --v8-tail-width: 4;
    --v8-head-width: 2.25;
}

.fantasy-tree-v8-energy-group[data-v8-energy-tier="3"] {
    --v8-rest-width: 0.9;
    --v8-bloom-width: 6;
    --v8-tail-width: 2.6;
    --v8-head-width: 1.6;
}

.fantasy-tree-v8-energy-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fantasy-tree-v8-energy-line.is-rest {
    stroke: var(--v8-energy-rest);
    stroke-width: var(--v8-rest-width);
    opacity: 0.075;
}

.fantasy-tree-v8-energy-line.is-bloom,
.fantasy-tree-v8-energy-line.is-tail,
.fantasy-tree-v8-energy-line.is-head {
    opacity: 0;
    will-change: opacity, stroke-dashoffset;
}

.fantasy-tree-v8-energy-line.is-bloom {
    stroke: var(--v8-energy-glow);
    stroke-width: var(--v8-bloom-width);
    stroke-dasharray: 30 100;
    stroke-dashoffset: 30;
    filter: url("#fantasy-tree-v8-bloom-filter");
}

.fantasy-tree-v8-energy-line.is-tail {
    stroke: var(--v8-energy-tail);
    stroke-width: var(--v8-tail-width);
    stroke-dasharray: 22 100;
    stroke-dashoffset: 22;
    filter: url("#fantasy-tree-v8-head-filter");
}

.fantasy-tree-v8-energy-line.is-head {
    stroke: var(--v8-energy-core);
    stroke-width: var(--v8-head-width);
    stroke-dasharray: 5 100;
    stroke-dashoffset: 5;
    filter: url("#fantasy-tree-v8-head-filter");
}

.fantasy-tree-v8-junction,
.fantasy-tree-v8-tip {
    transform-box: fill-box;
    transform-origin: center;
    pointer-events: none;
    opacity: 0;
    will-change: opacity, transform;
}

.fantasy-tree-v8-junction {
    fill: rgba(232, 255, 255, 0.94);
    filter:
        drop-shadow(0 0 4px rgba(216, 255, 255, 0.9))
        drop-shadow(0 0 10px rgba(0, 234, 255, 0.7));
}

.fantasy-tree-v8-tip {
    fill: rgba(216, 255, 255, 0.95);
    filter: drop-shadow(0 0 5px rgba(0, 234, 255, 0.78));
}

.fantasy-tree-v8-tip.is-violet {
    fill: rgba(222, 248, 255, 0.96);
    filter:
        drop-shadow(0 0 5px rgba(132, 90, 255, 0.82))
        drop-shadow(0 0 9px rgba(255, 47, 166, 0.38));
}

.fantasy-tree-v8-node-layer {
    position: absolute;
    z-index: 4;
    inset: 0;
    width: 1672px;
    height: 941px;
    overflow: visible;
    pointer-events: none;
}

.fantasy-tree-v8-node {
    --v8-node-core: #e9ffff;
    --v8-node-cyan: #5ef6ff;
    --v8-node-violet: #9d7cff;
    --v8-node-magenta: #ff53c7;
    position: absolute;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #dfffff;
    font: inherit;
    letter-spacing: 0;
    cursor: pointer;
    pointer-events: auto;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
}

.fantasy-tree-v8-node-core {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 13px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(226, 255, 255, 0.9);
    border-radius: 50%;
    background:
        radial-gradient(circle, #ffffff 0 18%, #caffff 24%, #61efff 48%, rgba(20, 146, 196, 0.42) 68%, transparent 72%);
    box-shadow:
        0 0 5px rgba(234, 255, 255, 0.95),
        0 0 12px rgba(59, 232, 255, 0.78),
        0 0 22px rgba(63, 116, 255, 0.3);
    transition:
        transform 160ms ease,
        filter 160ms ease,
        box-shadow 160ms ease;
}

.fantasy-tree-v8-node-core::before,
.fantasy-tree-v8-node-core::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(94, 246, 255, 0.4);
    border-radius: 50%;
    opacity: 0.34;
}

.fantasy-tree-v8-node-core::after {
    inset: -10px;
    border-color: rgba(157, 124, 255, 0.34);
    opacity: 0;
    animation: fantasyTreeV8NodeFlow var(--v8-node-cycle) linear infinite;
    animation-delay: var(--v8-node-flow-delay);
}

.fantasy-tree-v8-node-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.fantasy-tree-v8-node-ring.is-inner {
    inset: -4px;
    border-top: 1px solid rgba(238, 255, 255, 0.86);
    border-right: 1px solid rgba(94, 246, 255, 0.48);
    border-bottom: 1px solid transparent;
    border-left: 1px solid rgba(94, 246, 255, 0.22);
    transform: rotate(28deg);
}

.fantasy-tree-v8-node-ring.is-outer {
    inset: -8px;
    border: 1px dashed rgba(157, 124, 255, 0.28);
    opacity: 0;
}

.fantasy-tree-v8-node.is-key .fantasy-tree-v8-node-core,
.fantasy-tree-v8-node.is-fork .fantasy-tree-v8-node-core {
    width: 16px;
    height: 16px;
}

.fantasy-tree-v8-node.is-key .fantasy-tree-v8-node-ring.is-outer,
.fantasy-tree-v8-node.is-fork .fantasy-tree-v8-node-ring.is-outer {
    opacity: 0.7;
}

.fantasy-tree-v8-node.is-fork .fantasy-tree-v8-node-core {
    border-color: rgba(207, 188, 255, 0.92);
    box-shadow:
        0 0 6px rgba(235, 255, 255, 0.9),
        0 0 15px rgba(157, 124, 255, 0.72),
        0 0 24px rgba(255, 83, 199, 0.24);
}

.fantasy-tree-v8-node.is-leaf .fantasy-tree-v8-node-core {
    width: 16px;
    height: 16px;
    box-shadow:
        0 0 7px rgba(239, 255, 255, 0.98),
        0 0 17px rgba(94, 246, 255, 0.86),
        0 0 28px rgba(157, 124, 255, 0.42);
}

.fantasy-tree-v8-node.is-leaf .fantasy-tree-v8-node-ring.is-outer {
    inset: -9px;
    border-color: rgba(94, 246, 255, 0.52);
    opacity: 0.76;
}

.fantasy-tree-v8-node.is-current .fantasy-tree-v8-node-core {
    width: 19px;
    height: 19px;
    box-shadow:
        0 0 7px rgba(255, 255, 255, 1),
        0 0 18px rgba(94, 246, 255, 0.92),
        0 0 32px rgba(157, 124, 255, 0.52);
}

.fantasy-tree-v8-node.is-current .fantasy-tree-v8-node-ring.is-outer {
    inset: -10px;
    border-color: rgba(172, 143, 255, 0.72);
    opacity: 0.92;
    animation: fantasyTreeV8CurrentNode 2.8s ease-in-out infinite;
}

.fantasy-tree-v8-node.is-root {
    cursor: default;
}

.fantasy-tree-v8-node.is-root .fantasy-tree-v8-node-core {
    width: 22px;
    height: 22px;
    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.96),
        0 0 24px rgba(94, 246, 255, 0.84),
        0 0 42px rgba(83, 100, 255, 0.42);
}

.fantasy-tree-v8-node.is-root .fantasy-tree-v8-node-ring.is-outer {
    inset: -12px;
    border-color: rgba(94, 246, 255, 0.5);
    opacity: 0.78;
}

.fantasy-tree-v8-node.is-pending {
    opacity: 0.58;
}

.fantasy-tree-v8-node.is-pending .fantasy-tree-v8-node-ring.is-inner {
    border-style: dashed;
}

.fantasy-tree-v8-node.is-future .fantasy-tree-v8-node-core {
    background:
        radial-gradient(circle, rgba(235, 255, 255, 0.96) 0 14%, rgba(109, 237, 255, 0.58) 30%, rgba(112, 83, 218, 0.28) 58%, transparent 72%);
}

.fantasy-tree-v8-node.status-failed .fantasy-tree-v8-node-core,
.fantasy-tree-v8-node.status-selection_failed .fantasy-tree-v8-node-core {
    border-color: rgba(255, 100, 190, 0.84);
    background:
        radial-gradient(circle, #fff2fb 0 16%, #ff71cb 30%, rgba(172, 66, 180, 0.42) 58%, transparent 72%);
    box-shadow:
        0 0 6px rgba(255, 235, 250, 0.82),
        0 0 16px rgba(255, 83, 199, 0.58);
}

.fantasy-tree-v8-node:hover .fantasy-tree-v8-node-core,
.fantasy-tree-v8-node:focus-visible .fantasy-tree-v8-node-core,
.fantasy-tree-v8-node.is-selected .fantasy-tree-v8-node-core {
    transform: translate(-50%, -50%) scale(1.18);
    filter: brightness(1.18);
    box-shadow:
        0 0 8px rgba(255, 255, 255, 1),
        0 0 20px rgba(94, 246, 255, 0.94),
        0 0 34px rgba(255, 83, 199, 0.46);
}

.fantasy-tree-v8-node:focus-visible {
    outline: none;
}

.fantasy-tree-v8-node:focus-visible::after {
    content: "";
    position: absolute;
    inset: 2px;
    border: 1px solid rgba(255, 83, 199, 0.72);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(94, 246, 255, 0.2);
}

.fantasy-tree-v8-node.is-compact:not(.is-current):not(.is-fork):not(.is-leaf)
    .fantasy-tree-v8-node-core {
    width: 11px;
    height: 11px;
}

.fantasy-tree-v8-stage-preview {
    z-index: 12;
    border-color: rgba(94, 246, 255, 0.5);
    background:
        linear-gradient(145deg, rgba(4, 18, 36, 0.98), rgba(10, 7, 32, 0.98));
    box-shadow:
        0 18px 46px rgba(0, 0, 0, 0.56),
        0 0 20px rgba(94, 246, 255, 0.11),
        0 0 32px rgba(157, 124, 255, 0.08);
}

.fantasy-tree-v8-editor-panel {
    position: absolute;
    z-index: 36;
    top: 72px;
    left: 18px;
    display: flex;
    flex-direction: column;
    width: min(286px, calc(100% - 36px));
    max-height: min(690px, calc(100% - 116px));
    overflow: hidden;
    pointer-events: auto;
    color: rgba(222, 250, 255, 0.92);
    border: 1px solid rgba(94, 246, 255, 0.34);
    background:
        linear-gradient(145deg, rgba(3, 16, 34, 0.96), rgba(9, 5, 29, 0.94)),
        rgba(2, 7, 20, 0.94);
    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.48),
        0 0 22px rgba(94, 246, 255, 0.12),
        0 0 32px rgba(157, 124, 255, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.025);
    clip-path: polygon(
        0 9px,
        9px 0,
        100% 0,
        100% calc(100% - 9px),
        calc(100% - 9px) 100%,
        0 100%
    );
    backdrop-filter: blur(18px) saturate(1.15);
    transition: width 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.fantasy-tree-v8-editor-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 83, 199, 0.76), rgba(94, 246, 255, 0.76), transparent);
    pointer-events: none;
}

.fantasy-tree-v8-editor-header,
.fantasy-tree-v8-editor-meta,
.fantasy-tree-v8-editor-actions {
    flex: 0 0 auto;
}

.fantasy-tree-v8-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 12px 10px;
}

.fantasy-tree-v8-editor-header > div {
    display: grid;
    gap: 3px;
}

.fantasy-tree-v8-editor-kicker {
    color: rgba(157, 124, 255, 0.8);
    font-size: 9px;
    letter-spacing: 0.12em;
    line-height: 1;
}

.fantasy-tree-v8-editor-header strong {
    color: rgba(239, 255, 255, 0.96);
    font-size: 14px;
    font-weight: 650;
}

.fantasy-tree-v8-editor-collapse,
.fantasy-tree-v8-editor-actions button,
.fantasy-tree-v8-editor-life-header,
.fantasy-tree-v8-editor-node {
    border: 0;
    font: inherit;
}

.fantasy-tree-v8-editor-collapse {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    color: rgba(176, 222, 235, 0.72);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.fantasy-tree-v8-editor-collapse:hover,
.fantasy-tree-v8-editor-collapse:focus-visible {
    color: #e9ffff;
    background: rgba(94, 246, 255, 0.14);
    outline: none;
}

.fantasy-tree-v8-editor-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px 10px;
    color: rgba(169, 210, 223, 0.72);
    font-size: 10px;
}

.fantasy-tree-v8-editor-meta span:last-child {
    color: rgba(94, 246, 255, 0.88);
}

.fantasy-tree-v8-editor-meta span.is-saving {
    color: rgba(255, 221, 141, 0.92);
}

.fantasy-tree-v8-editor-meta span.is-conflict,
.fantasy-tree-v8-editor-meta span.is-error {
    color: rgba(255, 110, 196, 0.94);
}

.fantasy-tree-v8-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 0 12px 10px;
}

.fantasy-tree-v8-editor-actions button {
    min-height: 30px;
    padding: 0 8px;
    color: rgba(197, 237, 246, 0.82);
    border: 1px solid rgba(94, 246, 255, 0.2);
    background: rgba(7, 25, 44, 0.74);
    cursor: pointer;
    font-size: 10px;
}

.fantasy-tree-v8-editor-actions button:hover,
.fantasy-tree-v8-editor-actions button:focus-visible,
.fantasy-tree-v8-editor-actions button[aria-pressed="true"] {
    color: #efffff;
    border-color: rgba(94, 246, 255, 0.68);
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.18), rgba(157, 124, 255, 0.2));
    outline: none;
}

.fantasy-tree-v8-editor-actions button:disabled {
    opacity: 0.44;
    cursor: default;
}

.fantasy-tree-v8-editor-actions button i {
    margin-right: 5px;
    color: rgba(255, 83, 199, 0.78);
}

.fantasy-tree-v8-editor-lives {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(94, 246, 255, 0.48) transparent;
}

.fantasy-tree-v8-editor-life {
    margin: 0 0 5px;
    border: 1px solid rgba(94, 246, 255, 0.11);
    background: rgba(4, 15, 31, 0.58);
}

.fantasy-tree-v8-editor-life.is-selected {
    border-color: rgba(94, 246, 255, 0.58);
    box-shadow: inset 2px 0 0 rgba(94, 246, 255, 0.92), 0 0 14px rgba(94, 246, 255, 0.08);
}

.fantasy-tree-v8-editor-life.is-current {
    border-right-color: rgba(255, 83, 199, 0.6);
}

.fantasy-tree-v8-editor-life-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    padding: 9px 9px 8px 10px;
    color: rgba(224, 250, 255, 0.9);
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.fantasy-tree-v8-editor-life-header:hover,
.fantasy-tree-v8-editor-life-header:focus-visible {
    background: rgba(94, 246, 255, 0.08);
    outline: none;
}

.fantasy-tree-v8-editor-life-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.fantasy-tree-v8-editor-life-main strong {
    overflow: hidden;
    color: rgba(239, 255, 255, 0.94);
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fantasy-tree-v8-editor-life-main small {
    color: rgba(155, 207, 220, 0.7);
    font-size: 9px;
}

.fantasy-tree-v8-editor-life-header > i {
    color: rgba(157, 124, 255, 0.78);
    font-size: 9px;
}

.fantasy-tree-v8-editor-node-list {
    display: grid;
    gap: 2px;
    padding: 0 5px 5px 10px;
}

.fantasy-tree-v8-editor-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 26px;
    padding: 0 7px;
    color: rgba(179, 220, 230, 0.78);
    border-left: 1px solid rgba(157, 124, 255, 0.26);
    background: rgba(10, 27, 48, 0.48);
    cursor: pointer;
    font-size: 10px;
    text-align: left;
}

.fantasy-tree-v8-editor-node:hover,
.fantasy-tree-v8-editor-node:focus-visible,
.fantasy-tree-v8-editor-node.is-selected {
    color: #f1ffff;
    border-left-color: rgba(255, 83, 199, 0.86);
    background: linear-gradient(90deg, rgba(94, 246, 255, 0.14), rgba(157, 124, 255, 0.16));
    outline: none;
}

.fantasy-tree-v8-editor-node i {
    color: rgba(94, 246, 255, 0.66);
    font-size: 9px;
}

.fantasy-tree-v8-editor-empty {
    padding: 18px 10px;
    color: rgba(161, 208, 220, 0.64);
    font-size: 11px;
    text-align: center;
}

.fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-panel {
    width: 42px;
}

.fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-panel > *:not(.fantasy-tree-v8-editor-header) {
    display: none;
}

.fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-header {
    justify-content: center;
    padding: 12px 7px;
}

.fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-header > div {
    display: none;
}

.fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-collapse i {
    transform: rotate(180deg);
}

.fantasy-tree-v8-artboard.is-readonly .fantasy-tree-v8-node {
    cursor: pointer;
}

.fantasy-tree-v8-artboard.is-editing .fantasy-tree-v8-node:not(.is-root) {
    touch-action: none;
}

.fantasy-tree-v8-node.is-dragging {
    z-index: 8;
    cursor: grabbing;
    filter: brightness(1.25);
}

.fantasy-tree-v8-node.is-dragging .fantasy-tree-v8-node-core {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow:
        0 0 10px rgba(255, 255, 255, 1),
        0 0 24px rgba(94, 246, 255, 1),
        0 0 40px rgba(255, 83, 199, 0.58);
}

.fantasy-tree-v8-node.is-dimmed {
    opacity: 0.2;
    filter: saturate(0.55);
}

.fantasy-tree-v8-node.is-life-highlighted {
    z-index: 6;
    filter: brightness(1.12);
}

.fantasy-tree-v8-node.is-life-highlighted .fantasy-tree-v8-node-ring.is-outer {
    border-color: rgba(255, 83, 199, 0.84);
    box-shadow: 0 0 12px rgba(255, 83, 199, 0.42);
}

@keyframes fantasyTreeV8NodeFlow {
    0%, 86%, 100% {
        opacity: 0;
        transform: scale(0.72);
    }
    4% {
        opacity: 0.9;
        transform: scale(1.18);
    }
    10% {
        opacity: 0.18;
        transform: scale(1.48);
    }
}

@keyframes fantasyTreeV8CurrentNode {
    0%, 100% {
        transform: rotate(0deg) scale(0.96);
        opacity: 0.66;
    }
    50% {
        transform: rotate(120deg) scale(1.1);
        opacity: 1;
    }
}

@media (max-width: 860px), (hover: none), (pointer: coarse) {
    body.fantasy-tree-v8-active
        .fantasy-tree-v8-root
        .fantasy-tree-v4-scene {
        min-height: min(58vw, 72vh);
    }

    .fantasy-tree-v8-energy-line.is-bloom {
        filter: none;
    }

    .fantasy-tree-v8-energy-line.is-tail,
    .fantasy-tree-v8-energy-line.is-head {
        filter: none;
    }

    .fantasy-tree-v8-flow-canvas {
        opacity: 0.82;
    }

    .fantasy-tree-v8-junction,
    .fantasy-tree-v8-tip {
        filter: drop-shadow(0 0 4px rgba(0, 234, 255, 0.62));
    }

    .fantasy-tree-v8-node {
        width: 48px;
        height: 48px;
    }

    .fantasy-tree-v8-editor-panel {
        top: 58px;
        left: 10px;
        width: min(292px, calc(100% - 20px));
        max-height: min(560px, calc(100% - 78px));
    }

    .fantasy-tree-v8-artboard.is-editor-panel-collapsed .fantasy-tree-v8-editor-panel {
        width: 42px;
    }

}

@media (prefers-reduced-motion: reduce) {
    body.fantasy-tree-v8-active .fantasy-tree-v8-scene-canvas {
        will-change: auto;
    }

    .fantasy-tree-v8-energy-line.is-bloom,
    .fantasy-tree-v8-energy-line.is-tail,
    .fantasy-tree-v8-energy-line.is-head,
    .fantasy-tree-v8-junction,
    .fantasy-tree-v8-tip {
        display: none;
    }

    .fantasy-tree-v8-energy-line.is-rest {
        opacity: 0.12;
    }

    .fantasy-tree-v8-flow-canvas {
        opacity: 0.34;
    }

    .fantasy-tree-v8-node-core::after,
    .fantasy-tree-v8-node.is-current .fantasy-tree-v8-node-ring.is-outer {
        animation: none;
    }

    .fantasy-tree-v8-node-core {
        transition: none;
    }
}
