/* ==========================================================================
   Norte . estilos de Hoy (v2)
   Instrumento, no formulario: aguja y score arriba, hábitos de un toque, y todo
   lo demás en líneas de pregunta dentro de superficies sin borde.
   Solo tokens de norte.css. Naranja: aguja, casilla marcada, bonus y Guardar.
   Los estados salen en verde, ámbar y rojo (.s-good, .s-warn, .s-bad).
   La barra de Guardar mide 45px y flota a 12px de la barra de pestañas.
   ========================================================================== */

.hoy{display:flex;flex-direction:column;gap:14px;padding-bottom:72px}
.hoy-cols{display:flex;flex-direction:column;gap:14px}
.hoy-col{display:contents}
.hoy-sec{display:flex;flex-direction:column;gap:10px}
.hoy-sec-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;min-width:0}
.hoy-sec-info{font-size:12px;color:var(--tx3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.hoy-flat{font-size:13px;color:var(--tx3)}

/* ---------- navegación de día (cabecera de la app) ---------- */
.hoy-nav{display:inline-flex;align-items:center;gap:2px}
.hoy-nav .btn-icon{width:44px;height:44px;border-color:transparent;background:transparent}
.hoy-nav .btn-icon[disabled]{opacity:.3;pointer-events:none}
.hoy-nav-date{font-size:13px;font-weight:600;min-width:88px;text-align:center;font-variant-numeric:tabular-nums;color:var(--tx)}
.hoy-nav .btn-xs{margin-left:4px}
@media (max-width:899px){.hoy-nav-date{display:none}}

/* ---------- cabecera: la aguja manda ---------- */
.hoy-hero{padding:16px 18px 18px;background:radial-gradient(120% 130% at 0% 0%,var(--or-soft),transparent 62%),var(--card);overflow:hidden}
.hoy-hero-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-height:20px}
.hoy-tags{display:flex;flex-wrap:wrap;gap:6px}
.hoy-tags .chip{cursor:default}
.hoy-date{font-size:clamp(23px,6vw,30px);margin:12px 0 16px}
.hoy-hero-main{display:flex;align-items:center;gap:18px}
.hoy-needle{flex:none;filter:drop-shadow(0 4px 18px rgba(0,0,0,.5))}
.hoy-hero-nums{display:flex;flex-direction:column;min-width:0}
.hoy-pct-row{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.hoy-pct{font-size:clamp(40px,11vw,50px);line-height:.9}
.hoy-bonus{font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--or)}
.hoy-score-lab{margin-top:7px}
.hoy-of{font-size:15px;font-weight:600;color:var(--tx2);margin-top:12px}
.hoy-streak{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--tx3);margin-top:5px}
.hoy-streak svg{width:14px;height:14px;color:var(--or);flex:none}

/* ---------- hábitos principales: lo único que merece la pantalla ---------- */
.hoy-habits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
@media (min-width:360px){.hoy-habits{grid-template-columns:repeat(3,minmax(0,1fr))}}
.habit{
  display:flex;flex-direction:column;justify-content:space-between;gap:6px;text-align:left;width:100%;min-height:84px;
  padding:10px 11px;border-radius:var(--r);border:1px solid var(--line);background:var(--card);
  transition:background .2s,border-color .2s,transform .18s var(--ease),opacity .2s;
}
.habit:hover{border-color:var(--line2);background:var(--card2)}
.habit:active{transform:scale(.97)}
.habit.on{background:var(--card2);border-color:var(--line2)}
.habit-top{display:flex;align-items:center;justify-content:space-between;width:100%;gap:6px}
.habit-emoji{font-size:20px;line-height:1}
.habit .check{width:20px;height:20px;border-radius:6px}
.habit .check svg{width:13px;height:13px}
.habit-name{font-weight:600;font-size:12.5px;line-height:1.25;letter-spacing:-.01em;color:var(--tx2);transition:color .2s}
.habit.on .habit-name{color:var(--tx)}
.habit-tag{font-size:9.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--tx3);line-height:1.2}
.habit-tag.or{color:var(--or)}
.habit.off-day{opacity:.55;border-style:dashed}
.habit.is-bonus{opacity:1;border-style:solid;border-color:var(--or-line)}

/* ---------- superficies y líneas de pregunta ---------- */
.hoy-surf{padding:4px 16px 10px}
.hoy-surf-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:13px 0 3px;min-width:0}
.hoy-surf .q{padding:11px 0;border-bottom:0;border-top:1px solid var(--line)}
.hoy-surf .q-lab b{font-size:14px}
.hoy-surf .q-ctl{gap:10px;flex-wrap:wrap}
.hoy-surf .nsel-btn{max-width:100%}
/* móvil de una mano: la etiqueta y su objetivo caben en la misma línea, el control debajo */
@media (max-width:480px){
  .hoy-surf .q{padding:10px 0}
  .hoy-surf .q.wrap-m{gap:7px}
  .hoy-surf .q.wrap-m .q-lab{flex-direction:row;align-items:baseline;flex-wrap:wrap;gap:4px 8px}
  .hoy-surf .q.wrap-m .q-ctl{padding-bottom:2px}
  .hoy-surf .q.stack .q-lab{flex-direction:column}
  .hoy-surf .hoy-rate-b{min-height:44px}
}

