/* ==========================================================================
   NEXBOOK — premium-intro.css · "The Handbook" — a hardcover book you flip through
   ========================================================================== */
#nb-intro { position: fixed; inset: 0; z-index: 2147483500; background: radial-gradient(ellipse at 50% 40%, #f3f1ea, #e9e6dd 70%, #dcd8cc); color: #111110; font-family: var(--font-ui, Inter, system-ui); overflow: hidden; opacity: 0; animation: nbIntroIn 0.8s ease 0.1s forwards; perspective: 2400px; }
#nb-intro.is-leaving { animation: nbIntroOut 0.7s cubic-bezier(0.65,0,0.35,1) forwards; }
@keyframes nbIntroIn { to { opacity: 1; } } @keyframes nbIntroOut { to { opacity: 0; } }
#nb-intro::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#nb-intro::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 120%, rgba(0,0,0,0.18), transparent 60%); }
.nbb-desk { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.nbb-book { position: relative; width: min(1240px, 94vw); aspect-ratio: 1.62; max-height: 84vh; transform-style: preserve-3d; transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)); transition: transform 0.5s cubic-bezier(0.22,1,0.36,1); }
.nbb-book::before { content: ""; position: absolute; left: 2%; right: 2%; bottom: -22px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.28); filter: blur(22px); z-index: -1; }
/* page stack edges */
.nbb-edge { position: absolute; top: 4px; bottom: 4px; width: 14px; background: repeating-linear-gradient(180deg, #fff 0 2px, #e4e1d8 2px 3px); border-radius: 2px; transition: width 0.6s cubic-bezier(0.22,1,0.36,1); }
.nbb-edge.l { left: 0; transform: translateX(calc(-1 * var(--w, 0px))); width: var(--w, 0px); } .nbb-edge.r { right: 0; transform: translateX(var(--w, 14px)); width: var(--w, 14px); }
.nbb-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(0,0,0,0.12), rgba(0,0,0,0.32), rgba(0,0,0,0.12)); z-index: 6; pointer-events: none; }
.nbb-spine::before, .nbb-spine::after { content: ""; position: absolute; top: 0; bottom: 0; width: 46px; pointer-events: none; }
.nbb-spine::before { right: 2px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.08)); } .nbb-spine::after { left: 2px; background: linear-gradient(90deg, rgba(0,0,0,0.1), transparent); }

