/* ===============================
   IOTT Predx — app.css
   =============================== */

/* --- FUENTE OPTOTYPES --- */
@font-face {
  font-family: 'Optotypes';
  src: url('fonts/Optician-Sans.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

html,
body {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {

  html,
  body {
    scroll-behavior: auto;
  }
}

.clinic-name {
  display: none;
}

/* --- CONTENEDOR GENERAL --- */
#predx-root {
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(110px, 12vh, 160px) 20px 340px;
  /* top aumentado para el logo centrado */
  min-height: 80vh;
  box-sizing: border-box;
  position: relative;
  transition: background-color 0.3s, color 0.3s;
}

input#calibration-slider {
  margin-bottom: 50px;
}

/* Contenedor de la zona de calibración */
#calibration-area {
  max-width: 600px;
  margin: 0 auto;
}

/* Contenedor de los controles (botones y slider) */
.calibration-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* El slider ahora ocupa el espacio flexible */
.calibration-controls input[type="range"] {
  width: 100%;
}

/* Botones de ajuste fino (-) y (+) */
.btn-adjust {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* Circulares */
  font-size: 1.8rem;
  font-weight: 600;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  /* Evita que se encojan */
  /* Heredar estilos de botón "Atrás" para consistencia */
  background-color: #e9eef3;
  color: #0d3b66;
  border: 1px solid #d7dee6;
  box-shadow: none;
}

.btn-adjust:hover {
  background-color: #d9e4ed !important;
  /* Añadimos important para sobreescribir :hover general */
}

/* Agrupador del paso */
#predx-root #step-content {
  width: min(980px, 94vw);
  margin: 16px auto 0;
  text-align: center;
  /* centra textos y botones inline/inline-block */
}

/* --- LOGO CABECERA (centrado y responsive) --- */
.app-header {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
  margin-bottom: 40px;
  z-index: 2;
}

.app-header img {
  display: block;
  width: clamp(200px, 22vw, 280px);
  height: auto;
  max-width: 100%;
}

/* --- TIPOGRAFÍA --- */
#predx-root h1 {
  font-weight: 700;
  font-size: clamp(1.9rem, 2.5vw + 1rem, 2.6rem);
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
  color: #000;
  /* Asegurar color base */
}

/* === Fix: imágenes de pasos, máx 490px y responsivas === */
#predx-root .step-image-container {
  width: min(300px, 92vw);
  max-width: 300px;
  margin: 0 auto 6px;
  aspect-ratio: 1 / 1;
}

#predx-root .step-image {
  /* antes: width: 70%; */
  display: block;
  width: 100%;
  max-width: 490px;
  height: auto;
  /* que no obliguen a scroll vertical si la pantalla es “baja” */
  max-height: min(60vh, 520px);
  object-fit: contain;
}

/* --- BOTONES --- */
#predx-root button {
  background-color: #0170b9;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 0px 12px 0px 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .05s ease, background-color 0.3s ease, box-shadow .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px 12px;
  /* separación entre botones */
  /*min-width: 160px;*/
  box-shadow: 0 6px 14px rgba(1, 112, 185, .15);
}

#predx-root button:hover {
  background-color: #015a94;
  box-shadow: 0 8px 18px rgba(1, 112, 185, .22);
}

#predx-root button:active {
  transform: translateY(1px);
}

#predx-root button:disabled {
  background-color: #8da6ba;
  box-shadow: none;
  cursor: not-allowed;
}

/* Variante para "Atrás" */
#predx-root button[data-action="back"] {
  background-color: #e9eef3;
  color: #0d3b66;
}

#predx-root button[data-action="back"]:hover {
  background-color: #d9e4ed;
}

/* --- RESULTADOS --- */
#predx-root .results-summary {
  background-color: rgba(0, 0, 0, 0.06);
  padding: 20px;
  border-radius: 12px;
  margin: 20px auto;
}

/* --- ACUITY (fuente del optotipo) --- */
#acuity-test-area div {
  font-family: 'Optotypes', sans-serif;
}

/* --- FORMULARIO DE CONTACTO (p03_contact) --- */
#predx-root label[for="contact_name"],
#predx-root label[for="contact_email"],
#predx-root label[for="contact_phone"] {
  display: block !important;
  float: none !important;
  width: min(560px, 92vw);
  margin: 0 auto 6px;
  text-align: left;
  font-weight: 600;
  color: #2f3b48;
}

