/* NARBE Color Splash - a bright art-studio look: cream paper, chunky sticker-like buttons,
   paint splashes. The highlight is color AND thickness AND a lift, never color alone.
   Simple High Contrast (data-cvi="1") is white on black with thick bright outlines; everything stays visible. */

:root {
    --paper: #FFF7EA;
    --ink: #2B1B3D;
    --ink-soft: #5B4A6E;
    --card: #FFFFFF;
    --coral: #FF5A5F;
    --sun: #FFD23F;
    --teal: #3EC1D3;
    --leaf: #59C97B;
    --grape: #9B6BFF;
    --hl: #FFD400;
    --hl-ink: #1A1206;
    --outline: #FFD400;
    --radius: 22px;
    --shadow: 0 6px 0 rgba(43, 27, 61, 0.9);
    --font: 'Baloo 2', 'Segoe UI Rounded', 'Arial Rounded MT Bold', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    background-image:
        radial-gradient(circle at 4% 8%, rgba(255, 90, 95, .16) 0 90px, transparent 91px),
        radial-gradient(circle at 96% 12%, rgba(62, 193, 211, .16) 0 120px, transparent 121px),
        radial-gradient(circle at 92% 94%, rgba(255, 210, 63, .22) 0 110px, transparent 111px),
        radial-gradient(circle at 6% 92%, rgba(155, 107, 255, .14) 0 100px, transparent 101px);
    -webkit-user-select: none; user-select: none;
}
button { font-family: inherit; color: inherit; }
.ncs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#ncs { position: fixed; inset: 0; }
.ncs-screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: clamp(10px, 2vh, 22px) clamp(12px, 2.4vw, 32px); gap: clamp(8px, 1.6vh, 18px); }
.ncs-screen.show { display: flex; }
.ncs-center { align-items: center; justify-content: center; }

