/* FamilyHub · Tres diseños con efecto: Agua, Espejo y Relieve
   Cada pantalla vive dentro de <div class="scr" data-d="agua|espejo|relieve">.
   Copiar tal cual junto con la carpeta assets/disenos/. */

.scr {
  --ink: #14233B;
  --ink-2: #3A4B66;
  --blue: #2B5DBE;
  --blue-2: #224C9E;
  --ok: #226A4C;
  --risk: #7E5106;
  --bad: #9E3828;
  --elite: #5846A8;
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px; line-height: 1.4;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.scr *, .scr *::before, .scr *::after { box-sizing: border-box; }
.scr p, .scr h3, .scr h4 { margin: 0; }
.scr svg { flex: none; }

/* ---------- Piezas comunes ---------- */
.s-status { display: flex; justify-content: space-between; padding: 14px 26px 0; font-size: 12px; font-weight: 600; }
.s-body { padding: 10px 16px 0; display: grid; gap: 14px; }
.s-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; }
.s-head small { display: block; font-size: 12px; color: var(--ink-2); }
.s-head strong { display: block; font-family: "InterDisplay", "Inter", sans-serif; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.s-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.s-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.s-big { font-family: "InterDisplay", "Inter", sans-serif; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 2px 0; }
.s-sub { font-size: 12px; color: var(--ink-2); }
.s-title { font-size: 16px; font-weight: 600; }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.s-chip { --c: var(--ok); display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px; color: var(--c); white-space: nowrap; }
.s-chip svg { width: 11px; height: 11px; fill: currentColor; }
.s-chip.risk { --c: var(--risk); } .s-chip.bad { --c: var(--bad); } .s-chip.elite { --c: var(--elite); }
.s-item { display: grid; grid-template-columns: 40px 1fr 16px; align-items: center; gap: 12px; padding: 10px 0; }
.s-item + .s-item { border-top: 1px solid var(--line, rgb(20 35 59 / 0.08)); }
.s-item b { display: block; font-size: 14px; font-weight: 600; }
.s-item > div > span { display: block; font-size: 12px; color: var(--ink-2); }
.s-item i svg, .s-item > svg { width: 16px; height: 16px; color: var(--ink-2); }
.s-mini { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.s-tabs { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px; border-radius: 32px; }
.s-tab { display: grid; justify-items: center; gap: 2px; height: 52px; align-content: center; border-radius: 26px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.s-tab svg { width: 21px; height: 21px; stroke-width: 1.6; }
.s-tab.on { color: var(--blue-2); }
.s-fab { position: absolute; right: 20px; bottom: 92px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.s-fab svg { width: 26px; height: 26px; }
.s-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-area { display: grid; gap: 8px; padding: 14px; }
.s-area b { font-size: 14px; font-weight: 600; }
.s-area .s-chip { justify-self: start; }

/* =========================================================
   AGUA · vidrio líquido sobre agua quieta
   ========================================================= */
.scr[data-d="agua"] {
  --ink: #10243F; --ink-2: #2F4666; --line: rgb(16 36 63 / 0.10);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.30), rgb(255 255 255 / 0.42)), url("assets/disenos/agua-fondo.jpg") center / cover;
}
[data-d="agua"] .a-glass {
  background: linear-gradient(180deg, rgb(255 255 255 / 0.66), rgb(255 255 255 / 0.44));
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgb(255 255 255 / 0.72);
  box-shadow: 0 10px 28px rgb(24 78 140 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.7);
  border-radius: 28px;
}
[data-d="agua"] .s-avatar { background: rgb(255 255 255 / 0.6); border: 1px solid rgb(255 255 255 / 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
[data-d="agua"] .a-hero { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 18px 18px 18px 20px; border-radius: 32px; }
[data-d="agua"] .s-eyebrow { color: var(--blue-2); }
[data-d="agua"] .s-chip { background: color-mix(in srgb, var(--c) 10%, rgb(255 255 255 / 0.72)); }
/* Esfera de agua: --p es el avance de 0 a 100 */
.a-orb { --p: 0; position: relative; width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: rgb(255 255 255 / 0.42); border: 1px solid rgb(255 255 255 / 0.85); box-shadow: inset 0 0 0 5px rgb(255 255 255 / 0.32), inset 0 8px 16px rgb(24 78 140 / 0.16), 0 8px 18px rgb(24 78 140 / 0.14); }
.a-orb .w { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--p) * 1%); background: linear-gradient(180deg, #4A84D8, #2B5DBE); }
.a-orb .w svg { position: absolute; left: 0; bottom: calc(100% - 1px); width: 200%; height: 9px; fill: #4A84D8; animation: a-wave 7s linear infinite; }
.a-orb .w svg + svg { fill: #7FAEE8; opacity: 0.55; bottom: calc(100% + 1px); animation-duration: 11s; animation-direction: reverse; }
.a-orb b { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 14px; font-family: "InterDisplay", "Inter", sans-serif; font-size: 24px; font-weight: 700; color: #fff; }
@keyframes a-wave { to { transform: translateX(-50%); } }
/* Tubo de agua con marcador de ritmo */
.a-tube { position: relative; height: 14px; border-radius: 999px; background: rgb(255 255 255 / 0.5); box-shadow: inset 0 1px 3px rgb(24 78 140 / 0.28), 0 1px 0 rgb(255 255 255 / 0.7); margin: 12px 0 10px; }
.a-tube i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: calc(var(--p) * 1% - 4px); border-radius: 999px; background: linear-gradient(180deg, #6FA2E6, #3B72D0); }
.a-tube u { position: absolute; top: -4px; bottom: -4px; left: calc(var(--pace) * 1%); width: 3px; border-radius: 2px; background: var(--ink); }
[data-d="agua"] .a-card { padding: 16px 18px; }
[data-d="agua"] .s-mini { background: rgb(255 255 255 / 0.7); border: 1px solid rgb(255 255 255 / 0.9); }
[data-d="agua"] .s-tabs { background: rgb(255 255 255 / 0.56); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); border: 1px solid rgb(255 255 255 / 0.78); box-shadow: 0 12px 30px rgb(24 78 140 / 0.16), inset 0 1px 0 rgb(255 255 255 / 0.7); }
[data-d="agua"] .s-tab.on { background: rgb(255 255 255 / 0.82); box-shadow: 0 2px 8px rgb(24 78 140 / 0.14); }
[data-d="agua"] .s-fab { background: linear-gradient(160deg, #4F89DE, #2B5DBE); box-shadow: 0 10px 22px rgb(43 93 190 / 0.30), inset 0 1px 0 rgb(255 255 255 / 0.28); }
[data-d="agua"] .a-tide { display: block; width: 100%; height: 92px; margin-top: 8px; }
[data-d="agua"] .a-days { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); padding: 2px 2px 0; }
[data-d="agua"] .s-area { border-radius: 24px; grid-template-columns: auto 1fr; align-items: center; gap: 8px 10px; padding: 12px; }
[data-d="agua"] .s-area .s-chip { grid-column: 1 / -1; }
[data-d="agua"] .a-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.7); border: 1px solid rgb(255 255 255 / 0.9); color: var(--blue-2); box-shadow: 0 4px 10px rgb(24 78 140 / 0.10); }
[data-d="agua"] .a-ico svg { width: 20px; height: 20px; stroke-width: 1.6; }

/* =========================================================
   ESPEJO · superficies pulidas que se reflejan en el suelo
   ========================================================= */
.scr[data-d="espejo"] {
  --ink: #17233A; --ink-2: #414F66; --blue: #3060C4; --blue-2: #264FA6; --line: rgb(23 35 58 / 0.08);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.22), rgb(255 255 255 / 0.40)), url("assets/disenos/espejo-fondo.jpg") center / cover;
}
[data-d="espejo"] .s-avatar { background: rgb(255 255 255 / 0.85); box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px rgb(23 35 58 / 0.06), 0 6px 14px rgb(23 35 58 / 0.10); }
[data-d="espejo"] .s-body { gap: 12px; }
[data-d="espejo"] .e-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 20px; border-radius: 28px; color: #fff;
  background: linear-gradient(112deg, transparent 0 36%, rgb(255 255 255 / 0.07) 36% 50%, transparent 50%), linear-gradient(165deg, #3767CA, #284FA6);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.26);
  margin-bottom: 30px;
  -webkit-box-reflect: below 5px linear-gradient(transparent 62%, rgb(0 0 0 / 0.18));
}
[data-d="espejo"] .e-hero .s-eyebrow { color: #fff; }
[data-d="espejo"] .e-hero .s-sub { color: #fff; }
.e-ring { position: relative; width: 88px; height: 88px; }
.e-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.e-ring circle { fill: none; stroke-width: 3.2; }
.e-ring .t { stroke: rgb(255 255 255 / 0.26); }
.e-ring .f { stroke: #fff; stroke-linecap: round; stroke-dasharray: var(--p) 100; }
.e-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: "InterDisplay", "Inter", sans-serif; font-size: 20px; font-weight: 700; }
[data-d="espejo"] .e-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 26px; }
[data-d="espejo"] .e-tile {
  padding: 12px 12px 14px; border-radius: 22px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.96), rgb(255 255 255 / 0.78));
  box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px rgb(23 35 58 / 0.05);
  position: relative;
}
[data-d="espejo"] .e-tile::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 4px); height: 20px; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, rgb(255 255 255 / 0.50), rgb(255 255 255 / 0)); pointer-events: none; }
[data-d="espejo"] .e-tile small { display: block; font-size: 12px; color: var(--ink-2); }
[data-d="espejo"] .e-tile b { display: block; font-family: "InterDisplay", "Inter", sans-serif; font-size: 24px; font-weight: 700; line-height: 1.2; }
[data-d="espejo"] .e-tile .s-chip { padding: 0; margin-top: 2px; background: none; }
[data-d="espejo"] .e-card { padding: 16px 18px; border-radius: 26px; background: rgb(255 255 255 / 0.84); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.95), 0 0 0 1px rgb(23 35 58 / 0.05), 0 10px 26px rgb(23 35 58 / 0.08); }
[data-d="espejo"] .s-mini { background: #EEF2F8; }
[data-d="espejo"] .s-chip { background: color-mix(in srgb, var(--c) 9%, #fff); }
[data-d="espejo"] .s-tabs { background: rgb(252 253 255 / 0.72); -webkit-backdrop-filter: blur(22px) saturate(130%); backdrop-filter: blur(22px) saturate(130%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.95), 0 0 0 1px rgb(23 35 58 / 0.06), 0 12px 28px rgb(23 35 58 / 0.12); }
[data-d="espejo"] .s-tab.on { background: rgb(23 35 58 / 0.06); }
[data-d="espejo"] .s-fab { background: linear-gradient(165deg, #3767CA, #284FA6); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.26), 0 10px 22px rgb(40 79 166 / 0.26); }
[data-d="espejo"] .e-bar { height: 6px; border-radius: 3px; background: #E3E8F0; margin-top: 8px; position: relative; }
[data-d="espejo"] .e-bar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p) * 1%); border-radius: 3px; background: var(--c, var(--blue)); }
[data-d="espejo"] .e-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 26px; }
[data-d="espejo"] .e-kpis .e-tile { padding: 14px 14px 16px; }

/* =========================================================
   RELIEVE · porcelana mate con íconos 3D
   ========================================================= */
.scr[data-d="relieve"] {
  --ink: #1E2736; --ink-2: #485365; --blue: #2F60C8; --blue-2: #264FA8; --line: rgb(30 39 54 / 0.08);
  --out: 6px 6px 14px rgb(133 144 162 / 0.30), -6px -6px 14px rgb(255 255 255 / 0.95);
  --out-sm: 3px 3px 8px rgb(133 144 162 / 0.28), -3px -3px 8px rgb(255 255 255 / 0.95);
  --in: inset 3px 3px 7px rgb(133 144 162 / 0.34), inset -3px -3px 7px rgb(255 255 255 / 0.95);
  background: #ECEFF3;
}
[data-d="relieve"] .r-card { background: #F0F2F5; border: 1px solid rgb(255 255 255 / 0.7); border-radius: 28px; box-shadow: var(--out); padding: 16px 18px; }
[data-d="relieve"] .s-avatar { background: #F0F2F5; box-shadow: var(--out-sm); }
[data-d="relieve"] .s-eyebrow { color: var(--blue-2); }
[data-d="relieve"] .r-hero { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 14px 14px 20px; border-radius: 32px; }
/* Dial: surco hundido, arco azul mate y botón central levantado */
.r-dial { position: relative; width: 100px; height: 100px; border-radius: 50%; background: #ECEFF3; box-shadow: var(--in); }
.r-dial svg { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); transform: rotate(-90deg); }
.r-dial circle { fill: none; stroke: var(--blue); stroke-width: 3.6; stroke-linecap: round; stroke-dasharray: var(--p) 100; }
.r-dial b { position: absolute; inset: 20px; border-radius: 50%; display: grid; place-items: center; background: #F2F4F7; box-shadow: var(--out-sm); font-family: "InterDisplay", "Inter", sans-serif; font-size: 18px; font-weight: 700; }
[data-d="relieve"] .r-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0 4px; }
[data-d="relieve"] .r-q { display: grid; justify-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
[data-d="relieve"] .r-q span { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #F0F2F5; box-shadow: var(--out); border: 1px solid rgb(255 255 255 / 0.7); }
[data-d="relieve"] .r-q img { width: 36px; height: 36px; object-fit: contain; }
.r-groove { position: relative; height: 16px; border-radius: 999px; background: #ECEFF3; box-shadow: var(--in); margin: 12px 0 10px; }
.r-groove i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc(var(--p) * 1% - 6px); border-radius: 999px; background: var(--c, var(--blue)); }
.r-groove u { position: absolute; top: -4px; bottom: -4px; left: calc(var(--pace) * 1%); width: 3px; border-radius: 2px; background: var(--ink); }
[data-d="relieve"] .s-mini { background: #F0F2F5; box-shadow: var(--out-sm); }
[data-d="relieve"] .s-chip { background: #ECEFF3; box-shadow: inset 1px 1px 3px rgb(133 144 162 / 0.34), inset -1px -1px 3px rgb(255 255 255 / 0.95); }
[data-d="relieve"] .s-tabs { background: #F0F2F5; border: 1px solid rgb(255 255 255 / 0.7); box-shadow: var(--out); }
[data-d="relieve"] .s-tab.on { box-shadow: var(--in); background: #ECEFF3; }
[data-d="relieve"] .s-fab { background: var(--blue); box-shadow: 6px 6px 14px rgb(133 144 162 / 0.42), -6px -6px 14px rgb(255 255 255 / 0.95); }
[data-d="relieve"] .s-area { border-radius: 26px; padding: 12px 14px; gap: 6px; }
[data-d="relieve"] .s-body { gap: 12px; }
[data-d="relieve"] .s-area img { width: 50px; height: 50px; object-fit: contain; }

@media (prefers-reduced-motion: reduce) { .a-orb .w svg { animation: none; } }
@media (prefers-reduced-transparency: reduce) {
  [data-d="agua"] .a-glass, [data-d="agua"] .s-tabs, [data-d="espejo"] .e-card, [data-d="espejo"] .s-tabs { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(255 255 255 / 0.94); }
}
.s-mini svg { width: 20px; height: 20px; stroke-width: 1.6; color: var(--blue-2, currentColor); }