#predx-root #contact_name,
#predx-root #contact_email,
#predx-root #contact_phone {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: min(560px, 92vw);
  margin: 6px auto 22px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d7dee6;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
  font-size: 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}

#predx-root #contact_name:focus,
#predx-root #contact_email:focus,
#predx-root #contact_phone:focus {
  outline: none;
  border-color: #0170b9;
  box-shadow: 0 0 0 4px rgba(1, 112, 185, .12);
}

#predx-root input::placeholder {
  color: #9aa7b3;
}

/* Checkbox de marketing (mismo ancho y alineación limpia) */
#predx-root #step-content div>label:not([for]) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: min(560px, 92vw);
  margin: 4px auto 26px;
  text-align: left;
}

#predx-root input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0170b9;
}

/* Más aire sobre los botones del paso */
#predx-root [data-action="back"],
#predx-root [data-action="next"] {
  margin-top: 6px;
}


/* Caja del QR centrada y con fondo blanco (contraste en dark) */
#predx-root #qr-code-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 224px;
  height: 224px;
  margin: 0 auto 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  padding: 12px;
}

#predx-root #qr-code-container canvas,
#predx-root #qr-code-container img {
  display: block;
  width: 200px;
  height: 200px;
}

/* Texto de estado centrado bajo el QR */
#predx-root #remote-status-container {
  text-align: center;
  margin: 8px auto 6px;
  min-height: 1.25em;
  /* evita saltos cuando cambia el texto */
  color: #4a5568;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  #predx-root .step-image-container {
    width: min(92vw, 490px);
  }

  #predx-root button {
    width: 100%;
    max-width: 360px;
  }

  #predx-root {
    padding-top: 96px;
  }

  #predx-root #qr-code-container {
    width: 208px;
    height: 208px;
    padding: 10px;
  }

  #predx-root #qr-code-container canvas,
  #predx-root #qr-code-container img {
    width: 188px;
    height: 188px;
  }
}

@media (max-height: 740px) {
  #predx-root {
    padding-top: clamp(72px, 8vh, 110px);
  }

  #predx-root .step-image {
    max-height: 50vh;
  }

  /* más margen para textos/botones */
}

/* ===== p08_profile – "Sobre ti" (select de edad) ===== */

/* Más espacio bajo el título del paso */
#predx-root #step-content>h1+p {
  margin-top: 8px;
  margin-bottom: 22px;
}

/* Label alineado a la izquierda dentro de un contenedor centrado */
#predx-root label[for="profile_age_band"] {
  display: block;
  width: min(420px, 92vw);
  margin: 0 auto 8px;
  text-align: left;
  font-weight: 600;
  color: #2f3b48;
}

/* Select con mejor tamaño, borde suave y flecha personalizada */
#predx-root #profile_age_band {
  display: block;
  width: min(420px, 92vw);
  margin: 0 auto 26px;
  padding: 12px 44px 12px 14px;
  font-size: 1rem;
  background: #fff;
  border: 1px solid #d7dee6;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .03);
  transition: border-color .2s ease, box-shadow .2s ease;

  /* Quitar estilo nativo y poner flecha */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

/* Enfoque accesible */
#predx-root #profile_age_band:focus {
  outline: none;
  border-color: #0170b9;
  box-shadow: 0 0 0 4px rgba(1, 112, 185, .12);
}

/* Botones: un poco más de aire arriba en este paso */
#predx-root #profile_age_band~[data-action] {
  margin-top: 10px;
}

/* Responsive fino */
@media (max-width: 480px) {

  #predx-root label[for="profile_age_band"],
  #predx-root #profile_age_band {
    width: min(560px, 94vw);
  }
}

/* ===== Síntomas (sliders 1–10) ===== */
#predx-root .symptom-sliders {
  width: min(620px, 92vw);
  /* barras más cortas y centradas */
  margin: 8px auto 6px;
}

#predx-root .slider-group {
  margin: 22px 0 30px;
  /* más aire entre barras */
}

#predx-root .slider-group label {
  display: block;
  text-align: left;
  margin: 0 0 10px;
  font-weight: 600;
  color: #2f3b48;
}

/* Pista del slider */
#predx-root .slider-group input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#predx-root .slider-group input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #e7edf3;
  border-radius: 999px;
}

#predx-root .slider-group input[type="range"]::-moz-range-track {
  height: 8px;
  background: #e7edf3;
  border-radius: 999px;
}

/* Thumb */
#predx-root .slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  /* centra en la pista */
  border-radius: 50%;
  background: #0d6db6;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