/* --- buttons ---------------------------------------------------------------------------------- */
.ncs-btn {
    position: relative; cursor: pointer; border: 4px solid var(--ink); background: var(--card);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 16px; font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 700; line-height: 1.1; min-height: 64px; transition: transform .15s ease, box-shadow .15s ease, outline-color .1s;
    outline: 0 solid transparent; outline-offset: 4px;
}
.ncs-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(43, 27, 61, .9); }
.ncs-chip { display: inline-flex; width: 1.7em; height: 1.7em; flex: none; }
.ncs-icon { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.ncs-icon .ncs-i-fill { fill: var(--sun); }
.ncs-icon .ncs-i-fill2 { fill: var(--teal); }
.ncs-icon .ncs-i-solid { fill: currentColor; stroke: none; }

/* The highlight: a thick band in the highlight color, a dark keyline, a glow and a small lift. It never makes a
   thing bigger: grown items (and whole rows) ran past the screen and card edges and their highlight was cut off
   (2026-11-27). Color AND thickness, never color alone (ACCESSIBILITY.md). */
.ncs-focus {
    outline: 8px solid var(--hl) !important; outline-offset: 3px;
    box-shadow: 0 0 0 14px rgba(0, 0, 0, .55), 0 0 34px 10px var(--hl) !important;
    transform: translateY(-4px); z-index: 5;
}
#ncs[data-motion="full"] .ncs-focus { animation: ncs-lift .9s ease-in-out infinite alternate; }
@keyframes ncs-lift { from { transform: translateY(-2px); } to { transform: translateY(-5px); } }
/* A row (or a More colors group) is a frame round its buttons: its highlight is drawn INSIDE the frame, and it never
   moves or grows, so nothing reaches past the screen edge. The row's padding leaves room for the band. */
.ncs-row.ncs-focus, .ncs-more-group.ncs-focus {
    transform: none !important; animation: none !important; outline-offset: -8px; border-radius: 26px;
    box-shadow: inset 0 0 0 12px rgba(0, 0, 0, .45), inset 0 0 30px 14px rgba(255, 212, 0, .5) !important; background: rgba(255, 212, 0, .16);
}
.ncs-scan-status { position: absolute; top: 8px; right: 12px; z-index: 40; pointer-events: none; }

/* --- the bookshelf ------------------------------------------------------------------------------- */
.ncs-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ncs-brand { display: flex; align-items: center; gap: 12px; }
.ncs-logo svg { width: clamp(52px, 7vh, 78px); height: auto; display: block; filter: drop-shadow(0 4px 0 rgba(43, 27, 61, .85)); }
.ncs-brand-words { display: flex; flex-direction: column; line-height: .9; }
.ncs-brand-narbe { font-size: clamp(13px, 1.4vw, 17px); letter-spacing: .3em; font-weight: 800; color: var(--ink-soft); }
/* The title's outline is UNDER the letters: the title itself in ink with a ring of text-shadows, and a rainbow copy
   (::after) laid exactly on top. Not -webkit-text-stroke: Baloo 2's letters are built from overlapping pieces and a
   stroke traces every piece, which drew lines across the l, r, p and h (2026-11-27). Ben's Food Court's title has
   the same fix. --o = outline width. */
.ncs-brand-title { position: relative; margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -.01em; color: var(--ink);
    --o: 2.5px; --od: calc(var(--o) * .7071);
    text-shadow: var(--o) 0 0 var(--ink), calc(var(--o) * -1) 0 0 var(--ink), 0 var(--o) 0 var(--ink), 0 calc(var(--o) * -1) 0 var(--ink),
        var(--od) var(--od) 0 var(--ink), calc(var(--od) * -1) var(--od) 0 var(--ink), var(--od) calc(var(--od) * -1) 0 var(--ink), calc(var(--od) * -1) calc(var(--od) * -1) 0 var(--ink),
        0 calc(var(--o) + 3px) 0 var(--ink); }
.ncs-brand-title::after { content: attr(data-text); position: absolute; inset: 0; text-shadow: none; color: transparent;
    background: linear-gradient(90deg, var(--coral), #FF9F1C 30%, var(--leaf) 55%, var(--teal) 75%, var(--grape));
    -webkit-background-clip: text; background-clip: text; }
.ncs-head-sub { margin: 0; font-size: clamp(18px, 2.1vw, 26px); font-weight: 700; color: var(--ink-soft); }
.ncs-mode-chip { margin-left: auto; background: var(--ink); color: #fff; border-radius: 999px; padding: 4px 16px; font-weight: 800; font-size: clamp(15px, 1.6vw, 20px); }

.ncs-continue {
    display: flex; align-items: center; gap: 18px; text-align: left; padding: 10px 18px; min-height: 0; height: clamp(84px, 13vh, 130px);
    background: linear-gradient(100deg, #FFF0C2, #FFFFFF 60%);
}
.ncs-continue .ncs-tile-pic { height: 100%; aspect-ratio: 3/2; }
.ncs-continue-text { display: flex; flex-direction: column; }
.ncs-continue-kicker { font-size: .8em; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .12em; }
.ncs-continue-title { font-size: 1.25em; }

.ncs-shelf-rows { flex: 1 1 auto; display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 16px); min-height: 0; }
.ncs-row { display: flex; gap: clamp(8px, 1.4vw, 18px); padding: 14px; border-radius: 26px; transition: background .15s; }
.ncs-shelf-row { flex: 1 1 0; min-height: 0; }
.ncs-tile { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; padding: 8px 8px 6px; gap: 4px; }
.ncs-tile-pic { display: block; flex: 1 1 auto; min-height: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 3px solid var(--ink); position: relative; }
.ncs-thumb-pic, .ncs-thumb-pic svg { width: 100%; height: 100%; display: block; }
/* The name and count never shrink (flex: none); only the picture gives up height when a row is short. The name's
   overflow: hidden (for the ellipsis) takes away a flex item's usual "never smaller than my text" floor, so it used
   to shrink with the picture and lose the bottom of its letters (2026-11-28). */
.ncs-tile-name { flex: none; font-size: clamp(16px, 1.9vw, 24px); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ncs-tile-count { flex: none; font-size: clamp(13px, 1.4vw, 17px); color: var(--ink-soft); text-align: center; min-height: 1.2em; }
.ncs-tile-count.has { color: #B26B00; }
.ncs-shelf-tile:nth-child(4n+1) { background: #FFE8E8; } .ncs-shelf-tile:nth-child(4n+2) { background: #E6F8FB; }
.ncs-shelf-tile:nth-child(4n+3) { background: #FFF6D6; } .ncs-shelf-tile:nth-child(4n+4) { background: #EFE7FF; }
.ncs-menu-row { flex: none; }
.ncs-menu-btn { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.ncs-menu-value { font-weight: 800; padding: 2px 12px; border-radius: 999px; background: var(--sun); border: 3px solid var(--ink); }   /* Play Mode shows its mode */
#ncs[data-cvi="1"] .ncs-menu-value { background: #fff; color: #000; }
.ncs-pick-back { align-self: flex-start; display: flex; align-items: center; gap: 10px; }
.ncs-shelf .ncs-pick-back[hidden], .ncs-continue[hidden], .ncs-menu-row[hidden] { display: none; }

/* --- book and page pickers -------------------------------------------------------------------------- */
.ncs-head-small .ncs-title { margin: 0; }
.ncs-title { margin: 0; font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; }
.ncs-pick-grid { flex: 1 1 auto; display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 14px); min-height: 0; }
.ncs-pick-row { flex: 1 1 0; min-height: 0; max-height: 40vh; }
.ncs-pick-nav { display: flex; gap: 14px; justify-content: flex-end; }
.ncs-nav-btn { display: flex; align-items: center; gap: 10px; min-width: 180px; justify-content: center; }
.ncs-nav-btn[hidden] { display: none; }
.ncs-page-tile .ncs-badge { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; }
.ncs-badge-none { opacity: 0; }
.ncs-badge-partial { background: linear-gradient(90deg, var(--teal) 50%, #fff 50%) !important; }
.ncs-badge-done { background: var(--sun) !important; display: flex; padding: 4px; transform: rotate(-12deg); box-shadow: 0 3px 0 var(--ink); }
.ncs-badge-done .ncs-icon { stroke-width: 3; }
.ncs-book-tile { border-left: 16px solid var(--book, var(--ink)); }   /* a spine in the book's cover color */
.ncs-book-tile.shiny { background: linear-gradient(120deg, #FFE27A, #FFF6CF 35%, #FFD23F 55%, #FFF2B0 75%, #F5B700); border-color: #7A4E00; }
#ncs[data-motion="full"] .ncs-book-tile.shiny { background-size: 200% 200%; animation: ncs-shine 3s linear infinite; }
@keyframes ncs-shine { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }

/* --- cards ------------------------------------------------------------------------------------------ */
.ncs-card { position: relative; background: var(--card); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 0 10px 0 rgba(43, 27, 61, .9);
    padding: clamp(16px, 3vh, 30px) clamp(18px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; transform: scale(var(--card-scale, 1)); max-width: 92vw; }
.ncs-card-wide { width: min(880px, 92vw); }
.ncs-sub { margin: 0; font-size: clamp(17px, 2vw, 24px); color: var(--ink-soft); font-weight: 600; }
.ncs-list { display: flex; flex-direction: column; gap: 12px; }
.ncs-list-row { flex-direction: row; }
.ncs-list-row .ncs-item { flex: 1; }
.ncs-item { display: flex; align-items: center; gap: 14px; text-align: left; min-width: min(360px, 80vw); }
.ncs-item-warn { background: #FFE3E3; }

/* --- coloring --------------------------------------------------------------------------------------- */
.ncs-play { padding-bottom: clamp(8px, 1.4vh, 16px); }
.ncs-topbar { display: flex; align-items: center; gap: 14px; flex: none; }
.ncs-play-title { margin: 0; font-size: clamp(20px, 2.6vw, 32px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.ncs-progress { flex: 1 1 auto; height: 18px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.ncs-progress-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coral), var(--sun), var(--leaf), var(--teal), var(--grape)); transition: width .5s ease; }
.ncs-progress-text { font-weight: 800; font-size: clamp(16px, 1.8vw, 22px); min-width: 4.5em; text-align: right; }
.ncs-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
/* The coloring book: the page on its cover board, spiral rings down the left, the pages under it
   peeking out at the edges. A page that turns is a leaf in the slot, turning on the rings. */
.ncs-book { --book: #3EC1D3; position: relative; width: min(100cqw, 150cqh); aspect-ratio: 3 / 2; padding: 2.4% 2.6% 2.6% 6.4%;
    background: radial-gradient(circle at 16% 10%, rgba(255, 255, 255, .3), transparent 42%), linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(0, 0, 0, .14)), var(--book);
    border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 10px 0 rgba(43, 27, 61, .85), 0 18px 40px rgba(43, 27, 61, .18); }
.ncs-slot { position: relative; width: 100%; height: 100%; }
.ncs-paper { position: absolute; inset: 0; background: #fff; border: 2px solid #CFC3AC; border-radius: 5px 10px 10px 5px; overflow: hidden;
    box-shadow: 3px 3px 0 -1px #FBF7EF, 3px 3px 0 1px #CFC3AC, 6px 6px 0 -1px #FBF7EF, 6px 6px 0 1px #CFC3AC, 9px 9px 0 -1px #FBF7EF, 9px 9px 0 1px #CFC3AC; }
.ncs-paper > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ncs-paper .cs-ink { pointer-events: none; }
.ncs-rings { position: absolute; left: 2.2%; width: 6.4%; top: 7%; bottom: 7%; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; z-index: 7; }
.ncs-rings i { display: block; height: 4.4%; border: 3px solid var(--ink); border-radius: 999px; transform: rotate(-10deg);
    background: linear-gradient(180deg, #FFFFFF 0%, #D4DAE1 45%, #8C96A2 100%); box-shadow: 0 3px 0 rgba(43, 27, 61, .35); }
.ncs-brush { pointer-events: none; }

.ncs-leaf { position: absolute; inset: 0; z-index: 6; transform-origin: 0 50%; transform-style: preserve-3d; pointer-events: none; will-change: transform; }
.ncs-leaf-front, .ncs-leaf-back { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden;
    border: 2px solid #CFC3AC; border-radius: 5px 10px 10px 5px; }
.ncs-leaf-front { background: #fff; }
.ncs-leaf-front > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ncs-leaf-back { transform: rotateY(180deg); background: linear-gradient(90deg, #E6DDCB, #FBF7EF 55%, #F1EBDD); }
.ncs-leaf-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(90deg, rgba(43, 27, 61, 0) 25%, rgba(43, 27, 61, .4)); }
.ncs-cover { display: flex; align-items: center; justify-content: center; border: 4px solid var(--ink); border-radius: 12px;
    background: radial-gradient(circle at 18% 14%, rgba(255, 255, 255, .35), transparent 45%), radial-gradient(circle at 85% 88%, rgba(0, 0, 0, .14), transparent 40%), var(--book); }
.ncs-cover-label { display: flex; flex-direction: column; align-items: center; gap: .15em; max-width: 82%; padding: 3% 6%; text-align: center;
    background: #fff; border: 4px solid var(--ink); border-radius: 26px; box-shadow: 0 8px 0 rgba(43, 27, 61, .85); }
.ncs-cover-kicker { font-size: clamp(14px, 2.6cqw, 28px); font-weight: 700; color: var(--ink-soft); letter-spacing: .04em; }
.ncs-cover-title { font-size: clamp(26px, 6.5cqw, 80px); font-weight: 800; line-height: 1.05; }
.ncs-hl { pointer-events: none; }
#ncs[data-motion="full"] .ncs-hl .ncs-hl-over, #ncs[data-motion="calm"] .ncs-hl .ncs-hl-over { animation: ncs-hl-pulse 1.3s ease-in-out infinite; }
#ncs[data-motion="calm"] .ncs-hl .ncs-hl-over { animation-duration: 2.6s; }
@keyframes ncs-hl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.ncs-loading { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.ncs-loading.show { display: flex; }
.ncs-spinner { width: 70px; height: 70px; border-radius: 50%; border: 10px solid var(--sun); border-top-color: var(--coral); animation: ncs-spin 1s linear infinite; }
@keyframes ncs-spin { to { transform: rotate(360deg); } }

.ncs-bar { flex: none; display: flex; justify-content: center; }
.ncs-bar-row { display: none; gap: clamp(10px, 1.6vw, 20px); width: min(1100px, 100%); justify-content: center; align-items: stretch; }
.ncs-bar[data-bar="color"] .ncs-color-bar, .ncs-bar[data-bar="paint"] .ncs-paint-bar, .ncs-bar[data-bar="hold"] .ncs-hold-bar, .ncs-bar[data-bar="fix"] .ncs-fix-bar { display: flex; }
/* Fix a Spot: the chip names the part lit up on the picture; picking shows the part's colors. */
.ncs-fix-spot { flex: 2.2 1 0; font-size: clamp(22px, 2.6vw, 34px); background: linear-gradient(180deg, #E6F6FF, #BDE6FA); cursor: default; }
.ncs-fix-bar[data-stage="pick"] .ncs-swatch-btn, .ncs-fix-bar[data-stage="pick"] .ncs-more-btn { display: none; }
.ncs-fix-bar[data-stage="colors"] .ncs-fix-spot { flex: 1.4 1 0; }
.ncs-fix-bar .ncs-swatch-btn[hidden] { display: none; }
#ncs[data-screen="fix"] .ncs-paper .cs-fills path { cursor: pointer; }
.ncs-bar-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: clamp(70px, 11vh, 104px); flex: 1 1 0; }
.ncs-color-btn { flex: 2.2 1 0; font-size: clamp(24px, 3vw, 38px); background: linear-gradient(180deg, #FFF3B8, #FFD23F); }
.ncs-color-btn .ncs-chip { width: 1.6em; height: 1.6em; }
.ncs-next-swatch { width: 1.1em; height: 1.1em; border-radius: 50%; border: 4px solid var(--ink); }
.ncs-swatch-btn { flex-direction: column; gap: 4px; padding: 6px; }
.ncs-swatch { width: clamp(40px, 6vh, 62px); height: clamp(40px, 6vh, 62px); border-radius: 50%; border: 4px solid var(--ink); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); }
.ncs-swatch-btn .ncs-label { font-size: clamp(15px, 1.7vw, 20px); }
.ncs-swatch-btn[hidden] { display: none; }
.ncs-more-btn { background: linear-gradient(120deg, #FFE1E1, #FFF7C8, #DDF7E3, #DDF3FA, #EEE3FF); }
.ncs-hold-bar { align-items: center; }
.ncs-hold-hint { font-size: clamp(18px, 2.2vw, 26px); font-weight: 700; color: var(--ink-soft); }
.ncs-hold-pause { flex: 0 0 auto; min-width: 180px; }
.ncs-ring { position: absolute; inset: -10px; border-radius: 28px; pointer-events: none; opacity: 0;
    background: conic-gradient(var(--coral) calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 0); mask: radial-gradient(farthest-side, transparent calc(100% - 9px), #000 0); }
.ncs-hold-pause.holding .ncs-ring { opacity: 1; }
.ncs-draw-hint, .ncs-draw-pause { display: none; }
.ncs-bar[data-bar="drawing"] .ncs-draw-hint { display: flex; align-items: center; font-size: clamp(20px, 2.6vw, 30px); font-weight: 800; color: var(--ink-soft); margin-right: 20px; }
.ncs-bar[data-bar="drawing"] .ncs-draw-pause { display: flex; flex: 0 0 auto; min-width: 180px; }

/* The pencil that draws Surprise Me pages. */
.ncs-pencil { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 6; transition: transform .05s linear; }
.ncs-pencil::before { content: ''; position: absolute; left: -6px; top: -64px; width: 18px; height: 70px; border-radius: 4px 4px 2px 2px; border: 3px solid var(--ink);
    background: linear-gradient(180deg, #FF8FA3 0 14%, #EDEDED 14% 20%, #FFD23F 20% 78%, #F6D6A8 78%); transform: rotate(32deg); transform-origin: 9px 70px;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 50% 100%, 0 80%); }

/* --- More colors -------------------------------------------------------------------------------------- */
.ncs-more { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); z-index: 30; background: #fff; border: 4px solid var(--ink); border-radius: 30px;
    box-shadow: 0 10px 0 rgba(43, 27, 61, .9); padding: 16px 20px; width: min(760px, 94vw); display: flex; flex-direction: column; gap: 12px; }
.ncs-more[hidden] { display: none; }
.ncs-more-title { margin: 0; text-align: center; font-size: clamp(22px, 2.6vw, 30px); }
.ncs-more-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ncs-more-group { border: 4px solid var(--ink); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: #FAF6FF; cursor: pointer; }
.ncs-more-group-name { font-weight: 800; font-size: clamp(16px, 1.8vw, 21px); text-align: center; }
.ncs-more-hues { display: flex; gap: 8px; justify-content: space-between; }
.ncs-hue, .ncs-shade { flex: 1 1 0; min-height: 66px; border-radius: 18px; border: 4px solid var(--ink); background: var(--c); cursor: pointer; position: relative; padding: 0; }
.ncs-hue-name { position: absolute; left: 50%; bottom: -2px; transform: translate(-50%, 100%); font-size: 13px; font-weight: 800; white-space: nowrap; opacity: 0; }
.ncs-hue.ncs-focus .ncs-hue-name, .ncs-shade .ncs-hue-name { opacity: 1; }
.ncs-more-shades { display: none; gap: 12px; padding-bottom: 22px; }
.ncs-more[data-level="shades"] .ncs-more-shades { display: flex; }
.ncs-more[data-level="shades"] .ncs-more-groups { opacity: .35; }
.ncs-shade[hidden] { display: none; }
.ncs-sweep { display: none; position: relative; width: min(420px, 70vw); aspect-ratio: 1; margin: 0 auto; }
.ncs-more[data-level="sweep"] .ncs-sweep { display: block; }
.ncs-more[data-level="sweep"] .ncs-more-groups { display: none; }
.ncs-sweep-dot { position: absolute; width: 16%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid var(--ink); background: var(--c); cursor: pointer; font-weight: 800; }
.ncs-sweep-dot.back { background: #fff; font-size: 14px; }

/* --- overlay cards: palette, pause, finish, fix ---------------------------------------------------------- */
.ncs-over { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(43, 27, 61, .42); z-index: 20; padding: 16px; }
.ncs-over.show { display: flex; }
.ncs-over-card { max-height: 94vh; overflow: visible; }   /* ui.js scales the card to fit; clipping only cut off highlights */
.ncs-over-body.ncs-list { min-width: min(420px, 86vw); }
.ncs-over-foot { display: flex; flex-direction: column; gap: 10px; }
.ncs-over-foot:empty { display: none; }
.ncs-pause-more { flex-wrap: wrap; border: 3px dashed rgba(43, 27, 61, .25); }
.ncs-pause-more .ncs-item { min-width: 0; flex: 1 1 40%; font-size: clamp(16px, 1.8vw, 22px); }
.ncs-palettes { display: flex; gap: 16px; }
.ncs-pal-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; width: clamp(170px, 24vw, 300px); min-height: 0; }
.ncs-pal-card .ncs-tile-pic { aspect-ratio: 3/2; }
/* Finish: the page stays in view, alive; the choices sit along the bottom. */
.ncs-over[data-kind="finish"] { background: transparent; align-items: flex-end; pointer-events: none; }
.ncs-over[data-kind="finish"] .ncs-over-card { pointer-events: auto; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: center; gap: 12px 20px; padding: 12px 18px; }
.ncs-over[data-kind="finish"] .ncs-title { font-size: clamp(24px, 3vw, 36px); }
.ncs-over[data-kind="finish"] .ncs-sub { display: none; }
.ncs-finish-list { flex-direction: row !important; flex-wrap: wrap; }
.ncs-finish-list .ncs-item { min-width: 0; }
.ncs-save-pic { position: absolute; right: clamp(12px, 2vw, 28px); top: clamp(10px, 2vh, 22px); z-index: 25; display: flex; align-items: center; gap: 8px; font-size: 16px; min-height: 48px; padding: 6px 12px; opacity: .9; }
.ncs-save-pic[hidden] { display: none; }
.ncs-fix-back { align-self: flex-start; }

/* Sticker reward. */
.ncs-sticker-pop { position: absolute; right: clamp(16px, 3vw, 40px); top: 18%; width: clamp(140px, 18vw, 220px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; z-index: 26;
    border: 8px solid #fff; box-shadow: 0 0 0 4px var(--ink), 0 10px 0 4px rgba(43, 27, 61, .5); background: #fff; opacity: 0; transform: scale(.2) rotate(-30deg); pointer-events: none; }
.ncs-sticker-pop.show { opacity: 1; transform: scale(1) rotate(-8deg); transition: transform .7s cubic-bezier(.2, 1.6, .4, 1) .9s, opacity .2s .9s; }
.ncs-sticker-pop .ncs-thumb-pic { width: 100%; height: 100%; }
.ncs-sticker-pop .ncs-thumb-pic svg { width: 150%; height: 150%; margin: -25%; }
.ncs-sticker-star { position: absolute; right: 4%; bottom: 4%; width: 34%; color: var(--ink); background: var(--sun); border-radius: 50%; padding: 4%; border: 3px solid var(--ink); }

/* --- settings, help, dialogs ------------------------------------------------------------------------------ */
/* Settings is one long list: it scrolls inside the card, the highlighted row kept in view with room for its band. */
.ncs-settings-list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc(100vh - 150px); padding: 28px 32px; margin: -20px -26px; }
.ncs-settings-list .ncs-row-btn { flex: none; min-height: 56px; scroll-margin: 30px; }
.ncs-row-btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; }
.ncs-row-btn.nav { background: #F3EEFF; }
.ncs-row-btn.back { background: #EEE; }
.ncs-row-value { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 14px; font-size: .9em; white-space: nowrap; }
.ncs-help-title { display: flex; align-items: center; gap: 12px; font-size: clamp(24px, 3vw, 34px); align-self: flex-start; }
.ncs-help-step { margin: 0; font-weight: 800; color: var(--ink-soft); }
.ncs-help-body p { margin: 0 0 10px; font-size: clamp(18px, 2.1vw, 25px); line-height: 1.35; font-weight: 600; }
.ncs-dialog-text { color: var(--ink); max-width: 640px; }

/* Large captions for players who are deaf or hard of hearing. */
.ncs-caption { position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 100; max-width: 92vw; background: rgba(20, 12, 32, .92); color: #fff;
    font-size: clamp(24px, 3.4vw, 44px); font-weight: 800; padding: 8px 22px; border-radius: 18px; text-align: center; pointer-events: none; }
.ncs-caption[hidden] { display: none; }

/* --- finish: particles ------------------------------------------------------------------------------------ */
.ncs-overlay { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.ncs-p { position: absolute; left: var(--x); top: -8%; display: block; animation-delay: calc(var(--d) * -1) !important; }
.ncs-p-snow { width: calc(14px * var(--s)); height: calc(14px * var(--s)); border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(40, 60, 90, .35); animation: ncs-fall 8s linear infinite; }
.ncs-p-rain { width: 4px; height: 34px; border-radius: 4px; background: rgba(60, 120, 220, .7); animation: ncs-fall 1.4s linear infinite; }
.ncs-p-leaves { width: calc(26px * var(--s)); height: calc(18px * var(--s)); border-radius: 0 80% 0 80%; border: 2px solid rgba(40, 20, 0, .6);
    background: hsl(calc(10 + var(--h) / 9), 85%, 55%); animation: ncs-fall-spin 7s linear infinite; }
.ncs-p-petals { width: calc(18px * var(--s)); height: calc(12px * var(--s)); border-radius: 60% 60% 60% 0; background: hsl(calc(320 + var(--h) / 10), 80%, 78%); border: 2px solid rgba(120, 30, 80, .4); animation: ncs-fall-spin 8s linear infinite; }
.ncs-p-confetti { width: 12px; height: 18px; background: hsl(var(--h), 90%, 58%); border: 2px solid rgba(0, 0, 0, .35); animation: ncs-fall-spin 4.5s linear infinite; }
.ncs-p-bubbles { top: auto; bottom: -10%; width: calc(28px * var(--s)); height: calc(28px * var(--s)); border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9) 0 18%, rgba(160, 220, 255, .35) 19%); animation: ncs-rise 7s ease-in infinite; }
.ncs-p-hearts { top: auto; bottom: -10%; width: calc(30px * var(--s)); height: calc(30px * var(--s)); animation: ncs-rise 6s ease-in infinite;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'%3E%3Cpath d='M16 28S2 19 2 9a7 7 0 0 1 14-2 7 7 0 0 1 14 2c0 10-14 19-14 19z' fill='%23FF5A7A' stroke='%232B1B3D' stroke-width='2.5'/%3E%3C/svg%3E"); }
.ncs-p-stars, .ncs-p-sparkles { top: var(--y); width: calc(30px * var(--s)); height: calc(30px * var(--s)); animation: ncs-twinkle 2.4s ease-in-out infinite;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 1Q18 14 31 16Q18 18 16 31Q14 18 1 16Q14 14 16 1Z' fill='%23FFE45C' stroke='%232B1B3D' stroke-width='1.5'/%3E%3C/svg%3E"); }
.ncs-p-sparkles { filter: hue-rotate(calc(var(--h) * 1deg)); }
.ncs-p-fireworks { top: calc(var(--y) * .6); width: 160px; height: 160px; margin: -80px; border-radius: 50%; animation: ncs-burst 2.6s ease-out infinite;
    background: repeating-conic-gradient(hsl(var(--h), 95%, 60%) 0 8deg, transparent 8deg 30deg); -webkit-mask: radial-gradient(circle, transparent 38%, #000 40% 62%, transparent 64%); mask: radial-gradient(circle, transparent 38%, #000 40% 62%, transparent 64%); }
.ncs-p-birds { top: calc(var(--y) * .4); left: -10%; width: calc(40px * var(--s)); height: calc(20px * var(--s)); animation: ncs-fly 9s linear infinite;
    background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 20'%3E%3Cpath d='M2 6Q10 0 20 12Q30 0 38 6' fill='none' stroke='%232B1B3D' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ncs-p-sunbeams { left: auto; right: -30%; top: -60%; width: 120%; aspect-ratio: 1; border-radius: 50%; opacity: .32;
    background: repeating-conic-gradient(rgba(255, 220, 80, .9) 0 9deg, transparent 9deg 24deg); animation: ncs-spin 40s linear infinite; }
@keyframes ncs-fall { to { transform: translate(30px, 115vh); } }
@keyframes ncs-fall-spin { to { transform: translate(-40px, 115vh) rotate(720deg); } }
@keyframes ncs-rise { to { transform: translate(20px, -115vh); } }
@keyframes ncs-twinkle { 0%, 100% { transform: scale(.4) rotate(0deg); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes ncs-burst { 0% { transform: scale(.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes ncs-fly { to { transform: translate(120vw, -6vh); } }
#ncs[data-motion="calm"] .ncs-p { animation-duration: 14s; }
#ncs[data-motion="off"] .ncs-p { animation: none; }

/* --- finish: things come alive (lifted copies, transform-origin set by page.js) ------------------------------- */
/* What comes alive at a finish (art-source/actors.json). Every moving thing is a WHOLE thing and turns
   on its own pivot (set by page.js from the page data): plants bend from the base, hanging things
   swing from the top, tails wag from the body, flags wave from the pole. Calm motion slows them all.
   Keep tests/finish-motion.cjs (the frame check) in step with these numbers. */
.ncs-act { animation-duration: var(--d, 3s); animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
#ncs[data-motion="calm"] .ncs-act { animation-duration: calc(var(--d, 3s) * 1.8); }
.ncs-act-sway { --d: 4s; animation-name: ncs-sway; }
.ncs-act-swing { --d: 3s; animation-name: ncs-swing; }
.ncs-act-wag { --d: .9s; animation-name: ncs-wag; }
.ncs-act-wave { --d: 1.8s; animation-name: ncs-wave; }
.ncs-act-rock { --d: 3.2s; animation-name: ncs-rock; }
.ncs-act-teeter { --d: 2.8s; animation-name: ncs-teeter; }
.ncs-act-nod { --d: 2.8s; animation-name: ncs-nod; }
.ncs-act-breathe { --d: 3.4s; animation-name: ncs-breathe; }
.ncs-act-hop { --d: 2.4s; animation-name: ncs-hop; }
.ncs-act-bounce { --d: 1.5s; animation-name: ncs-bounce; animation-timing-function: linear; }
.ncs-act-float { --d: 5s; animation-name: ncs-float; }
.ncs-act-drift { --d: 10s; animation-name: ncs-drift; }
.ncs-act-swim { --d: 4.5s; animation-name: ncs-swim; }
.ncs-act-scuttle { --d: 2.4s; animation-name: ncs-scuttle; }
.ncs-act-flap { --d: .6s; animation-name: ncs-flap; }
.ncs-act-flutter { --d: .45s; animation-name: ncs-flutter; }
.ncs-act-flicker { --d: .9s; animation-name: ncs-flicker; }
.ncs-act-glow { --d: 2.6s; animation-name: ncs-glow; }
.ncs-act-shine { --d: 3.6s; animation-name: ncs-act-shine; }
.ncs-act-twinkle { --d: 1.6s; animation-name: ncs-act-twinkle; }
.ncs-act-spin { --d: 14s; animation-name: ncs-spin; animation-timing-function: linear; }
.ncs-act-rumble { --d: .45s; animation-name: ncs-rumble; animation-timing-function: linear; }
.ncs-act-puff { --d: 3.6s; animation-name: ncs-puff; }
.ncs-act-gush { --d: 2.6s; animation-name: ncs-gush; }
.ncs-act-lift { --d: 4s; animation-name: ncs-lift-off; }
@keyframes ncs-sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes ncs-swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes ncs-wag { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
@keyframes ncs-wave { 0%, 100% { transform: skewY(-6deg) scaleX(1); } 50% { transform: skewY(6deg) scaleX(.95); } }
@keyframes ncs-rock { 0%, 100% { transform: rotate(-3deg); } 25%, 75% { transform: translateY(-3px) rotate(0deg); } 50% { transform: rotate(3deg); } }
@keyframes ncs-teeter { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes ncs-nod { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(4deg); } }
@keyframes ncs-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.04); } }
@keyframes ncs-hop { 0%, 45%, 100% { transform: translateY(0) scale(1, 1); } 52% { transform: translateY(0) scale(1.05, .94); } 66% { transform: translateY(-26px) scale(.97, 1.04); } 80% { transform: translateY(0) scale(1.05, .95); } 88% { transform: translateY(0) scale(1, 1); } }
@keyframes ncs-bounce {
    0%, 100% { transform: translateY(0) scale(1.08, .92); animation-timing-function: ease-out; }
    10% { transform: translateY(-8px) scale(.97, 1.03); animation-timing-function: ease-out; }
    50% { transform: translateY(-44px) scale(1, 1); animation-timing-function: ease-in; }
    90% { transform: translateY(-8px) scale(.97, 1.03); animation-timing-function: ease-in; }
}
@keyframes ncs-float { 0%, 100% { transform: translateY(5px); } 50% { transform: translateY(-12px); } }
@keyframes ncs-drift { 0%, 100% { transform: translateX(-16px); } 50% { transform: translateX(16px); } }
@keyframes ncs-swim { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(4px, -7px); } 50% { transform: translate(0, 0); } 75% { transform: translate(-4px, 7px); } }
@keyframes ncs-scuttle { 0%, 100% { transform: translate(-12px, 0); } 25%, 75% { transform: translate(0, -2px); } 50% { transform: translate(12px, 0); } }
@keyframes ncs-flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.7); } }
@keyframes ncs-flutter { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.65); } }
@keyframes ncs-flicker { 0%, 100% { transform: scale(1, 1) skewX(0deg); } 25% { transform: scale(.96, 1.08) skewX(2deg); } 50% { transform: scale(1.02, .97) skewX(-1deg); } 75% { transform: scale(.97, 1.06) skewX(-2deg); } }
@keyframes ncs-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 230, 120, 0)); } 50% { filter: drop-shadow(0 0 18px rgba(255, 230, 120, .95)); } }
@keyframes ncs-act-shine { 0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 236, 150, .5)); transform: scale(1); } 50% { filter: drop-shadow(0 0 26px rgba(255, 236, 150, 1)); transform: scale(1.035); } }
@keyframes ncs-act-twinkle { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 250, 200, .4)); transform: scale(.9); } 50% { filter: drop-shadow(0 0 14px rgba(255, 250, 200, 1)); transform: scale(1.12); } }
@keyframes ncs-rumble { 0%, 50%, 100% { transform: translateY(0); } 25% { transform: translateY(-2px); } 75% { transform: translateY(-1px); } }
@keyframes ncs-puff { 0%, 100% { transform: translateY(0) scale(1); opacity: 1; } 50% { transform: translateY(-12px) scale(1.06); opacity: .85; } }
@keyframes ncs-gush { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.04, 1.1); } }
@keyframes ncs-lift-off { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* --- Simple High Contrast: black, high contrast, saturated; every choice stays visible -------------------------- */
body.ncs-cvi { background: #000; background-image: none; color: #fff; }
#ncs[data-cvi="1"] { --ink: #FFFFFF; --ink-soft: #FFFFFF; --card: #000; --shadow: none; }
#ncs[data-cvi="1"] .ncs-btn { background: #000 !important; color: #fff; border: 6px solid #fff; box-shadow: none; font-size: clamp(24px, 3vw, 40px); }
#ncs[data-cvi="1"] .ncs-card, #ncs[data-cvi="1"] .ncs-more { background: #000; border-color: #fff; box-shadow: none; }
#ncs[data-cvi="1"] .ncs-brand-title { color: #fff; text-shadow: none; }
#ncs[data-cvi="1"] .ncs-brand-title::after { display: none; }
#ncs[data-cvi="1"] .ncs-mode-chip, #ncs[data-cvi="1"] .ncs-row-value { background: #fff; color: #000; }
#ncs[data-cvi="1"] .ncs-book { background: #000; border-color: var(--outline); box-shadow: none; padding: 1.2%; }
#ncs[data-cvi="1"] .ncs-rings { display: none; }
#ncs[data-cvi="1"] .ncs-paper, #ncs[data-cvi="1"] .ncs-leaf-front, #ncs[data-cvi="1"] .ncs-leaf-back { background: #000; border: 3px solid var(--outline); box-shadow: none; }
#ncs[data-cvi="1"] .ncs-paper .cs-cvi-lines path, #ncs[data-cvi="1"] .ncs-leaf .cs-cvi-lines path { stroke: var(--outline); }
#ncs[data-cvi="1"] .ncs-cover { background: #000; border-color: var(--outline); }
#ncs[data-cvi="1"] .ncs-cover-label { background: #000; border-color: var(--outline); box-shadow: none; }
#ncs[data-cvi="1"] .ncs-cover-kicker, #ncs[data-cvi="1"] .ncs-cover-title { color: var(--outline); }
#ncs[data-cvi="1"] .ncs-tile-pic { background: #000; border-color: #fff; }
#ncs[data-cvi="1"] .ncs-focus { outline-width: 12px; box-shadow: 0 0 0 18px #000, 0 0 50px 18px var(--hl) !important; }
#ncs[data-cvi="1"] .ncs-row { padding: 18px; }
#ncs[data-cvi="1"] .ncs-row.ncs-focus, #ncs[data-cvi="1"] .ncs-more-group.ncs-focus { outline-offset: -12px; box-shadow: inset 0 0 0 16px #000 !important; }
#ncs[data-cvi="1"][data-motion="full"] .ncs-focus, #ncs[data-cvi="1"][data-motion="calm"] .ncs-focus { animation: ncs-cvi-pulse 1.6s ease-in-out infinite; }
#ncs[data-cvi="1"][data-motion="full"] .ncs-hl { animation: ncs-cvi-breathe 2.4s ease-in-out infinite; }
@keyframes ncs-cvi-pulse { 0%, 100% { outline-color: var(--hl); } 50% { outline-color: transparent; } }   /* blinks; never grows */
@keyframes ncs-cvi-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
/* One thing at a time: everything that is not the current choice steps back. */
#ncs[data-cvi="1"] .ncs-over { background: rgba(0, 0, 0, .7); }
#ncs[data-cvi="1"] .ncs-p-snow { background: #fff; }

@media (max-height: 640px) {
    .ncs-continue { height: 70px; }
    .ncs-bar-btn { min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
    .ncs-p, .ncs-act, .ncs-focus { animation: none !important; }
}
