.dim-index-container {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 200;
    pointer-events: auto
}

.dim-line {
    position: absolute;
    right: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #ffffff1a;
    z-index: -1
}

.dim-line-fill {
    position: absolute;
    right: 5px;
    top: 0;
    width: 1px;
    background: var(--color-primary);
    z-index: 0;
    transition: height .1s linear;
    box-shadow: 0 0 8px #ffffff80
}

.dim-notch-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    opacity: .4;
    transition: all .3s ease;
    padding: 6px 0
}

.dim-notch-container:hover {
    opacity: .8
}

.dim-notch-container.active {
    opacity: 1
}

.dim-label {
    font-size: .7rem;
    color: var(--color-dim);
    text-align: right;
    letter-spacing: .05em;
    transition: color .3s
}

.dim-label.active {
    color: var(--color-primary);
    text-shadow: 0 0 5px rgba(255, 255, 255, .5);
    font-weight: 700
}

.dim-notch {
    width: 14px;
    height: 3px;
    background: #fff;
    transition: all .3s
}

.dim-notch.active {
    width: 20px;
    background: var(--color-primary);
    box-shadow: 0 0 10px #fffc
}

@media (max-width: 768px) {
    .dim-index-container {
        position: fixed;
        top: 25%;
        right: 10px;
        height: 40vh;
        transform: translateY(-50%);
        width: 30px;
        z-index: 100
    }

    .dim-label {
        display: none
    }

    .dim-notch {
        margin-left: auto
    }
}

.narrative-display {
    position: absolute;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 4rem 2rem 2rem;
    pointer-events: none;
    box-sizing: border-box
}

.active-chapter {
    width: 100%;
    max-width: 600px;
    background: #0006;
    backdrop-filter: blur(10px);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, .1);
    pointer-events: none
}

.active-chapter a,
.active-chapter button,
.active-chapter .promo-btn,
.active-chapter .book-item {
    pointer-events: auto;
    cursor: pointer
}

.animate-fade-in {
    animation: fadeIn .8s ease forwards
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.chapter-id {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: .5rem;
    text-transform: uppercase;
    color: #fff
}

.chapter-sub {
    font-size: 1rem;
    color: var(--color-primary);
    opacity: .8;
    margin-bottom: 2rem
}

.chapter-sub:before {
    content: ""
}

.label {
    display: block;
    font-size: .7rem;
    color: var(--color-dim);
    margin-bottom: .5rem;
    letter-spacing: .1em
}

.blueprint-box,
.tech-desc,
.visual-state,
.citation-box {
    margin-bottom: 2rem
}

.blueprint-text {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.4
}

.desc-text {
    font-family: Inter, sans-serif;
    font-size: .95rem;
    line-height: 1.7;
    color: #ffffffe6;
    white-space: pre-wrap
}

.has-cursor:after {
    content: "|";
    animation: blink 1s infinite;
    color: var(--color-primary)
}

@keyframes blink {

    0%,
    to {
        opacity: 1
    }

    50% {
        opacity: 0
    }
}

.visual-text {
    font-size: .8rem;
    color: #aaa;
    border-left: 2px solid var(--color-dim);
    padding-left: 1rem
}

.citation-text {
    font-size: .7rem;
    color: var(--color-dim);
    font-style: italic
}

@media (max-width: 768px) {
    .narrative-display {
        top: 0;
        height: 100%;
        padding: 1.5rem 1.5rem 6rem;
        background: #000;
        border-top: 1px solid rgba(255, 255, 255, .2)
    }

    .active-chapter {
        max-width: 100%;
        padding: 0;
        border: none;
        background: transparent;
        backdrop-filter: none
    }

    .chapter-id {
        font-size: 1.5rem;
        margin-bottom: .5rem
    }

    .chapter-sub {
        font-size: .9rem;
        margin-bottom: 1.5rem;
        color: var(--color-primary)
    }

    .blueprint-box,
    .tech-desc,
    .visual-state {
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, .05)
    }

    .desc-text {
        font-size: .9rem;
        line-height: 1.6;
        max-height: none;
        overflow: visible
    }
}

.book-promo-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .1)
}

.book-promo-card {
    background: #ffffff0d;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.promo-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: .5rem
}