#predx-root .slider-group input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0d6db6;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}

#predx-root .slider-group input[type="range"]:focus {
  box-shadow: 0 0 0 4px rgba(13, 109, 182, .18);
}

/* Escala bajo los sliders */
#predx-root .slider-scale {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(620px, 92vw);
  margin: 8px auto 0;
  font-size: .9rem;
  color: #6c7a89;
}

#predx-root .slider-scale .min,
#predx-root .slider-scale .max {
  min-width: 2ch;
  text-align: center;
}

/* Grupo del slider */
#predx-root .slider-group {
  width: min(620px, 92vw);
  margin: 18px auto 28px;
}

/* Línea de “Valor: x/10” */
#predx-root .slider-value {
  text-align: center;
  margin-top: 8px;
  font-size: .95rem;
  color: #5d6b78;
}

/* Marcas 1–5–10 bajo el slider */
#predx-root .slider-scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  /* tres columnas iguales */
  width: 100%;
  margin-top: 6px;
  font-size: .9rem;
  color: #6c7a89;
}

#predx-root .slider-scale span:nth-child(1) {
  justify-self: start;
}

#predx-root .slider-scale span:nth-child(2) {
  justify-self: center;
}

#predx-root .slider-scale span:nth-child(3) {
  justify-self: end;
}

#predx-root .checklist-container {
  text-align: center;
  margin: 0 30%;
}

/* ===== DUOCHROME (Rojo-Verde) ===== */
#predx-root .duo-frame {
  padding: 0px;
  background: #fff;
  border-radius: 16px;
}

#predx-root .duo-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 12px;
  overflow: hidden;
}

#predx-root .duo-half {
  display: flex;
  align-items: center;
  justify-content: center;
}

#predx-root .duo-half.red {
  background: rgb(255 0 0);
}

#predx-root .duo-half.green {
  background: rgb(0 255 0);
}

#predx-root .duo-letters {
  text-align: center;
  line-height: 1.1;
}

#predx-root .duo-letters .row {
  color: #000;
  font-family: 'Optotypes', 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: .12em;
  margin: .22em 0;
}

/* Tamaños decrecientes por fila, grandes y legibles */
#predx-root .duo-letters .r1 {
  font-size: clamp(22px, 2.6vw, 40px);
}

#predx-root .duo-letters .r2 {
  font-size: clamp(19px, 2.3vw, 34px);
}

#predx-root .duo-letters .r3 {
  font-size: clamp(17px, 2.0vw, 29px);
}

#predx-root .duo-letters .r4 {
  font-size: clamp(15px, 1.7vw, 25px);
}

#predx-root .duo-letters .r5 {
  font-size: clamp(13px, 1.5vw, 21px);
}

#predx-root .duo-letters .r6 {
  font-size: clamp(12px, 1.3vw, 18px);
}

/* Botonera: izquierda/centro/derecha */
#predx-root .duo-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(10px, 1.6vw, 20px);
  margin-bottom: clamp(12px, 2vw, 18px);
}

#predx-root .duo-btn {
  padding: 12px 16px;
  border-radius: 0px 12px 0px 12px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(1, 112, 185, .12);
  border: none;
  cursor: pointer;
}

#predx-root .duo-btn.left {
  background: #dbe9ff;
  color: #0d3b66;
  justify-self: start;
}

#predx-root .duo-btn.right {
  background: #dbe9ff;
  color: #0d3b66;
  justify-self: end;
}

#predx-root .duo-btn.neutral {
  background: #0170b9;
  color: #fff;
  justify-self: center;
}

#predx-root .duo-btn:hover {
  filter: brightness(.95);
}

#predx-root .duo-wrap {
  margin: 0 auto;
  max-width: 960px;
  width: min(980px, 95vw);
}

/* Asegura 50/50 y sin separaciones */
#predx-root .duo-panel {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  border-radius: 16px;
}

#predx-root .duo-half {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(56px, 10vh, 120px);
  line-height: 1;
  font-weight: 900;
  user-select: none;
  -webkit-user-select: none;
}

#predx-root .duo-half.red {
  background: rgb(255, 0, 0);
  color: #000;
  padding-right: 64px;
  text-align: left;
  /* el texto lo manejamos por grid en .duo-row */
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

#predx-root .duo-half.green {
  background: rgb(0, 255, 0);
  color: #000;
  padding-left: 64px;
  text-align: left;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

