/* =====================  v6 (22/11): tu caso, camino del tratamiento, invierno con porcentaje, privacidad  ===================== */

/* ---------- Tu caso ---------- */
.caso { background: var(--hueso); overflow-y: auto; padding-bottom: max(26px, env(safe-area-inset-bottom)); }
.caso .paso-cabeza { padding-bottom: 2px; }
.caso .paso-titulo { font-size: 25px; text-wrap: balance; }
.caso-voz { min-height: 62px; padding: 6px 22px 10px; text-align: left; font-size: 16px; line-height: 1.36; }
.caso-voz:empty::before { content: attr(data-vacio); display: block; font-size: 14px; line-height: 1.4; font-weight: 400; color: var(--texto-2); }
.caso > * { flex-shrink: 0; }
.caso-paso { animation: aparece .45s var(--ease); }
.caso-lead { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.25; color: var(--tinta); margin: 2px 20px 12px; text-wrap: balance; }

.caso-cabezas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.cabeza { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 0 6px; padding: 6px 6px 9px; border-radius: 16px; background: #fff; text-align: left;
  border: 1.5px solid rgba(8,38,44,.06); box-shadow: 0 1px 2px rgba(8,38,44,.05), 0 8px 18px rgba(8,38,44,.05);
  transition: border-color .2s, box-shadow .2s, transform .15s; animation: aparece .45s var(--ease) both; }
