/* Numbers-only teaching scene: one compact title, raised glass tray, enlarged Chick. */
html.ni-adventure-preview, .ni-adventure-preview body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #0f5a72; }
.ni-adventure, .ni-adventure * { box-sizing: border-box; }
.ni-adventure { position: relative; isolation: isolate; width: 100%; max-width: 768px; height: 100vh; height: 100dvh; margin: 0 auto; overflow: hidden; color: #193f45; font-family: Tahoma, Arial, sans-serif; }
.ni-adventure [hidden] { display: none !important; }
.ni-adventure button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; min-height: 48px; }
.ni-adventure button:disabled { cursor: default; }
.ni-adventure button:focus-visible { outline: 3px solid #03596c; outline-offset: 3px; }
.ni-adventure-backdrop { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ni-adventure-hud { position: absolute; z-index: 5; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; gap: 8px; }
.ni-adventure-hud button, .ni-welcome-back { border: 1px solid #ffffffad; border-radius: 16px; background: #06495de8; color: #fff9d9; padding: 8px 12px; box-shadow: 0 3px 8px #153d3d38; }
.ni-adventure-guidance { position: absolute; z-index: 2; top: max(73px, calc(env(safe-area-inset-top) + 65px)); left: 18px; right: 18px; text-align: center; padding: 8px 12px; border-radius: 18px; background: #fff8e5e8; box-shadow: 0 4px 14px #123d4d20; }
.ni-adventure h1 { margin: 0; font-size: clamp(18px, 4.5vw, 23px); line-height: 1.4; color: #193f45; text-shadow: none; }
.ni-adventure-instruction { font-size: clamp(14px, 3.6vw, 18px); line-height: 1.5; margin: 2px 0 0; }
.ni-adventure-sign { position: absolute; left: 40%; top: 18%; width: 60%; max-width: 290px; aspect-ratio: 1; filter: drop-shadow(0 8px 5px #69471938); }
.ni-adventure-sign-art { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ni-adventure-number-model { position: absolute; left: 36%; top: 13%; width: 28%; height: 27%; min-width: 48px; border: 0; padding: 0; background: transparent; }
.ni-adventure-number-model img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ni-adventure-slot { position: absolute; top: 40%; left: 12%; width: 76%; height: 20%; display: grid; place-items: center; }
.ni-adventure-slot-hint { color: #fff3cc; font-size: 14px; text-shadow: 0 1px 2px #522c15; }
.ni-adventure-fixed-tag { position: relative; width: 85%; height: 100%; display: grid; place-items: center; }
.ni-adventure-fixed-tag img { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.ni-adventure-fixed-tag b { position: relative; color: #58301b; font: 900 clamp(18px, 5vw, 27px) Georgia, serif; }
.ni-adventure-chick { position: absolute; z-index: 0; width: 48%; max-width: 235px; height: 36%; object-fit: contain; left: -3%; top: 21%; pointer-events: none; filter: drop-shadow(0 8px 5px #684a244a); }
.ni-adventure-learning-panel { position: absolute; z-index: 2; left: 16px; right: 16px; top: 49%; min-height: 174px; padding: 14px 12px; border-radius: 26px; background: #fffbefdf; border: 1px solid #ffffffed; box-shadow: 0 10px 30px #2a65413b, inset 0 1px 0 #fff; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.ni-adventure-quantity { display: grid; gap: 12px; }
.ni-adventure-counter { text-align: center; font-size: 18px; line-height: 1.4; font-weight: 800; color: #355745; }
.ni-adventure-apples { display: grid; grid-template-columns: repeat(var(--ni-count-columns), minmax(0, 96px)); justify-content: center; gap: 8px; direction: ltr; }
.ni-adventure-apple { position: relative; width: 100%; height: 96px; min-width: 48px; padding: 0; border: 1px solid #d0dacb; border-radius: 20px; background: #ffffff8c; overflow: hidden; transition: transform .15s, background .15s; }
.ni-adventure-apple img { position: absolute; left: -22.5%; top: -22.5%; width: 145%; height: 145%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 3px #623b252e); }
.ni-adventure-apple span { position: absolute; bottom: 2px; right: 3px; min-width: 24px; font: 800 15px system-ui; color: #1f534e; border-radius: 12px; background: #fff8dfed; }
.ni-adventure-apple span:empty { display: none; }
.ni-adventure-apple.is-counted { border-color: #15806a; background: #ecfff4c9; }
.ni-adventure-apple.is-count-focus { box-shadow: inset 0 0 0 2px #18745d; }
.ni-adventure-apples.is-many { gap: 6px; }
.ni-adventure-apples.is-many .ni-adventure-apple { height: 70px; border-radius: 15px; }
.ni-adventure-props { display: flex; justify-content: center; gap: 24px; direction: ltr; align-items: center; min-height: 140px; }
.ni-adventure-prop { position: relative; flex: 0 1 150px; max-width: 150px; width: 42%; border: 0; background: transparent; padding: 0; user-select: none; }
.ni-adventure-number { height: 140px; }
.ni-adventure-prop-base { position: absolute; width: 100%; height: 65%; bottom: 0; left: 0; object-fit: contain; pointer-events: none; }
.ni-adventure-prop-numeral { position: absolute; width: 66%; height: 72%; top: 0; left: 17%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 3px #5d3a2736); }
.ni-adventure-word { height: 88px; border-radius: 16px; }
.ni-adventure-word img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ni-adventure-word b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 clamp(19px, 5vw, 28px) Georgia, serif; color: #58301b; pointer-events: none; }
.ni-adventure-prop.is-selected, .ni-adventure-prop.is-hinted { outline: 2px solid #16765f; outline-offset: 4px; border-radius: 16px; }
.ni-adventure-status { position: absolute; z-index: 3; top: 78%; left: 18px; right: 18px; padding: 5px 9px; text-align: center; border-radius: 12px; background: #fff8e5e8; color: #164952; font-weight: 700; font-size: 13px; line-height: 1.55; }
.ni-adventure-status:empty { display: none; }
.ni-adventure-status[data-tone="retry"] { color: #8b341b; }
.ni-adventure-controls { position: absolute; z-index: 5; left: 14px; right: 14px; bottom: max(22px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 8px; }
.ni-adventure-controls button { flex: 1 1 0; min-width: 48px; max-width: 190px; border-radius: 17px; padding: 11px 7px; border: 2px solid #fff8d2; font-size: 14px; font-weight: 800; color: #5e3e20; background: #fff3cb; box-shadow: 0 4px 0 #124b5266; }
.ni-adventure-controls .ni-adventure-primary { color: #fff; background: #096d78; }
.ni-adventure-controls button:disabled { opacity: .65; }
#ni-learning-host { position: fixed; z-index: 900; inset: 0; background: #0f5a72; }
#ni-learning-host:empty { display: none; }
.ni-adventure-welcome .ni-welcome-back { position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top)); right: 12px; }
.ni-welcome-chick { position: absolute; width: 68%; height: 49%; object-fit: contain; left: 16%; top: 8%; filter: drop-shadow(0 9px 5px #684a244a); }
.ni-welcome-copy { position: absolute; bottom: max(25px, env(safe-area-inset-bottom)); left: 20px; right: 20px; padding: 18px; text-align: center; background: #fffbefe8; backdrop-filter: blur(9px); border: 1px solid #fff; border-radius: 24px; box-shadow: 0 8px 25px #31574930; }
.ni-welcome-copy p { font-size: 17px; line-height: 1.8; margin: 8px 0; }
.ni-welcome-copy button { border: 1px solid #fff8d2; padding: 8px 12px; border-radius: 14px; margin: 5px 3px 0; background: #fff2c9; color: #5e3e20; font-weight: 800; }
.ni-welcome-copy .ni-welcome-start { background: #096d78; color: white; }
.ni-welcome-audio { display: block; font-size: 12px; line-height: 1.6; color: #526653; }
@media (min-width: 600px) { .ni-adventure-sign { left: 44%; width: 38%; } .ni-adventure-chick { left: 10%; width: 34%; height: 39%; top: 19%; } .ni-adventure-learning-panel { left: 10%; right: 10%; padding: 20px; top: 50%; } .ni-adventure-status { left: 12%; right: 12%; } }
@media (max-height: 720px) { .ni-adventure-guidance { top: 70px; } .ni-adventure-sign { top: 22%; width: 50%; left: 48%; } .ni-adventure-chick { top: 24%; height: 31%; } .ni-adventure-learning-panel { top: 52%; padding: 8px; min-height: 130px; } .ni-adventure-props { min-height: 108px; } .ni-adventure-number { height: 108px; } .ni-adventure-apple { height: 76px; } .ni-adventure-apples.is-many .ni-adventure-apple { height: 54px; } .ni-adventure-quantity { gap: 5px; } .ni-adventure-status { top: 80%; font-size: 11px; } .ni-adventure-controls { bottom: 12px; } .ni-welcome-copy { padding: 12px; } .ni-welcome-copy p { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .ni-adventure *, .ni-adventure *::before { animation: none !important; transition: none !important; } }
