/* ============================================================
   Menú NebelAI · réplica 3D de la referencia del cliente
   Las tarjetas están en capas (translateZ) y se separan al inclinar.
   ============================================================ */
#menu { background: radial-gradient(60% 50% at 50% 62%, rgba(249, 115, 22, .10), transparent 70%); }
.nm-stage { position: relative; perspective: 2200px; perspective-origin: 50% 40%; padding: 10px 0 70px; }
.nm-float { position: relative; transform-style: preserve-3d; will-change: transform; }
.nm {
  --nm-a: 1; --nm-wv: 360; --nm-rv: 28;
  --or: #f97316; --or2: #ffa24a; --peach: #ffbd7a; --tx: #f3eee8; --mu: #9a9389;
  position: relative; transform-style: preserve-3d;
  display: grid; grid-template-columns: 210px 1fr;
  font-family: var(--f-b); color: var(--tx);
  background: rgba(11, 10, 12, var(--nm-a));
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 18px;
  box-shadow: 0 70px 120px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .02) inset, 0 0 90px rgba(249, 115, 22, .14);
  transition: background .3s;
}
.nm::before { content: ''; position: absolute; inset: -1px; border-radius: 18px; pointer-events: none; padding: 1px; background: linear-gradient(140deg, rgba(255, 162, 74, .7), rgba(255, 255, 255, .04) 35%, rgba(255, 255, 255, .02) 65%, rgba(249, 115, 22, .5)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.nm-shadow { position: absolute; left: 10%; right: 10%; bottom: -60px; height: 90px; border-radius: 50%; background: radial-gradient(closest-side, rgba(249, 115, 22, .35), transparent); filter: blur(24px); transform: translateZ(-120px) rotateX(80deg); pointer-events: none; }
.nm-launch::after { content: ''; position: absolute; inset: 0; border-radius: 18px; pointer-events: none; background: linear-gradient(100deg, transparent 35%, rgba(255, 162, 74, .28) 50%, transparent 65%); background-size: 250% 100%; animation: nmsweep 1.1s var(--ease) forwards; }
@keyframes nmsweep { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* Barra lateral */
.nm-side { display: flex; flex-direction: column; gap: 4px; padding: 22px 14px; border-right: 1px solid rgba(255, 255, 255, .06); transform: translateZ(8px); }
.nm-logo { display: flex; align-items: center; gap: 11px; margin: 0 0 26px 4px; font: 700 18px/1 var(--f-b); }
.nm-logo-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #17151f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.nm-logo-ic svg { width: 18px; height: 22px; }
.nm-nav { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 11px; font: 600 15px/1 var(--f-b); color: #cfc8bf; }
.nm-nav .ico { width: 18px; height: 18px; }
.nm-nav.on { background: #3b1d0b; color: #fff; box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .25); }
.nm-nav.on .ico { color: var(--peach); }
.nm-caret { margin-left: auto; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #8b857c; }
.nm-sub { display: flex; align-items: center; gap: 10px; padding: 9px 14px 9px 28px; font: 500 13.5px/1.2 var(--f-b); color: var(--mu); }
.nm-sub .ico { width: 15px; height: 15px; }

/* Columna principal */
.nm-main { position: relative; transform-style: preserve-3d; min-width: 0; }
.nm-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 26px 18px; }
.nm-top h3 { font: 700 27px/1.1 var(--f-b); }
.nm-top p { margin-top: 4px; font-size: 14px; color: var(--mu); }
.nm-pbtn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 9px; font: 600 14px/1 var(--f-b); color: #a9a29a; background: #1b1918; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); transition: color .2s, box-shadow .2s; }
.nm-pbtn:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(249, 115, 22, .6); }
.nm-pbtn .ico { width: 16px; height: 16px; }
.nm-body { display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--nm-wv) * .97px); gap: 16px; padding: 0 26px 16px; transform-style: preserve-3d; transition: grid-template-columns .2s; }
.nm-col { display: grid; gap: 12px; align-content: start; transform-style: preserve-3d; min-width: 0; }
.nm-card { position: relative; padding: 15px 16px; background: rgba(22, 19, 17, var(--nm-a)); border: 1px solid rgba(255, 255, 255, .075); border-radius: calc(var(--nm-rv) * .43px); box-shadow: 0 22px 34px rgba(0, 0, 0, .38); transition: border-radius .2s, background .3s; }
.nm-z1 { transform: translateZ(22px); }
.nm-z2 { transform: translateZ(40px); }
.nm-z3 { transform: translateZ(58px); }
.nm-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 11px; }
.nm-card-h > span { display: flex; align-items: center; gap: 9px; font: 600 14.5px/1 var(--f-b); }
.nm-card-h .ico { width: 17px; height: 17px; color: #e7e1d9; }
.nm-tag { padding: 5px 10px; border-radius: 6px; font: 700 11px/1 var(--f-c); letter-spacing: .14em; text-transform: uppercase; color: #f0abfc; background: #2a1330; box-shadow: inset 0 0 0 1px #5b2a66; }
.nm-keys { display: flex; flex-wrap: wrap; gap: 8px; min-height: 54px; padding: 10px; border-radius: 9px; background: #0f0d0c; border: 1px solid rgba(255, 255, 255, .05); }
.nm-key { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 11px; border-radius: 7px; font: 600 13px/1 var(--f-b); color: #c7d2fe; background: #1b2140; box-shadow: inset 0 0 0 1px #3b4a8a; animation: nmpop .35s var(--ease); }
.nm-key .ico { width: 14px; height: 14px; }
.nm-key button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: #a5b4fc; font-size: 15px; line-height: 1; }
.nm-key button:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@keyframes nmpop { from { transform: scale(.6); opacity: 0; } }
.nm-add { display: inline-flex; align-items: center; gap: 8px; margin-top: 11px; padding: 10px 18px; border-radius: 8px; font: 700 14px/1 var(--f-b); color: #1d0e02; background: linear-gradient(180deg, var(--or2), var(--or)); box-shadow: 0 8px 20px rgba(249, 115, 22, .35); transition: transform .2s, filter .2s; }
.nm-add:hover { transform: translateY(-1px); filter: brightness(1.08); }
.nm-add b { font-size: 18px; line-height: 0; }

.nm-range { display: grid; gap: 10px; padding: 6px 2px 10px; }
.nm-range + .nm-range { border-top: 1px solid rgba(255, 255, 255, .04); padding-top: 12px; }
.nm-range > span { display: flex; justify-content: space-between; align-items: center; }
.nm-range b { font: 600 14px/1 var(--f-b); color: #e7e1d9; }
.nm-range output { padding: 5px 9px; border-radius: 6px; font: 700 12px/1 var(--f-m); color: var(--peach); background: #201a15; }
.nm-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 3px; outline: none; cursor: pointer; background: linear-gradient(90deg, var(--or) var(--p, 50%), #2b2521 var(--p, 50%)); }
.nm-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 19px; height: 19px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 4px rgba(249, 115, 22, .25), 0 2px 8px rgba(0, 0, 0, .5); }
.nm-range input::-moz-range-thumb { width: 19px; height: 19px; border: 0; border-radius: 50%; background: var(--peach); }

.nm-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px; border-radius: 9px; background: #0f0d0c; border: 1px solid rgba(255, 255, 255, .05); transition: opacity .3s; }
.nm-row > b { font: 600 14px/1.2 var(--f-b); }
.nm-row.off .nm-chips { opacity: .4; filter: grayscale(.6); }
.nm-tog { position: relative; flex: none; width: 40px; height: 22px; border-radius: 11px; background: #3a3430; transition: background .25s; }
.nm-tog::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 4px rgba(0, 0, 0, .4); }
.nm-tog[aria-checked="true"] { background: var(--or); }
.nm-tog[aria-checked="true"]::after { transform: translateX(18px); }
.nm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; transition: opacity .3s, filter .3s; }
.nm-sw { width: 58px; height: 27px; border-radius: 6px; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), 0 0 14px color-mix(in srgb, var(--c) 50%, transparent); }
.nm-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 7px; font: 700 12px/1 var(--f-m); border: 1.5px solid; }
.nm-chip i { width: 10px; height: 10px; border-radius: 50%; }
.nm-c-green { color: #4ade80; border-color: #22c55e; background: rgba(34, 197, 94, .08); }
.nm-c-green i { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.nm-c-white { color: #fff; border-color: #e5e5e5; }
.nm-c-white i { border: 2px solid #fff; }
.nm-c-orange { color: var(--peach); border-color: var(--or); background: rgba(249, 115, 22, .1); }
.nm-c-orange i { background: var(--or); box-shadow: 0 0 8px var(--or); }

/* Vista previa */
.nm-prev { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nm-prev-t { text-align: center; font: 600 14px/1 var(--f-b); color: #cfc8bf; }
.nm-prev-in { flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; min-height: 360px; }
.nm-vs { display: flex; flex-direction: column; align-items: center; gap: 16px; font: 700 10.5px/1 var(--f-m); color: #8b857c; }
.nm-vtrack { --v: 100%; position: relative; flex: 1; width: 6px; border-radius: 3px; background: #2b2521; cursor: pointer; touch-action: none; }
.nm-vtrack::before { content: ''; position: absolute; inset: 0 -10px; }
.nm-vtrack:focus-visible { outline-offset: 6px; }
.nm-vfill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); border-radius: 3px; background: linear-gradient(0deg, var(--or), var(--or2)); }
.nm-vknob { position: absolute; left: 50%; bottom: var(--v); width: 19px; height: 19px; margin: 0 0 -9.5px -9.5px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 4px rgba(249, 115, 22, .3), 0 2px 8px rgba(0, 0, 0, .5); }
.nm-char { position: relative; overflow: hidden; border-radius: 10px; background: radial-gradient(circle at 50% 78%, #252a52 0%, #12152b 55%, #0b0d1c 100%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nm-char canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* personaje como imagen cuando WebGL no puede cargar texturas (página abierta con doble clic, file://) */
.nm-char-dom { position: absolute; left: 50%; bottom: 9%; height: 82%; width: auto; max-width: 92%; transform: translateX(-50%); object-fit: contain; pointer-events: none; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .65)); }
.nm-prev-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 600 12.5px/1 var(--f-b); color: #cfc8bf; }
.nm-prev-f > span { display: flex; align-items: center; gap: 8px; }
.nm-active { color: #22c55e; font: 700 11px/1 var(--f-m) !important; letter-spacing: .12em; }
.nm-active i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: ping 2s infinite; }
.nm-dot { width: 9px; height: 9px; border-radius: 50%; background: #6b6560; flex: none; }
.nm-dot-g { background: #22c55e; box-shadow: 0 0 10px #22c55e; }

/* Barra inferior */
.nm-bottom { display: flex; align-items: center; gap: 24px; margin: 0 26px 22px; padding: 12px 14px 12px 18px; border-radius: 11px; background: rgba(22, 19, 17, var(--nm-a)); border: 1px solid rgba(255, 255, 255, .075); box-shadow: 0 22px 34px rgba(0, 0, 0, .38); }
.nm-lic { display: flex; align-items: center; gap: 9px; font: 600 14px/1 var(--f-b); }
.nm-dur { font-size: 13px; color: #22c55e; }
.nm-go { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 11px 28px; border-radius: 9px; font: 700 15px/1 var(--f-b); color: #1d0e02; background: linear-gradient(180deg, var(--or2), var(--or)); box-shadow: 0 10px 24px rgba(249, 115, 22, .4); transition: transform .2s, filter .2s; }
.nm-go:hover { transform: translateY(-1px); filter: brightness(1.08); }
.nm-go .ico { width: 17px; height: 17px; }

@media (max-width: 1100px) {
  .nm { grid-template-columns: 1fr; }
  .nm-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
  .nm-logo { margin: 0 auto 0 0; }
  .nm-sub { display: none; }
}
@media (max-width: 860px) {
  .nm-body { grid-template-columns: 1fr; }
  .nm-prev-in { min-height: 320px; }
}
@media (max-width: 760px) {
  .nm-stage { padding-bottom: 40px; }
  .nm-side .nm-nav:not(.on) { display: none; }
  .nm-top { padding: 18px 16px 14px; }
  .nm-top h3 { font-size: 22px; }
  .nm-pbtn span { display: none; }
  .nm-body { padding: 0 14px 14px; }
  .nm-row { flex-wrap: wrap; }
  .nm-chips { margin-left: 0; width: 100%; }
  .nm-bottom { flex-wrap: wrap; gap: 10px 16px; margin: 0 14px 14px; }
  .nm-go { width: 100%; justify-content: center; margin-left: 0; }
  .nm-z1, .nm-z2, .nm-z3, .nm-side { transform: none; }
}