/* Cada fila es un grid de 3 celdas de ancho fijo, así A|O|R y R|O|A quedan alineados al centro */
#predx-root .duo-row {
  display: grid;
  grid-template-columns: repeat(3, 1ch);
  /* 1ch = ancho de carácter */
  column-gap: .8ch;
  margin: .22em 0;
  white-space: nowrap;
  letter-spacing: 0;
  /* no necesitamos tracking extra */
}

/* Empuja el bloque de 3 celdas contra la “costura” central */
#predx-root .duo-half.red .duo-row {
  margin-left: auto;
  justify-items: end;
}

#predx-root .duo-half.green .duo-row {
  margin-right: auto;
  justify-items: start;
}

#predx-root .duo-cell {
  display: block;
}

/* Botonera con aire */
#predx-root .duo-actions {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 22px 6px 0
}

#predx-root .duo-btn {
  padding: 12px 18px;
  border-radius: 12px 0px 12px 0px;
  border: 0;
  cursor: pointer;
  font-weight: 700
}

#predx-root .duo-btn.neutral {
  background: #fff;
  color: #222;
}

#predx-root .duo-btn.left,
#predx-root .duo-btn.right {
  background: #e5efff;
}

/* Responsive móvil: apilamos botones y ampliamos panel */
@media (max-width: 768px) {
  #predx-root .duo-half {
    aspect-ratio: 4 / 3;
  }

  #predx-root .duo-actions {
    grid-template-columns: 1fr;
  }

  #predx-root .duo-btn.left,
  #predx-root .duo-btn.right,
  #predx-root .duo-btn.neutral {
    justify-self: stretch;
  }
}

/* Oscurecer TODA la página cuando el paso sea oscuro */
body.dark-page {
  background: #54595F !important;
}

body.dark-page #page,
body.dark-page .site,
body.dark-page .elementor,
body.dark-page .elementor-section-wrap,
body.dark-page #content {
  background: transparent !important;
}

/* ===== Test del Reloj ===== */
#predx-root .clock-wrap {
  width: min(980px, 94vw);
  margin: 10px auto 22px;
}

#predx-root .clock-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 18px;
}

#predx-root .clock-svg {
  width: min(540px, 86vw);
  height: auto;
  display: block;
}

/* Botones de sector */
#predx-root .clock-sectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px auto 6px;
  max-width: 720px;
}

#predx-root .seg-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff !important;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  grid-column: span 3;
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
}

p.clock-step2 {
  text-align: center;
}



/* Intensidad */
#predx-root .intensity {
  margin: 12px auto 8px;
  max-width: 720px;
}

#predx-root .intensity label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2f3b48;
}

#predx-root .intensity input[type="range"] {
  width: 100%;
}

.slider-row {
  margin-bottom: 60px;
}

/* Marcas 1,5,10 del slider */
#predx-root .slider-scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: .95rem;
  color: #6b7a89;
  margin-top: 4px;
}

#predx-root .slider-scale span:nth-child(1) {
  justify-self: start;
}

#predx-root .slider-scale span:nth-child(2) {
  justify-self: center;
}

#predx-root .slider-scale span:nth-child(3) {
  justify-self: end;
}

/* Listas dentro del paso actual: sin viñetas */
#predx-root #step-content ul {
  list-style: none;
  /* quita los puntos */
  padding-left: 0;
  /* elimina la sangría de la lista */
  margin: 10px auto 18px;
  /* espaciado agradable */
  max-width: 560px;
  /* que no se haga kilométrica en desktop */
}

#predx-root #step-content ul li {
  margin: 6px 0;
  /* separación entre ítems */
}

body.predx-dark {
  background: #54595f;
  color: #fff;
}

/* Botones de sector */
#predx-root .clock-sectors {
  /*display: flex;
    flex-direction: column;*/
  align-items: center;
  gap: 12px;
  /* Espacio uniforme entre botones */
  margin: 20px auto 15px;
  max-width: 380px;
  /* Ancho máximo del contenedor de botones */
}

#predx-root .seg-btn {
  width: 100%;
  /* Ocupa todo el ancho del contenedor */
  margin: 0;
  /* Eliminamos márgenes individuales */
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff;
  border-color: #0170b9;
  padding-left: 64px;
  text-align: left;
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal;
  isolation: isolate;
}

