#ni-learning-host:has(.nd-film){position:fixed;inset:0;z-index:10000;overflow:auto;background:#f9efd9;overscroll-behavior:contain}
.nd-film{--nd-accent:#158d87;--nd-light:#b9ffec;box-sizing:border-box;max-width:600px;min-height:100%;margin:auto;display:flex;flex-direction:column;position:relative;isolation:isolate;color:#194b52;background:#ffe9be var(--katkoot-discovery-bg,url('assets/numbers-island/m1-stage3/beach-clearing.png')) center/cover;font-family:Tahoma,Arial,sans-serif;padding:max(12px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}.nd-film *{box-sizing:border-box}.nd-film [hidden]{display:none!important}.nd-film button{font:inherit;cursor:pointer;min-width:48px;min-height:48px;border:0;border-radius:16px;background:#fff9e9;color:#145e64;box-shadow:0 4px 0 #bd9c63;touch-action:manipulation}.nd-film button:focus-visible{outline:4px solid #174e99;outline-offset:3px}.nd-header{display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:3}.nd-header>div{text-align:center;color:#fff;text-shadow:0 2px 4px #174e69}.nd-header small{display:block;font-size:11px;margin-bottom:7px}.nd-header strong{font-size:18px}.nd-header button{font-size:25px}.nd-cinema{position:relative;min-height:440px;flex:1;margin:14px -8px 0;overflow:hidden}.nd-scene-label{position:relative;z-index:5;display:table;max-width:95%;margin:10px auto;background:#fff7dfed;padding:10px 16px;border-radius:20px;font-size:13px;text-align:center;line-height:1.6;box-shadow:0 4px 16px #1b758326}.nd-number-friend{position:absolute;right:7%;top:18%;width:58%;height:47%;display:flex;justify-content:center;align-items:center;filter:drop-shadow(0 12px 4px #74533255);animation:nd-friend 4s ease-in-out infinite;transform-origin:50% 90%;z-index:3}.nd-number-friend b{font-family:Arial,sans-serif;font-weight:900;font-size:clamp(150px,42vw,230px);line-height:1;color:var(--nd-accent);-webkit-text-stroke:3px #fff7d1;text-shadow:2px 6px 0 #185b64,0 0 20px var(--nd-light)}.nd-eyes{position:absolute;top:48%;display:flex;gap:12px;direction:ltr;pointer-events:none}.nd-eyes i{width:15px;height:21px;background:#fff;border-radius:50%;border:1px solid #23636b;position:relative;animation:nd-blink 7s infinite}.nd-eyes i:after{content:'';position:absolute;width:7px;height:11px;background:#184653;border-radius:50%;right:1px;top:5px}.nd-katkoot{position:absolute;left:0;bottom:11%;height:53%;max-width:48%;object-fit:contain;filter:drop-shadow(0 10px 5px #70451f44);z-index:4;animation:nd-katkoot 4s ease-in-out infinite;transform-origin:bottom center}.nd-prop{position:absolute;right:14%;bottom:18%;width:21%;height:17%;object-fit:contain;filter:drop-shadow(0 6px 3px #72512138);z-index:4;animation:nd-prop 5s ease-in-out infinite}.nd-nameboard{position:absolute;left:35%;right:4%;bottom:1%;z-index:5;background:#fff6dc;border:2px solid #e6bf72;border-radius:23px;padding:12px 8px;text-align:center;box-shadow:0 6px 0 #c99a51}.nd-nameboard strong{display:block;letter-spacing:3px;color:var(--nd-accent);font-size:clamp(24px,8vw,39px)}.nd-nameboard span{display:block;font-size:16px;margin-top:4px;color:#735734}.nd-halo{position:absolute;right:0;top:12%;height:60%;width:76%;border-radius:50%;background:radial-gradient(ellipse,#ffffd899,transparent 70%);animation:nd-glow 5s ease-in-out infinite}.nd-cloud{position:absolute;width:100px;height:22px;border-radius:50%;background:#ffffff6b;top:15%;animation:nd-cloud 24s linear infinite}.nd-cloud:after{content:'';position:absolute;width:55px;height:35px;background:inherit;border-radius:50%;top:-15px;left:20px}.cloud-b{top:33%;opacity:.5;animation-delay:-12s;transform:scale(.6)}.nd-sparkles{position:absolute;right:8%;top:20%;width:57%;height:48%;pointer-events:none;z-index:4}.nd-sparkles i{position:absolute;color:#fff7bc;font-style:normal;font-size:35px;animation:nd-spark 3s ease-in-out infinite;text-shadow:0 0 10px #ffc540}.nd-sparkles i:nth-child(2){right:8%;bottom:4%;animation-delay:1s}.nd-sparkles i:nth-child(3){right:2%;top:-5%;animation-delay:2s}.nd-start{position:absolute;inset:0;background:linear-gradient(#073b5c29,#fff4d5de);z-index:8;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:35px 16px;gap:16px;border-radius:25px}.nd-start>span{font-size:14px;font-weight:bold;background:#fff8e5e8;border-radius:16px;padding:10px}.nd-start button{background:#148a7d;color:white;padding:15px 22px;font-weight:bold;box-shadow:0 5px 0 #085e59}.nd-start button b{margin-right:12px}.nd-start p{font-size:12px;margin:0}.nd-footer{z-index:5;background:#fffaf0f5;border:2px solid #fff8dc;border-radius:24px;padding:18px 14px 10px;margin-top:16px;box-shadow:0 8px 25px #654a2430}.nd-caption{font-size:19px;font-weight:bold;line-height:1.8;text-align:center;min-height:72px;display:flex;justify-content:center;align-items:center;white-space:pre-line}.nd-progress{height:5px;background:#e6dfca;border-radius:20px;margin:15px 4px 18px;direction:ltr;overflow:hidden}.nd-progress i{display:block;width:0;height:100%;background:#168c7c;transition:width .1s linear}.nd-controls{display:flex;justify-content:space-between;gap:9px}.nd-controls button{background:#e8f1e4;box-shadow:0 3px 0 #b7c9b0;flex:1;font-size:12px;font-weight:bold;padding:8px}.nd-controls button:disabled{opacity:.45;cursor:default}.nd-ending{text-align:center}.nd-ending p{font-size:14px;line-height:1.6;margin:0 0 13px}.nd-ending button{display:block;width:100%;margin-top:12px;background:#117e76;color:white;font-size:14px;font-weight:bold;padding:12px;box-shadow:0 4px 0 #075950}.nd-ending button:first-of-type{background:#f3ead2;color:#155b60;box-shadow:0 4px 0 #d0bc92}.nd-parent{font-size:10px;color:#766d55;line-height:1.8;margin-top:16px;text-align:center}.nd-parent summary{cursor:pointer;min-height:28px}.nd-parent p{font-size:12px;text-align:right}.nd-film[data-scene=arrive] .nd-number-friend{opacity:.15;filter:blur(6px)}.nd-film[data-scene=arrive] .nd-nameboard{visibility:hidden}.nd-film[data-scene=space] .nd-sparkles{opacity:.3}.nd-film[data-scene=space] .nd-number-friend{animation-duration:7s}.nd-film.nd-cue-enter .nd-nameboard{animation:nd-pop .9s ease-out both}.nd-film.nd-speaking .nd-katkoot{animation:nd-katkoot .8s ease-in-out infinite}.nd-film.nd-beat .nd-number-friend{animation:nd-dance 1.4s ease-in-out infinite}.nd-film.nd-paused *{animation-play-state:paused!important}.nd-flower{--nd-accent:#c25487;--nd-light:#ffe2f3}.nd-butterfly{--nd-accent:#9d70c8;--nd-light:#eddbff}.nd-train{--nd-accent:#c45a31;--nd-light:#ffe7a9}.nd-star{--nd-accent:#b9851c;--nd-light:#fffac5}.nd-ball{--nd-accent:#3485b9;--nd-light:#d0f6ff}.nd-fish{--nd-accent:#19a18d;--nd-light:#d0fff8}.nd-car{--nd-accent:#bc5462;--nd-light:#ffe1e4}.nd-duck{--nd-accent:#a68629;--nd-light:#fff4bc}.nd-treasure{--nd-accent:#9663c7;--nd-light:#f1dfff}.nd-butterfly .nd-prop{animation:nd-flutter 4s ease-in-out infinite}.nd-train .nd-prop,.nd-car .nd-prop{animation:nd-drive 6s ease-in-out infinite}.nd-fish .nd-prop{animation:nd-swim 5s ease-in-out infinite}.nd-star .nd-prop{animation:nd-twinkle 4s ease-in-out infinite}
@keyframes nd-friend{50%{transform:translateY(-10px) rotate(2deg)}}@keyframes nd-katkoot{50%{transform:translateY(-5px) rotate(-1.5deg)}}@keyframes nd-prop{50%{transform:translateY(-8px) rotate(5deg)}}@keyframes nd-blink{0%,43%,47%,100%{transform:scaleY(1)}45%{transform:scaleY(.1)}}@keyframes nd-glow{50%{opacity:.5;transform:scale(1.12)}}@keyframes nd-cloud{from{left:-120px}to{left:100%}}@keyframes nd-spark{0%,100%{opacity:.2;transform:scale(.6)}50%{opacity:1;transform:scale(1.1)}}@keyframes nd-pop{from{opacity:.3;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes nd-dance{25%{transform:rotate(-5deg) translateY(-7px)}75%{transform:rotate(5deg) translateY(-7px)}}@keyframes nd-flutter{25%{transform:translate(-15px,-20px) rotate(-15deg)}75%{transform:translate(15px,-8px) rotate(12deg)}}@keyframes nd-drive{50%{transform:translateX(-35px)}}@keyframes nd-swim{50%{transform:translate(-22px,-10px) rotate(-12deg)}}@keyframes nd-twinkle{50%{transform:rotate(15deg) scale(1.13)}}
@media(max-height:740px){.nd-cinema{min-height:350px}.nd-footer{padding:12px 12px 6px;margin-top:10px}.nd-caption{font-size:17px;min-height:60px}.nd-progress{margin:10px 4px 14px}.nd-header small{font-size:10px}}@media(max-width:350px){.nd-cinema{min-height:330px}.nd-controls button{font-size:11px}.nd-header strong{font-size:15px}.nd-header small{font-size:9px}.nd-number-friend b{font-size:145px}.nd-eyes{gap:7px}.nd-caption{font-size:16px}}@media(min-width:600px){.nd-number-friend b{font-size:240px}.nd-cinema{min-height:550px}}@media(prefers-reduced-motion:reduce){.nd-film *{animation:none!important;transition:none!important}.nd-cloud{display:none}}
.nd-voice-warning{font-size:11px;line-height:1.7;color:#8a542b;background:#fff0cf;border-radius:12px;padding:8px;margin:12px 0 0;text-align:center}
@media(max-height:900px){.nd-film[data-scene=complete] .nd-cinema{min-height:320px}.nd-film[data-scene=complete] .nd-caption{min-height:42px}}
.nd-film[data-scene=arrive] .nd-number-friend{opacity:0;filter:none}.nd-film[data-scene=arrive] .nd-prop{width:38%;height:30%;right:12%;bottom:26%;filter:drop-shadow(0 0 15px #fffac4);transition:width 1s,height 1s}.nd-film[data-scene=reveal].nd-cue-enter .nd-number-friend{animation:nd-reveal 1.8s ease-out both}.nd-film[data-scene=goodbye] .nd-number-friend{animation:nd-friend 2.5s ease-in-out infinite}
@keyframes nd-reveal{0%{opacity:0;transform:translateY(90px) scale(.2)}60%{opacity:1;transform:translateY(-12px) scale(1.08)}100%{opacity:1;transform:translateY(0) scale(1)}}

/* Use the game’s original glossy numeral art; reveal the complete decoded scene. */
.nd-numeral{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 9px 4px #694b3840)}.nd-film.nd-loading{background-image:linear-gradient(170deg,#8edbdc,#fff0c9 70%)}.nd-loading .nd-number-friend,.nd-loading .nd-katkoot,.nd-loading .nd-prop,.nd-loading .nd-nameboard,.nd-loading .nd-sparkles{visibility:hidden}.nd-start button:disabled{opacity:.7;cursor:wait}.nd-start [data-nd=assets-retry]{background:#fff3d8;color:#155f67}
