.nm { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 16px; }
.nm:fullscreen { display: flex; flex-direction: column; justify-content: center; padding: 32px; border-radius: 0; }
.nm-stage { position: relative; border-radius: calc(var(--radius) - 4px); overflow: hidden; background: linear-gradient(#cfe6f2, #eaf4e4 70%); min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 16px 16px 0; transition: background .4s; }
.nm:fullscreen .nm-stage { flex: 1; }
.nm[data-state="loud"] .nm-stage { background: linear-gradient(#f3d6cf, #f6e6df 70%); }
.nm-scene { position: absolute; inset: 0; }
.nm-sun { position: absolute; top: 24px; right: 32px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); opacity: .85; transition: transform .6s, opacity .6s; }
.nm[data-state="loud"] .nm-sun { transform: translateY(40px); opacity: .3; }
.nm-critters { position: absolute; left: 0; right: 0; bottom: 64px; display: flex; justify-content: space-evenly; padding: 0 16px; }
.nm-critter { font-size: clamp(36px, 7vw, 72px); line-height: 1; transform: translateY(120%); opacity: 0; transition: transform .7s cubic-bezier(.2,.9,.3,1.3), opacity .5s; transition-delay: calc(var(--i) * 40ms); }
.nm:fullscreen .nm-critter { font-size: clamp(56px, 10vw, 140px); }
.nm-critter.is-up { transform: translateY(0); opacity: 1; }
.nm[data-state="warn"] .nm-critter.is-up { animation: nm-nervous .35s ease-in-out infinite alternate; }
@keyframes nm-nervous { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(8px) rotate(4deg); } }
.nm-grass { position: absolute; left: 0; right: 0; bottom: 0; height: 88px; background: var(--primary); border-radius: 60% 60% 0 0 / 28px 28px 0 0; }
.nm-lights { display: none; position: relative; gap: 16px; padding: 16px 20px; background: #1d2a1f; border-radius: 999px; margin: auto 0 16px; }
.nm-light { width: 72px; height: 72px; border-radius: 50%; opacity: .18; transition: opacity .25s, box-shadow .25s; }
.nm:fullscreen .nm-light { width: 18vh; height: 18vh; }
.nm-red { background: #e5484d; } .nm-amber { background: #f5a524; } .nm-green { background: #30a46c; }
.nm[data-state="loud"] .nm-red, .nm[data-state="warn"] .nm-amber, .nm[data-state="quiet"] .nm-green { opacity: 1; box-shadow: 0 0 32px currentColor; }
.nm[data-view="lights"] .nm-scene { display: none; }
.nm[data-view="lights"] .nm-lights { display: flex; }
.nm[data-view="lights"] .nm-stage { background: #eef2ec; justify-content: center; }
.nm-monster { display: none; position: absolute; inset: 0; }
.nm[data-view="monster"] .nm-scene { display: none; }
.nm[data-view="monster"] .nm-monster { display: block; }
.nm[data-view="monster"] .nm-stage { background: linear-gradient(#22304f, #3f5a78 75%); }
.nm[data-view="monster"][data-state="loud"] .nm-stage { background: linear-gradient(#47263a, #7a4550 75%); }
.nm[data-view="monster"] .nm-streak { background: rgba(255,255,255,.88); }
.nm-moon { position: absolute; top: 20px; right: 32px; width: 48px; height: 48px; border-radius: 50%; background: #f7ecc4; }
.nm-hill { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: #1f4a3d; border-radius: 60% 60% 0 0 / 24px 24px 0 0; }
.nm-fly { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #ffe27a; box-shadow: 0 0 18px 6px rgba(255,226,122,.65); opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.nm-fly.is-up { opacity: 1; transform: none; }
.nm:fullscreen .nm-fly { width: 26px; height: 26px; }
.nm-moss { position: absolute; left: 50%; bottom: 8px; height: 58%; transform: translateX(-50%); transform-origin: 50% 100%; transition: transform .4s; }
.nm-lids, .nm-brows, .nm-m-oh, .nm-m-roar { opacity: 0; }
.nm-ears, .nm-pupils { transition: transform .4s; }
.nm[data-state="idle"] .nm-lids { opacity: 1; }
.nm[data-state="warn"] .nm-m-smile, .nm[data-state="loud"] .nm-m-smile { opacity: 0; }
.nm[data-state="warn"] .nm-m-oh { opacity: 1; }
.nm[data-state="warn"] .nm-pupils { transform: translateY(-5px); }
.nm[data-state="warn"] .nm-moss { animation: nm-shiver .3s ease-in-out infinite alternate; }
.nm[data-state="loud"] .nm-m-roar, .nm[data-state="loud"] .nm-brows { opacity: 1; }
.nm[data-state="loud"] .nm-ears { transform: translateY(14px); }
.nm[data-state="loud"] .nm-moss { transform: translateX(-50%) scale(1.12); }
@keyframes nm-shiver { from { transform: translateX(-51%); } to { transform: translateX(-49%); } }
@media (prefers-reduced-motion: reduce) { .nm[data-state="warn"] .nm-moss { animation: none; } }
.nm-dino { display: none; position: absolute; inset: 0; }
.nm[data-view="dino"] .nm-scene { display: none; }
.nm[data-view="dino"] .nm-dino { display: block; }
.nm[data-view="dino"] .nm-stage { background: linear-gradient(#bfe3ea, #f5ecd2 75%); }
.nm[data-view="dino"][data-state="loud"] .nm-stage { background: linear-gradient(#e7b09a, #f3d9b8 75%); }
.nm-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: #b9a86a; border-radius: 60% 60% 0 0 / 20px 20px 0 0; }
.nm-volcano { position: absolute; left: 6%; bottom: 36px; height: 50%; }
.nm-sauro { overflow: visible; position: absolute; left: 50%; bottom: 8px; height: 58%; transform: translateX(-50%); }
.nm-fern { position: absolute; bottom: 20px; height: 24%; margin-left: -3%; transform: scaleY(0); transform-origin: 50% 100%; transition: transform .8s; }
.nm-fern.is-up { transform: none; }
.nm-smoke, .nm-lava, .nm-d-lid, .nm-d-open { opacity: 0; transition: opacity .4s; }
.nm-neck { transform-origin: 92px 128px; transition: transform .6s; }
.nm[data-state="quiet"] .nm-neck { transform: rotate(-24deg); }
.nm[data-state="idle"] .nm-d-lid { opacity: 1; }
.nm[data-state="warn"] .nm-smoke, .nm[data-state="loud"] .nm-smoke, .nm[data-state="loud"] .nm-lava, .nm[data-state="loud"] .nm-d-open { opacity: 1; }
.nm[data-state="loud"] .nm-d-smile { opacity: 0; }
.nm[data-state="loud"] .nm-neck { transform: rotate(8deg); }
.nm[data-state="warn"] .nm-sauro { animation: nm-shiver .3s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .nm[data-state="warn"] .nm-sauro { animation: none; } }
.nm-status { position: relative; margin: 0; font-size: 22px; font-weight: 600; color: var(--text); text-align: center; background: rgba(255,255,255,.85); padding: 8px 16px; border-radius: 999px; }
.nm:fullscreen .nm-status { font-size: 36px; }
.nm-streak { position: relative; margin: 8px 0 0; color: var(--text); font-size: 16px; background: rgba(255,255,255,.7); padding: 4px 12px; border-radius: 999px; }
.nm[data-state="idle"] .nm-streak { visibility: hidden; }
.nm-best { color: var(--muted); }
.nm-meter { position: relative; height: 16px; margin: 16px 0; border-radius: 999px; background: linear-gradient(90deg, #30a46c 0 55%, #f5a524 55% 80%, #e5484d 80%); opacity: .25; overflow: visible; }
.nm[data-state]:not([data-state="idle"]) .nm-meter { opacity: 1; background: #e3e9e1; }
.nm-fill { height: 100%; width: 0; border-radius: 999px; background: #30a46c; transition: background .3s; }
.nm[data-state="warn"] .nm-fill { background: #f5a524; }
.nm[data-state="loud"] .nm-fill { background: #e5484d; }
.nm-limit { position: absolute; top: -6px; bottom: -6px; width: 4px; margin-left: -2px; left: 60%; background: var(--text); border-radius: 2px; }
.nm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.nm-btn { min-height: 44px; padding: 0 24px; border-radius: var(--radius); border: 2px solid var(--primary); background: var(--primary); color: #fff; font: 600 16px/1 var(--font-body); cursor: pointer; }
.nm-btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.nm-btn:focus-visible, .nm-field select:focus-visible, .nm-field input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nm-ghost { background: transparent; color: var(--primary); }
.nm-ghost:hover { background: var(--bg); color: var(--primary-dark); }
.nm-field { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.nm-field select { min-height: 40px; border-radius: 8px; border: 1px solid var(--line); padding: 0 8px; font: 14px var(--font-body); background: #fff; color: var(--text); }
.nm-sens { accent-color: var(--primary); width: 160px; }
.nm-vol { accent-color: var(--primary); width: 100px; }
.nm[data-alarm="off"] .nm-vol-field, .nm[data-alarm="off"] .nm-test { display: none; }
.nm-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.nm-help { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.nm-error { margin: 12px 0 0; padding: 12px 16px; border-radius: 8px; background: #fdecea; color: #8a1f17; font-size: 14px; }
@media (max-width: 640px) {
  .nm-stage { min-height: 260px; }
  .nm-status { font-size: 18px; }
  .nm-moss, .nm-sauro { height: 44%; }
  .nm-volcano { left: 0; height: 36%; }
  .nm-fern { height: 14%; margin-left: -5%; }
  .nm-moon { display: none; }
  .nm-light { width: 56px; height: 56px; }
  .nm-controls { flex-direction: column; align-items: stretch; }
  .nm-btn { width: 100%; }
  .nm-sens, .nm-vol { flex: 1; width: auto; }
}