.promo-subtitle {
    font-size: .9rem;
    color: #aaa;
    margin-bottom: 1.5rem
}

.book-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem
}

.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px
}

.book-cover-placeholder {
    width: 70px;
    height: 100px;
    background: #111;
    border: 1px solid #333;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px #00000080
}

.book-cover-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1
}

.book-cover-placeholder:before {
    content: "BOOK";
    color: #333;
    font-size: .7rem;
    position: absolute;
    z-index: 0
}

.book-label {
    font-size: .75rem;
    color: #ccc;
    line-height: 1.2;
    text-align: center
}

.promo-btn {
    display: inline-block;
    background: #0af;
    color: #000;
    padding: .8rem 1.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: transform .2s, background .2s;
    font-size: .9rem
}

.promo-btn:hover {
    transform: translateY(-2px);
    background: #3bf;
    box-shadow: 0 0 15px #0af6
}

.social-link {
    font-size: .8rem;
    color: #888
}

.social-link a {
    color: #fff;
    margin-left: .5rem;
    text-decoration: none
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 2rem;
    box-sizing: border-box
}

.nav-left {
    flex: 1
}

.brand-title {
    font-size: 1.2rem;
    letter-spacing: .1em;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-text);
    opacity: .9
}

.nav-right {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
    width: 40%;
    padding-left: 2rem
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--color-dim);
    font-size: .9rem;
    cursor: pointer;
    padding: .5rem 0;
    border-bottom: 2px solid transparent;
    transition: all .3s ease;
    letter-spacing: .05em
}

.nav-btn:hover {
    color: var(--color-primary)
}

.nav-btn.active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary)
}

.rainbow-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 18px;
    background: linear-gradient(90deg, red, orange, #ff0, green, #00f, indigo, violet);
    border-bottom: 1px solid rgba(255, 255, 255, .4);
    z-index: 0
}

.info-overlay {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: #000000b3;
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: flex-end;
    z-index: 50;
    animation: fadeIn .3s ease
}

.info-content {
    width: 40%;
    height: 100%;
    background: #14141ef2;
    border-left: 1px solid rgba(255, 255, 255, .2);
    padding: 2rem;
    overflow-y: auto;
    position: relative;
    box-shadow: -10px 0 30px #00000080;
    animation: slideIn .3s ease
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-dim);
    cursor: pointer;
    transition: color .2s
}

.close-btn:hover {
    color: #fff
}

.info-title {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--color-dim);
    padding-bottom: 1rem
}

.info-item {
    margin-bottom: 2.5rem
}

.item-title {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: .5rem;
    color: #fff
}

.item-desc {
    font-size: .9rem;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 1rem
}

.item-action,
.item-action-btn {
    font-family: Roboto Mono, monospace;
    font-size: .8rem;
    color: var(--color-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: transparent;
    border: 1px solid var(--color-dim);
    padding: .5rem 1rem;
    cursor: pointer;
    display: inline-block;
    transition: all .2s
}

.item-action:hover,
.item-action-btn:hover {
    border-color: #fff;
    background: #ffffff1a
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideIn {
    0% {
        transform: translate(100%)
    }

    to {
        transform: translate(0)
    }
}

.swipe-hint-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px
}

.swipe-hint-container.visible {
    opacity: 1
}

.hand-icon {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 50%;
    position: relative;
    animation: swipeUp 2s infinite
}

.finger {
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%)
}

.swipe-text {
    font-family: monospace;
    font-size: .7rem;
    color: #fff9;
    text-transform: uppercase
}

@keyframes swipeUp {
    0% {
        transform: translateY(10px);
        opacity: 0
    }

    20% {
        opacity: 1
    }

    80% {
        transform: translateY(-10px);
        opacity: 0
    }

    to {
        transform: translateY(-10px);
        opacity: 0
    }
}

@media (max-width: 768px) {
    .swipe-hint-container {
        bottom: 80px;
        right: 20px
    }
}

.app-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #000
}

.fixed-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 100;
    pointer-events: none
}

.main-layout {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative
}

.canvas-section {
    width: 60%;
    height: 100%;
    background: #000;
    position: relative;
    z-index: 1
}

.narrative-section {
    width: 40%;
    height: 100%;
    position: relative;
    z-index: 60;
    pointer-events: none
}

