/* MyEFB v1.0.6-dev.2 — compact Home, explicitly limited to the launcher.
   This file loads after the legacy Home and Documents style layers. */
body[data-efb-app="home"] #homeView.efbHomeFlightFirst{
  --home-grid-gap:clamp(10px,1.35dvh,14px);
  --home-mini-height:clamp(112px,16dvh,142px);
  --home-hero-height:clamp(148px,22dvh,198px);
  padding-bottom:max(10px,env(safe-area-inset-bottom))!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .myEfbHomeBrand{
  width:min(100%,440px)!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppsSection{
  display:block!important;flex:0 0 auto!important;
  width:min(100%,440px)!important;max-width:100%!important;
  margin:clamp(16px,2.8dvh,25px) 0 0!important;
  padding:0!important;min-height:0!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:auto auto auto!important;
  grid-auto-columns:minmax(0,1fr)!important;grid-auto-rows:auto!important;
  grid-auto-flow:row!important;
  gap:var(--home-grid-gap)!important;
  width:100%!important;max-width:100%!important;height:auto!important;
  min-height:0!important;overflow:visible!important;
  justify-content:stretch!important;justify-items:stretch!important;
  align-content:start!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"]{
  grid-column:1/-1!important;order:-1!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
){
  grid-column:auto!important;grid-row:auto!important;order:0!important;
  display:flex!important;flex-direction:column!important;
  align-items:flex-start!important;justify-content:flex-start!important;
  box-sizing:border-box!important;min-width:0!important;width:100%!important;
  min-height:var(--home-mini-height)!important;height:var(--home-mini-height)!important;
  padding:clamp(11px,2.9vw,15px)!important;gap:0!important;
  border:1px solid #e4eaf3!important;
  border-radius:23px!important;
  background:#fff!important;color:#25364e!important;
  box-shadow:0 4px 14px rgba(20,37,61,.07)!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppIcon{
  display:grid!important;place-items:center!important;
  position:static!important;flex:0 0 43px!important;
  width:43px!important;height:43px!important;
  border:0!important;border-radius:13px!important;
  background:#e9f0fa!important;color:#315d9e!important;
  box-shadow:none!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppIcon svg{width:24px!important;height:24px!important}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppLabel{
  margin:auto 0 0!important;width:100%!important;
  font-size:clamp(.85rem,3.7vw,1rem)!important;
  font-weight:760!important;line-height:1.15!important;
  overflow-wrap:normal!important;white-space:normal!important;
  text-align:left!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppDescription{
  display:block!important;margin:5px 0 0!important;
  font-size:clamp(.65rem,2.65vw,.76rem)!important;
  font-weight:500!important;line-height:1.25!important;
  color:#6e7d91!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"]{
  min-height:var(--home-hero-height)!important;
  height:var(--home-hero-height)!important;
  padding:clamp(15px,3.5vw,20px)!important;
  border-radius:27px!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppIcon{
  top:clamp(14px,3vw,19px)!important;right:clamp(14px,3vw,19px)!important;
  width:46px!important;height:46px!important;flex-basis:46px!important;
  border-radius:14px!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppIcon svg{
  width:28px!important;height:28px!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppLabel{
  margin-top:clamp(11px,2.1dvh,19px)!important;
  font-size:clamp(1.26rem,4.8vw,1.56rem)!important;
  line-height:1.12!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppDescription{
  margin-top:5px!important;font-size:clamp(.72rem,2.5vw,.85rem)!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppCTA{
  margin-top:auto!important;padding:7px 12px!important;font-size:.75rem!important;
}
/* Reserve a real region at the bottom even before a flight is initialised.
   The existing island occupies this region during flight; it cannot overlap tiles. */
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock{
  display:flex;align-items:center;justify-content:center;
  flex:0 0 clamp(70px,11dvh,100px)!important;
  width:min(100%,440px)!important;min-width:0;max-width:100%!important;
  min-height:0;margin-top:auto!important;
  box-sizing:border-box;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock .homeActiveFlightIsland{
  position:relative!important;inset:auto!important;
  transform:none!important;flex:0 0 auto!important;
  margin:0!important;width:100%!important;height:clamp(60px,8.6dvh,76px)!important;
  max-width:100%!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock .homeActiveFlightIsland:active{
  transform:scale(.982)!important;
}
/* Dark tiles retain the same hierarchy and geometry as light tiles. */
body[data-theme="dark"][data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
){
  background:#202b3d!important;color:#edf3fe!important;
  border-color:#354258!important;box-shadow:0 5px 15px rgba(0,0,0,.08)!important;
}
body[data-theme="dark"][data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppIcon{background:#2d4368!important;color:#abc7fb!important}
body[data-theme="dark"][data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
  [data-app-id="calculator"],[data-app-id="checklists"],
  [data-app-id="documents"],[data-app-id="settings"]
) .efbAppDescription{color:#9eaabe!important}
/* Keep four compact options in the bottom-right quadrant on phones and iPads.
   Short landscape devices use six columns to avoid scrolling. */
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppsSection{
    margin-top:8px!important;width:min(100%,1020px)!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    grid-template-rows:auto!important;
    gap:9px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"]{
    grid-column:span 2!important;height:124px!important;min-height:124px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
    [data-app-id="calculator"],[data-app-id="checklists"],
    [data-app-id="documents"],[data-app-id="settings"]
  ){height:124px!important;min-height:124px!important;padding:10px!important}
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppLabel{
    font-size:1.05rem!important;margin-top:7px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"] .efbAppCTA{
    padding:4px 8px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock{
    flex-basis:46px!important;width:min(100%,440px)!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock .homeActiveFlightIsland{
    height:40px!important;min-height:40px!important;
  }
}
@media(orientation:portrait) and (max-height:730px){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst{
    --home-grid-gap:9px;--home-mini-height:clamp(104px,14.5dvh,116px);
    --home-hero-height:clamp(136px,22dvh,155px);
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppsSection{
    margin-top:12px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
    [data-app-id="calculator"],[data-app-id="checklists"],
    [data-app-id="documents"],[data-app-id="settings"]
  ) .efbAppIcon{width:38px!important;height:38px!important;flex-basis:38px!important}
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
    [data-app-id="calculator"],[data-app-id="checklists"],
    [data-app-id="documents"],[data-app-id="settings"]
  ){padding:10px!important}
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock{
    flex-basis:clamp(52px,10dvh,70px)!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock .homeActiveFlightIsland{
    height:54px!important;
  }
}
@media(orientation:portrait) and (max-height:610px){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst{
    --home-mini-height:90px;--home-hero-height:130px;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock{
    flex-basis:48px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .homeActiveFlightDock .homeActiveFlightIsland{
    height:43px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
    [data-app-id="calculator"],[data-app-id="checklists"],
    [data-app-id="documents"],[data-app-id="settings"]
  ) .efbAppIcon{width:34px!important;height:34px!important;flex-basis:34px!important}
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>:is(
    [data-app-id="calculator"],[data-app-id="checklists"],
    [data-app-id="documents"],[data-app-id="settings"]
  ) .efbAppDescription{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppTile{transition-duration:.01ms!important}
}