/* ---------- entreno (se abre al marcar el hábito) ---------- */
.fold{display:grid;grid-template-rows:0fr;transition:grid-template-rows .24s var(--ease)}
.fold.open{grid-template-rows:1fr}
.fold>.fold-in{min-height:0;overflow:hidden;opacity:0;transition:opacity .2s}
.fold.open>.fold-in{opacity:1}
.hoy-wsec-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 0 2px;border-top:1px solid var(--line);min-width:0}
.hoy-wsec-h .kick{flex:none}
.hoy-dur{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.hoy-other{width:92px;min-height:40px;padding:8px 11px;-moz-appearance:textfield}
.hoy-other::-webkit-outer-spin-button,.hoy-other::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.hoy-q-rate{grid-template-columns:minmax(0,auto) minmax(0,1fr)}
.hoy-q-rate .q-ctl{flex:1}
.hoy-rate{display:flex;gap:4px;width:100%;min-width:0}
.hoy-rate-b{
  flex:1;min-width:0;min-height:40px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--card2);
  font-weight:600;font-size:13px;color:var(--tx3);font-variant-numeric:tabular-nums;
  transition:background .16s,border-color .16s,color .16s;
}
.hoy-rate-b:hover{border-color:var(--line2);color:var(--tx)}
.hoy-rate-b.lt{background:var(--card3);color:var(--tx2)}
.hoy-rate-b.on.s-good{background:var(--good-soft);border-color:var(--good-line);color:var(--good)}
.hoy-rate-b.on.s-warn{background:var(--warn-soft);border-color:var(--warn-line);color:var(--warn)}
.hoy-rate-b.on.s-bad{background:var(--bad-soft);border-color:var(--bad-line);color:var(--bad)}
.hoy-rate-b.on.s-none{background:var(--card3);border-color:var(--line2);color:var(--tx)}

/* ---------- cómo ha ido: un deslizador por línea ---------- */
.hoy-q-met{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
.hoy-q-met .q-ctl{flex:1;gap:12px;flex-wrap:nowrap}
.hoy-q-met .range{flex:1;min-width:96px;height:34px}
.met-val{font-size:19px;min-width:52px;text-align:right;flex:none;transition:color .2s}
.met-val.unset{font-family:var(--f);font-size:12px;font-weight:500;letter-spacing:0;color:var(--tx3);white-space:nowrap}
.range.unset::-webkit-slider-thumb{background:var(--tx3)}
.range.unset::-moz-range-thumb{background:var(--tx3)}

/* ---------- sueño ---------- */
.hoy-sleep{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.hoy-sleep>svg{width:15px;height:15px;color:var(--tx4);flex:none}
.hoy-time{width:104px;min-height:40px;padding:8px 10px;text-align:center}
.hoy-sleep-num{font-size:19px;min-width:56px;text-align:right;transition:color .2s}
.hoy-sleep-num.unset{font-family:var(--f);font-size:12px;font-weight:500;letter-spacing:0;color:var(--tx3)}

/* ---------- reflexión ---------- */
.hoy-q-ta .q-ctl{width:100%;justify-content:stretch}
.hoy-ta{min-height:44px;padding:10px 12px;resize:none;overflow:hidden;line-height:1.45;font-size:14.5px}
.hoy-reflex-grid{display:grid;gap:0;padding-bottom:2px}
.hoy-more{
  display:flex;align-items:center;justify-content:space-between;width:100%;min-height:42px;gap:12px;
  padding:4px 0 0;border-top:1px solid var(--line);text-align:left;
  font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--tx3);
}
.hoy-more:hover{color:var(--tx)}
.hoy-more>svg{width:17px;height:17px;flex:none;transition:transform .22s var(--ease)}
.hoy-reflex.open .hoy-more>svg{transform:rotate(180deg)}

/* ---------- guardar (fijo abajo, 45px) ---------- */
.hoy-save{
  position:fixed;left:16px;right:16px;bottom:calc(var(--tabbar) + 12px);z-index:25;
  display:flex;align-items:center;justify-content:flex-end;gap:10px;pointer-events:none;
}
.hoy-save>*{pointer-events:auto}
.hoy-save-note{font-size:11px;color:var(--tx3);background:rgba(5,5,5,.86);border-radius:100px;padding:4px 9px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.hoy-save .btn{min-width:130px}
@media (max-width:899px){body.hoy-on .toast-wrap{bottom:calc(var(--tabbar) + 12px + 45px + 12px)}}

/* ---------- cuenta compartida: aquí no se registra ---------- */
.hoy-shared{max-width:420px;margin:48px auto 0;gap:14px}
.hoy-shared svg{width:28px;height:28px;color:var(--or);opacity:1}
.hoy-shared p{font-size:15px;color:var(--tx2);text-wrap:balance}

/* ---------- escritorio ---------- */
@media (min-width:900px){
  .hoy{gap:18px;padding-bottom:80px}
  .hoy-cols{gap:18px}
  .hoy-habits{grid-template-columns:repeat(auto-fill,minmax(138px,1fr))}
  .hoy-save{left:auto;right:var(--pad);bottom:24px}
  body.hoy-on .toast-wrap{bottom:calc(24px + 45px + 12px)}
}

/* dos columnas equilibradas */
@media (min-width:1000px){
  .hoy-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}
  .hoy-col{display:flex;flex-direction:column;gap:14px;min-width:0}
  .hoy-hero{padding:20px 22px 22px}
  .hoy-date{font-size:clamp(26px,2.4vw,34px)}
  .hoy-hero-main{gap:22px}
  .hoy-pct{font-size:58px}
  .hoy-surf{padding:4px 20px 12px}
  .hoy-time{width:116px}
  .hoy-rate-b{min-height:38px;font-size:13.5px}
}

/* chips de gente con foto (ronda 3) */
.hoy-people{display:flex;flex-direction:column}
.hoy-pchips{display:flex;flex-wrap:wrap;gap:6px;padding:0 0 10px}
.hoy-pchip{gap:7px;padding-left:4px}
.hoy-pchip .avatar.sm{width:22px;height:22px;font-size:9px;flex:none}