/* Cada fila es un grid de 3 celdas de ancho fijo, así A|O|R y R|O|A quedan alineados al centro */
#predx-root .duo-row {
  display: grid;
  grid-template-columns: repeat(3, 1ch);
  /* 1ch = ancho de carácter */
  column-gap: .8ch;
  margin: .22em 0;
  white-space: nowrap;
  letter-spacing: 0;
  /* no necesitamos tracking extra */
}

/* Empuja el bloque de 3 celdas contra la “costura” central */
#predx-root .duo-half.red .duo-row {
  margin-left: auto;
  justify-items: end;
}

#predx-root .duo-half.green .duo-row {
  margin-right: auto;
  justify-items: start;
}

#predx-root .duo-cell {
  display: block;
}

/* Botonera con aire */
#predx-root .duo-actions {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 22px 6px 0
}

#predx-root .duo-btn {
  padding: 12px 18px;
  border-radius: 12px 0px 12px 0px;
  border: 0;
  cursor: pointer;
  font-weight: 700
}

#predx-root .duo-btn.neutral {
  background: #fff;
  color: #222;
}

#predx-root .duo-btn.left,
#predx-root .duo-btn.right {
  background: #e5efff;
}

/* Responsive móvil: apilamos botones y ampliamos panel */
@media (max-width: 768px) {
  #predx-root .duo-half {
    aspect-ratio: 4 / 3;
  }

  #predx-root .duo-actions {
    grid-template-columns: 1fr;
  }

  #predx-root .duo-btn.left,
  #predx-root .duo-btn.right,
  #predx-root .duo-btn.neutral {
    justify-self: stretch;
  }
}

/* Oscurecer TODA la página cuando el paso sea oscuro */
body.dark-page {
  background: #54595F !important;
}

body.dark-page #page,
body.dark-page .site,
body.dark-page .elementor,
body.dark-page .elementor-section-wrap,
body.dark-page #content {
  background: transparent !important;
}

/* ===== Test del Reloj ===== */
#predx-root .clock-wrap {
  width: min(980px, 94vw);
  margin: 10px auto 22px;
}

#predx-root .clock-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 18px;
}

#predx-root .clock-svg {
  width: min(540px, 86vw);
  height: auto;
  display: block;
}

/* Botones de sector */
#predx-root .clock-sectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px auto 6px;
  max-width: 720px;
}

#predx-root .seg-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  grid-column: span 3;
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
}

p.clock-step2 {
  text-align: center;
}



/* Intensidad */
#predx-root .intensity {
  margin: 12px auto 8px;
  max-width: 720px;
}

#predx-root .intensity label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2f3b48;
}

#predx-root .intensity input[type="range"] {
  width: 100%;
}

.slider-row {
  margin-bottom: 60px;
}

/* Marcas 1,5,10 del slider */
#predx-root .slider-scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: .95rem;
  color: #6b7a89;
  margin-top: 4px;
}

#predx-root .slider-scale span:nth-child(1) {
  justify-self: start;
}

#predx-root .slider-scale span:nth-child(2) {
  justify-self: center;
}

#predx-root .slider-scale span:nth-child(3) {
  justify-self: end;
}

/* Listas dentro del paso actual: sin viñetas */
#predx-root #step-content ul {
  list-style: none;
  /* quita los puntos */
  padding-left: 0;
  /* elimina la sangría de la lista */
  margin: 10px auto 18px;
  /* espaciado agradable */
  max-width: 560px;
  /* que no se haga kilométrica en desktop */
}

#predx-root #step-content ul li {
  margin: 6px 0;
  /* separación entre ítems */
}

body.predx-dark {
  background: #54595f;
  color: #fff;
}

/* Botones de sector */
#predx-root .clock-sectors {
  /*display: flex;
    flex-direction: column;*/
  align-items: center;
  gap: 12px;
  /* Espacio uniforme entre botones */
  margin: 20px auto 15px;
  max-width: 380px;
  /* Ancho máximo del contenedor de botones */
}

#predx-root .seg-btn {
  width: 100%;
  /* Ocupa todo el ancho del contenedor */
  margin: 0;
  /* Eliminamos márgenes individuales */
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
  margin-top: 8px;
  /* Pequeño espacio extra para el botón principal */
}

/* --- INTRO VIDEO BACKGROUND --- */
#predx-root.step-intro-active {
  background-color: transparent !important;
}

.intro-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  width: min(980px, 94vw);
  margin: 10px auto 22px;
}

#predx-root .clock-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto 18px;
}

#predx-root .clock-svg {
  width: min(540px, 86vw);
  height: auto;
  display: block;
}