.cabeza:active { transform: scale(.98); }
.cabeza img { grid-column: 1 / -1; width: 100%; aspect-ratio: 200 / 116; pointer-events: none; }
.cabeza-txt { grid-column: 1; grid-row: 2; padding: 3px 4px 0; font-size: 13px; line-height: 1.25; font-weight: 500; color: var(--tinta); }
.cabeza-cod { grid-column: 2; grid-row: 2; padding: 4px 4px 0 0; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: rgba(81,102,106,.75); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cabeza[aria-pressed="true"], .cerca[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,124,146,.16), 0 10px 22px rgba(18,124,146,.14); }
.cabeza[aria-pressed="true"]::after, .cerca[aria-pressed="true"]::after { content: ''; position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: 0 0 0 2px #fff; animation: aparece .25s var(--ease); }
.enlace-claro { font-size: 14px; font-weight: 500; color: var(--teal); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; padding: 6px 2px; }
.caso-paso > .ver-escala { display: block; margin: 14px auto 0; }

.caso-elegida { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 0 12px; margin: 2px 14px 14px; padding: 4px 10px 4px 4px; border-radius: 14px; background: #fff; border: 1px solid rgba(8,38,44,.06); }
.caso-elegida img { width: 92px; aspect-ratio: 200 / 116; }
.caso-elegida p { font-size: 13.5px; line-height: 1.3; font-weight: 500; color: var(--tinta); }
.caso-elegida img { grid-row: span 2; }
.caso-elegida p { align-self: end; }
.caso-elegida .enlace-claro { grid-column: 2; justify-self: start; align-self: start; font-size: 13px; padding: 2px 0; }
.caso-fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.cerca { position: relative; display: flex; flex-direction: column; padding: 6px; border-radius: 18px; background: #fff; text-align: left; border: 1.5px solid rgba(8,38,44,.06);
  box-shadow: 0 1px 2px rgba(8,38,44,.05), 0 10px 22px rgba(8,38,44,.06); transition: border-color .2s, box-shadow .2s, transform .15s; animation: aparece .45s var(--ease) both; }
.cerca + .cerca { animation-delay: .08s; }
.cerca:active { transform: scale(.98); }
.cerca img { width: 100%; aspect-ratio: 456 / 296; object-fit: cover; border-radius: 13px; pointer-events: none; }
.cerca span { padding: 9px 5px 5px; font-size: 14.5px; line-height: 1.32; font-weight: 500; color: var(--tinta); }
.caso-ambas { display: block; width: calc(100% - 28px); height: 52px; margin: 12px 14px 0; border-radius: 999px; background: #fff; border: 1.5px solid rgba(8,38,44,.2); color: var(--tinta); font-weight: 700; font-size: 15.5px; }
.caso-ambas:active { transform: scale(.98); }

.cr-cabeza { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 12px; margin: 2px 14px 0; padding: 6px 14px 6px 6px; border-radius: 16px; background: #fff; border: 1px solid rgba(8,38,44,.06); }
.cr-cabeza img { width: 112px; aspect-ratio: 200 / 116; }
.cr-cabeza p { font-size: 14px; line-height: 1.35; font-weight: 500; color: var(--tinta); }
.cr-cabeza em { display: block; margin-top: 3px; font-style: normal; font-weight: 400; font-size: 13px; color: var(--texto-2); }
.cr-cabeza small { display: block; font-size: 11.5px; font-weight: 400; color: var(--texto-2); margin-bottom: 2px; letter-spacing: .02em; }
.cr-titulo { margin: 20px 22px 0; font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.2; color: var(--tinta); text-wrap: balance; }
.cr-texto { margin: 10px 22px 0; font-size: 15.5px; line-height: 1.5; color: var(--texto); }
.cr-avisos { list-style: none; display: grid; gap: 8px; margin: 18px 14px 0; padding: 13px 14px; border-radius: 14px; background: rgba(18,124,146,.07); }
.cr-avisos li { position: relative; padding-left: 24px; font-size: 13.5px; line-height: 1.42; color: var(--tinta); }
.cr-avisos li::before { content: 'i'; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--teal); color: var(--teal);
  font: italic 700 10.5px/13px var(--serif); text-align: center; }
#b-caso-seguir { display: block; width: calc(100% - 28px); margin: 18px 14px 0; animation: aparece .4s var(--ease); }
.cr-enlaces { display: flex; justify-content: space-between; gap: 12px; margin: 10px 20px 0; }

/* hoja de la escala completa (la lámina de la clínica), ampliable con un toque */
.escala { position: fixed; inset: 0; z-index: 70; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; background: #061A1E; color: var(--hueso); animation: aparece .3s var(--ease); }
.escala[hidden] { display: none; }
.escala-cabeza { display: flex; align-items: center; gap: 12px; padding: max(16px, calc(env(safe-area-inset-top) + 8px)) 16px 12px 20px; }
.escala-titulo { flex: 1; font-family: var(--serif); font-size: 18px; line-height: 1.28; }
.escala-cerrar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; }
.escala-cerrar svg { width: 22px; height: 22px; }
.escala-caja { flex: 1; overflow: auto; padding: 0 10px; -webkit-overflow-scrolling: touch; }
#escala-img { display: block; width: 100%; height: auto; margin: 0 auto; border-radius: 10px; cursor: zoom-in; }
#escala-img.ampliada { width: 260%; max-width: none; border-radius: 0; cursor: zoom-out; }
.escala-ayuda { padding: 10px 16px max(16px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: rgba(251,246,243,.6); }
@media (min-width: 560px) { .escala { top: max(0px, calc((100vh - min(100vh, 900px)) / 2)); bottom: auto; height: min(100vh, 900px); border-radius: 28px; } }

/* ---------- Camino del tratamiento (reusa el calendario) ---------- */
.tr-cuerpo { position: relative; padding: 16px 24px 0; }
.tr-linea { position: relative; height: 76px; margin: 6px 0 8px; }
.tr-fases { position: absolute; left: 0; right: 0; top: 18px; height: 22px; }
.tr-fases .fase { top: 0; height: 22px; opacity: .14; transition: opacity .7s var(--ease); }
.tr-fases .fase.on { opacity: 1; }
.tr-fases .fase.fila2 { top: 14px; height: 8px; border-radius: 3px; }
.t-base { background: #F0E1C6; }
.t-caida { background: var(--rosa); }
.t-frena { background: #7FB7A6; }
.t-evalua { background: var(--oro); }
.t-mantiene { background: linear-gradient(90deg, var(--agua), rgba(111,211,224,.12)); }
.tr-fases .t-evalua { width: 6px !important; height: 34px; top: -6px; border-radius: 3px; z-index: 2; box-shadow: 0 0 0 2px var(--tinta); }
.tr-hoy { position: absolute; left: 0; top: 10px; height: 38px; border-left: 2px solid var(--hueso); }
.tr-hoy span { position: absolute; top: 44px; left: -2px; font-size: 12px; font-weight: 700; }
.tr-meses { position: absolute; left: 0; right: 0; top: 54px; height: 18px; }
.tr-meses span { position: absolute; transform: translateX(-50%); font-size: 11px; color: rgba(251,246,243,.55); white-space: nowrap; }
.tr-lista li { opacity: .22; transform: translateY(4px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.tr-lista li.on { opacity: 1; transform: none; }
.tr-lista li.activa b { color: var(--oro); }
.tr-lista li.activa span { color: var(--hueso); }
.tr-cierre { margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(216,182,106,.35); background: rgba(216,182,106,.08);
  font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.38; color: var(--oro-suave); animation: aparece .6s var(--ease); }
.tr-testimonios { margin-top: 20px; animation: aparece .6s var(--ease); }
.tr-test-tit { font-size: 13px; color: rgba(251,246,243,.6); margin-bottom: 10px; }
.tr-test-fila { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.tr-test-fila::-webkit-scrollbar { display: none; }
.tr-testimonio { flex: none; width: min(210px, 58vw); padding: 0; }
.tr-testimonio p { color: rgba(251,246,243,.6); padding: 8px 2px 0; }
.tr-salida { position: relative; z-index: 7; display: grid; gap: 10px; margin: 8px 24px 0; flex: none; animation: aparece .5s var(--ease); }
.tr-salida .boton-oro { margin: 0; }
.boton-borde-oro { height: 54px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(216,182,106,.7); background: rgba(216,182,106,.07); color: var(--oro-suave); font-weight: 700; font-size: 16px; }
.boton-borde-oro:active { transform: scale(.98); }
#b-cal-otro { flex: none; margin: 8px 24px 0; animation: aparece .5s var(--ease); }

/* fases del calendario: la aclaración debajo del texto */
.fases-lista em { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(251,246,243,.55); }

/* ¿Y si lo hacés en invierno?: el porcentaje con la cabeza que se llena de pelo */
.inv-pct { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; margin-top: 10px; padding: 12px 16px 12px 10px; border-radius: 16px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(216,182,106,.25); }
.inv-cabeza { width: 92px; height: 100px; overflow: visible; }
.ic-cara { fill: rgba(251,246,243,.06); stroke: rgba(251,246,243,.5); stroke-width: 1.2; stroke-linejoin: round; }
.ic-oreja { fill: none; stroke: rgba(251,246,243,.38); stroke-width: 1; }
.ic-cuero { fill: none; stroke: none; }
.inv-cabeza { --k: 0; }
.ic-gorra { fill: var(--oro); opacity: calc(.07 + var(--k) * .3); transition: opacity .4s var(--ease); }
.ic-pelos path { fill: none; stroke: var(--oro-suave); stroke-width: .9; stroke-linecap: round; opacity: 0; transition: opacity .35s var(--ease); }
.ic-pelos path.on { opacity: .9; }
.inv-pct-tit { font-size: 12.5px; line-height: 1.3; color: rgba(251,246,243,.68); }
.inv-pct-num { margin-top: 4px; font-family: var(--serif); font-size: 30px; line-height: 1.05; color: var(--oro); font-variant-numeric: tabular-nums; }
.inv-aviso { margin-top: 5px; font-size: 12px; color: rgba(251,246,243,.55); }

/* chat: respuesta que todavía no tiene audio (el texto se va leyendo) */
.burbuja.con-texto { max-width: 88%; }
.escrita-quien { font-size: 11.5px; font-weight: 700; color: var(--teal); margin-bottom: 4px; }
.escrita { font-size: 15.5px; line-height: 1.45; }
.escrita .w { color: rgba(24,40,43,.32); transition: color .15s; }
.escrita .w.dicha { color: var(--texto); }

/* tarjeta: tu caso y tu camino */
.t-caso { display: grid; grid-template-columns: 62px 1fr; gap: 9px; align-items: center; }
.t-caso-img { width: 62px; aspect-ratio: 200 / 116; border-radius: 8px; background: var(--hueso); }
.t-caso small, .t-camino span { display: block; font-size: 13px; font-weight: 400; color: var(--texto-2); margin-top: 1px; }

/* privacidad */
.enlace-priv { font-size: 12.5px; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
/* las hojas de la tarjeta quedan fijas en pantalla aunque la tarjeta esté scrolleada */
.hoja { position: fixed; max-width: 480px; margin: 0 auto; }
.priv-txt { display: grid; gap: 10px; margin: 2px 0 8px; }
.priv-txt p { font-size: 15px; line-height: 1.5; color: var(--texto); }
.priv-caja .boton-tinta { width: 100%; }

/* el grano no acompaña el scroll y deja un corte: en el camino del tratamiento va sin grano */
.tratamiento .grano { display: none; }