/* spreads */
.nbi-scene { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; visibility: hidden; }
.nbi-scene.is-active { visibility: visible; }
.nbi-scene.is-under { visibility: visible; }
.pg { position: relative; background: #fbfbfa; overflow: hidden; }
.pg.left { border-radius: 14px 2px 2px 14px; box-shadow: inset -12px 0 24px -16px rgba(0,0,0,0.25); }
.pg.right { border-radius: 2px 14px 14px 2px; box-shadow: inset 12px 0 24px -16px rgba(0,0,0,0.25); }
.pg::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(17,17,16,0.035) 31px 32px); mix-blend-mode: multiply; }
.pg.left::before { background: none; }
.pg .art { position: absolute; inset: 6% 7%; }
.pg .art svg { width: 100%; height: 100%; overflow: visible; }
.pg .copy { position: absolute; inset: 0; padding: clamp(24px, 5vw, 64px) clamp(24px, 4.4vw, 60px); display: flex; flex-direction: column; justify-content: center; z-index: 3; }
.pg .pno { position: absolute; bottom: 18px; font: italic 600 0.78rem/1 'Playfair Display', Georgia, serif; color: rgba(17,17,16,0.45); letter-spacing: 0.08em; }
.pg.left .pno { left: 26px; } .pg.right .pno { right: 26px; }
.pg .mg { position: absolute; pointer-events: none; font: 600 1.05rem/1.1 'Caveat', cursive; color: rgba(17,17,16,0.55); transform: rotate(-6deg); }
.pg .mg svg { width: 40px; height: 30px; stroke: rgba(17,17,16,0.5); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; display: block; }
.pg .dog { position: absolute; right: 0; bottom: 0; width: 52px; height: 52px; cursor: grab; z-index: 8; background: linear-gradient(225deg, #e9e6dd 0 50%, rgba(0,0,0,0.18) 50% 52%, #fff 52%); clip-path: polygon(100% 0, 100% 100%, 0 100%); filter: drop-shadow(-2px -2px 3px rgba(0,0,0,0.2)); transition: width 0.3s, height 0.3s; }
.pg .dog:hover { width: 64px; height: 64px; } .pg .dog:active { cursor: grabbing; }
.nbi-kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 0.64rem/1 Inter, system-ui; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(17,17,16,0.55); margin-bottom: 16px; opacity: 0; transform: translateY(8px); transition: opacity 0.5s 0.1s, transform 0.5s 0.1s; }
.nbi-kicker i { width: 22px; height: 1px; background: #111110; opacity: 0.4; }
.nbi-scene h2 { margin: 0 0 14px; font: italic 800 clamp(1.9rem, 3.6vw, 3.6rem)/1.02 'Playfair Display', Georgia, serif; letter-spacing: -0.035em; }
.nbi-scene h2 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; } .nbi-scene h2 .w i { display: inline-block; font-style: inherit; transform: translateY(110%); transition: transform 0.8s cubic-bezier(0.22,1,0.36,1); }
.nbi-scene.is-in h2 .w i { transform: none; } .nbi-scene.is-in .nbi-kicker { opacity: 1; transform: none; }
.nbi-scene p.lead { margin: 0; font: 500 clamp(0.92rem, 1.15vw, 1.08rem)/1.55 Inter, system-ui; color: rgba(17,17,16,0.68); max-width: 42ch; opacity: 0; transform: translateY(14px); transition: opacity 0.7s 0.4s, transform 0.7s 0.4s cubic-bezier(0.22,1,0.36,1); }
.nbi-scene.is-in p.lead { opacity: 1; transform: none; }
.nbi-note { display: block; margin-top: 16px; font: 600 1.25rem/1.1 'Caveat', cursive; color: rgba(17,17,16,0.75); transform: rotate(-2deg); opacity: 0; transition: opacity 0.6s 0.7s; } .nbi-scene.is-in .nbi-note { opacity: 1; }

/* the turning leaf */
.nbb-leaf { position: absolute; top: 0; bottom: 0; left: 50%; width: 50%; transform-origin: left center; transform-style: preserve-3d; z-index: 10; will-change: transform; }
.nbb-leaf .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: #fbfbfa; transform: translateZ(0.01px); opacity: 1; }
.nbb-leaf .face.front { border-radius: 2px 14px 14px 2px; } .nbb-leaf .face.back { transform: rotateY(180deg); border-radius: 14px 2px 2px 14px; }
.nbb-leaf .face .pg { position: absolute; inset: 0; border-radius: inherit; }
.nbb-leaf .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(0,0,0,0) 40%); opacity: 0; }
.nbb-leaf .face.back .shade { background: linear-gradient(270deg, rgba(0,0,0,0.35), rgba(0,0,0,0) 40%); }
.nbb-leaf.turn { animation: nbbTurn 1.15s cubic-bezier(0.45,0.05,0.25,1) forwards; }
.nbb-leaf.turn .face.front { animation: nbbFaceF 1.15s step-end forwards; } .nbb-leaf.turn .face.back { animation: nbbFaceB 1.15s step-end forwards; }
.nbb-leaf.back .face.front { animation: nbbFaceB 1.15s step-end forwards; } .nbb-leaf.back .face.back { animation: nbbFaceF 1.15s step-end forwards; }
@keyframes nbbFaceF { 0%,49.9% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes nbbFaceB { 0%,49.9% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; } }
.nbb-leaf.turn .face.front .shade { animation: nbbShadeF 1.15s ease forwards; } .nbb-leaf.turn .face.back .shade { animation: nbbShadeB 1.15s ease forwards; }
.nbb-leaf.back { transform: rotateY(-180deg); animation: nbbTurnBack 1.15s cubic-bezier(0.45,0.05,0.25,1) forwards; }
@keyframes nbbTurn { 0% { transform: rotateY(0); } 100% { transform: rotateY(-180deg); } }
@keyframes nbbTurnBack { 0% { transform: rotateY(-180deg); } 100% { transform: rotateY(0); } }
@keyframes nbbShadeF { 0% { opacity: 0; } 45% { opacity: 0.8; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes nbbShadeB { 0% { opacity: 0; } 50% { opacity: 0; } 55% { opacity: 0.8; } 100% { opacity: 0; } }
.nbb-book.turning .nbb-spine { opacity: 0.6; }
.nbb-floor-shadow { position: absolute; left: 50%; top: 0; bottom: 0; width: 50%; pointer-events: none; z-index: 9; opacity: 0; background: linear-gradient(90deg, rgba(0,0,0,0.25), transparent 60%); }
.nbb-book.turning .nbb-floor-shadow { animation: nbbFloor 1.15s ease forwards; }
@keyframes nbbFloor { 0% { opacity: 0; } 40% { opacity: 0.6; } 100% { opacity: 0; } }

/* cover */
.nbb-cover { position: absolute; inset: 0; z-index: 12; transform-style: preserve-3d; transform-origin: left center; transform: rotateY(0); }
.nbb-cover.open { animation: nbbOpen 1.6s cubic-bezier(0.65,0,0.2,1) 0.5s forwards; }
@keyframes nbbOpen { 0% { transform: rotateY(0); } 100% { transform: rotateY(-180deg); } }
.nbb-cover .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 4px 18px 18px 4px; }
.nbb-cover .face.front { left: 50%; background: linear-gradient(135deg, #14213d, #0b1220 60%, #1a2540); box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7), inset 0 0 0 1px rgba(255,255,255,0.06); display: grid; place-items: center; overflow: hidden; }
.nbb-cover .face.front::before { content: ""; position: absolute; inset: 14px; border: 1.5px solid rgba(245,197,66,0.55); border-radius: 4px 12px 12px 4px; pointer-events: none; }
.nbb-cover .face.front::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 22px; background: linear-gradient(90deg, rgba(0,0,0,0.5), rgba(255,255,255,0.08), rgba(0,0,0,0.2)); }
.nbb-cover .face.back { left: 50%; transform: rotateY(180deg); background: #efece3; border-radius: 18px 4px 4px 18px; box-shadow: inset 0 0 60px rgba(0,0,0,0.08); }
.nbb-cover .face.back::after { content: "For the student who asks the senior."; position: absolute; inset: 0; display: grid; place-items: center; font: italic 600 1.1rem/1.2 'Playfair Display', Georgia, serif; color: rgba(17,17,16,0.45); padding: 40px; text-align: center; }
.nbb-cover-left { display: none; position: absolute; left: 0; top: 0; bottom: 0; width: 50%; z-index: 11; background: linear-gradient(225deg, #14213d, #0b1220 60%, #1a2540); border-radius: 18px 4px 4px 18px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7); opacity: 1; transition: opacity 0.4s 1.6s; }
.nbb-cover-left.open { opacity: 0; pointer-events: none; }
.nbb-title { text-align: center; color: #f5e7b3; transform: translateZ(1px); }
.nbb-title .emb { font: 800 clamp(2rem, 4.4vw, 3.8rem)/1 'Playfair Display', Georgia, serif; letter-spacing: 0.18em; background: linear-gradient(180deg, #fff3c4, #e2b64b 55%, #b8860b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.45)); }
.nbb-title .sub { margin-top: 14px; font: italic 600 0.9rem/1.3 'Playfair Display', Georgia, serif; letter-spacing: 0.12em; color: rgba(245,231,179,0.8); }
.nbb-title .orn { margin: 18px auto 0; width: 120px; height: 26px; stroke: rgba(245,197,66,0.8); fill: none; stroke-width: 1.3; stroke-linecap: round; }
.nbb-title .ed { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); font: 600 0.6rem/1 Inter, system-ui; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(245,231,179,0.55); white-space: nowrap; }
.nbb-cover .bm { position: absolute; right: 110px; top: -6px; width: 16px; height: 120px; background: #dc2626; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); box-shadow: 0 6px 12px -4px rgba(0,0,0,0.5); }
.nbb-book.closing { animation: nbbClose 0.9s cubic-bezier(0.65,0,0.35,1) forwards; }
@keyframes nbbClose { to { transform: translate(var(--dx, 0px), var(--dy, -300px)) scale(0.06) rotate(10deg); opacity: 0; } }

/* chrome */
.nbi-skip { position: absolute; top: 22px; right: 48px; z-index: 30; font: 600 0.72rem/1 Inter, system-ui; letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(17,17,16,0.16); background: rgba(255,255,255,0.7); color: #111110; cursor: pointer; backdrop-filter: blur(8px); }
.nbi-skip:hover { background: #111110; color: #fff; }
.nbi-brand { position: absolute; top: 24px; left: 28px; z-index: 30; font: 800 0.95rem/1 'Playfair Display', Georgia, serif; letter-spacing: 0.14em; display: flex; align-items: center; gap: 10px; color: #111110; }
.nbi-brand svg { width: 20px; height: 20px; stroke: #111110; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nbi-count { position: absolute; left: 28px; bottom: 24px; z-index: 30; font: italic 700 1rem/1 'Playfair Display', Georgia, serif; color: rgba(17,17,16,0.6); letter-spacing: 0.05em; }
.nbi-count b { color: #111110; font-size: 1.5rem; }
.nbi-ribbon { position: absolute; right: 14px; top: 0; z-index: 30; width: 16px; height: 64px; background: #dc2626; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); transform: translateY(calc(var(--p, 0) * (100vh - 64px))); transition: transform 0.6s cubic-bezier(0.22,1,0.36,1); box-shadow: 0 6px 14px -6px rgba(220,38,38,0.6); }
.nbi-nav { position: absolute; left: 50%; bottom: 22px; z-index: 30; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; }
.nbi-nav button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: #111110; color: #fff; border: 0; font: 600 0.78rem/1 Inter, system-ui; letter-spacing: 0.06em; cursor: pointer; box-shadow: 0 12px 30px -12px rgba(0,0,0,0.5); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), opacity 0.3s; }
.nbi-nav button.prev { background: #fff; color: #111110; border: 1px solid rgba(17,17,16,0.15); } .nbi-nav button:disabled { opacity: 0.35; pointer-events: none; }
.nbi-nav button:hover { transform: translateY(-2px); }
.nbi-nav svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nbi-hint { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); z-index: 29; font: 600 0.6rem/1 Inter, system-ui; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(17,17,16,0.4); white-space: nowrap; }
.nbi-dots { position: absolute; right: 42px; top: 50%; transform: translateY(-50%); z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.nbi-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(17,17,16,0.18); transition: height 0.35s, background 0.35s; } .nbi-dots i.is-on { height: 22px; border-radius: 3px; background: #111110; }

/* ---- Scene 04 · handoff diorama ---- */
.nbi-s4 .pg .art { inset: 4% 5%; }
.nbi-s4 .senior .arm, .nbi-s4 .junior .arm { transform-box: fill-box; transform-origin: top left; }
.nbi-s4.is-in .senior .arm { animation: nbiGive 4.2s ease-in-out 1.2s infinite; }
.nbi-s4.is-in .junior .arm { animation: nbiTake 4.2s ease-in-out 1.2s infinite; }
@keyframes nbiGive { 0%,12% { transform: rotate(10deg); } 28%,50% { transform: rotate(-42deg); } 66%,100% { transform: rotate(10deg); } }
@keyframes nbiTake { 0%,30% { transform: rotate(-10deg); } 46%,60% { transform: rotate(32deg); } 78%,100% { transform: rotate(-10deg); } }
.nbi-s4 .hbook { offset-path: path('M268 148 C 300 112, 330 112, 366 146'); offset-rotate: auto; opacity: 0; }
.nbi-s4.is-in .hbook { animation: nbiHand 4.2s cubic-bezier(0.45,0,0.3,1) 1.2s infinite; }
@keyframes nbiHand { 0%,26% { opacity: 1; offset-distance: 0%; } 30% { opacity: 1; } 50% { opacity: 1; offset-distance: 100%; } 64% { opacity: 1; offset-distance: 100%; } 70% { opacity: 0; } 100% { opacity: 0; offset-distance: 0%; } }
.nbi-s4 .sbook { opacity: 1; } .nbi-s4.is-in .sbook { animation: nbiSbook 4.2s step-end 1.2s infinite; } @keyframes nbiSbook { 0%,25% { opacity: 1; } 26%,100% { opacity: 0; } }
.nbi-s4 .jbook { opacity: 0; } .nbi-s4.is-in .jbook { animation: nbiJbook 4.2s step-end 1.2s infinite; } @keyframes nbiJbook { 0%,63% { opacity: 0; } 64%,95% { opacity: 1; } 96%,100% { opacity: 0; } }
.nbi-s4 .senior, .nbi-s4 .junior { transform-box: fill-box; transform-origin: center bottom; } .nbi-s4.is-in .senior, .nbi-s4.is-in .junior { animation: nbiNod 4.2s ease-in-out 1.2s infinite; } .nbi-s4.is-in .junior { animation-delay: 1.5s; }
@keyframes nbiNod { 0%,58% { transform: none; } 66% { transform: translateY(-6px) rotate(-2deg); } 74% { transform: none; } 100% { transform: none; } }
.nbi-s4 .spark { transform-box: fill-box; transform-origin: center; transform: scale(0); } .nbi-s4.is-in .spark { animation: nbiSpark 4.2s cubic-bezier(0.34,1.56,0.64,1) 1.2s infinite; }
@keyframes nbiSpark { 0%,60% { transform: scale(0); opacity: 0; } 68% { transform: scale(1.2) rotate(15deg); opacity: 1; } 80% { transform: scale(1); opacity: 1; } 92%,100% { transform: scale(0); opacity: 0; } }
.nbi-s4 .route { stroke-dasharray: 6 7; animation: nbDash 1.6s linear infinite; }
.nbi-s4 .tag { transform-box: fill-box; transform-origin: 8% 0; opacity: 0; } .nbi-s4.is-in .tag { animation: nbiTag 1.6s cubic-bezier(0.34,1.56,0.64,1) 2.6s forwards; }
@keyframes nbiTag { 0% { opacity: 0; transform: rotate(-16deg) translateY(-20px); } 30% { opacity: 1; } 60% { transform: rotate(5deg); } 100% { opacity: 1; transform: rotate(0); } }
.nbi-s4 .stamp { transform-box: fill-box; transform-origin: center; opacity: 0; } .nbi-s4.is-in .stamp { animation: nbiStamp 0.5s cubic-bezier(0.34,1.56,0.64,1) 4s forwards; }
@keyframes nbiStamp { 0% { opacity: 0; transform: scale(2.4) rotate(-12deg); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); } }
.nbi-s4 .leaf { transform-box: fill-box; transform-origin: bottom center; animation: nbiSway 5s ease-in-out infinite; } @keyframes nbiSway { 50% { transform: rotate(3deg); } }

/* ---- mobile: single page, flip whole page ---- */
@media (max-width: 860px) {
    .nbb-book { aspect-ratio: auto; width: 94vw; height: 82vh; max-height: none; }
    .nbi-scene { grid-template-columns: 1fr; grid-template-rows: 46% 54%; }
    .pg.left, .pg.right { border-radius: 14px 14px 0 0; box-shadow: none; } .pg.right { border-radius: 0 0 14px 14px; }
    .nbb-spine { left: 0; right: 0; top: 46%; width: auto; height: 2px; transform: none; background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.3), rgba(0,0,0,0.12)); } .nbb-spine::before, .nbb-spine::after { display: none; }
    .nbb-leaf { left: 0; top: 0; width: 100%; transform-origin: center top; } .nbb-leaf .face.back { transform: rotateX(180deg); }
    @keyframes nbbTurn { 0% { transform: rotateX(0); } 100% { transform: rotateX(-180deg); } } @keyframes nbbTurnBack { 0% { transform: rotateX(-180deg); } 100% { transform: rotateX(0); } }
    .nbb-leaf .face.front .shade { background: linear-gradient(180deg, rgba(0,0,0,0.3), transparent 40%); } .nbb-leaf .face.back .shade { background: linear-gradient(0deg, rgba(0,0,0,0.3), transparent 40%); }
    .nbb-cover, .nbb-cover .face.front, .nbb-cover .face.back { left: 0; } .nbb-cover { transform-origin: center top; } @keyframes nbbOpen { 0% { transform: rotateX(0); } 100% { transform: rotateX(-180deg); } } .nbb-cover .face.back { transform: rotateX(180deg); }
    .nbb-cover-left { display: none; } .nbb-edge { display: none; } .nbb-floor-shadow { display: none; }
    .pg .copy { padding: 18px 20px 40px; justify-content: flex-start; } .pg .art { inset: 4% 5%; }
    .nbi-scene h2 { font-size: 1.7rem; } .nbi-dots { right: 8px; } .nbi-ribbon { right: 4px; width: 12px; } .nbi-hint { display: none; }
}
/* generic stroke-draw */
.nbi-draw path, .nbi-draw circle, .nbi-draw rect, .nbi-draw ellipse, .nbi-draw line, .nbi-draw polyline, .nbi-draw polygon { stroke: #111110; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; stroke-dashoffset: 900; }
.nbi-scene.is-in .nbi-draw path, .nbi-scene.is-in .nbi-draw circle, .nbi-scene.is-in .nbi-draw rect, .nbi-scene.is-in .nbi-draw ellipse, .nbi-scene.is-in .nbi-draw line, .nbi-scene.is-in .nbi-draw polyline, .nbi-scene.is-in .nbi-draw polygon { animation: nbiDraw 2.2s cubic-bezier(0.22,1,0.36,1) forwards; }
.nbi-draw .l1 * { animation-delay: 0s !important; } .nbi-draw .l2 * { animation-delay: 0.35s !important; } .nbi-draw .l3 * { animation-delay: 0.7s !important; } .nbi-draw .l4 * { animation-delay: 1.05s !important; } .nbi-draw .l5 * { animation-delay: 1.4s !important; }
.nbi-draw .fill { fill: var(--f, #fff) !important; }
@keyframes nbiDraw { to { stroke-dashoffset: 0; } }
.nbi-layer { position: absolute; inset: 0; will-change: transform; transition: transform 0.25s ease-out; }

/* ---- Scene 01 · campus ---- */
.nbi-s1 .art { height: 100%; }
.nbi-s1 .win { fill: transparent; transition: fill 0.6s; } .nbi-s1.is-lit .win { fill: #f5c542; fill-opacity: 0.9; animation: nbWin 4s ease-in-out infinite; }
.nbi-s1 .star { opacity: 0; } .nbi-s1.is-night .star { opacity: 1; animation: nbiTw 3s ease-in-out infinite; } .nbi-s1.is-night .pg.left { background: radial-gradient(ellipse at 50% 0%, #1e293b, #0f172a 70%); }
.nbi-s1.is-night .nbi-draw * { stroke: #e2e8f0; } .nbi-s1.is-night .pg.left .mg { color: rgba(248,250,252,0.7); } .nbi-s1.is-night .pg.left .mg svg { stroke: rgba(248,250,252,0.6); }
@keyframes nbiTw { 50% { opacity: 0.3; } }
.nbi-s1 .cyc { offset-path: path('M20 470 C 200 470, 380 440, 560 430 S 900 430, 1180 470'); offset-rotate: 0deg; animation: nbiRide 14s linear infinite; }
@keyframes nbiRide { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.nbi-s1 .cyc .wheel { transform-box: fill-box; transform-origin: center; animation: nbiSpin 1s linear infinite; }
@keyframes nbiSpin { to { transform: rotate(360deg); } }
.nbi-s1 .swap { transform-box: fill-box; transform-origin: center; animation: nbiSwap 3s ease-in-out infinite; }
@keyframes nbiSwap { 0%,100% { transform: translateX(0); } 50% { transform: translateX(22px); } }
.nbi-s1 .page { transform-box: fill-box; transform-origin: left center; animation: nbiPage 2.4s ease-in-out infinite; }
@keyframes nbiPage { 50% { transform: rotateY(-60deg) skewY(-6deg); } }

/* ---- Scene 02 · bookshelf ---- */
.nbi-shelf { display: flex; flex-direction: column; gap: 0; height: 100%; justify-content: center; perspective: 1200px; }
.nbi-row { position: relative; display: flex; align-items: flex-end; gap: 8px; height: 78px; padding: 0 22px 0 18px; cursor: pointer; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.5s, filter 0.5s; }
.nbi-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 10px; border-radius: 2px; background: linear-gradient(#9a7552, #6b4b2f); box-shadow: 0 10px 18px -8px rgba(0,0,0,0.5); }
.nbi-row .lbl { position: absolute; left: -4px; top: -6px; font: 800 0.6rem/1 Inter, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: #fff; background: var(--course, #111110); padding: 5px 9px; border-radius: 999px; transform: rotate(-3deg); box-shadow: 0 4px 10px -4px rgba(0,0,0,0.5); }
.nbi-row .sp { --h: 56px; width: 24px; height: var(--h); border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, rgba(0,0,0,0.22), transparent 18%, rgba(255,255,255,0.18) 40%, transparent 62%, rgba(0,0,0,0.25)), var(--course, #444); position: relative; box-shadow: 0 8px 14px -8px rgba(0,0,0,0.5); transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1); }
.nbi-row .sp span { position: absolute; inset: 0; display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); font: 700 8px/1 Inter, system-ui; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.92); }
.nbi-row .sp:nth-child(3n) { --h: 64px; filter: brightness(0.9); } .nbi-row .sp:nth-child(4n) { --h: 50px; width: 20px; filter: brightness(1.15); } .nbi-row .sp:nth-child(5n) { transform: rotate(-7deg); transform-origin: bottom left; }
.nbi-row:hover { transform: translateZ(30px) translateX(6px); } .nbi-row:hover .sp { transform: translateY(-4px); }
.nbi-shelf.has-pick .nbi-row:not(.is-on) { opacity: 0.35; filter: grayscale(0.6); }
.nbi-row.is-on { transform: translateZ(50px) translateX(10px) scale(1.02); }
.nbi-row.is-on::before { content: ""; position: absolute; inset: -40px -30px -10px; background: radial-gradient(ellipse at 50% 0%, rgba(245,197,66,0.45), transparent 65%); pointer-events: none; z-index: -1; }
.nbi-lamp { position: absolute; right: -10px; top: -12px; width: 90px; height: 90px; z-index: 4; opacity: 0; transform: translateY(-10px); transition: opacity 0.5s, transform 0.5s; pointer-events: none; }
.nbi-lamp svg { width: 100%; height: 100%; stroke: #111110; fill: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.nbi-lamp .beam { fill: rgba(245,197,66,0.35); stroke: none; opacity: 0; transition: opacity 0.4s 0.2s; }
.nbi-shelf.has-pick .nbi-lamp { opacity: 1; transform: none; } .nbi-shelf.has-pick .nbi-lamp .beam { opacity: 1; }
.nbi-years { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.nbi-years span { font: 600 0.66rem/1 Inter, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(17,17,16,0.55); margin-right: 4px; }
.nbi-pin { width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; font: 800 0.9rem/1 'Playfair Display', Georgia, serif; color: #fff; background: linear-gradient(180deg, #3a3a38, #111110); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 2px #fff, 0 0 0 3.5px #c9c6bd, 0 6px 12px -6px rgba(0,0,0,0.6); transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); position: relative; }
.nbi-pin::before { content: ""; position: absolute; left: 18%; top: 8%; width: 55%; height: 32%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.5), transparent); }
.nbi-pin:hover { transform: translateY(-3px) rotate(-6deg); } .nbi-pin.is-on { background: linear-gradient(180deg, #ffd95e, #b8860b); color: #111110; transform: scale(1.12) rotate(-8deg); }
.nbi-picked { margin-top: 16px; font: 600 1.25rem/1.1 'Caveat', cursive; color: #111110; min-height: 1.4em; opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.4s; }
.nbi-picked.is-on { opacity: 1; transform: none; }

/* ---- Scene 03 · Thinkly ---- */
.nbi-s3 .art { display: grid; place-items: center; }
.nbi-orbit { position: relative; width: min(520px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.nbi-glow { position: absolute; width: 62%; height: 62%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fdfbf6, #f5eedf 45%, #e8dcc8 100%); filter: blur(28px); opacity: 0.8; animation: nbiBreathe 4.5s ease-in-out infinite; }
@keyframes nbiBreathe { 50% { transform: scale(1.12); opacity: 1; } }
.nbi-bot { position: relative; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle at 50% 42%, #fdfbf6 0%, #faf5ec 46%, #f5eedf 78%, #f0e8d4 100%); box-shadow: 0 30px 60px -20px rgba(0,0,0,0.18), inset 0 -10px 24px rgba(0,0,0,0.05); display: grid; place-items: center; animation: nbiFloat 5s ease-in-out infinite; z-index: 2; }
@keyframes nbiFloat { 50% { transform: translateY(-10px); } }
.nbi-bot .screen { width: 118px; height: 54px; border-radius: 28px; background: #111110; display: grid; place-items: center; box-shadow: inset 0 0 20px rgba(17,17,16,0.08); }
.nbi-bot .screen svg { width: 90px; height: 34px; overflow: visible; } .nbi-bot .eye { stroke: #bffcff; stroke-width: 7; stroke-linecap: round; fill: none; filter: drop-shadow(0 0 6px #7de3ff); transition: transform 0.25s ease-out, d 0.3s; }
.nbi-bot.blink .eye { animation: nbiBlink 0.25s; } @keyframes nbiBlink { 50% { transform: scaleY(0.1) translateY(var(--ey, 0)); } }
.nbi-card { position: absolute; width: 150px; padding: 12px 12px 10px; border-radius: 16px; background: #fff; border: 1px solid rgba(17,17,16,0.1); box-shadow: 0 18px 40px -20px rgba(0,0,0,0.35); display: flex; gap: 10px; align-items: flex-start; cursor: pointer; transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s; z-index: 3; --r: 0deg; animation: nbiOrbit 28s linear infinite; animation-delay: var(--d, 0s); }
.nbi-card:hover { z-index: 5; box-shadow: 0 24px 50px -18px rgba(0,0,0,0.45); animation-play-state: paused; }
@keyframes nbiOrbit { from { transform: rotate(var(--a)) translateX(215px) rotate(calc(var(--a) * -1)); } to { transform: rotate(calc(var(--a) + 360deg)) translateX(215px) rotate(calc(var(--a) * -1 - 360deg)); } }
.nbi-card svg { width: 26px; height: 26px; flex: none; stroke: #111110; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.nbi-card b { display: block; font: 700 0.78rem/1.2 Inter, system-ui; } .nbi-card small { display: block; margin-top: 3px; font: 500 0.66rem/1.3 Inter, system-ui; color: rgba(17,17,16,0.6); }
@media (max-width: 900px) { .nbi-card { width: 122px; padding: 9px; } @keyframes nbiOrbit { from { transform: rotate(var(--a)) translateX(150px) rotate(calc(var(--a) * -1)); } to { transform: rotate(calc(var(--a) + 360deg)) translateX(150px) rotate(calc(var(--a) * -1 - 360deg)); } } .nbi-bot { width: 140px; height: 140px; } }
.nbi-chat { margin-top: 22px; display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.nbi-chat div { padding: 10px 14px; border-radius: 16px; font: 500 0.85rem/1.45 Inter, system-ui; max-width: 90%; }
.nbi-chat .u { align-self: flex-end; background: #111110; color: #fff; border-bottom-right-radius: 4px; }
.nbi-chat .a { align-self: flex-start; background: #fff; border: 1px solid rgba(17,17,16,0.1); border-bottom-left-radius: 4px; min-height: 2.4em; }
.nbi-chat .a .cur { display: inline-block; width: 2px; height: 1em; background: #111110; vertical-align: -2px; margin-left: 1px; animation: nbiCur 0.8s steps(2) infinite; } @keyframes nbiCur { 50% { opacity: 0; } }

/* ---- Scene 04 · journey ---- */
.nbi-s4 .art svg { overflow: visible; }
.nbi-book { offset-path: path('M70 190 C 180 120, 250 250, 360 170 S 520 110, 600 190'); offset-rotate: 0deg; transform-box: fill-box; }
.nbi-s4.is-in .nbi-book { animation: nbiTravel 7s cubic-bezier(0.45,0,0.2,1) 0.8s forwards; }
@keyframes nbiTravel { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.nbi-stop { transform-box: fill-box; transform-origin: center bottom; transform: scale(0); } .nbi-s4.is-in .nbi-stop { animation: nbiPop 0.6s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.nbi-s4.is-in .nbi-stop:nth-of-type(1) { animation-delay: 0.8s; } .nbi-s4.is-in .nbi-stop:nth-of-type(2) { animation-delay: 3s; } .nbi-s4.is-in .nbi-stop:nth-of-type(3) { animation-delay: 5.2s; } .nbi-s4.is-in .nbi-stop:nth-of-type(4) { animation-delay: 7.6s; }
@keyframes nbiPop { to { transform: scale(1); } }
.nbi-route { stroke-dasharray: 7 7; animation: nbDash 1.6s linear infinite; }
.nbi-tag { transform-box: fill-box; transform-origin: 10% 0; opacity: 0; } .nbi-s4.is-in .nbi-tag { animation: nbiTag 1.8s cubic-bezier(0.34,1.56,0.64,1) 4.2s forwards; }
@keyframes nbiTag { 0% { opacity: 0; transform: rotate(-14deg) translateY(-20px); } 30% { opacity: 1; } 60% { transform: rotate(5deg); } 100% { opacity: 1; transform: rotate(0); } }
.nbi-stamp { transform-box: fill-box; transform-origin: center; opacity: 0; } .nbi-s4.is-in .nbi-stamp { animation: nbiStamp 0.5s cubic-bezier(0.34,1.56,0.64,1) 8.4s forwards; }
@keyframes nbiStamp { 0% { opacity: 0; transform: scale(2.4) rotate(-12deg); } 100% { opacity: 1; transform: scale(1) rotate(-12deg); } }

/* ---- Scene 05 · ID card ---- */
.nbi-s5 .art { display: grid; place-items: center; perspective: 1600px; }
.nbi-id { position: relative; width: min(420px, 84vw); aspect-ratio: 1.58; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(0.22,1,0.36,1); cursor: pointer; }
.nbi-id.is-flipped { transform: rotateY(180deg); }
.nbi-id > div { position: absolute; inset: 0; border-radius: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.45), 0 0 0 1px rgba(17,17,16,0.08); }
.nbi-id .front { background: #fff; display: grid; grid-template-columns: 110px 1fr; }
.nbi-id .front .stripe { background: var(--course, #111110); display: grid; place-items: center; position: relative; }
.nbi-id .front .stripe img { width: 72px; height: 72px; border-radius: 16px; border: 3px solid rgba(255,255,255,0.9); box-shadow: 0 10px 20px -8px rgba(0,0,0,0.4); }
.nbi-id .front .stripe::after { content: "NEXBOOK"; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 800 0.6rem/1 'Playfair Display', Georgia, serif; letter-spacing: 0.3em; color: rgba(255,255,255,0.85); }
.nbi-id .front .info { padding: 22px 22px 18px; display: flex; flex-direction: column; }
.nbi-id .front .k { font: 600 0.58rem/1 Inter, system-ui; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(17,17,16,0.5); }
.nbi-id .front .nm { font: 800 1.55rem/1.05 'Playfair Display', Georgia, serif; margin: 6px 0 10px; letter-spacing: -0.02em; min-height: 1.1em; }
.nbi-id .front .nm.hand { font: 600 1.7rem/1 'Caveat', cursive; }
.nbi-id .front .row { display: flex; gap: 18px; } .nbi-id .front .row div b { display: block; font: 700 0.82rem/1.2 Inter, system-ui; }
.nbi-id .front .mem { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; }
.nbi-id .front .mem b { font: italic 800 1.1rem/1 'Playfair Display', Georgia, serif; }
.nbi-holo { width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(from var(--a, 0deg), #ffd6e8, #fff3b0, #c8f7dc, #c4e0ff, #e8ccff, #ffd6e8); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8), 0 2px 6px rgba(0,0,0,0.2); position: relative; }
.nbi-holo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.8) 50%, transparent 70%); background-size: 250% 100%; background-position: var(--sx, 0%) 0; }
.nbi-id .back { background: #111110; color: #fff; transform: rotateY(180deg); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.nbi-id .back .k { font: 600 0.58rem/1 Inter, system-ui; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.nbi-id .back .q { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); font: 600 0.82rem/1.2 Inter, system-ui; }
.nbi-id .back .q svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nbi-id .back .bar { margin-top: auto; height: 34px; border-radius: 6px; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 5px, #fff 5px 6px, transparent 6px 10px); opacity: 0.85; }
.nbi-flipHint { position: absolute; bottom: -34px; left: 50%; transform: translateX(-50%); font: 600 0.62rem/1 Inter, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(17,17,16,0.45); white-space: nowrap; }
.nbi-name { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.nbi-name input { flex: 1; max-width: 280px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid rgba(17,17,16,0.15); background: #fff; font: 600 1.35rem/1 'Caveat', cursive; color: #111110; outline: none; }
.nbi-name input:focus { border-color: #111110; box-shadow: 0 0 0 4px rgba(17,17,16,0.06); }
.nbi-cta { margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px; border-radius: 999px; background: #111110; color: #fff; border: 0; font: 700 0.95rem/1 Inter, system-ui; cursor: pointer; box-shadow: 0 16px 36px -14px rgba(0,0,0,0.6); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1); }
.nbi-cta:hover { transform: translateY(-2px); } .nbi-cta svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nbi-s5 .sky { position: absolute; left: 0; right: 0; bottom: 0; height: 140px; z-index: 0; opacity: 0.9; }
.nbi-s5 .sky svg { width: 100%; height: 100%; display: block; }
.nbi-s5 .sky .win { animation: nbWin 4s ease-in-out infinite; }
.nbi-id.is-pocket { animation: nbiPocket 0.9s cubic-bezier(0.65,0,0.35,1) forwards; }
@keyframes nbiPocket { to { transform: translate(var(--dx, 0px), var(--dy, -400px)) scale(0.08) rotate(12deg); opacity: 0; } }

/* ---- Spotlight tour ---- */
.nbs-overlay { position: fixed; inset: 0; z-index: 2147483400; pointer-events: auto; }
.nbs-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nbs-overlay .nbs-dim { fill: rgba(17,17,16,0.62); }
.nbs-overlay .nbs-hole { transition: all 0.55s cubic-bezier(0.22,1,0.36,1); }
.nbs-glow { position: fixed; border-radius: inherit; pointer-events: none; z-index: 2147483401; box-shadow: 0 0 0 4px rgba(212,160,23,0.35), 0 0 28px 4px rgba(212,160,23,0.12); transition: all 0.55s cubic-bezier(0.22,1,0.36,1); }
.nbs-card { position: fixed; z-index: 2147483402; width: 320px; background: #fbfbfa; border: 1.5px solid rgba(17,17,16,0.08); border-radius: 18px; box-shadow: 0 20px 50px -16px rgba(17,17,16,0.28), 0 0 0 1px rgba(17,17,16,0.04); padding: 22px 20px 18px; font-family: Inter, system-ui, sans-serif; transform: scale(0.92) translateY(8px); opacity: 0; transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease; pointer-events: auto; }
.nbs-card.is-in { transform: scale(1) translateY(0); opacity: 1; }
.nbs-card.is-out { transform: scale(0.88) translateY(12px); opacity: 0; }
.nbs-card .nbs-emo { position: absolute; top: -22px; right: 20px; width: 44px; height: 44px; }
.nbs-card .nbs-emo svg { width: 100%; height: 100%; overflow: visible; }
.nbs-card .nbs-ill { display: block; width: 48px; height: 48px; min-height: 48px; max-height: 48px; margin-bottom: 10px; overflow: hidden; flex-shrink: 0; }
.nbs-card .nbs-ill svg { display: block; width: 48px; height: 48px; stroke: #111110; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.nbs-card h4 { margin: 0 0 4px; font: 700 1.05rem/1.3 'Playfair Display', Georgia, serif; color: #111110; }
.nbs-card p { margin: 0 0 16px; font: 400 0.88rem/1.5 Inter, system-ui; color: rgba(17,17,16,0.7); }
.nbs-card .nbs-foot { display: flex; align-items: center; gap: 10px; }
.nbs-card .nbs-dots { display: flex; gap: 6px; flex: 1; }
.nbs-card .nbs-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(17,17,16,0.15); transition: background 0.3s, transform 0.3s; }
.nbs-card .nbs-dots i.is-on { background: #d42b2b; transform: scale(1.25); }
.nbs-card .nbs-skip { border: none; background: none; font: 500 0.78rem/1 Inter, system-ui; color: rgba(17,17,16,0.4); cursor: pointer; padding: 6px 8px; transition: color 0.2s; }
.nbs-card .nbs-skip:hover { color: rgba(17,17,16,0.7); }
.nbs-card .nbs-next { border: none; background: #111110; color: #fff; font: 600 0.82rem/1 Inter, system-ui; padding: 10px 18px; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 14px -4px rgba(17,17,16,0.3); }
.nbs-card .nbs-next:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -4px rgba(17,17,16,0.4); }
.nbs-card .nbs-next svg { width: 14px; height: 14px; stroke: #d4a017; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nbs-finish { text-align: center; }
.nbs-finish .nbs-emo { position: static; width: 56px; height: 56px; margin: 0 auto 12px; }
.nbs-finish h4 { font-size: 1.15rem; margin-bottom: 6px; }
.nbs-finish p { margin-bottom: 0; }
.nbs-finish .nbs-card-fold { animation: nbsFold 0.7s 1.6s cubic-bezier(0.65,0,0.35,1) forwards; transform-origin: top center; }
@keyframes nbsFold { to { transform: perspective(600px) rotateX(90deg) scaleY(0); opacity: 0; } }
@media (max-width: 600px) {
    .nbs-card { width: calc(100vw - 32px); left: 16px !important; right: 16px !important; bottom: 80px !important; top: auto !important; border-radius: 16px; }
}
.nb-return { position: fixed; left: 20px; bottom: 100px; z-index: 60; width: 260px; padding: 16px 18px 14px; background: #fff7d6; border-radius: 4px 14px 14px 14px; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.4); transform: rotate(-2deg); font: 500 0.9rem/1.4 Inter, system-ui; color: #111110; animation: nbRise 0.7s cubic-bezier(0.22,1,0.36,1) 1.2s both; }
.nb-return::before { content: ""; position: absolute; left: 50%; top: -8px; width: 34px; height: 14px; transform: translateX(-50%) rotate(2deg); background: rgba(245,197,66,0.6); }
.nb-return b { display: block; font: 600 1.3rem/1 'Caveat', cursive; margin-bottom: 6px; }
.nb-return .r { display: flex; gap: 8px; margin-top: 10px; } .nb-return button { font: 700 0.74rem/1 Inter, system-ui; padding: 8px 12px; border-radius: 999px; border: 1.5px solid #111110; background: #111110; color: #fff; cursor: pointer; } .nb-return button.g { background: transparent; color: #111110; }
.nb-your-shelf { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-3deg); z-index: 4; padding: 7px 14px; background: rgba(245,197,66,0.9); font: 800 0.62rem/1 Inter, system-ui; letter-spacing: 0.16em; text-transform: uppercase; color: #111110; border-radius: 2px; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.nb-hi { font: 600 1.45rem/1 'Caveat', cursive !important; background: rgba(255,255,255,0.85) !important; }

@media (max-width: 860px) {
    .nbi-row { height: 58px; padding: 0 14px; } .nbi-row .sp { width: 18px; --h: 42px; } .nbi-row .sp:nth-child(3n) { --h: 48px; } .nbi-row .sp:nth-child(4n) { --h: 38px; width: 16px; }
    .nbi-lamp { width: 64px; height: 64px; right: -4px; } .nbi-chat { display: none; } .nbi-s5 .sky { height: 90px; }
}
@media (prefers-reduced-motion: reduce) { #nb-intro * { animation-duration: 0.01s !important; animation-delay: 0s !important; transition-duration: 0.01s !important; } .nbi-draw * { stroke-dashoffset: 0 !important; } }

/* fixes */

.nbi-ribbon { right: 14px; } .nbi-skip { right: 48px; } .nbi-dots { right: 42px; }
.nbi-card { left: 50%; top: 50%; margin: -38px 0 0 -75px; width: 150px !important; min-width: 150px; max-width: 150px; writing-mode: horizontal-tb !important; flex-wrap: nowrap; word-break: normal; overflow-wrap: normal; }
.nbi-card > span { flex: 1 1 auto; min-width: 0; display: block; }
.nbi-card b, .nbi-card small { white-space: normal; word-break: normal; }
.nbi-id .front .stripe::after { white-space: nowrap; }
.nbi-s4 .art { height: 100%; }
@media (max-width: 900px) { .nbi-card { margin: -30px 0 0 -61px; width: 122px !important; min-width: 122px; max-width: 122px; } }
.nbi-scene .art .nbi-card svg { width: 26px !important; height: 26px !important; flex: none; }
.nbi-scene .art .nbi-bot .screen svg { width: 90px !important; height: 34px !important; }
.nbi-scene .art .nbi-lamp svg { width: 100%; height: 100%; }
.nbi-nav button { white-space: nowrap; }
@media (max-width: 860px) { .pg.right .mg { display: none; } .nbi-nav button { padding: 11px 14px; font-size: 0.72rem; } }

/* leaf clones carry the scene class so scene-scoped styles apply mid-turn */
.nbb-leaf .nbb-clone { position: absolute; inset: 0; display: block !important; visibility: visible !important; }
.nbb-leaf .nbb-clone .pg { position: absolute; inset: 0; }
.nbb-leaf .nbb-clone .pg::before { display: none; }
.nbi-card svg { width: 26px !important; height: 26px !important; flex: none; }
.nbi-bot .screen svg { width: 90px !important; height: 34px !important; }
.nbi-lamp svg { width: 100% !important; height: 100% !important; }
.nbi-s5 .pg .art, .nbb-clone.nbi-s5 .pg .art { display: grid; place-items: center; }
.nbi-s5 .sky, .nbb-clone.nbi-s5 .sky { position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 140px; z-index: 0; }
.nbb-leaf .nbi-card { animation-play-state: paused; }

/* v3 fixes */
#nb-intro::after { pointer-events: none !important; }
.nbi-cta { align-self: flex-start; width: auto; }
.nbi-name { align-self: flex-start; width: 100%; max-width: 320px; }
.nbi-name input { width: 100%; max-width: none; position: relative; z-index: 5; }
.pg .copy > * { pointer-events: auto; }
.nbb-book { transform: none !important; }
.nbi-s5 .pg { cursor: pointer; }
.nbi-s4 .cloud { animation: nbiDrift 30s linear infinite; } .nbi-s4 .cloud.c2 { animation-duration: 42s; animation-delay: -14s; }
@keyframes nbiDrift { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
.nbi-s4 .sun { transform-box: fill-box; transform-origin: center; animation: nbiSpin 60s linear infinite; }
.nbi-s4 .birds { animation: nbiDrift 26s linear infinite reverse; }
.nbi-s4 .fl { transform-box: fill-box; transform-origin: left center; animation: nbiFlag 1.6s ease-in-out infinite alternate; } @keyframes nbiFlag { to { transform: skewY(6deg) scaleX(0.94); } }
.nbi-s4 .tree circle { transform-box: fill-box; transform-origin: bottom center; animation: nbiSway 5s ease-in-out infinite; } .nbi-s4 .tree.r circle { animation-delay: -2s; }
