/* ======================================================================
   GritHQ Alpha4.72 — VISUAL LOCK
   This file is the final authority for shared shell presentation.
   Layout/content structure stays owned by existing components; visual assets
   and global presentation are intentionally isolated here.
   ====================================================================== */
:root{
  --gh-lock-bg:#040a12;
  --gh-lock-bg-top:#030914;
  --gh-lock-panel:#07131f;
  --gh-lock-line:rgba(100,132,164,.30);
  --gh-lock-text:#f4f7fa;
  --gh-lock-muted:#96a6b7;
  --gh-lock-glow:0 0 12px rgba(44,145,255,.10);
}

/* One continuous canvas removes the hard header/body band seen on-device. */
.app-stage{
  background:linear-gradient(180deg,var(--gh-lock-bg-top) 0,var(--gh-lock-bg) 150px,var(--gh-lock-bg) 100%)!important;
}
.main-content{background:transparent!important}

@media(max-width:959px){
  .mobile-appbar{
    min-height:86px!important;
    padding:calc(8px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 10px max(16px,env(safe-area-inset-left))!important;
    background:transparent!important;
    border-bottom:0!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    align-items:center!important;
  }
  .mobile-brand-row .brand-logo-img{
    width:172px!important;
    max-width:172px!important;
    height:auto!important;
    filter:brightness(1.08) contrast(1.05)!important;
  }

  /* Global Coach identity: same asset everywhere, no icon frame/border. */
  .global-coach-btn{
    width:68px!important;
    height:auto!important;
    min-height:72px!important;
    display:grid!important;
    grid-template-rows:52px auto!important;
    place-items:center!important;
    gap:2px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#c9d3de!important;
    overflow:visible!important;
  }
  .global-coach-btn img{
    width:52px!important;
    height:52px!important;
    object-fit:contain!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    filter:saturate(1.07) brightness(1.08) contrast(1.06)!important;
  }
  .global-coach-btn .global-coach-label{
    display:block!important;
    color:#cbd5df!important;
    font-size:11px!important;
    line-height:1!important;
    font-weight:650!important;
    letter-spacing:0!important;
    white-space:nowrap!important;
  }
  .global-coach-btn:focus-visible{outline:2px solid rgba(57,155,255,.72)!important;outline-offset:3px!important}

  /* A common, restrained icon treatment. Semantic color provides identity. */
  .gh-lane-switch-icon,
  .gh-home-v2-action>span,
  .gh-profile-row-icon,
  .gh-profile-quick>span,
  .gh-neon-icon{
    box-shadow:var(--gh-lock-glow)!important;
  }
  .gh-lane-switch-icon svg,
  .gh-home-v2-action>span svg,
  .gh-profile-row-icon svg,
  .gh-profile-quick svg,
  .gh-neon-icon svg{
    filter:none!important;
  }

  /* Canonical Mobility symbol. No character illustration. */
  .gh-mobility-range-icon{
    display:block!important;
    width:72%!important;
    height:72%!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.85!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  #view-routines .gh-lane-switch.mobility .gh-mobility-range-icon{
    width:25px!important;height:25px!important;margin:auto!important;
  }
  .gh-home-v2-action.mobility>span .gh-mobility-range-icon{
    width:24px!important;height:24px!important;margin:auto!important;
  }

  /* Shared primary views fade directly into the same dark canvas. */
  #view-home,#view-routines,#view-history,#view-profile{
    background:transparent!important;
  }
}

@media(max-width:390px){
  .mobile-brand-row .brand-logo-img{width:164px!important;max-width:164px!important}
  .global-coach-btn{width:64px!important;grid-template-rows:49px auto!important;min-height:68px!important}
  .global-coach-btn img{width:49px!important;height:49px!important}
  .global-coach-btn .global-coach-label{font-size:11px!important}
}

/* Approved Train organization: six lanes in a balanced 3 × 2 grid. */
@media(max-width:959px) and (orientation:portrait){
  #view-routines .gh-six-lanes{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #view-routines .gh-six-lanes .gh-lane-switch{
    min-height:88px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
    gap:7px!important;
    padding:8px 6px!important;
  }
  #view-routines .gh-six-lanes .gh-lane-switch-copy{align-items:center!important;width:100%!important}
  #view-routines .gh-six-lanes .gh-training-mode-control-label{
    font-size:11px!important;
    line-height:1.08!important;
    text-align:center!important;
    max-width:100%!important;
  }
  #view-routines .gh-six-lanes .gh-lane-switch.active:after{
    left:50%!important;transform:translateX(-50%)!important;width:34px!important;bottom:5px!important;
  }
}
