/* =====================================================================
   Diseño adaptable tablet / escritorio (v3.5.0)
   Todo vive dentro de media queries ≥ 768 px y excluye html.fz (teléfono en
   "sitio de escritorio"), así que en celulares (PWA y APK) no cambia nada.
   Cortes:  768–1099 tablet (riel lateral compacto) · ≥ 1100 escritorio (barra lateral completa)
   ===================================================================== */
@media (min-width: 768px) {
  html:not(.fz) .app-root { max-width: none; box-shadow: none; }
  html:not(.fz) { --content-max: 760px; --gutter: max(24px, calc((100% - var(--content-max)) / 2)); }

  /* Contenido centrado con ancho cómodo (pestañas y vistas) */
  html:not(.fz) .tab-page > :not(.hero) { width: auto; max-width: var(--content-max); margin-left: auto; margin-right: auto; }
  html:not(.fz) .tab-page > .sec[style*="padding:0"] .hscroll { padding-left: 16px; padding-right: 16px; }
  html:not(.fz) .hero { padding-left: var(--gutter); padding-right: var(--gutter); border-radius: 0 0 44px 44px; }
  html:not(.fz) .view-bar { padding-left: var(--gutter); padding-right: var(--gutter); }
  html:not(.fz) .view-body:not(.flush) { padding-left: var(--gutter); padding-right: var(--gutter); }

  /* Rejillas: 2–3 columnas */
  html:not(.fz) .cw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  html:not(.fz) .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  html:not(.fz) .feed { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  html:not(.fz) .quick { gap: 14px; }
  html:not(.fz) .scan-box { max-width: 460px; }

  /* Hub Hello: modal centrado en tablet/escritorio */
  html:not(.fz) .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(560px, calc(100% - 48px)); max-height: min(86vh, 760px); border-radius: 30px;
    transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .3s var(--ease), opacity .25s var(--ease); box-shadow: 0 30px 80px -24px rgba(43,40,35,.45); }
  html:not(.fz) .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  html:not(.fz) .sheet.tall { height: min(86vh, 760px); }
  html:not(.fz) .sheet .sheet-grab { display: none; }
  html:not(.fz) .sheet.hello-hub { width: 460px; max-height: none; border-radius: 30px; }
  html:not(.fz) .sheet.hello-hub .sheet-body { padding: 22px 26px 24px; }
  html:not(.fz) .hello-hub-hint p { font-size: 15px; }
  html:not(.fz) .hello-hub-row-2 { max-width: 300px; }
  html:not(.fz) .hello-hub-tile { padding: 16px 8px 14px; cursor: pointer; }
  html:not(.fz) .hello-hub-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(58,61,38,.45), inset 0 0 0 1.5px rgba(141,178,198,.5); }
}