/* Botones de sector */
#predx-root .clock-sectors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px auto 6px;
  max-width: 720px;
}

#predx-root .seg-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  grid-column: span 3;
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
}

p.clock-step2 {
  text-align: center;
}



/* Intensidad */
#predx-root .intensity {
  margin: 12px auto 8px;
  max-width: 720px;
}

#predx-root .intensity label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2f3b48;
}

#predx-root .intensity input[type="range"] {
  width: 100%;
}

.slider-row {
  margin-bottom: 60px;
}

/* Marcas 1,5,10 del slider */
#predx-root .slider-scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-size: .95rem;
  color: #6b7a89;
  margin-top: 4px;
}

#predx-root .slider-scale span:nth-child(1) {
  justify-self: start;
}

#predx-root .slider-scale span:nth-child(2) {
  justify-self: center;
}

#predx-root .slider-scale span:nth-child(3) {
  justify-self: end;
}

/* Listas dentro del paso actual: sin viñetas */
#predx-root #step-content ul {
  list-style: none;
  /* quita los puntos */
  padding-left: 0;
  /* elimina la sangría de la lista */
  margin: 10px auto 18px;
  /* espaciado agradable */
  max-width: 560px;
  /* que no se haga kilométrica en desktop */
}

#predx-root #step-content ul li {
  margin: 6px 0;
  /* separación entre ítems */
}

body.predx-dark {
  background: #54595f;
  color: #fff;
}

/* Botones de sector */
#predx-root .clock-sectors {
  /*display: flex;
    flex-direction: column;*/
  align-items: center;
  gap: 12px;
  /* Espacio uniforme entre botones */
  margin: 20px auto 15px;
  max-width: 380px;
  /* Ancho máximo del contenedor de botones */
}

#predx-root .seg-btn {
  width: 100%;
  /* Ocupa todo el ancho del contenedor */
  margin: 0;
  /* Eliminamos márgenes individuales */
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #cfd7e0;
  background: #f4f7fb;
  color: #0d3b66;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff !important;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
  margin-top: 8px;
  /* Pequeño espacio extra para el botón principal */
}

/* --- INTRO VIDEO BACKGROUND --- */
#predx-root.step-intro-active {
  background-color: transparent !important;
}

.intro-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.65);
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  border-radius: 16px;
}


/* --- OPTIMIZACIÓN LAYOUT TEST AGUDEZA (Landolt C) --- */
/* Cuando estamos en el test de agudeza, subimos todo arriba */
#predx-root.step-acuity-active {
  padding-top: 20px !important;
  justify-content: flex-start;
}

#predx-root.step-acuity-active .app-header {
  padding-top: 10px;
  margin-bottom: 10px;
}

#predx-root.step-acuity-active .app-header img {
  width: clamp(140px, 18vw, 200px);
  /* Logo más pequeño */
}

#predx-root.step-acuity-active h1 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  /* Título más pequeño */
}

#predx-root.step-acuity-active #step-content {
  margin-top: 0;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

#predx-root .seg-btn:hover {
  filter: brightness(.97);
}

#predx-root .seg-btn.active {
  background: #0170b9;
  color: #fff !important;
  border-color: #0170b9;
}

#predx-root .seg-btn.neutral {
  background: #e9eef3;
  border-color: #d7dee6;
  color: #223;
  margin-top: 8px;
  /* Pequeño espacio extra para el botón principal */
}

/* --- INTRO VIDEO BACKGROUND --- */
#predx-root.step-intro-active {
  background-color: transparent !important;
}

.intro-video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.intro-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.65);
  z-index: 1;
}

.intro-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  border-radius: 16px;
}


/* --- OPTIMIZACIÓN LAYOUT TEST AGUDEZA (Landolt C) --- */
/* Cuando estamos en el test de agudeza, subimos todo arriba */
#predx-root.step-acuity-active {
  padding-top: 20px !important;
  justify-content: flex-start;
}

#predx-root.step-acuity-active .app-header {
  padding-top: 10px;
  margin-bottom: 10px;
}

#predx-root.step-acuity-active .app-header img {
  width: clamp(140px, 18vw, 200px);
  /* Logo más pequeño */
}

#predx-root.step-acuity-active h1 {
  margin-bottom: 10px;
  font-size: clamp(1.4rem, 2vw, 2rem);
  /* Título más pequeño */
}

#predx-root.step-acuity-active #step-content {
  margin-top: 0;
}