.bl-niti-demo__stage {
    width: min(600px, calc(100% - 40px));
}

.bl-niti-motion {
    position: relative;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--bl-line, rgba(0, 0, 0, 0.08));
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
    background: #fff;
    aspect-ratio: 2 / 3;
    max-height: min(900px, 85vh);
    font-family: var(--sans, system-ui, sans-serif);
}

/* Mobile / touch: lighter GPU load during demo animation */
.bl-niti-motion.is-perf-lite .bl-niti-motion__viewport {
    contain: strict;
}

.bl-niti-motion.is-perf-lite.is-animating .nb-camera {
    will-change: transform;
}

.bl-niti-motion.is-perf-lite .nb-wedding-pulse {
    display: none;
}

.bl-niti-motion.is-perf-lite .nb-node.is-entering,
.bl-niti-motion.is-perf-lite .nb-node.is-entering .nb-sticker,
.bl-niti-motion.is-perf-lite .nb-node.is-entering .devlab-item,
.bl-niti-motion.is-perf-lite .nb-node--start.is-entering .nb-node-av,
.bl-niti-motion.is-perf-lite .nb-wedding.is-entering .nb-wedding-marker,
.bl-niti-motion.is-perf-lite .nb-wedding.is-entering .nb-wedding-label {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
}

.bl-niti-motion.is-perf-lite .nb-node--start .nb-start-card {
    transform: translate(-50%, -50%);
}

.bl-niti-motion.is-perf-lite .nb-node--guest .devlab-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bl-niti-motion__app {
    position: absolute;
    inset: 0;
}

.bl-niti-motion__viewport {
    position: absolute;
    inset: 0;
    cursor: default;
    overflow: hidden;
    background: #fff;
}

.bl-niti-motion.is-explorable .bl-niti-motion__viewport {
    cursor: grab;
}

.bl-niti-motion.is-explorable .bl-niti-motion__viewport.is-panning {
    cursor: grabbing;
}

.bl-niti-motion .nb-sticker-date {
    display: none !important;
}

.bl-niti-motion .nb-node:not(.nb-node--guest) .nb-sticker {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.4rem;
    width: max-content;
    max-width: none;
    padding: 0.34rem 0.52rem;
}

.bl-niti-motion .nb-node:not(.nb-node--guest) .nb-sticker-role {
    flex-shrink: 0;
    font-size: 0.6rem;
    line-height: 1.15;
    white-space: nowrap;
}

.bl-niti-motion .nb-node:not(.nb-node--guest) .nb-sticker-title {
    flex: 0 1 auto;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    word-break: normal;
    text-overflow: clip;
}

.bl-niti-motion .nb-node--joint .nb-sticker {
    gap: 0;
}

.bl-niti-motion .nb-node:not(.nb-node--guest).nb-node--right .nb-sticker {
    left: 24px;
}

.bl-niti-motion .nb-node--start .nb-start-card {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    width: 64px;
    direction: ltr;
}

.bl-niti-motion .nb-node--start .nb-start-name {
    position: static;
    transform: none;
    text-align: center;
    max-width: 5.5rem;
    font-size: 0.65rem;
    justify-self: center;
}

.bl-niti-motion .nb-node--start .nb-node-av--start {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
}

.bl-niti-motion .nb-node.is-entering:not(.nb-node--start):not(.nb-node--guest) {
    animation: nm-knot-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bl-niti-motion .nb-node--guest.is-entering {
    animation: none;
}

.bl-niti-motion .nb-node.is-entering:not(.nb-node--start):not(.nb-node--guest) .nb-sticker {
    opacity: 0;
    animation: nm-sticker-in 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.22s;
}

.bl-niti-motion .nb-node--start.is-entering .nb-node-av {
    animation: nm-av-in 1.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bl-niti-motion .nb-node--guest.is-entering .devlab-item {
    opacity: 0;
    animation: nm-guest-in 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.bl-niti-motion .nb-wedding.is-entering .nb-wedding-marker {
    animation: nm-knot-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bl-niti-motion .nb-wedding.is-entering .nb-wedding-label {
    opacity: 0;
    animation: nm-sticker-in 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.25s;
}

@keyframes nm-guest-in {
    from { opacity: 0; transform: rotate(var(--nb-note-tilt, 0deg)) scale(0.92) translateY(8px); }
    to { opacity: 1; transform: rotate(var(--nb-note-tilt, 0deg)) scale(1) translateY(0); }
}

@keyframes nm-knot-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.55); filter: blur(4px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}

@keyframes nm-sticker-in {
    from { opacity: 0; transform: translateY(-50%) translateX(22px) scale(0.94); filter: blur(6px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); filter: blur(0); }
}

@keyframes nm-av-in {
    from { opacity: 0; transform: scale(0.72); }
    to { opacity: 1; transform: scale(1); }
}

.bl-niti-motion .nb-thread-rope .nb-thread-fill,
.bl-niti-motion .nb-thread-rope .nb-thread-shadow {
    animation: none !important;
}

.bl-niti-motion__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.bl-niti-motion__progress > span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c62828, #c9a96e);
}

.bl-niti-motion__hint {
    position: absolute;
    left: 50%;
    bottom: 0.65rem;
    transform: translateX(-50%);
    z-index: 6;
    margin: 0;
    padding: 0.35rem 0.65rem;
    max-width: calc(100% - 1.5rem);
    font-size: 0.68rem;
    line-height: 1.35;
    text-align: center;
    color: rgba(0, 0, 0, 0.55);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .bl-niti-motion .nb-node.is-entering,
    .bl-niti-motion .nb-node.is-entering .nb-sticker,
    .bl-niti-motion .nb-node.is-entering .devlab-item,
    .bl-niti-motion .nb-node--start.is-entering .nb-node-av {
        animation: none;
        opacity: 1;
        filter: none;
        transform: none;
    }
}