/* ---------- Riel lateral (tablet horizontal y escritorio) ---------- */
@media (min-width: 768px) {
  html:not(.fz) { --rail: 104px; --content-max: 960px; }
  html:not(.fz) .tabs, html:not(.fz) #views { left: var(--rail); }
  html:not(.fz).keep-tabbar #views { bottom: 0; }
  html:not(.fz) .tab-page { padding-bottom: 40px; }
  html:not(.fz) .view-body { padding-bottom: 40px; }
  html:not(.fz) .view { box-shadow: none; }
  html:not(.fz) .view.under { transform: none; opacity: 0; }

  .side-rail { display: none; }
  html:not(.fz) .scr-main .side-rail { display: flex; position: absolute; z-index: 29; left: 0; top: 0; bottom: 0; width: var(--rail); flex-direction: column; align-items: center;
    background: linear-gradient(180deg, #1E1C18 0%, #2A3558 55%, #3B5372 100%); color: #fff; padding: 22px 0 18px; }
  .side-brand { display: flex; align-items: baseline; gap: 3px; }
  .side-brand .lg-a, .side-brand .lg-b { color: #fff; }
  .side-brand .lg-b { display: none; }
  .side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; color: #fff; border-radius: 18px; padding: 8px; }
  .side-me:hover { background: rgba(255,255,255,.08); }
  .side-me .av { width: 40px; height: 40px; border-radius: 50%; background: #A4555F; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
  .side-me .tx { display: none; flex-direction: column; text-align: left; line-height: 1.2; }
  .side-me .tx b { font-size: 14.5px; } .side-me .tx span { font-size: 12px; opacity: .7; }
  .side-soc { display: none; }

  html:not(.fz) .tabbar { left: 0; right: auto; top: 86px; bottom: auto; width: var(--rail); height: auto; padding: 0 10px; background: transparent; box-shadow: none; border-radius: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none; display: flex; flex-direction: column; gap: 8px; }
  html:not(.fz) .tab-btn { color: rgba(255,255,255,.72); height: 70px; border-radius: 18px; font-size: 11.5px; }
  html:not(.fz) .tab-btn:hover { background: rgba(255,255,255,.07); color: #fff; }
  html:not(.fz) .tab-btn.active { color: #fff; background: rgba(141,178,198,.22); }
  html:not(.fz) .tab-btn.active .tb-ic { background: transparent; }
  html:not(.fz) .tab-btn-brand .tb-ic, html:not(.fz) .tab-btn .tb-brand { width: 44px; height: 44px; }
  html:not(.fz) .tab-btn-brand { height: 82px; gap: 3px; }
  html:not(.fz) .tab-btn-brand::after { content: 'Hello'; }
}

/* ---------- Escritorio: barra lateral completa, 3 columnas ---------- */
@media (min-width: 1100px) {
  html:not(.fz) { --rail: 248px; --content-max: 1100px; }
  html:not(.fz) .scr-main .side-rail { align-items: stretch; padding: 30px 18px 22px; }
  .side-brand { padding: 0 12px; } .side-brand .lg-a { font-size: 26px; } .side-brand .lg-b { display: inline; font-size: 28px; }
  .side-tag { display: block; padding: 4px 12px 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; opacity: .6; }
  .side-me .tx { display: flex; }
  .side-soc { display: flex; gap: 8px; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.12); margin-top: 12px; }
  .side-soc a { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
  .side-soc a:hover { background: rgba(255,255,255,.18); }

  html:not(.fz) .tabbar { top: 118px; width: var(--rail); padding: 0 18px; gap: 6px; }
  html:not(.fz) .tab-btn { flex-direction: row; justify-content: flex-start; gap: 12px; height: 52px; padding: 0 10px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
  html:not(.fz) .tab-btn .tb-ic { width: 34px; height: 34px; }
  html:not(.fz) .tab-btn-brand { height: 52px; gap: 12px; }
  html:not(.fz) .tab-btn-brand .tb-ic, html:not(.fz) .tab-btn .tb-brand { width: 34px; height: 34px; }
  html:not(.fz) .tab-btn-brand::after { content: 'Hello · accesos'; }
  html:not(.fz) .tab-btn-action { font-size: 0; }
  html:not(.fz) .tab-btn-action::after { content: 'Escanear QR'; font-size: 15.5px; }
  html:not(.fz) .tab-btn .tb-qr { width: 22px; height: 22px; }

  html:not(.fz) .cw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  html:not(.fz) .rec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  html:not(.fz) .feed { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

  /* Inicio en 2 columnas */
  html:not(.fz) #tab-inicio.active { display: grid; grid-template-columns: [full-start] minmax(28px, 1fr) [c-start] minmax(0, 540px) [mid] minmax(0, 540px) [c-end] minmax(28px, 1fr) [full-end]; column-gap: 20px; align-content: start; grid-auto-rows: max-content; }
  html:not(.fz) #tab-inicio > * { grid-column: c-start / c-end; max-width: none; margin-left: 0; margin-right: 0; }
  html:not(.fz) #tab-inicio > .hero { grid-column: full-start / full-end; padding-left: calc(var(--gutter) + 8px); padding-right: calc(var(--gutter) + 8px); padding-bottom: 104px; }
  html:not(.fz) #tab-inicio > .float-wrap { margin-top: -84px; }
  html:not(.fz) #tab-inicio > .sec { padding-left: 0; padding-right: 0; }
  html:not(.fz) #tab-inicio > .sec:has(.search-pill), html:not(.fz) #tab-inicio > .sec:has(.mk-home), html:not(.fz) #tab-inicio > .sec:has(.appt) { grid-column: c-start / mid; }
  html:not(.fz) #tab-inicio > .sec:has(.quick), html:not(.fz) #tab-inicio > .sec:has(.duo), html:not(.fz) #tab-inicio > .sec:has(.tip) { grid-column: mid / c-end; }
  html:not(.fz) #tab-inicio > .sec:has(.search-pill) { align-self: center; }
  html:not(.fz) #tab-inicio > .sec:has(.duo) { grid-row: span 2; }
  html:not(.fz) #tab-inicio > .sec:has(.duo) .duo-card { min-height: 140px; }
  html:not(.fz) #tab-inicio .hscroll { padding-left: 4px !important; padding-right: 4px !important; }
  html:not(.fz) #tab-inicio .version { grid-column: c-start / c-end; }
  html:not(.fz) .well { gap: 32px; }

  /* Login / onboarding: pantalla dividida (video a la izquierda, formulario a la derecha) */
  html:not(.fz) .scr-auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(460px, 1fr); align-items: stretch; overflow: hidden; }
  html:not(.fz) .scr-auth .auth-head { height: auto; border-radius: 0; padding: 56px 64px; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(180deg, rgba(11,17,28,.15) 0%, rgba(30,28,24,.35) 55%, rgba(30,28,24,.82) 100%) !important; }
  html:not(.fz) .scr-auth .auth-head .logo-w { position: absolute; top: 48px; left: 64px; }
  html:not(.fz) .scr-auth .auth-head .logo-w .lg-a { font-size: 32px; } html:not(.fz) .scr-auth .auth-head .logo-w .lg-b { font-size: 34px; }
  html:not(.fz) .scr-auth .auth-head h1 { font-size: 58px; margin: 0 0 12px; }
  html:not(.fz) .scr-auth .auth-head p { font-size: 19px; max-width: 460px; }
  html:not(.fz) .scr-auth .auth-head p::after { content: 'Registra tus síntomas, aprende con especialistas y descubre negocios de bienestar cerca de ti.'; display: block; margin-top: 10px; font-size: 16px; opacity: .85; }
  html:not(.fz) .scr-auth .auth-card { grid-column: 2; grid-row: 1; align-self: center; justify-self: center; width: min(440px, calc(100% - 64px)); margin: 0; padding: 70px 32px 28px; }
  html:not(.fz) .scr-auth::after { content: ''; grid-column: 2; grid-row: 1; background: radial-gradient(60% 50% at 80% 10%, rgba(141,178,198,.30), transparent 70%), radial-gradient(50% 40% at 10% 95%, rgba(201,126,135,.14), transparent 70%), #F6F3EA; z-index: 1; }
  html:not(.fz) .scr-auth .auth-card { z-index: 2; }
  html:not(.fz) .scr-onb { left: 53.5%; background: #F6F3EA; }
}
@media (min-width: 768px) {
  html:not(.fz) .tab-btn.active .tb-ic svg [fill="#fff"] { fill: #34416A; }
  html:not(.fz) .tab-btn.active .tb-ic svg [stroke="#fff"] { stroke: #34416A; }
}