.scroll-driver {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    z-index: 50;
    opacity: 0;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth
}

.snap-section {
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always
}

.intro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: none
}

.intro-diagram {
    max-width: 80%;
    width: 600px;
    opacity: .8;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, .3))
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #fff0 50%, #0000001a 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9999;
    opacity: .6
}

.intro-title {
    font-family: Inter, sans-serif;
    font-weight: 200;
    font-size: 3rem;
    color: #fff;
    letter-spacing: .5em;
    text-transform: uppercase;
    text-align: center
}

.intro-subtitle {
    font-family: Inter, sans-serif;
    font-weight: 300;
    font-size: 1.2rem;
    color: #fff9;
    letter-spacing: .3em;
    text-align: center;
    margin-top: 1rem;
    font-style: italic
}

.glow-text {
    text-shadow: 0 0 20px rgba(255, 255, 255, .4), 0 0 40px rgba(255, 255, 255, .2)
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translate(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    z-index: 2000;
    transition: opacity .5s ease
}

.scroll-text {
    font-size: .7rem;
    color: var(--color-dim);
    letter-spacing: .2em
}

.scroll-arrow {
    font-size: 1.2rem;
    color: #fffc;
    margin-top: 5px;
    animation: arrowBounce 2s infinite
}

@keyframes arrowBounce {

    0%,
    to {
        transform: translateY(0);
        opacity: .5
    }

    50% {
        transform: translateY(5px);
        opacity: 1
    }
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 12px;
    position: relative
}

.scroll-wheel {
    width: 2px;
    height: 6px;
    background: #fff;
    border-radius: 1px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translate(-50%);
    animation: scrollBounce 2s infinite
}

@keyframes scrollBounce {
    0% {
        transform: translate(-50%);
        opacity: 0
    }

    20% {
        opacity: 1
    }

    to {
        transform: translate(-50%, 15px);
        opacity: 0
    }
}

.intro-infinity {
    font-size: 3rem;
    color: #fffc;
    font-weight: 100;
    margin-bottom: 0;
    line-height: 1;
    display: block;
    text-align: center
}

@media (max-width: 768px) {
    .intro-title {
        font-size: 1.8rem;
        letter-spacing: .2em;
        padding: 0 1rem
    }

    .intro-subtitle {
        font-size: 1rem;
        letter-spacing: .15em
    }

    .intro-infinity {
        font-size: 2.5rem
    }

    .scroll-indicator {
        bottom: 5rem
    }

    .main-layout {
        flex-direction: column
    }

    .canvas-section {
        width: 100%;
        height: 45vh
    }

    .narrative-section {
        width: 100%;
        height: 55vh
    }
}

.persistent-scroll-arrow {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    color: #ffffff80;
    font-size: 1.2rem;
    pointer-events: auto;
    cursor: pointer;
    animation: arrowBounce 2s infinite;
    transition: opacity 1s ease
}

:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-primary: #ffffff;
    --color-dim: rgba(255, 255, 255, .4);
    --glass-bg: rgba(255, 255, 255, .05);
    --glass-border: rgba(255, 255, 255, .1);
    --font-main: "Inter", sans-serif;
    --font-mono: "Roboto Mono", monospace;
    --spacing-unit: 1rem
}

#cnscns-widget * {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

#cnscns-widget {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-main);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    height: 100%;
    position: relative;
    display: block
}

#cnscns-widget ::-webkit-scrollbar {
    width: 6px
}

#cnscns-widget ::-webkit-scrollbar-track {
    background: var(--color-bg)
}

#cnscns-widget ::-webkit-scrollbar-thumb {
    background: var(--color-dim);
    border-radius: 3px
}

#cnscns-widget ::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary)
}

#cnscns-widget .mono {
    font-family: var(--font-mono)
}

#cnscns-widget .glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border)
}

#cnscns-widget .glow-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, .5)
}

#cnscns-widget .wireframe-border {
    border: 1px solid var(--color-primary)
}

#cnscns-widget canvas {
    will-change: transform
}

#cnscns-widget .app-container,
#cnscns-widget .canvas-section,
#cnscns-widget .narrative-section {
    transform: translateZ(0);
    backface-visibility: hidden
}