/* Homedly: look de la app (rediseño v0.3) aplicado al sitio.
   Tarjetas sin borde duro (sombra suave + filete), avatares y estados con los colores de la app. */

/* tarjetas y paneles: sombra difusa en vez de borde gris */
.card { border: 0; box-shadow: var(--app-shadow), 0 0 0 1px color-mix(in oklab, var(--ink) 7%, transparent); }
.ground-inverse .card { box-shadow: none; }
.ui-panel { border: 0; box-shadow: var(--app-shadow), 0 0 0 1px rgba(31,42,55,.08); border-radius: 20px; }
.ui-title { font-weight: 600; }
.ui-avatar, .ui-btn, .ui-chip { font-weight: 600; }

/* botones primarios: azul de la app con luz arriba, como en la app */
.btn--primary { box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px rgba(5,100,245,.28); font-weight: 600; }
.ground-inverse .btn--primary { box-shadow: none; }
.btn--secondary { font-weight: 600; }
.ui-btn { background: #0564f5; color: #fff; border-radius: 10px; }

/* avatares: paleta de la app (menta, azul, lavanda, coral, rosa) */
.ui-avatar { background: #dcf4f0; color: #0f7468; box-shadow: none; }
.ui-avatar[data-tone="1"] { background: #dcf4f0; color: #0f7468; }
.ui-avatar[data-tone="2"] { background: #e6efff; color: #0249b8; }
.ui-avatar[data-tone="3"] { background: #ebe9f7; color: #322d7a; }
.ui-avatar[data-tone="4"] { background: #fde8eb; color: #a8273a; }
.ui-avatar[data-tone="5"] { background: #fbe7f3; color: #9d1d63; }

/* estados: tomado = menta, ahora = azul suave */
.ui-win__st.is-done { color: var(--app-ok-ink); background: var(--app-ok-soft); box-shadow: none; }
.ui-win__st.is-you { color: var(--app-primary-ink); background: var(--app-primary-soft); box-shadow: none; }
.ui-win__st.is-you::before { background: #0564f5; }
.ui-chip--accent { background: var(--app-primary-soft); color: var(--app-primary-ink); box-shadow: none; }
.ui-chip--accent::before { background: #0564f5; }
.ui-chip { border-radius: 999px; }
.ui-chip--plain { background: var(--app-ok-soft); color: var(--app-ok-ink); box-shadow: none; }
.ui-chip--ink { background: var(--app-primary-soft); color: var(--app-primary-ink); }

/* casillas de toma: círculo que se rellena en menta */
.ui-check__box { border-radius: 50%; }
.ui-check.is-done .ui-check__box, .ui-check.is-now .ui-check__box { background: var(--app-ok); color: #fff; box-shadow: none; }
.ui-checks__bar i { background: var(--app-ok); }
.ui-switch.is-on { background: #0564f5; }

/* calendario: rango de la receta en azul suave, inicio y fin en azul */
.ui-cal__d::before { background: var(--app-primary-soft); }
.ui-cal__d.is-in b { color: var(--app-primary-ink); }
.ui-cal__d:is(.is-start, .is-end) b { background: #0564f5; color: #fff; box-shadow: 0 4px 10px rgba(5,100,245,.28); }

/* barras de la semana en menta */
.ui-stat__bars rect { fill: var(--app-ok); }

/* avisos: icono azul suave */
.ui-note__ico { background: var(--app-primary-soft); color: var(--app-primary-ink); }

/* pasos: mismos componentes que arriba */
.px-person, .px-alert, .px-code b, .px-label { background: #fff; box-shadow: 0 1px 2px rgba(31,42,55,.06), 0 0 0 1px rgba(31,42,55,.08); }
.ground-inverse .px-person, .ground-inverse .px-alert, .ground-inverse .px-code b, .ground-inverse .px-label { background: #f6f6f9; }
.px-code b { font-variant-numeric: tabular-nums; font-weight: 600; }
.px-person { border-radius: 14px; font-weight: 600; }
.px-person small { font-weight: 500; }

/* fondo de las escenas: azul claro de la app (primarySoft) con menta */
html[data-ground="app"] { --ground-bg: #dbe7fb; --ground-surface: #e6efff; --ground-ink: #1f2a37; --ground-muted: #4a5766; --ground-accent: #0564f5; }
.ui-cal__ev.is-now .ui-cal__date { background: #0564f5; }

/* Pantallas de la app recreadas en HTML/CSS (medidas y colores de implementation/src/theme y components/ui).
   Todos los datos son inventados: un hogar de ejemplo (Elena, Marcos, Lucía, Pablo). */
.ph { --i: #1f2a37; --i2: #4a5766; --i3: #5b6674; --ln: rgba(31,42,55,.08); width: min(340px, 100%); margin-inline: auto; padding: 12px 16px 0; background: #f6f6f9;
  border-radius: 32px 32px 0 0; box-shadow: 0 0 0 8px #1f2a37, 0 24px 60px -12px rgba(31,42,55,.35); color: var(--i); font-family: var(--font-text); text-align: left; }
.ph--bare { padding: 0; background: none; box-shadow: none; border-radius: 0; width: 100%; }
.ph b { font-weight: 600; }
.ph-h1 { font: 600 28px/34px var(--font-text); letter-spacing: -.6px; margin: 0; }
.ph-sub { font: 500 14px/20px var(--font-text); color: #4840a8; margin: 0 0 10px; }
.ph-sec { font: 600 15px/20px var(--font-text); color: var(--i3); margin: 10px 8px 6px; }
.ph-chips { display: flex; gap: 8px; margin: 0 0 10px; overflow: hidden; }
.ph-chip { height: 34px; padding: 0 12px 0 5px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(31,42,55,.06), 0 0 0 1px var(--ln); display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--font-text); white-space: nowrap; flex: none; }
.ph-chip.on { background: #1f2a37; color: #fff; box-shadow: none; }
.ph-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--font-text); flex: none; font-style: normal; }
.ph-av--lg { width: 40px; height: 40px; font-size: 15px; }
.a1 { background: #ecf7d4; color: #3f6212; } .a2 { background: #fde8eb; color: #a8273a; } .a3 { background: #e5e9f0; color: #334155; } .a4 { background: #dcf4f0; color: #0f7468; } .a5 { background: #fbe7f3; color: #9d1d63; }
.ph-card { background: #fff; border-radius: 20px; box-shadow: 0 1px 2px rgba(31,42,55,.06), 0 8px 24px -8px rgba(31,42,55,.10), 0 0 0 1px var(--ln); }
.ph-dayh { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 8px 8px; }
.ph-dayh b { font-size: 15px; color: var(--i3); font-weight: 600; }
.ph-dayh span { font-size: 12px; color: var(--i3); font-variant-numeric: tabular-nums; }
.ph-dose { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 14px; min-height: 60px; position: relative; }
.ph-dose + .ph-dose::before { content: ""; position: absolute; left: 14px; right: 0; top: 0; height: 1px; background: var(--ln); }
.ph-time { width: 42px; font: 700 15px/20px var(--font-text); font-variant-numeric: tabular-nums; }
.ph-bar { width: 4px; align-self: stretch; margin: 6px 0; border-radius: 2px; flex: none; background: #17a898; }
.ph-ico { width: 34px; height: 34px; border-radius: 12px; background: #e8ecf2; color: #0564f5; display: grid; place-items: center; flex: none; }
.ph-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ph-ico--mint { background: #dff5f1; color: #0f7468; }
.ph-ico--lav { background: #ebe9f7; color: #4840a8; }
.ph-ico--amber { background: #fbf0da; color: #855a0c; }
.ph-ico--blue { background: #e6efff; color: #0249b8; }
.ph-tx { flex: 1; min-width: 0; display: grid; }
.ph-tx b { font: 600 14px/19px var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tx span { font-size: 12px; line-height: 17px; color: var(--i2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chk { width: 36px; height: 36px; display: grid; place-items: center; flex: none; }
.ph-chk i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px #b4bfc9; display: grid; place-items: center; color: transparent; }
.ph-chk svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ph-dose.is-taken .ph-chk i { background: #17a898; box-shadow: none; color: #fff; }
.ph-dose.is-taken .ph-tx b, .ph-dose.is-taken .ph-time { color: #6b7684; }
.ph-search { height: 44px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(31,42,55,.06), 0 0 0 1px var(--ln); display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--i3); font: 400 14px var(--font-text); margin-bottom: 10px; }
.ph-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-st { padding: 10px 12px 12px; display: grid; gap: 6px; }
.ph-st-top { display: flex; align-items: center; justify-content: space-between; }
.ph-pill { height: 24px; padding: 0 10px; border-radius: 999px; background: #dff5f1; color: #0f7468; font: 500 11.5px/24px var(--font-text); }
.ph-st b { font: 600 14px/18px var(--font-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ph-st small { display: block; font-size: 11.5px; color: var(--i3); margin-top: -4px; }
.ph-sbar { height: 6px; border-radius: 3px; background: #e8ecf2; overflow: hidden; }
.ph-sbar i { display: block; height: 100%; border-radius: 3px; background: #17a898; }
.ph-sbar.low i { background: #e5384c; }
.ph-sn { font: 700 14px var(--font-text); } .ph-sn span { font: 400 11.5px var(--font-text); color: var(--i3); }
.ph-set { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: relative; min-height: 52px; }
.ph-set + .ph-set::before { content: ""; position: absolute; left: 14px; right: 0; top: 0; height: 1px; background: var(--ln); }
.ph-set .ph-tx b { white-space: normal; font-size: 14px; line-height: 19px; }
.ph-set .ph-tx span { white-space: normal; }
.ph-sw { width: 46px; height: 28px; border-radius: 14px; background: #d3d9e0; position: relative; flex: none; }
.ph-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ph-sw.on { background: #17a898; } .ph-sw.on::after { left: 21px; }
.ph-scan { position: relative; height: 272px; border-radius: 28px; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #6b5b4c, #2c2a2b 60%, #1c1d20); color: #fff; text-align: center; }
.ph-scan-t { position: absolute; top: 16px; left: 0; right: 0; font: 600 15px var(--font-text); }
.ph-scan-x { position: absolute; top: 10px; left: 12px; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.4); display: grid; place-items: center; }
.ph-scan-x svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.ph-frame { position: absolute; left: 50%; top: 66px; width: 210px; height: 118px; margin-left: -105px; }
.ph-frame i { position: absolute; width: 30px; height: 30px; border: 3px solid #fff; }
.ph-frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.ph-frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.ph-frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.ph-frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.ph-frame u { position: absolute; left: 10px; right: 10px; top: 50%; height: 2px; background: #17a898; }
.ph-scan-h { position: absolute; left: 0; right: 0; top: 204px; font: 400 13px var(--font-text); opacity: .92; }
.ph-rec { padding: 14px 16px; display: grid; gap: 8px; margin-bottom: 10px; }
.ph-rec .ph-pill { justify-self: start; }
.ph-rec b { font: 600 18px/24px var(--font-text); letter-spacing: -.3px; }
.ph-rec span.m { font-size: 13px; color: var(--i2); }
.ph-tag { justify-self: start; height: 28px; padding: 0 12px; border-radius: 999px; background: #eceef3; font: 500 13px/28px var(--font-text); }
.ph-cal { padding: 14px 12px 12px; }
.ph-cal-h { display: flex; justify-content: space-between; align-items: center; padding: 0 6px 8px; font: 600 16px var(--font-text); }
.ph-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; row-gap: 4px; }
.ph-cal-g em { font: 500 11.5px/18px var(--font-text); color: var(--i3); font-style: normal; }
.ph-cal-g span { display: grid; place-items: center; height: 34px; }
.ph-cal-g i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 500 13px var(--font-text); font-style: normal; font-variant-numeric: tabular-nums; }
.ph-cal-g .f { background: #eceef3; } .ph-cal-g .ok { background: #dcf4f0; color: #0f7468; } .ph-cal-g .pt { background: #fbf0da; color: #855a0c; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0564f5; font-weight: 700; }
.ph-mem { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 60px; position: relative; }
.ph-mem + .ph-mem::before { content: ""; position: absolute; left: 66px; right: 0; top: 0; height: 1px; background: var(--ln); }
.ph-chev { color: var(--i3); font-size: 18px; margin-left: auto; }
.ph-code { background: #ebe9f7; border-radius: 20px; padding: 18px 14px 14px; text-align: center; }
.ph-code b { display: block; font: 700 36px/42px var(--font-text); letter-spacing: .22em; padding-left: .22em; color: #322d7a; font-variant-numeric: tabular-nums; }
.ph-code span { font-size: 13px; color: var(--i2); }
.ph-btns { display: flex; gap: 10px; margin-top: 12px; }
.ph-btn { flex: 1; height: 48px; border-radius: 14px; display: grid; place-items: center; font: 600 15px var(--font-text); background: #e6efff; color: #0249b8; }
.ph-btn.p { background: #0564f5; color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 12px rgba(5,100,245,.28); }
.ph-sheet-t { font: 600 18px/24px var(--font-text); letter-spacing: -.2px; margin: 0 0 4px; }
.ph-sheet-p { font-size: 13px; line-height: 18px; color: var(--i2); margin: 0 0 12px; }
.ph-notif { display: grid; gap: 4px; padding: 12px 16px 14px; background: #fff; border-radius: 22px; box-shadow: 0 8px 24px -8px rgba(31,42,55,.18), 0 0 0 1px var(--ln); }
.ph-notif-h { display: flex; align-items: center; gap: 8px; font: 500 12px var(--font-text); color: var(--i3); }
.ph-notif-h img { width: 18px; height: 18px; border-radius: 5px; }
.ph-notif b { font: 600 14px/19px var(--font-text); }
.ph-notif p { margin: 0; font: 400 13px/18px var(--font-text); color: var(--i2); white-space: pre-line; }
.ph-priv { background: #ebe9f7; border-radius: 20px; padding: 14px 16px; display: flex; gap: 12px; font-size: 13px; line-height: 18px; color: #322d7a; margin-bottom: 10px; }
.ph-priv .ph-ico { background: #fff; color: #4840a8; border-radius: 50%; }
.ph-priv b { font-weight: 700; }
.ph-bigbtn { height: 48px; border-radius: 14px; background: #e6efff; color: #0249b8; display: grid; place-items: center; font: 600 14px var(--font-text); margin-top: 10px; }
.ph-tabs { margin-top: 12px; background: #fff; border-radius: 26px; box-shadow: 0 4px 16px rgba(31,42,55,.08), 0 0 0 1px var(--ln); display: flex; align-items: center; padding: 6px; gap: 2px; }
.ph-notif { grid-template-columns: 1fr; }
@media (max-width: 639px) {
  #funciones .panel { --p-h: 360px !important; } #pasos .panel { --p-h: 230px !important; }
  .ph { padding: 10px 10px 0; } .ph-dose { gap: 8px; padding-left: 10px; } .ph-time { width: 38px; font-size: 14px; } .ph-chk { width: 32px; } .ph-tx b { font-size: 13.5px; }
  #recetas .frame--split { min-height: 590px; }
}
