/* ----------------------------------------------------------------------------
   ACE NUTRITIONS. — Hoja de Componente 22
   Extraida de `tokens.css` en la Iteracion 07.7 (Regla #011).
   El ORDEN de carga en `app-shell.html` reproduce el del archivo original:
   la cascada CSS depende de el y no debe alterarse.
   -------------------------------------------------------------------------- */
/* ============================================================================
   ATLAS 3D DE MORFOLOGÍA DE LA MANO (REEMPLAZO DE EMOJIS POR MALLA 3D REAL)
   ============================================================================ */
.pn-hand-card[data-select-hand-pose] {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pn-hand-card[data-select-hand-pose]:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
}

.pn-hand-card.is-active-pose {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22), 0 8px 24px rgba(2, 6, 23, 0.14);
}

.pn-hand-3d-box {
  position: relative;
  width: 100%;
  height: 152px;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pn-hand-3d-box-edu {
  height: 138px;
  margin-bottom: 12px;
}

.pn-hand-3d-thumb-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.pn-hand-3d-tag {
  position: absolute;
  bottom: 7px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

.pn-hand-3d-tag-palm {
  color: rgb(251, 113, 133);
  border-color: rgba(244, 63, 94, 0.45);
}

.pn-hand-3d-tag-fist {
  color: rgb(52, 211, 153);
  border-color: rgba(16, 185, 129, 0.45);
}

.pn-hand-3d-tag-cupped {
  color: rgb(56, 189, 248);
  border-color: rgba(14, 165, 233, 0.45);
}

.pn-hand-3d-tag-thumb {
  color: rgb(251, 191, 36);
  border-color: rgba(245, 158, 11, 0.45);
}

.pn-hand-pose-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}

.pn-dot-palm {
  background: rgb(244, 63, 94);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.65);
}

.pn-dot-fist {
  background: rgb(16, 185, 129);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

.pn-dot-cupped {
  background: rgb(14, 165, 233);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.65);
}

.pn-dot-thumb {
  background: rgb(245, 158, 11);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
}

.pn-pillar-hand-3d-head {
  width: 100%;
}

.pn-open-pillar-card[data-select-hand-pose] {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pn-open-pillar-card[data-select-hand-pose]:hover,
.pn-open-pillar-card.is-active-pose {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18), 0 8px 20px rgba(2, 6, 23, 0.08);
}

/* ============================================================================
   LECTURA EN 1 VISTAZO: ESPEJO 3D MINIMALISTA (#calcFutureMeCard.is-glance-clean)
   ============================================================================ */
.pn-chamber-bio-strip.is-two-col {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 6px 12px;
  font-size: 12px;
}

.pn-future-controls.is-minimal-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.pn-future-controls.is-minimal-bar .pn-future-presets {
  display: inline-flex;
  gap: 6px;
}

.pn-future-controls.is-minimal-bar .pn-future-preset-btn {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.pn-future-slider-wrap.is-inline-slider {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(2, 6, 23, 0.45);
  border-radius: 999px;
  margin: 0;
}

.pn-slider-inline-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.pn-future-gate-cta.is-inline-cta {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.pn-future-gate-cta.is-inline-cta .ace-btn-row {
  margin: 0;
}

@media (max-width: 960px) {
  .pn-future-controls.is-minimal-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pn-future-controls.is-minimal-bar .pn-future-presets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
}

.pn-teaser-card.is-compact-strip {
  padding: 14px 18px;
}

.pn-teaser-kpi-grid.is-2col-clean {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.pn-hand-atlas-layout.is-4col-only {
  display: block;
  margin-top: 8px;
}

.pn-hand-portions-grid.is-4col-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 960px) {
  .pn-teaser-kpi-grid.is-2col-clean {
    grid-template-columns: 1fr;
  }

  .pn-hand-portions-grid.is-4col-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .pn-hand-portions-grid.is-4col-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   MODAL DE CONVERSIÓN FULL-SCREEN CON OVERLAY OPACO Y LÍMITE DE 4 SEMANAS
   ============================================================================ */
.pn-lead-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.pn-lead-gate-overlay.kx-hidden {
  display: none;
}

.pn-lead-gate-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(45, 212, 191, 0.28);
}

.pn-gate-preview-4w-btn {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
}

.pn-future-preset-btn.is-locked-step {
  opacity: 0.72;
  border-style: dashed;
}

/* ============================================================================
   CONTROL HÍBRIDO TECLADO + BARRA TIPO VOLUMEN + BOTONES (- / +) EN /STUDIO
   ============================================================================ */
.ace-vol-combo {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 4px 6px 6px;
  background: var(--bg-studio);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ace-vol-combo:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

.ace-vol-combo:focus-within {
  background: var(--bg-surface);
  border-color: var(--jade);
  box-shadow: 0 0 0 3px var(--jade-soft);
}

.ace-vol-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.ace-vol-num-input.ace-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  min-height: 26px;
  height: 26px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  appearance: textfield;
  -moz-appearance: textfield;
}

.ace-vol-num-input.ace-input:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

.ace-vol-num-input.ace-input::-webkit-outer-spin-button,
.ace-vol-num-input.ace-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ace-vol-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink-secondary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.ace-vol-step-btn:hover {
  background: var(--jade-soft);
  color: var(--jade);
  border-color: rgba(13, 148, 136, 0.24);
}

.ace-vol-step-btn:active {
  transform: scale(0.95);
}

.ace-vol-slider {
  width: 100%;
  height: 5px;
  margin: 0;
  padding: 0;
  accent-color: var(--jade);
  cursor: ew-resize;
  opacity: 0.88;
}

.ace-vol-slider:hover,
.ace-vol-slider:focus {
  opacity: 1;
}

/* ============================================================================
   SIMULADOR 3D EN /STUDIO (PESO META + CONTROL DESLIZABLE ESTILO CALCULADORA)
   ============================================================================ */
.ace-studio-goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-studio);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  flex-wrap: wrap;
}

.ace-studio-goal-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ace-studio-goal-combo {
  width: 132px;
  padding: 3px 5px;
  background: var(--bg-surface);
}

.ace-studio-goal-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ace-studio-goal-chips .ace-btn.is-active {
  background: var(--jade-soft);
  color: var(--jade);
  border-color: rgba(13, 148, 136, 0.28);
  font-weight: 600;
}

.ace-studio-future-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-studio);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}

.ace-studio-future-bar .ace-future-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.ace-studio-slider-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
}

.ace-studio-slider-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--jade);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .ace-studio-future-bar {
    grid-template-columns: 1fr;
  }
}
