/* MyEFB DEV visual hierarchy — presentation only.
   Loaded last. No layout height, position, touch-action or state changes.
   Preserve cockpit alert colours, running-timer effects and compact window sizing. */
/* HOME: iPadOS-style restrained launcher.
   Keep the existing app buttons, active-flight states and compact breakpoints;
   this layer controls colour, typography and decorative effects only. */
body[data-efb-app="home"] #homeView.efbHomeFlightFirst{
  background:var(--efb-page)!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"]
){
  border-color:var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-card)!important;
  background:var(--efb-surface)!important;
  color:var(--efb-text)!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{
  background:color-mix(in srgb,var(--efb-accent) 8%,var(--efb-surface-subtle))!important;
  color:var(--efb-accent)!important;
  border-radius:var(--efb-radius-content-group)!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"]
) .efbAppLabel{
  font-weight:600!important;
  letter-spacing:-.02em!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{
  color:var(--efb-muted)!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid>[data-app-id="dashboard"]{
  background:var(--efb-home-hero)!important;
  border-radius:24px!important;
  box-shadow:none!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst [data-app-id="dashboard"] .efbAppLabel{
  font-weight:700!important;
  letter-spacing:-.035em!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst [data-app-id="dashboard"] .efbAppCTA{
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#fff!important;
  box-shadow:none!important;
  font-weight:650!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .myEfbHomeBrand>strong{
  color:var(--efb-text)!important;
}
/* Preserve tile position on touch: respond using tone, not bounce. */
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid > .efbAppTile{
  transition:filter var(--efb-feedback-duration) var(--efb-feedback-ease),
             border-color var(--efb-feedback-duration) ease!important;
}
body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid > .efbAppTile:active:not(:disabled){
  filter:brightness(.97)!important;
}
@media(hover:hover) and (pointer:fine){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppTile:hover .efbAppIcon{
    transform:none!important;
    box-shadow:none!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid > .efbAppTile:hover:not(:disabled){
    border-color:color-mix(in srgb,var(--efb-accent) 24%,var(--efb-hairline))!important;
  }
}
@media(orientation:landscape) and (max-height:540px){
  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{
    font-size:.85rem!important;
  }
}

/* FLIGHT DASHBOARD: reinforce the plan/weather pair without changing alert
   styling, the live Block timer, or fuel-critical readouts. */
body[data-efb-app="dashboard"] #dashboardView #dashboardFlightDetailsMetric,
body[data-efb-app="dashboard"] #dashboardView #dashboardMetarMetric{
  background:var(--efb-surface)!important;
  border-color:var(--efb-hairline)!important;
  box-shadow:var(--efb-card-shadow)!important;
}
@media(min-width:700px) and (min-height:570px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardCardHeading>span{
    font-size:var(--efb-type-card-title)!important;
    font-weight:650!important;
  }
}

/* PERFORMANCE: selected step and section headers have clear visual anchors. */
body[data-efb-app="calculator"] #calculatorView .performanceAppHeader h2{
  font-size:var(--efb-type-page-title)!important;
  font-weight:700!important;
}
body[data-efb-app="calculator"] #calculatorView .performanceAppHeader h2::before{
  content:none;
  display:none;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceTab.active{
  box-shadow:var(--efb-shadow-segment)!important;
}
body[data-efb-app="calculator"] #calculatorView .phaseCard .phaseHeader{
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
}
@media(max-width:620px){
  body[data-efb-app="calculator"] #calculatorView .performanceAppHeader h2{
    font-size:var(--efb-type-page-title-compact)!important;
  }
}

/* CHECKLISTS: more obvious section headers and category markers, retaining
   red/amber abnormal and emergency semantics. */
body[data-efb-app="checklists"] #checklistsView .checklistNavTitle h2,
body[data-efb-app="checklists"] #checklistsView .checklistGroupTitle h2{
  font-size:var(--efb-type-page-title)!important;
  font-weight:700!important;
  letter-spacing:-.03em!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistGroupCard:not(.abnormal):not(.emergency){
  box-shadow:var(--efb-card-shadow)!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistGroupCard.abnormal{
  box-shadow:inset 3px 0 0 var(--warn)!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistGroupCard.emergency{
  box-shadow:inset 3px 0 0 var(--bad)!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistGroupCopy strong{
  font-size:var(--efb-type-card-title)!important;
  font-weight:650!important;
}

/* SETTINGS: readable section hierarchy and cards visibly distinct from
   the page surface, without resizing form fields or changing preferences. */
body[data-efb-app="settings"] #settingsView .settingsSectionHeader{
  border-left:0!important;
  padding-left:4px!important;
}
body[data-efb-app="settings"] #settingsView .settingsSectionHeader h3{
  font-size:var(--efb-type-section-title)!important;
  font-weight:700!important;
}
body[data-efb-app="settings"] #settingsView .settingsCard{
  border:1px solid var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-card)!important;
  background:var(--efb-surface)!important;
  box-shadow:none!important;
}
body[data-theme="dark"][data-efb-app="settings"] #settingsView .settingsCard{
  box-shadow:none!important;
}
body[data-efb-app="settings"] #settingsView .settingsCard .cardTitleRow h4{
  font-size:var(--efb-type-card-title)!important;
  font-weight:650!important;
}

/* DOCUMENTS: reinforce the browser's heading and grouped list container.
   Keep swipe, selection, drag handles and reader gestures unchanged. */
body[data-efb-app="documents"] #documentsView .docLibraryHeading h2{
  font-size:var(--efb-type-page-title)!important;
  font-weight:700!important;
}
body[data-efb-app="documents"] #documentsView .docBrowserGroupTitle{
  font-size:var(--efb-type-section-label)!important;
  font-weight:600!important;
}
body[data-efb-app="documents"] #documentsView .docBrowserRows{
  border-color:var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-card)!important;
  background:var(--efb-surface)!important;
  box-shadow:none!important;
}
body[data-efb-app="documents"] #documentsView .docFolderGlyph{
  border-radius:var(--efb-radius-content-group)!important;
  background:color-mix(in srgb,var(--efb-accent) 8%,var(--efb-surface-subtle))!important;
  color:var(--efb-accent)!important;
}
body[data-theme="dark"][data-efb-app="documents"] #documentsView .docBrowserRows{
  box-shadow:none!important;
}

/* Keyboard and switch-access focus remains visible without shifting layout. */
body.menuHeaderInstalled[data-efb-app="home"] #homeView .efbAppGrid > .efbAppTile:focus-visible,
body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsNav button:focus-visible,
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) #docBrowserPane
  :is(.docOpenFolder,.docItemLink,.docHeaderActions button):focus-visible,
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceTab:focus-visible,
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  :is(.checklistGroupCard,.checklistActionDock > button):focus-visible{
  outline:3px solid var(--efb-focus-ring)!important;
  outline-offset:2px!important;
}
/* No animated or hover-only visual dependency for reduced motion users. */
@media(prefers-reduced-motion:reduce){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppTile{transition:none!important}
}

/* DEV .38 — visible list typography and selection cues. No row dimensions,
   swiping, reader transforms, menu positioning or state logic is altered. */
body[data-efb-app="documents"] #documentsView .docFolderHeading strong{
  font-size:var(--efb-type-row-title)!important;
  font-weight:600!important;
  line-height:1.3!important;
}
body[data-efb-app="documents"] #documentsView .docItemText strong{
  font-size:var(--efb-type-row-title)!important;
  font-weight:600!important;
  line-height:1.3!important;
}
body[data-efb-app="documents"] #documentsView :is(.docFolderHeading,.docItemText) small{
  font-size:var(--efb-type-row-support)!important;
  line-height:1.3!important;
}
body[data-efb-app="documents"] #documentsView .docItemSelected{
  background:color-mix(in srgb,var(--efb-accent) 9%,var(--efb-surface))!important;
  box-shadow:inset 2px 0 0 var(--efb-accent)!important;
}
/* Browser only: document reader transform, pan and swipe remain unchanged. */
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) #docBrowserPane
  :is(.docOpenFolder,.docItemLink){
  transition:background-color var(--efb-feedback-duration) ease!important;
}
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) #docBrowserPane
  :is(.docOpenFolder,.docItemLink):active{
  background:color-mix(in srgb,var(--efb-accent) 6%,var(--efb-surface))!important;
}
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading)
  .docHeaderActions button:active:not(:disabled){
  filter:brightness(.97)!important;
}
body[data-theme="dark"][data-efb-app="documents"] #documentsView .docItemSelected{
  background:color-mix(in srgb,var(--efb-accent) 12%,var(--efb-surface))!important;
}


/* Stage 12.4 — native-feeling browser actions: horizontal capsule controls
   and circular utility buttons. These selectors exclude the document reader.
   Don't alter widths, positions, scroll containers, gestures or disabled states. */
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading)
  .docHeaderActions :is(#docSelectButton,#docNewFolder,#docPickFiles){
  border-radius:999px!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading)
  :is(.docFileMore,.docFolderMore,.docDragHandle){
  border-radius:50%!important;
  box-shadow:none!important;
}

/* Checklist categories and individual lists now have an easier scan path.
   Preserve current/done/deferred/emergency item backgrounds and borders. */
body[data-efb-app="checklists"] #checklistsView .checklistLibraryOpen strong{
  font-size:1rem!important;
  font-weight:650!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistLibraryMeta,
body[data-efb-app="checklists"] #checklistsView :is(.checklistNavTitle,.checklistGroupTitle) p{
  font-size:var(--efb-type-row-support)!important;
  line-height:1.35!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary>span{
  font-size:.88rem!important;
  font-weight:600!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress{
  height:8px!important;
  box-shadow:none!important;
}

/* Settings navigation uses one low-contrast selected surface on iPhone and iPad.
   Do not add a separate underline or rail to the active tab. */
body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsNav button{
  border-radius:999px!important;
  box-shadow:none!important;
  transition:background-color var(--efb-feedback-duration) ease,
             color var(--efb-feedback-duration) ease,
             border-color var(--efb-feedback-duration) ease!important;
}
body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsNav button:active:not(:disabled){
  filter:brightness(.97)!important;
}
body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsNav button.active{
  border:1px solid var(--efb-hairline)!important;
  border-radius:999px!important;
  background:var(--efb-surface-raised)!important;
  color:var(--efb-text)!important;
  box-shadow:var(--efb-shadow-segment)!important;
}

/* Strengthen Performance section headings, leaving chart/POH dimensions
   and phase-state output colours unchanged. */
body[data-efb-app="calculator"] #calculatorView .sectionTitle h2{
  font-size:var(--efb-type-section-title)!important;
  font-weight:700!important;
  letter-spacing:-.025em!important;
}
body[data-efb-app="calculator"] #calculatorView .panelHeading h3{
  font-size:clamp(.92rem,1.85vw,1.06rem)!important;
  font-weight:650!important;
}


/* DEV .39 — iPhone screenshot review: bottom-dock clearance and readable
   checklist progress. Purely presentational; no dock geometry or app state. */

/* The static version is obscured by the lower-right Back pill on detail pages.
   Float it immediately above the navigation instead of behind it. */
body.menuHeaderInstalled:not([data-efb-app="home"]):not(.efbDocumentReaderOpen) > .myEfbGlobalVersion{
  bottom:max(81px,calc(env(safe-area-inset-bottom) + 76px))!important;
  right:max(12px,calc(env(safe-area-inset-right) + 12px))!important;
  z-index:110!important;
  opacity:.84!important;
}
@media(orientation:landscape) and (max-height:520px){
  body.menuHeaderInstalled:not([data-efb-app="home"]):not(.efbDocumentReaderOpen) > .myEfbGlobalVersion{
    bottom:max(63px,calc(env(safe-area-inset-bottom) + 58px))!important;
  }
}

/* Scroll beyond the final document or checklist entry so the two bottom
   navigation buttons do not hide the last actionable item. These are scroll
   gutters, not changes to the reader or list item heights. */
body[data-efb-app="documents"] #documentsView.documentLibraryMain:not(.isReading){
  padding-bottom:max(172px,calc(env(safe-area-inset-bottom) + 154px))!important;
}
body[data-efb-app="checklists"] #checklistsView.checklistsMain{
  padding-bottom:max(186px,calc(env(safe-area-inset-bottom) + 160px))!important;
}
body[data-efb-app="checklists"] #checklistsView .activeChecklistContent{
  padding-bottom:max(310px,calc(env(safe-area-inset-bottom) + 278px))!important;
}
body[data-efb-app="settings"] #settingsView.settingsMain{
  padding-bottom:max(216px,calc(env(safe-area-inset-bottom) + 195px))!important;
}

/* A 0%-complete checklist should still show its progress track visibly.
   Keep green completion fill and the existing checked/deferred semantics. */
body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress{
  background:color-mix(in srgb,var(--efb-muted) 20%,var(--efb-surface))!important;
  border:1px solid var(--efb-hairline)!important;
  border-radius:999px!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress::-webkit-progress-bar{
  background:color-mix(in srgb,var(--efb-muted) 20%,var(--efb-surface))!important;
  border-radius:999px!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress::-webkit-progress-value{
  background:#16733b!important;
  border-radius:999px!important;
}
body[data-theme="dark"][data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress{
  background:color-mix(in srgb,var(--efb-muted) 25%,var(--efb-surface))!important;
}
body[data-theme="dark"][data-efb-app="checklists"] #checklistsView .checklistProgressSummary progress::-webkit-progress-bar{
  background:color-mix(in srgb,var(--efb-muted) 25%,var(--efb-surface))!important;
}

/* Avoid obscuring reader visuals: document reader keeps its own full-screen
   viewport and special navigation; this rule is browser-only by selector. */


/* DEV .40 — Screenshot-driven Settings navigation placement.
   The eight horizontally scrollable Settings tabs previously floated above
   Home/Back, covering Units and form rows while scrolling. In portrait
   touch-sized layouts keep them within the page flow, visually below the
   Settings heading, with a sticky top position during longer forms.
   No tab click handling, selection state or form DOM changes. */
@media (max-width:820px) and (orientation:portrait){
  body[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding-bottom:max(120px,calc(env(safe-area-inset-bottom) + 104px))!important;
  }
  body[data-efb-app="settings"] #settingsView > .settingsTop{
    order:0!important;
    flex:0 0 auto!important;
  }
  body[data-efb-app="settings"] #settingsView > .settingsNav{
    order:1!important;
    position:sticky!important;
    top:max(10px,calc(env(safe-area-inset-top) + 4px))!important;
    bottom:auto!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    z-index:85!important;
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:0 0 16px!important;
    padding:5px!important;
    border-radius:15px!important;
    box-sizing:border-box!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-padding-inline:8px;
  }
  body[data-efb-app="settings"] #settingsView > .settingsShell{
    order:2!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
  }
  body[data-efb-app="settings"] #settingsView > .settingsNav button{
    min-height:42px!important;
    padding-inline:14px!important;
    font-size:.80rem!important;
  }
}
/* iOS standalone PWA content begins below the OS status bar. Avoid
   counting the safe-area inset twice when the tabs stick during scroll. */
@media (max-width:820px) and (orientation:portrait) and (display-mode:standalone){
  body[data-efb-app="settings"] #settingsView > .settingsNav{
    top:10px!important;
  }
}


/* DEV .41 — Nested Documents folder toolbar in phone portrait.
   A visible Back button previously caused Folder/Add files to wrap into
   an asymmetric right-aligned second row. This grid only activates inside
   a folder, leaving root Documents, selection and landscape unchanged. */
@media (max-width:620px) and (orientation:portrait){
  body[data-efb-app="documents"] #documentsView .docLibraryHeader{
    gap:12px!important;
    margin-bottom:12px!important;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)){
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
    row-gap:9px!important;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)) > .docHeaderLeft{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
  }
  /* Stage 12.8: the historic 84px reservation overrode the later
     full-label fix by specificity. The current header scrolls horizontally;
     let its Back button use its intrinsic width so "Documents" stays legible. */
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)) #docBackFolder{
    min-width:0!important;
    width:max-content!important;
    max-width:none!important;
    flex:0 0 auto!important;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions #docBackFolder > span{
    min-width:0;
    overflow:visible;
    text-overflow:clip;
    white-space:nowrap;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)) #docSelectButton{
    flex:0 0 auto!important;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)) > .docHeaderRight{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    align-items:stretch!important;
    width:100%!important;
    min-width:0!important;
    margin-left:0!important;
  }
  body[data-efb-app="documents"] #documentsView .docHeaderActions:has(> .docHeaderLeft > #docBackFolder:not(.hidden)) > .docHeaderRight > button{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    padding:0 9px!important;
  }
}

/* DEV .42 — Confirmed portrait screenshots: avoid overlaid version stamp.
   Keep the version bottom-right but below the lowest navigation pills and
   above the iOS home-indicator zone instead of across Initialise/tabs. */
body.menuHeaderInstalled:not([data-efb-app="home"]):not(.efbDocumentReaderOpen) > #myEfbGlobalVersion.myEfbGlobalVersion{
  bottom:max(16px,calc(env(safe-area-inset-bottom) - 5px))!important;
  right:max(10px,calc(env(safe-area-inset-right) + 10px))!important;
  z-index:30!important;
  opacity:.72!important;
}

/* The earlier Settings footer reset uses an ID plus a class in an
   !important selector; these higher-specificity rules win without
   affecting the landscape footer or any Settings click handlers.
   Portrait tabs stay in normal flow beneath the Settings heading,
   above the currently selected panel. They scroll sideways as before. */
@media (max-width:820px) and (orientation:portrait){
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsTop{
    order:0!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > nav.settingsNav{
    position:static!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    order:1!important;
    flex:0 0 auto!important;
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 16px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    z-index:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsShell{
    order:2!important;
    min-width:0!important;
  }
}

/* A search sheet with no airport suggestion buttons should not be a
   420px-tall blank card. As soon as suggestions arrive, revert to the
   established viewport-safe, internally scrollable search results sheet.
   Only applies to airport search on portrait phones. */
@media (max-width:620px) and (orientation:portrait){
  #dashboardAirportSearchDialog[open]:not(:has(#dashboardAirportSearchResults > .flightDashboardAirportOption)){
    height:auto!important;
    max-height:var(--efb-search-visible-height,calc(100dvh - 24px))!important;
  }
  #dashboardAirportSearchDialog[open] #dashboardAirportSearchResults:not(:has(> .flightDashboardAirportOption)){
    flex:0 0 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:64px!important;
    overflow-y:auto!important;
    margin:2px 0!important;
  }
}


/* DEV .43 — Shorten the initialised-flight weather panel on portrait
   phones only when neither its active airport nor active alternate is set.
   Actual METARs remain fully expanded, with their existing scroll area.
   Preflight, landscape, iPad and block/fuel cards are unaffected. */
@media (max-width:650px) and (orientation:portrait){
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"]:has(#dashboardMetarMetric[data-weather-empty="true"]) .flightDashboardMetrics{
    height:auto!important;
    min-height:0!important;
    align-self:start!important;
    align-content:start!important;
    grid-template-rows:minmax(255px,max-content) minmax(170px,max-content)!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] #dashboardMetarMetric[data-weather-empty="true"]{
    height:auto!important;
    min-height:170px!important;
    align-self:start!important;
  }
}


/* DEV .69 — The old .44/.45 short-result selectors were removed.
   Universal Search now groups results inside sections rather than placing
   .efbDocSearchResult directly under #efbDocumentSearchResults. Limiting the
   results to 92px therefore clipped real matches and hid quick-access links. */

/* A neutral, legible empty state for Search and empty Documents folders.
   No content, selection, sorting, button or data-state changes. */
body .efbDocSearchResults > .efbDocSearchHint{
  box-sizing:border-box;
  padding:9px 12px!important;
  border:1px solid var(--efb-hairline,var(--efb-border))!important;
  border-radius:12px!important;
  background:var(--efb-surface-subtle)!important;
}
body[data-efb-app="documents"] #documentsView .docFolderEmpty{
  box-sizing:border-box;
  width:100%;
  margin-top:9px;
  padding:22px 16px!important;
  border:1px solid var(--efb-component-border,var(--efb-border));
  border-radius:16px;
  background:color-mix(in srgb,var(--efb-surface-subtle) 65%,var(--efb-surface));
  text-align:center;
}
body[data-efb-app="documents"] #documentsView .docFolderEmpty strong{
  font-size:.96rem!important;
  font-weight:650!important;
}
body[data-efb-app="documents"] #documentsView .docFolderEmpty span{
  font-size:.78rem!important;
  line-height:1.4!important;
}


/* DEV .46 — Checklist library readability on compact screens.
   Long user-defined names may occupy two lines rather than disappearing
   behind a single-line ellipsis; row height expands naturally. No changes
   to progress fills, completion states, actions or touch geometry. */
body[data-efb-app="checklists"] #checklistsView .checklistLibraryRow .checklistLibraryOpen strong{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2;
  line-clamp:2;
  white-space:normal!important;
  overflow:hidden!important;
  overflow-wrap:anywhere!important;
  text-overflow:ellipsis!important;
  max-height:2.72em;
  line-height:1.35!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistGroupCopy strong{
  overflow-wrap:anywhere!important;
  line-height:1.3!important;
}
body[data-efb-app="checklists"] #checklistsView #activeChecklistPageTitle{
  min-width:0!important;
  overflow-wrap:anywhere!important;
  hyphens:auto;
  text-wrap:pretty;
}

/* Keep empty checklist groups legible within their existing list surface.
   Empty-state wording and the adjacent New Checklist action are unchanged. */
body[data-efb-app="checklists"] #checklistsView .checklistEmptyState{
  box-sizing:border-box;
  width:100%;
  padding:28px 18px!important;
  background:var(--efb-surface-subtle)!important;
  color:var(--efb-muted)!important;
  font-size:.82rem!important;
  line-height:1.45!important;
  text-align:center;
}


/* DEV .47 — Checklist density following iPhone screenshots. Portrait only.
   No changes to item states, gestures, buttons or checklist data. */
@media (max-width:620px) and (orientation:portrait){
  /* Aircraft: reclaim an unused grid track while protecting both sibling
     buttons (list at right:72px and reset at right:18px). */
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftRow > .checklistAircraftCard{
    grid-template-columns:44px minmax(0,1fr)!important;
    column-gap:12px!important;
    min-height:104px!important;
    padding:13px 122px 13px 14px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftIcon{
    width:44px!important;
    height:44px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftCopy{
    gap:3px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftCopy strong{
    font-size:1.08rem!important;
    line-height:1.2!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftCopy > span{
    font-size:.88rem!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistAircraftCopy small{
    font-size:.73rem!important;
    line-height:1.28!important;
    overflow-wrap:normal!important;
  }

  /* Active checklist: less blank scroll tail, but sufficient clearance for
     the last checklist item to clear fixed actions and Home/Back. */
  body[data-efb-app="checklists"] #checklistsView.checklistsMain{
    padding-bottom:max(132px,calc(env(safe-area-inset-bottom) + 112px))!important;
  }
  body[data-efb-app="checklists"] #checklistsView .activeChecklistContent{
    padding-bottom:max(174px,calc(env(safe-area-inset-bottom) + 148px))!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistRunSticky{
    padding:6px 6px 8px!important;
    margin-bottom:9px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistRunToolbar{
    margin-bottom:7px!important;
    gap:8px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistRunToolbar button{
    min-height:44px!important;
    padding:7px 8px!important;
    font-size:.79rem!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistProgressSummary{
    gap:6px!important;
    padding:2px!important;
  }

  /* Keep the fixed docks in their existing positions; smaller chrome
     makes extra room without colliding with the bottom navigation. */
  body.menuHeaderInstalled[data-efb-app="checklists"] .checklistActionDock{
    padding:5px!important;
    gap:6px!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] .checklistActionDock > button{
    min-height:44px!important;
    padding:7px 6px!important;
    font-size:.76rem!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] .checklistDeferredBar{
    min-height:32px!important;
    font-size:.68rem!important;
  }

  /* Keep accessible reset/edit targets and two-line checklist titles. */
  body[data-efb-app="checklists"] #checklistsView .checklistLibraryRow{
    min-height:60px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistLibraryRow .checklistLibraryOpen{
    min-height:54px!important;
  }

  /* Editor items remain single-line native inputs to preserve keyboard,
     value capture, drag and persistence semantics. Tighten only spacing. */
  body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry{
    padding-top:5px!important;
    padding-bottom:5px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistEditorEntryFields{
    gap:3px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistEditorActions{
    padding:2px 0 1px!important;
    gap:6px!important;
  }
}


/* DEV .48 — Checklist editor long challenge/response fields can now wrap
   across visible lines while preserving their value strings, max lengths,
   field classes, reordering and the existing Save flow. Safari/iOS can
   expand each field up to 128px before allowing internal scrolling. */
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry textarea.checklistChallengeInput,
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry textarea.checklistResponseInput{
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  max-height:128px!important;
  margin:0!important;
  padding:8px 12px!important;
  border:1px solid var(--efb-hairline)!important;
  border-radius:var(--efb-control-radius)!important;
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  resize:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overflow-wrap:anywhere!important;
  white-space:pre-wrap!important;
  font-family:inherit!important;
  line-height:1.35!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry textarea.checklistChallengeInput{
  font-size:17px!important;
  font-weight:650!important;
  color:var(--efb-text)!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry textarea.checklistResponseInput{
  font-size:16px!important;
  font-weight:550!important;
  color:var(--efb-muted,var(--muted))!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry textarea:is(.checklistChallengeInput,.checklistResponseInput):focus{
  border-color:var(--efb-accent)!important;
  outline:2px solid var(--efb-accent)!important;
  outline-offset:-2px!important;
}


/* DEV .49 — Long section headings use the same multiline, auto-sized editor
   presentation as the Challenge/Response fields introduced in .48. Keep the
   native max length, value reading, drag handles and remove buttons. */
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry.section textarea.checklistSectionTitleInput{
  display:block!important;
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:42px!important;
  max-height:128px!important;
  margin:0!important;
  padding:8px 12px!important;
  border:1px solid var(--efb-hairline)!important;
  border-radius:var(--efb-control-radius)!important;
  background:var(--efb-surface-subtle)!important;
  color:var(--efb-text)!important;
  box-shadow:none!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  resize:none!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overflow-wrap:anywhere!important;
  white-space:pre-wrap!important;
  font:650 16px/1.35 -apple-system,BlinkMacSystemFont,system-ui,sans-serif!important;
}
body[data-efb-app="checklists"] #checklistsView .checklistEditorEntry.section textarea.checklistSectionTitleInput:focus{
  border-color:var(--efb-accent)!important;
  outline:2px solid var(--efb-accent)!important;
  outline-offset:-2px!important;
}

/* Give the longest field label, "Procedure type", a genuinely separate
   column rather than its previous 72px track. Apply consistently to all
   three editor metadata rows; don't narrow their form controls excessively. */
@media (max-width:620px) and (orientation:portrait){
  body[data-efb-app="checklists"] #checklistsView .checklistEditorGroup :is(.checklistNameField,.checklistTypeField){
    grid-template-columns:minmax(98px,34%) minmax(0,1fr)!important;
    column-gap:10px!important;
    padding-inline:14px!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistEditorGroup :is(.checklistNameField,.checklistTypeField) > span{
    min-width:0!important;
    overflow-wrap:break-word!important;
    line-height:1.3!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistEditorPage{
    gap:12px!important;
  }
}


/* DEV .50 — Screenshot: active Checklist ends with an oversized blank tail.
   Previous portrait rules stacked 132px on the main page and 174px on the
   content itself. Use one combined clearance only when the active panel is
   visible; preserve a larger buffer if the deferred banner is showing. */
@media (max-width:620px) and (orientation:portrait){
  body[data-efb-app="checklists"] #checklistsView.checklistsMain:has(> .checklistsPanel[data-checklists-panel="active"]:not(.hidden)){
    padding-bottom:0!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent{
    padding-bottom:max(170px,calc(env(safe-area-inset-bottom) + 136px))!important;
  }
  body[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent:has(> .checklistDeferredBar:not(.hidden)){
    padding-bottom:max(226px,calc(env(safe-area-inset-bottom) + 192px))!important;
  }
}


/* DEV .51 — iPhone landscape screenshot audit: maintain readable content on
   short viewports instead of clipping cards or floating tabs over forms.
   Navigation, inputs, aviation values and their saved state are unchanged. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  /* HOME — the 124px hero truncates its own Open Flight CTA once the
     description wraps. Give all five launch tiles enough room. */
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst:not(.hasActiveFlight) .efbAppGrid > [data-app-id="dashboard"],
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst:not(.hasActiveFlight) .efbAppGrid > :is([data-app-id="calculator"],[data-app-id="checklists"],[data-app-id="documents"],[data-app-id="settings"]){
    box-sizing:border-box!important;
    height:152px!important;
    min-height:152px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst:not(.hasActiveFlight) .efbAppGrid > [data-app-id="dashboard"]{
    padding:12px 15px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst:not(.hasActiveFlight) .efbAppGrid > [data-app-id="dashboard"] .efbAppDescription{
    line-height:1.2!important;
    margin-top:3px!important;
  }
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst:not(.hasActiveFlight) .efbAppGrid > [data-app-id="dashboard"] .efbAppCTA{
    flex-shrink:0!important;
    margin-top:auto!important;
    padding:5px 9px!important;
  }

  /* FLIGHT DASHBOARD — the preflight cards are currently forced into
     zero-min-height fractional rows within a fixed-height shell. Let only
     preflight scroll; preserve the specialised in-flight timer/fuel grid. */
  body[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="preflight"]{
    height:100dvh!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:max(136px,calc(env(safe-area-inset-bottom) + 108px))!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] .flightDashboardShell{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:max-content max-content max-content!important;
    align-content:start!important;
    gap:10px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] .flightDashboardMetrics{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:max-content max-content!important;
    align-content:start!important;
    gap:9px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] :is(#dashboardFlightDetailsMetric,#dashboardMetarMetric){
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
    padding:11px 13px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] #dashboardMetarRaw{
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:148px!important;
    overflow-y:auto!important;
  }
  body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] #dashboardPreflightActions{
    align-self:start!important;
    margin-top:2px!important;
    gap:9px!important;
  }

  /* DOCUMENTS — shorten the header/toolbar stack so folder rows enter the
     visible area sooner; preserve scrolling past the fixed Home/Back dock. */
  body[data-efb-app="documents"] #documentsView.documentLibraryMain:not(.isReading){
    padding-top:max(19px,calc(env(safe-area-inset-top) + 9px))!important;
    padding-bottom:max(128px,calc(env(safe-area-inset-bottom) + 102px))!important;
  }
  body[data-efb-app="documents"] #documentsView .docLibraryHeader{
    gap:8px!important;
    margin-bottom:8px!important;
  }
  body[data-efb-app="documents"] #documentsView .docLibraryToolbar{
    min-height:36px!important;
    margin-bottom:8px!important;
  }
  body[data-efb-app="documents"] #documentsView .docFolderOrder select{
    height:38px!important;
    min-height:38px!important;
  }

  /* SETTINGS — place section tabs after the heading, before the form,
     rather than fixed over Theme/Units and the navigation dock. */
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding-bottom:max(132px,calc(env(safe-area-inset-bottom) + 106px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsTop{
    order:0!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > nav.settingsNav{
    order:1!important;
    position:static!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    flex:0 0 auto!important;
    align-self:stretch!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 12px!important;
    padding:5px!important;
    z-index:auto!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > nav.settingsNav button{
    min-height:40px!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsShell{
    order:2!important;
    flex:1 1 auto!important;
    min-width:0!important;
  }

  /* PERFORMANCE — keep a scroll gutter below the aircraft illustration and
     form so the floating Home/Back controls never cover the final inputs. */
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain{
    padding-bottom:max(138px,calc(env(safe-area-inset-bottom) + 112px))!important;
  }
}


/* DEV .52 — Clear landscape iPhone collisions without changing controls,
   aviation data, checklist completion or search filtering. */
@media (orientation:landscape) and (min-width:780px) and (max-width:1020px) and (max-height:540px){
  /* Checklist actions live beside the list, rather than across the current
     checklist item. The Home/Back dock remains below the action rail. */
  body[data-efb-app="checklists"] #checklistsView [data-checklists-panel="active"]:not(.hidden) .activeChecklistList{
    box-sizing:border-box!important;
    width:calc(100% - 255px)!important;
    max-width:calc(100% - 255px)!important;
  }
  body[data-efb-app="checklists"] #checklistsView [data-checklists-panel="active"]:not(.hidden) .checklistActionDock{
    left:auto!important;
    right:max(16px,calc((100vw - 760px) / 2 + 14px))!important;
    bottom:max(90px,calc(env(safe-area-inset-bottom) + 88px))!important;
    transform:none!important;
    box-sizing:border-box!important;
    width:230px!important;
    max-width:230px!important;
    height:56px!important;
    grid-template-columns:1fr 1fr 1.15fr!important;
    gap:3px!important;
    padding:5px!important;
  }
  body[data-efb-app="checklists"] #checklistsView [data-checklists-panel="active"]:not(.hidden) .checklistActionDock > button{
    min-width:0!important;
    min-height:44px!important;
    padding:0 3px!important;
    font-size:.70rem!important;
  }
  body[data-efb-app="checklists"] #checklistsView [data-checklists-panel="active"]:not(.hidden) .checklistDeferredBar:not(.hidden){
    left:auto!important;
    right:max(16px,calc((100vw - 760px) / 2 + 14px))!important;
    transform:none!important;
    width:230px!important;
    max-width:230px!important;
  }
}
/* The short landscape Performance phase selector must scroll off with the
   form rather than staying stuck over airport and EOBT fields. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    position:static!important;
    top:auto!important;
    bottom:auto!important;
    left:auto!important;
    right:auto!important;
    inset-block-start:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 12px!important;
  }
}
/* iOS landscape keyboard reduces visualViewport.height without reliably
   reducing 100dvh. Limit the search sheet to the measured visible region. */
@media (orientation:landscape) and (min-width:650px) and (max-height:540px){
  body .efbDocSearchOverlay:not([hidden]){
    padding:10px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel{
    height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 24px))!important;
    max-height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 24px))!important;
    min-height:0!important;
    padding:10px!important;
    gap:7px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHeader{
    min-height:36px!important;
    gap:8px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchClose{
    height:38px!important;
    min-height:38px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchInputWrap{
    height:42px!important;
    min-height:42px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
    min-height:0!important;
    overflow-y:auto!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHint{
    margin:3px!important;
    padding:5px 9px!important;
    line-height:1.25!important;
  }
}


/* DEV .53 — Phase 1: common protected navigation area on landscape iPhones.
   This non-interactive layer is behind existing Search/Documents/Home/Back
   controls; the buttons retain their native body DOM and event handlers.
   Flight/Checklist action buttons remain in their own operational regions. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbProtectedNavigationArea{
    display:block!important;
    position:fixed!important;
    bottom:0!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    height:max(96px,calc(env(safe-area-inset-bottom) + 86px))!important;
    box-sizing:border-box!important;
    z-index:25!important;
    pointer-events:none!important;
    border-top:1px solid var(--efb-hairline,var(--efb-border))!important;
    background:var(--efb-surface)!important;
    box-shadow:var(--efb-footer-shadow)!important;
  }
  /* All existing global navigation buttons remain above the footer
     surface, regardless of which MyEFB app is selected. */
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen) > :is(
    #efbDocumentSearchButton,#efbDashboardDocumentsButton,
    #efbHomeButton,#efbHistoryBackButton
  ):not(.hidden){
    z-index:92!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen) > #myEfbGlobalVersion{
    z-index:30!important;
  }
  /* Page-owned scroll containers need to be able to scroll their last
     content above the global protected area, not beneath its surface. */
  html:has(body.menuHeaderInstalled:not(.efbDocumentReaderOpen)){
    scroll-padding-bottom:max(106px,calc(env(safe-area-inset-bottom) + 96px));
  }
  body.menuHeaderInstalled[data-efb-app="documents"] #documentsView.documentLibraryMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 120px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 120px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 120px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView.checklistsMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 120px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .activeChecklistContent{
    padding-bottom:max(174px,calc(env(safe-area-inset-bottom) + 148px))!important;
  }
}


/* DEV .54 — Short landscape Checklist content was squeezed between the
   protected navigation footer and a full-width sticky progress toolbar.
   Keep Complete/Reset and progress at the top of the checklist in normal
   document flow, so scrolling reveals multiple items instead of retaining
   a tall overlay over them. The separate right action rail stays fixed. */
@media (orientation:landscape) and (min-width:780px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) > .checklistRunSticky{
    position:static!important;
    top:auto!important;
    inset-block-start:auto!important;
    margin:0 0 10px!important;
    padding:6px 8px 8px!important;
    border-radius:14px!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistRunToolbar{
    margin:0 0 5px!important;
    gap:8px!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistRunToolbar > button{
    min-height:42px!important;
    padding:6px 10px!important;
    line-height:1.2!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistProgressSummary{
    gap:3px!important;
    padding:0 2px 2px!important;
  }
  /* Full-height checklist actions remain clear of the protected footer,
     and no geometry of the Checked/Undo/Defer buttons changes. */
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistList{
    scroll-margin-bottom:max(105px,calc(env(safe-area-inset-bottom) + 94px))!important;
  }
}


/* DEV .55 — Active Flight previously used fixed-height, non-scrolling
   landscape metric rows, so the protected nav area clipped the Block/Fuel
   cards. Make only active Flight content-sized and scrollable above that
   area; retain the original meter values and all flight control logic. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="flight"]{
    box-sizing:border-box!important;
    height:100dvh!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    padding-bottom:max(122px,calc(env(safe-area-inset-bottom) + 106px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardShell{
    height:auto!important;
    min-height:100%!important;
    grid-template-rows:max-content max-content max-content!important;
    align-content:start!important;
    gap:8px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardMetrics{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:minmax(190px,max-content) minmax(140px,max-content)!important;
    align-content:start!important;
    gap:8px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] :is(#dashboardBlockMetric,#dashboardEnduranceMetric){
    box-sizing:border-box!important;
    height:auto!important;
    min-height:190px!important;
    overflow:visible!important;
    align-self:stretch!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] #dashboardMetarMetric{
    box-sizing:border-box!important;
    height:auto!important;
    min-height:140px!important;
    max-height:260px!important;
    overflow-y:auto!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] #dashboardFlightActions{
    margin-bottom:5px!important;
  }
}
/* DEV .55 — Keyboard-aware landscape Documents Search was still so tall
   around the title and input that the first result was obscured. Use most
   of the measured visual viewport for a compact independently scrolling
   list, preserving Cancel and the focussed search input. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body .efbDocSearchOverlay:not([hidden]){
    padding:4px max(10px,env(safe-area-inset-right)) 3px max(10px,env(safe-area-inset-left))!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel{
    height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 10px))!important;
    max-height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 10px))!important;
    min-height:0!important;
    padding:6px!important;
    gap:4px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHeader{
    min-height:32px!important;
    gap:6px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHeader h2{
    font-size:.89rem!important;
    line-height:1.1!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchClose{
    min-height:32px!important;
    height:32px!important;
    min-width:66px!important;
    padding:0 10px!important;
    font-size:.75rem!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchInputWrap{
    height:40px!important;
    min-height:40px!important;
    padding-inline:10px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
    flex:1 1 0!important;
    min-height:0!important;
    gap:3px!important;
    padding:0 1px!important;
    overflow-y:auto!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchResult{
    min-height:42px!important;
    gap:6px!important;
    padding:5px 8px!important;
    grid-template-columns:28px minmax(0,1fr) 16px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchResultIcon{
    width:27px!important;
    height:29px!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHint{
    margin:0!important;
    padding:3px 6px!important;
  }
}


/* DEV .56 — Landscape Documents search must show more than a single hit
   above the iOS keyboard, and swipes must scroll the actual result viewport.
   Place the existing Cancel control beside Search (instead of spending a
   whole row on the title). Keep the heading in the accessibility tree. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:40px minmax(0,1fr)!important;
    column-gap:7px!important;
    row-gap:5px!important;
    align-content:start!important;
    height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 10px))!important;
    max-height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 10px))!important;
    min-height:0!important;
    padding:6px!important;
    overflow:hidden!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHeader{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    min-height:0!important;
    margin:0!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHeader h2{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    clip-path:inset(50%)!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchClose{
    height:40px!important;
    min-height:40px!important;
    min-width:70px!important;
    margin:0!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchInputWrap{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    height:40px!important;
    min-height:40px!important;
    min-width:0!important;
    margin:0!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
    display:block!important;
    grid-column:1 / -1!important;
    grid-row:2!important;
    min-width:0!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    padding:0 1px 3px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain!important;
    touch-action:pan-y!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults > .efbDocSearchResult{
    display:grid!important;
    width:100%!important;
    min-height:42px!important;
    margin:0!important;
    touch-action:pan-y!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults > .efbDocSearchResult + .efbDocSearchResult{
    margin-top:4px!important;
  }
}


/* DEV .57 — Stage 2: visually standardise the existing bottom navigation
   buttons inside the landscape protected footer. They remain body children
   with their current handlers, hidden states and accessibility metadata. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen){
    --efb-protected-nav-bottom:max(18px,calc(env(safe-area-inset-bottom) + 10px));
    --efb-protected-nav-button-width:120px;
    --efb-protected-nav-half-gap:6px;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) >
  :is(#efbDocumentSearchButton,#efbDashboardDocumentsButton,#efbHomeButton,#efbHistoryBackButton){
    position:fixed!important;
    top:auto!important;
    right:auto!important;
    bottom:var(--efb-protected-nav-bottom)!important;
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
  }
  /* Search at the safe-area leading edge, away from the centred pair. */
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDocumentSearchButton{
    left:max(14px,env(safe-area-inset-left))!important;
    width:46px!important;
    min-width:46px!important;
    transform:none!important;
  }
  /* Every non-dashboard detail view: Home left, Back right. */
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen):not([data-efb-app="dashboard"]) > #efbHomeButton{
    left:calc(50% - 126px)!important;
    width:var(--efb-protected-nav-button-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHistoryBackButton{
    left:calc(50% + var(--efb-protected-nav-half-gap))!important;
    width:var(--efb-protected-nav-button-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  /* Dashboard: Documents left, Home right. Visibility still controlled by JS. */
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDashboardDocumentsButton{
    left:calc(50% - 126px)!important;
    width:var(--efb-protected-nav-button-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHomeButton{
    left:calc(50% + var(--efb-protected-nav-half-gap))!important;
    width:var(--efb-protected-nav-button-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #myEfbGlobalVersion{
    position:fixed!important;
    top:auto!important;
    right:max(14px,calc(env(safe-area-inset-right) + 4px))!important;
    bottom:max(12px,calc(env(safe-area-inset-bottom) + 1px))!important;
    left:auto!important;
    transform:none!important;
    pointer-events:none!important;
    z-index:30!important;
  }
}


/* DEV .58–59 — Protected navigation, stage 3–4: portrait phones
   and compact split-view widths through 699px. Existing body-level buttons
   retain their original click/focus/visibility handling. */
@media (orientation:portrait) and (min-width:320px) and (max-width:699px){
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen){
    --efb-portrait-nav-band:max(106px,calc(env(safe-area-inset-bottom) + 78px));
    --efb-portrait-nav-bottom:max(28px,calc(env(safe-area-inset-bottom) + 10px));
    --efb-portrait-slot-width:clamp(92px,28vw,114px);
    --efb-portrait-slot-gap:10px;
    /* 8px minimum between Search and the first pill, including safe area.
       Expand the centred group rightward only on exceptionally narrow phones. */
    --efb-portrait-pair-left:max(
      calc(max(12px,env(safe-area-inset-left)) + 54px),
      calc(50% - var(--efb-portrait-slot-width) - 5px)
    );
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbProtectedNavigationArea{
    display:block!important;
    position:fixed!important;
    inset:auto 0 0!important;
    height:var(--efb-portrait-nav-band)!important;
    width:100%!important;
    box-sizing:border-box!important;
    border-top:1px solid var(--efb-hairline,var(--efb-border))!important;
    background:var(--efb-surface)!important;
    box-shadow:var(--efb-footer-shadow)!important;
    z-index:25!important;
    pointer-events:none!important;
  }
  /* These are the original controls. Neither their DOM nodes nor their
     hidden states are modified; only their geometry is standardised. */
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) >
  :is(#efbDocumentSearchButton,#efbDashboardDocumentsButton,#efbHomeButton,#efbHistoryBackButton){
    position:fixed!important;
    top:auto!important;
    right:auto!important;
    bottom:var(--efb-portrait-nav-bottom)!important;
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    z-index:92!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDocumentSearchButton{
    left:max(12px,env(safe-area-inset-left))!important;
    width:46px!important;
    min-width:46px!important;
    transform:none!important;
  }
  /* General app pages: Home then Back. */
  body.menuHeaderInstalled:not([data-efb-app="dashboard"]):not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHomeButton{
    left:var(--efb-portrait-pair-left)!important;
    width:var(--efb-portrait-slot-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHistoryBackButton{
    left:calc(var(--efb-portrait-pair-left) + var(--efb-portrait-slot-width) + var(--efb-portrait-slot-gap))!important;
    width:var(--efb-portrait-slot-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  /* Dashboard keeps its existing context: Documents then Home, never Back. */
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDashboardDocumentsButton{
    left:var(--efb-portrait-pair-left)!important;
    width:var(--efb-portrait-slot-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHomeButton{
    left:calc(var(--efb-portrait-pair-left) + var(--efb-portrait-slot-width) + var(--efb-portrait-slot-gap))!important;
    width:var(--efb-portrait-slot-width)!important;
    min-width:0!important;
    transform:none!important;
  }
  /* Informational version sits below and outside the button row. */
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #myEfbGlobalVersion.myEfbGlobalVersion{
    position:fixed!important;
    top:auto!important;
    bottom:max(12px,calc(env(safe-area-inset-bottom) - 5px))!important;
    right:max(10px,calc(env(safe-area-inset-right) + 10px))!important;
    left:auto!important;
    transform:none!important;
    z-index:30!important;
    pointer-events:none!important;
  }

  /* The Dashboard is a fixed-height page. Without a scrollable, content-
     sized shell, the new reserved footer could cover active-flight actions.
     Preserve metric order and controls while allowing both stages to scroll. */
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain{
    height:100dvh!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:max(128px,calc(env(safe-area-inset-bottom) + 94px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView .flightDashboardShell{
    height:auto!important;
    min-height:100%!important;
    grid-template-rows:max-content max-content max-content!important;
    align-content:start!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView .flightDashboardMetrics{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:max-content max-content!important;
    align-content:start!important;
  }
  /* Home has no Home/Back pills, but its launch cards must still scroll
     beyond the same protected Search-only footer. */
  body.menuHeaderInstalled[data-efb-app="home"] #homeView.efbHomeMain{
    padding-bottom:max(122px,calc(env(safe-area-inset-bottom) + 92px))!important;
  }
  /* Existing Documents, Settings and Checklist scroll gutters already
     exceed the band; avoid stacking additional page/content padding. */
}


/* DEV .59 — Finish coverage between 621 and 699px in portrait, where
   phone-like and compact tablet views previously had no shared footer.
   Preserve existing content gutters elsewhere; only the active Checklist
   needs its former double bottom padding normalised to one scroll buffer. */
@media (orientation:portrait) and (min-width:621px) and (max-width:699px){
  html:has(body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen)){
    scroll-padding-bottom:max(116px,calc(env(safe-area-inset-bottom) + 88px));
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView.checklistsMain:has(> .checklistsPanel[data-checklists-panel="active"]:not(.hidden)){
    padding-bottom:0!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent{
    padding-bottom:max(170px,calc(env(safe-area-inset-bottom) + 136px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent:has(> .checklistDeferredBar:not(.hidden)){
    padding-bottom:max(226px,calc(env(safe-area-inset-bottom) + 192px))!important;
  }
  /* Keep Performance's last form controls above the navigation band. */
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 118px))!important;
  }
}


/* DEV .60 — Documents Search: fix upward scrolling and iOS keyboard drift.
   The visual viewport can move down when the software keyboard is focused;
   anchor the portrait dialog to its actual visible top and height. Native
   result panning is now two-way (the overlay outside results stays locked). */
@media (orientation:portrait) and (min-width:320px) and (max-width:699px){
  body .efbDocSearchOverlay:not([hidden]){
    top:var(--efb-doc-search-visible-top,0px)!important;
    bottom:auto!important;
    height:var(--efb-doc-search-visible-height,100dvh)!important;
    max-height:var(--efb-doc-search-visible-height,100dvh)!important;
    padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left))!important;
  }
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel{
    box-sizing:border-box!important;
    height:min(440px,calc(var(--efb-doc-search-visible-height,100dvh) - 16px))!important;
    max-height:min(440px,calc(var(--efb-doc-search-visible-height,100dvh) - 16px))!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y!important;
  }
  body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults > .efbDocSearchResult{
    touch-action:pan-y!important;
  }
}

/* DEV .60 — Restore the short landscape Checklist header, but keep it
   compact and flush to the top while scrolling. The current-item geometry
   already consults the sticky header's actual bottom position. */
@media (orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) > .checklistRunSticky{
    position:sticky!important;
    top:0!important;
    inset-block-start:0!important;
    margin:0 -6px 6px!important;
    padding:4px 8px 5px!important;
    border-radius:0 0 13px 13px!important;
    background:var(--efb-surface-raised,var(--surface))!important;
    box-shadow:var(--efb-chrome-shadow)!important;
    z-index:90!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistRunToolbar{
    margin:0 0 4px!important;
    gap:8px!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistRunToolbar > button{
    min-height:44px!important;
    padding:5px 8px!important;
    font-size:.73rem!important;
    line-height:1.15!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistProgressSummary{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    margin:0!important;
    padding:0 3px!important;
    min-height:20px!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistProgressSummary > span{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    font-size:.74rem!important;
    line-height:1.2!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistProgressSummary > progress{
    flex:1 1 auto!important;
    width:auto!important;
    min-width:32px!important;
    height:7px!important;
    margin:0!important;
  }
}


/* DEV .61 — Protected navigation stage 5: compact iPad portrait 700–820px.
   Keep the existing Search, Documents, Home, Back nodes and handlers, and
   reserve the same footer-safe working space at this final compact breakpoint. */
@media (orientation:portrait) and (min-width:700px) and (max-width:820px){
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen){
    --efb-compact-nav-height:max(108px,calc(env(safe-area-inset-bottom) + 82px));
    --efb-compact-nav-bottom:max(26px,calc(env(safe-area-inset-bottom) + 10px));
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbProtectedNavigationArea{
    display:block!important;
    position:fixed!important;
    inset:auto 0 0!important;
    box-sizing:border-box!important;
    width:100%!important;
    height:var(--efb-compact-nav-height)!important;
    background:var(--efb-surface)!important;
    border-top:1px solid var(--efb-hairline,var(--efb-border))!important;
    box-shadow:var(--efb-footer-shadow)!important;
    z-index:25!important;
    pointer-events:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) >
  :is(#efbDocumentSearchButton,#efbDashboardDocumentsButton,#efbHomeButton,#efbHistoryBackButton){
    position:fixed!important;
    top:auto!important;
    right:auto!important;
    bottom:var(--efb-compact-nav-bottom)!important;
    height:46px!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    z-index:92!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDocumentSearchButton{
    left:max(18px,env(safe-area-inset-left))!important;
    width:46px!important;
    min-width:46px!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not([data-efb-app="dashboard"]):not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHomeButton,
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbDashboardDocumentsButton{
    left:calc(50% - 126px)!important;
    width:120px!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHistoryBackButton,
  body.menuHeaderInstalled[data-efb-app="dashboard"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #efbHomeButton{
    left:calc(50% + 6px)!important;
    width:120px!important;
    min-width:0!important;
    transform:none!important;
  }
  body.menuHeaderInstalled:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen) > #myEfbGlobalVersion{
    position:fixed!important;
    top:auto!important;
    right:max(14px,env(safe-area-inset-right))!important;
    bottom:max(12px,calc(env(safe-area-inset-bottom) - 5px))!important;
    left:auto!important;
    transform:none!important;
    pointer-events:none!important;
    z-index:30!important;
  }
  /* Settings tabs belong above the form, never above the global footer. */
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden){
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 116px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsTop{order:0!important}
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > nav.settingsNav{
    order:1!important;
    position:static!important;
    inset:auto!important;
    transform:none!important;
    z-index:auto!important;
    align-self:stretch!important;
    box-sizing:border-box!important;
    flex:0 0 auto!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 12px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView.settingsMain:not(.hidden) > .settingsShell{
    order:2!important;
    flex:1 1 auto!important;
    min-width:0!important;
  }
  /* Reserve a single scroll gutter for the active Checklist, including the
     deferred-warning variant, with its action bar above the new footer. */
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView.checklistsMain:has(> .checklistsPanel[data-checklists-panel="active"]:not(.hidden)){
    padding-bottom:0!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent{
    padding-bottom:max(210px,calc(env(safe-area-inset-bottom) + 184px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .activeChecklistContent:has(> .checklistDeferredBar:not(.hidden)){
    padding-bottom:max(266px,calc(env(safe-area-inset-bottom) + 240px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistActionDock{
    bottom:max(122px,calc(env(safe-area-inset-bottom) + 100px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView .checklistsPanel[data-checklists-panel="active"]:not(.hidden) .checklistDeferredBar:not(.hidden){
    bottom:max(196px,calc(env(safe-area-inset-bottom) + 174px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain{
    height:100dvh!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 116px))!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView .flightDashboardShell{
    height:auto!important;
    min-height:100%!important;
    grid-template-rows:max-content max-content max-content!important;
    align-content:start!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView .flightDashboardMetrics{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:max-content max-content!important;
    align-content:start!important;
  }
  body.menuHeaderInstalled[data-efb-app="documents"] #documentsView.documentLibraryMain:not(.isReading),
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain,
  body.menuHeaderInstalled[data-efb-app="home"] #homeView.efbHomeMain{
    padding-bottom:max(144px,calc(env(safe-area-inset-bottom) + 116px))!important;
  }
}

/* DEV .63 — Landscape phone Performance tabs belong above the shared
   protected Home/Back dock, never at the top of the scrollable form. */
@media(orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    position:fixed!important;
    top:auto!important;inset-block-start:auto!important;
    bottom:calc(var(--efb-compact-nav-height,84px) + 8px)!important;
    left:50%!important;right:auto!important;
    transform:translateX(-50%)!important;
    width:min(520px,calc(100vw - 36px))!important;
    max-width:calc(100vw - 36px)!important;
    margin:0!important;
    z-index:89!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain{
    padding-bottom:max(194px,calc(env(safe-area-inset-bottom) + 170px))!important;
  }
}

/* DEV .64 — compact Performance dock clear of the protected footer. */
@media(max-width:620px){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    bottom:max(104px,calc(env(safe-area-inset-bottom) + 94px))!important;
    max-height:57px!important;padding:3px!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab{
    min-height:47px!important;padding:3px 5px!important;gap:1px!important;
  }
}
@media(orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    bottom:calc(env(safe-area-inset-bottom) + 91px)!important;
    max-height:55px!important;padding:3px!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab{
    min-height:44px!important;padding:2px 6px!important;gap:2px!important;
  }
}

/* DEV .65 — expand the Performance bottom control surface rather than
   shrinking/clipping the tab content or leaving a detached floating bar. */
@media(max-width:620px){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    box-sizing:border-box!important;
    bottom:max(72px,calc(env(safe-area-inset-bottom) + 68px))!important;
    height:auto!important;max-height:none!important;min-height:0!important;
    overflow:visible!important;padding:6px!important;
    border-radius:16px 16px 0 0!important;
    box-shadow:0 28px 0 0 var(--efb-surface)!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab{
    box-sizing:border-box!important;
    height:auto!important;max-height:none!important;
    min-height:54px!important;padding:6px 5px!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView.appMain{
    padding-bottom:max(184px,calc(env(safe-area-inset-bottom) + 164px))!important;
  }
}
@media(orientation:landscape) and (min-width:650px) and (max-width:1020px) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher{
    box-sizing:border-box!important;
    bottom:calc(env(safe-area-inset-bottom) + 65px)!important;
    height:auto!important;max-height:none!important;min-height:0!important;
    overflow:visible!important;padding:5px!important;
    border-radius:15px 15px 0 0!important;
    box-shadow:0 20px 0 0 var(--efb-surface)!important;
  }
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab{
    box-sizing:border-box!important;
    height:auto!important;max-height:none!important;
    min-height:48px!important;padding:4px 6px!important;
  }
}


/* DEV .71 — Documents has its own full-height vertical scroller and a fixed
   measured header. Override legacy page-gutter values from this last sheet. */
html body.menuHeaderInstalled[data-efb-app="documents"] #documentsView.documentLibraryMain:not(.isReading){
  position:fixed!important;
  inset:0!important;
  box-sizing:border-box!important;
  width:100vw!important;
  max-width:none!important;
  height:100dvh!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  padding-top:0!important;
  padding-bottom:calc(var(--efb-footer-base-height,90px) + 14px)!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
html body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) #docBrowserPane > .efbDocumentsStickyHeader{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  margin:0!important;
  z-index:90!important;
}

/* DEV .79 — Move dashboard METARs into a native popup without changing weather data. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardStatusRow{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardMetarTrigger{
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;
  min-height:34px;padding:5px 9px;flex:0 0 auto;
  border:1px solid var(--efb-component-border);border-radius:10px;
  color:var(--efb-text);background:var(--efb-surface-subtle);
  font:750 .68rem/1 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardMetarTrigger svg{
  width:20px;height:20px;fill:none;stroke:currentColor;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardMetarTrigger:focus-visible,
body[data-efb-app="dashboard"] #dashboardView #dashboardMetarClose:focus-visible{
  outline:3px solid var(--primary);outline-offset:2px;
}
/* No empty row is reserved for METARs after the weather card leaves the metrics grid. */
body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] .flightDashboardMetrics{
  grid-template-rows:max-content!important;
}
body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardMetrics{
  grid-template-rows:minmax(0,1fr)!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] .flightDashboardMetrics{
  grid-template-rows:max-content!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardMetrics{
  grid-template-rows:max-content!important;
}
#dashboardView .flightDashboardMetarDialog{
  box-sizing:border-box;width:min(560px,calc(100vw - 24px));max-width:560px;
  max-height:min(78dvh,700px);margin:auto;padding:14px;
  border:1px solid var(--efb-hairline);border-radius:var(--efb-radius-lg);
  color:var(--efb-text);background:var(--efb-surface);
  box-shadow:var(--efb-shadow-float);
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
#dashboardView .flightDashboardMetarDialog:not([open]){display:none!important}
#dashboardView .flightDashboardMetarDialog::backdrop{
  background:rgba(10,18,30,.55);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}
#dashboardView .flightDashboardMetarDialogHeader{
  position:sticky;top:-14px;z-index:3;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  margin:-14px -14px 12px;padding:14px 14px 10px;
  background:var(--efb-surface);border-bottom:1px solid var(--efb-component-border);
}
#dashboardView .flightDashboardMetarDialogHeader h2{
  margin:0;font-size:1.1rem;line-height:1.3;color:var(--efb-text);
}
#dashboardView #dashboardMetarClose{
  min-height:36px;padding:6px 13px;border:1px solid var(--efb-component-border);
  border-radius:10px;background:var(--efb-surface-subtle);color:var(--efb-text);
  font:750 .82rem/1 system-ui,sans-serif;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardMetarDialog #dashboardMetarMetric{
  box-sizing:border-box;width:100%;height:auto!important;min-height:0!important;
  max-height:none!important;padding:12px!important;
  display:flex!important;overflow:visible!important;
  grid-column:auto!important;grid-row:auto!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardMetarDialog .flightDashboardMetarRaw{
  flex:0 0 auto!important;max-height:none!important;min-height:0!important;
  overflow:visible!important;font-size:clamp(.77rem,2.1vw,.94rem);line-height:1.45;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardMetarDialog .flightDashboardAlternateMetar{
  width:100%;
}
@media(orientation:landscape) and (max-height:520px){
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardMetrics{
    grid-template-rows:minmax(190px,max-content)!important;
  }
  #dashboardView .flightDashboardMetarDialog{
    max-height:calc(100dvh - 16px);padding:10px;
  }
  #dashboardView .flightDashboardMetarDialogHeader{
    top:-10px;margin:-10px -10px 10px;padding:8px 10px;
  }
}

/* DEV .81 — Estimated block time entry on preflight and in-flight tools. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockField{
  grid-column:1 / -1;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs{
  display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:wrap;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs label{
  box-sizing:border-box;display:flex;align-items:center;gap:5px;min-width:0;
  color:var(--efb-muted);font-size:.74rem;font-weight:700;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input{
  box-sizing:border-box;display:block;width:66px;min-width:0;height:38px;
  padding:0 7px;border:1px solid var(--efb-component-border);border-radius:10px;
  background:var(--efb-surface-subtle);color:var(--efb-text);
  font:750 .86rem/1 system-ui,sans-serif;font-variant-numeric:tabular-nums;
  text-align:center;appearance:textfield;-moz-appearance:textfield;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input::-webkit-inner-spin-button,
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input::-webkit-outer-spin-button{
  -webkit-appearance:none;margin:0;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs small{
  color:var(--efb-muted);font-size:.69rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools[hidden]{display:none!important}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{
  box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);
  width:100%;min-width:0;gap:10px;align-items:start;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolCard{
  box-sizing:border-box;display:flex;flex-direction:column;gap:10px;
  min-width:0;margin:0;padding:15px 16px;border:1px solid var(--efb-hairline);
  border-radius:var(--efb-radius-lg);background:var(--efb-surface);box-shadow:var(--efb-card-shadow);
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolHeading{
  display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolHeading h3{
  margin:0;min-width:0;color:var(--efb-text);
  font-size:.98rem;line-height:1.2;font-weight:650;letter-spacing:-.015em;
}
body[data-efb-app="dashboard"] #dashboardProgressPercent{
  color:var(--efb-accent);font-size:1rem;font-weight:700;font-variant-numeric:tabular-nums;
}
body[data-efb-app="dashboard"] #dashboardProgressTrack{
  box-sizing:border-box;height:12px;width:100%;overflow:hidden;border-radius:99px;
  background:var(--efb-surface-subtle);border:1px solid var(--efb-component-border);
}
body[data-efb-app="dashboard"] #dashboardProgressFill{
  display:block;width:0;height:100%;border-radius:inherit;background:var(--primary);
  transition:width .35s linear;
}
body[data-efb-app="dashboard"] #dashboardProgressTrack[data-state="overrun"] #dashboardProgressFill{
  background:var(--warn,#d58b15);
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressTimes{
  display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;
  color:var(--efb-text);font-size:.83rem;font-weight:760;font-variant-numeric:tabular-nums;
}
body[data-efb-app="dashboard"] #dashboardProgressRemaining{
  margin:0;color:var(--efb-text);font-size:.79rem;line-height:1.35;font-weight:650;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCaution{
  color:var(--efb-muted);font-size:.69rem;line-height:1.3;
}
body[data-efb-app="dashboard"] #dashboardScratchpadClear{
  min-height:34px;min-width:54px;padding:6px 12px;
  border:1px solid var(--efb-hairline);border-radius:10px;
  background:var(--efb-surface-subtle);color:var(--efb-text);
  font-size:.77rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardScratchpad{
  box-sizing:border-box;display:block;width:100%;min-width:0;min-height:108px;
  max-height:280px;resize:vertical;padding:10px 12px;
  border:1px solid var(--efb-component-border);border-radius:12px;
  background:var(--efb-surface-subtle);color:var(--efb-text);
  font:500 16px/1.45 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  overflow:auto;-webkit-overflow-scrolling:touch;
}
body[data-efb-app="dashboard"] #dashboardScratchpad::placeholder{
  color:var(--efb-muted);opacity:1;
}
body[data-efb-app="dashboard"] #dashboardScratchpadSaveStatus{
  color:var(--efb-muted);font-size:.69rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardView :is(#dashboardScratchpad,#dashboardScratchpadClear,#dashboardEstimatedBlockHours,#dashboardEstimatedBlockMinutes):focus-visible{
  outline:2px solid var(--primary);outline-offset:2px;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] .flightDashboardShell{
  grid-template-rows:max-content max-content max-content!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardShell{
  grid-template-rows:max-content max-content max-content max-content!important;
  height:auto!important;align-content:start!important;gap:10px!important;
}
@media(min-width:700px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
  }
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{
    grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
  }
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolCard{
    padding:10px 12px;gap:7px;border-radius:14px;
  }
  body[data-efb-app="dashboard"] #dashboardScratchpad{min-height:78px;max-height:120px}
}
@media(max-width:430px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolCard{
    padding:12px 13px;border-radius:17px;
  }
}

/* DEV .82 — Compact in-flight progress, drawing scratchpad, safe time inputs. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs{
  gap:6px!important;flex-wrap:nowrap!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs label{
  gap:5px!important;flex:0 0 auto;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input{
  width:53px!important;height:35px!important;padding:0 5px!important;
  border-radius:9px!important;font-size:.83rem!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockHint{
  display:block;margin-top:2px;line-height:1.2;
  color:var(--efb-muted);font-size:.63rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{
  gap:8px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolCard{
  padding:11px 13px!important;gap:7px!important;border-radius:16px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard{
  gap:6px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolHeading h3{
  font-size:.9rem!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardProgressPercent{
  font-size:.91rem!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardProgressTrack{
  height:13px!important;
  background:color-mix(in srgb,var(--efb-muted) 11%,var(--efb-surface-subtle))!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressTimes{
  font-size:.77rem!important;gap:5px!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardProgressRemaining{
  font-size:.76rem!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCaution{
  font-size:.61rem!important;line-height:1.2!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadActions{
  display:flex;align-items:center;gap:6px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadActions button{
  min-width:51px;min-height:32px;padding:4px 9px;
  border:1px solid var(--efb-hairline);border-radius:9px;
  background:var(--efb-surface-subtle);color:var(--efb-text);
  font-size:.72rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadActions button:disabled{
  opacity:.4;
}
body[data-efb-app="dashboard"] #dashboardView canvas#dashboardScratchpad{
  display:block;box-sizing:border-box;
  width:100%;height:clamp(132px,17dvh,190px)!important;
  min-height:0!important;max-height:none!important;
  padding:0!important;resize:none!important;overflow:hidden!important;
  border:1px solid var(--efb-hairline);border-radius:11px!important;
  background:#fff!important;cursor:crosshair;
  touch-action:none!important;user-select:none!important;
  -webkit-user-select:none!important;-webkit-touch-callout:none;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadLegacy[hidden]{
  display:none!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadLegacy{
  color:var(--efb-muted);font-size:.71rem;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadLegacy pre{
  white-space:pre-wrap;overflow-wrap:anywhere;
  margin:5px 0 0;padding:7px 9px;border:1px solid var(--efb-component-border);
  border-radius:8px;color:var(--efb-text);background:var(--efb-surface-subtle);
  font:500 .75rem/1.35 system-ui,sans-serif;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardScratchpadSaveStatus{
  font-size:.64rem!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"]{
  padding-bottom:max(210px,calc(env(safe-area-inset-bottom) + 192px))!important;
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardToolCard{
    padding:8px 10px!important;gap:5px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView canvas#dashboardScratchpad{
    height:110px!important;
  }
}

/* DEV .83 — Put the progress readout on a single compact strip and
   dedicate the freed vertical space to finger/Pencil scratchpad drawing. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard{
  box-sizing:border-box;display:flex;flex-direction:column;
  padding:9px 12px!important;gap:5px!important;
  border-radius:14px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard .flightDashboardToolHeading{
  min-height:20px;gap:8px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard .flightDashboardToolHeading h3{
  font-size:.86rem!important;line-height:1.15!important;
  font-weight:650!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard #dashboardProgressPercent{
  font-size:.88rem!important;line-height:1.15!important;
  font-weight:700!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard #dashboardProgressTrack{
  height:9px!important;flex:0 0 9px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard .flightDashboardProgressTimes{
  box-sizing:border-box;display:flex!important;flex-wrap:wrap;
  align-items:center;justify-content:space-between;
  gap:3px 9px!important;min-height:17px;
  font-size:.7rem!important;line-height:1.2!important;
  color:var(--efb-muted)!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard #dashboardProgressRemaining{
  box-sizing:border-box;flex:0 1 auto;
  margin:0 0 0 auto!important;padding:0!important;
  font-size:.7rem!important;line-height:1.2!important;
  font-weight:650!important;color:var(--efb-text)!important;
  text-align:right;
}
/* The explanatory caution stays available to assistive technology but
   does not consume a whole row of critical cockpit screen space. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard .flightDashboardProgressCaution{
  position:absolute!important;width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;overflow:hidden!important;
  clip-path:inset(50%)!important;white-space:nowrap!important;
  border:0!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadCard{
  padding:11px 12px!important;gap:7px!important;
  border-radius:16px!important;
}
body[data-efb-app="dashboard"] #dashboardView canvas#dashboardScratchpad{
  height:clamp(240px,38dvh,430px)!important;
  min-height:240px!important;max-height:none!important;
  touch-action:none!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"]{
  /* Content remains scrollable above the fixed protected footer; the
     larger drawing canvas must never be trapped underneath its buttons. */
  padding-bottom:max(220px,calc(env(safe-area-inset-bottom) + 200px))!important;
}
@media (min-width:700px) and (min-height:550px){
  body[data-efb-app="dashboard"] #dashboardView canvas#dashboardScratchpad{
    height:clamp(280px,40dvh,500px)!important;
    min-height:280px!important;
  }
}
@media (orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard{
    padding:7px 10px!important;gap:4px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView canvas#dashboardScratchpad{
    height:clamp(160px,55dvh,260px)!important;
    min-height:160px!important;
  }
}

/* DEV .84 — A truly compact progress strip, only two visible rows.
   Accessibility text remains on the progressbar and hidden caution. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard{
  display:flex!important;flex-direction:column!important;
  padding:7px 11px!important;gap:4px!important;min-height:0!important;
  border-radius:13px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressSummary{
  display:flex;align-items:baseline;justify-content:space-between;
  width:100%;min-width:0;gap:8px;line-height:1.1;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressSummary #dashboardProgressPercent{
  flex:0 0 auto;margin:0!important;
  font-size:.93rem!important;line-height:1.1!important;
  font-weight:700!important;color:var(--efb-accent);
  font-variant-numeric:tabular-nums;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressSummary #dashboardProgressRemaining{
  display:block;flex:1;min-width:0;margin:0!important;
  font-size:.75rem!important;line-height:1.1!important;
  font-weight:600!important;text-align:right;
  color:var(--efb-text);font-variant-numeric:tabular-nums;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard #dashboardProgressTrack{
  display:block;width:100%;height:7px!important;flex:0 0 7px!important;
  margin:0!important;border-radius:20px!important;
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressCard{
    padding:6px 10px!important;gap:3px!important;
  }
}

/* DEV .85 — Ten selectable scratchpad pages and a consistent protected
   footer clearance across compact portrait/landscape and tablet sizes. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow{
  display:flex;align-items:center;justify-content:space-between;gap:7px;
  width:100%;min-width:0;margin:0;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
  display:grid;grid-template-columns:repeat(10,minmax(0,1fr));align-items:center;
  flex:1;min-width:0;gap:3px;
}
body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage{
  position:relative;display:flex;align-items:center;justify-content:center;
  box-sizing:border-box;width:100%;aspect-ratio:1/1;max-width:30px;
  min-width:0;min-height:21px;max-height:30px;margin:0;padding:0;
  border-radius:50%;border:1px solid var(--efb-component-border);
  background:var(--efb-surface-subtle);color:var(--efb-muted);
  font-size:clamp(.58rem,1.7vw,.74rem);font-weight:650;line-height:1;
  font-variant-numeric:tabular-nums;cursor:pointer;touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage[data-active="true"]{
  background:var(--efb-action-primary);color:white;border-color:var(--efb-action-primary);
}
body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage[data-has-ink="true"]:not([data-active="true"])::after{
  content:"";position:absolute;bottom:2px;left:50%;transform:translateX(-50%);
  width:3px;height:3px;border-radius:50%;background:var(--efb-accent);
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow #dashboardScratchpadClear{
  flex:0 0 auto;min-width:51px;min-height:31px;padding:4px 8px;
  border:1px solid var(--efb-component-border);border-radius:10px;
  background:var(--efb-surface-subtle);color:var(--efb-text);
  font-size:.72rem;font-weight:600;
}
body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage:focus-visible,
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow #dashboardScratchpadClear:focus-visible{
  outline:2px solid var(--primary);outline-offset:2px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadCard{
  min-width:0;scroll-margin-bottom:calc(var(--efb-footer-base-height,90px) + var(--efb-footer-extra-height,76px) + 26px);
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{
  min-width:0;padding-bottom:18px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="flight"]{
  box-sizing:border-box!important;height:100dvh!important;min-height:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain;
  padding-bottom:calc(var(--efb-footer-base-height,90px) + var(--efb-footer-extra-height,76px) + 34px)!important;
  scroll-padding-bottom:calc(var(--efb-footer-base-height,90px) + var(--efb-footer-extra-height,76px) + 24px)!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardShell{
  height:max-content!important;min-height:0!important;
  grid-template-rows:max-content max-content max-content!important;
  align-content:start!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardProgressTrack[data-complete="true"] #dashboardProgressFill{
  background:var(--good,#168245)!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardProgressSummary #dashboardProgressPercent[data-complete="true"]{
  color:var(--good,#168245)!important;
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow{gap:6px}
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{gap:3px}
  body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage{max-width:27px;max-height:27px}
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardTools{padding-bottom:12px!important}
}

/* DEV .86 — Show five larger circles; swipe the strip to reach all ten.
   Preserve independent per-page strokes and the existing selected-page UI. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow{
  align-items:center!important;gap:9px!important;min-width:0!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
  box-sizing:border-box;display:flex!important;flex:1 1 0!important;
  max-width:286px!important;min-width:0!important;width:auto!important;
  align-items:center!important;gap:6px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x mandatory;scrollbar-width:none;
  -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;
  touch-action:pan-x!important;padding:2px 0!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages::-webkit-scrollbar{display:none}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages .dashboardScratchpadPage{
  box-sizing:border-box!important;
  flex:0 0 calc((100% - 24px) / 5)!important;
  width:calc((100% - 24px) / 5)!important;
  min-width:0!important;max-width:none!important;
  height:auto!important;min-height:0!important;max-height:none!important;
  aspect-ratio:1/1!important;border-radius:50%!important;
  font-size:clamp(.73rem,2.6vw,.94rem)!important;
  scroll-snap-align:start;touch-action:manipulation!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadTopRow #dashboardScratchpadClear{
  flex:0 0 auto!important;min-width:53px!important;min-height:36px!important;
}
/* iOS scroll container padding is not reliable clearance for an external
   fixed footer. The final shell row is a real DOM spacer, sized from the
   actual footer overlap in JS on resize/rotation. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardFooterSpacer{display:none!important}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="flight"]{
  box-sizing:border-box!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  padding-bottom:0!important;scroll-padding-bottom:0!important;
  -webkit-overflow-scrolling:touch;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardShell{
  height:max-content!important;min-height:0!important;
  grid-template-rows:max-content max-content max-content max-content!important;
  align-content:start!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardFooterSpacer{
  display:block!important;grid-column:1/-1;
  width:100%;height:196px;min-height:28px;
  margin:0!important;padding:0!important;pointer-events:none;
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
    max-width:268px!important;gap:5px!important;
  }
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages .dashboardScratchpadPage{
    flex-basis:calc((100% - 20px) / 5)!important;
    width:calc((100% - 20px) / 5)!important;
    max-width:none!important;max-height:none!important;
  }
}

/* DEV .87 — Move used-page dots into their circle boundaries. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
  padding:4px 2px!important;scroll-padding-inline:2px;border-radius:18px;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages .dashboardScratchpadPage{
  border-radius:999px!important;box-shadow:none!important;min-height:0!important;
}
body[data-efb-app="dashboard"] #dashboardView .dashboardScratchpadPage[data-has-ink="true"]:not([data-active="true"])::after{
  bottom:5px!important;width:4px!important;height:4px!important;
  background:var(--efb-accent)!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages .dashboardScratchpadPage[data-active="true"]{
  box-shadow:none!important;
}
/* Do not trap the drawing card beneath the reserved fixed footer. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="flight"]{
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadCard{
  scroll-margin-bottom:calc(var(--efb-footer-base-height,90px) + var(--efb-footer-extra-height,76px) + 18px)!important;
}
/* Pure Search opens at the input, with no oversized idle hint. */
body .efbDocSearchOverlay:not([hidden]) .efbDocSearchResults:empty{min-height:0!important}
body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel:has(.efbDocSearchResults:empty){
  height:auto!important;min-height:0!important;
}
body .efbDocSearchOverlay:not([hidden]) .efbDocSearchHint{
  border:0!important;background:transparent!important;
  margin:0!important;padding:7px 4px!important;
  font-size:.8rem!important;line-height:1.4!important;
}

/* DEV .88: fixed in-flight page. No vertical Dashboard scrolling or
   faux footer spacer. Space remaining after flight widgets is drawn on. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView.flightDashboardMain[data-flight-stage="flight"]{
  box-sizing:border-box!important;
  height:100dvh!important;min-height:0!important;max-height:100dvh!important;
  overflow:hidden!important;overscroll-behavior:none!important;
  padding-bottom:0!important;scroll-padding-bottom:0!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] > .flightDashboardShell{
  box-sizing:border-box!important;display:grid!important;
  height:var(--efb-dashboard-usable-height,calc(100dvh - var(--efb-footer-base-height,90px) - var(--efb-footer-extra-height,76px) - 10px))!important;
  max-height:var(--efb-dashboard-usable-height,calc(100dvh - var(--efb-footer-base-height,90px) - var(--efb-footer-extra-height,76px) - 10px))!important;
  min-height:0!important;overflow:hidden!important;
  grid-template-rows:max-content max-content minmax(0,1fr)!important;
  align-content:start!important;gap:7px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardMetrics{
  height:auto!important;min-height:0!important;max-height:none!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardTools{
  box-sizing:border-box!important;display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:max-content minmax(0,1fr)!important;
  align-content:stretch!important;align-items:stretch!important;
  height:100%!important;min-height:0!important;max-height:100%!important;
  overflow:hidden!important;padding:0!important;gap:7px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardScratchpadCard{
  box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
  height:100%!important;width:100%!important;
  min-height:0!important;max-height:100%!important;
  overflow:hidden!important;padding:8px 10px!important;gap:5px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] canvas#dashboardScratchpad{
  box-sizing:border-box!important;display:block!important;
  height:100%!important;min-height:0!important;max-height:none!important;
  flex:1 1 0%!important;width:100%!important;margin:0!important;
  border-radius:10px!important;touch-action:none!important;
}
/* Keep save/error messages for screen readers without a visual status row. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] #dashboardScratchpadSaveStatus{
  position:absolute!important;width:1px!important;height:1px!important;
  margin:-1px!important;padding:0!important;overflow:hidden!important;
  clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardFooterSpacer{
  display:none!important;min-height:0!important;height:0!important;
}
@media(orientation:landscape) and (max-height:540px){
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] > .flightDashboardShell{
    gap:5px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardTools{gap:5px!important}
  body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardScratchpadCard{
    padding:5px 8px!important;gap:3px!important;
  }
}
/* Search list owns all vertical scrolling. Use the visual viewport when the
   keyboard opens; suppress scroll chaining and empty-list rubber-banding. */
body .efbDocSearchOverlay:not([hidden]){
  top:var(--efb-doc-search-visible-top,0px)!important;bottom:auto!important;
  height:var(--efb-doc-search-visible-height,100dvh)!important;
  max-height:var(--efb-doc-search-visible-height,100dvh)!important;
  overflow:hidden!important;overscroll-behavior:none!important;
}
body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel:not(:has(.efbDocSearchResults:empty)){
  box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
  height:min(620px,calc(var(--efb-doc-search-visible-height,100dvh) - 16px))!important;
  max-height:calc(var(--efb-doc-search-visible-height,100dvh) - 16px)!important;
  min-height:0!important;overflow:hidden!important;
}
body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
  box-sizing:border-box!important;min-height:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior-y:none!important;touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
}
@media(orientation:landscape) and (max-height:540px){
  body .efbDocSearchOverlay:not([hidden]) .efbDocSearchPanel:not(:has(.efbDocSearchResults:empty)){
    height:min(340px,calc(var(--efb-doc-search-visible-height,100dvh) - 10px))!important;
    max-height:calc(var(--efb-doc-search-visible-height,100dvh) - 10px)!important;
  }
}

/* DEV .89 — The usable Dashboard height is measured from the shell's
   REAL top edge, not the padded parent. Keep the scratchpad's entire
   rounded bottom border and shadow above the protected footer. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="flight"] .flightDashboardScratchpadCard{
  box-sizing:border-box!important;
  border:1px solid var(--efb-component-border)!important;
  border-radius:16px!important;
  background:var(--efb-surface)!important;
  box-shadow:var(--efb-card-shadow)!important;
  min-height:0!important;
}

/* DEV .90: compact segmented estimated block-time input. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs{
  box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;
  width:max-content!important;max-width:100%!important;gap:0!important;
  flex-wrap:nowrap!important;padding:4px!important;
  border:1px solid var(--efb-component-border)!important;border-radius:14px!important;
  background:var(--efb-surface-subtle)!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs label{
  display:flex!important;flex:0 0 auto!important;align-items:center!important;
  gap:5px!important;padding:0 7px!important;min-height:37px!important;
  color:var(--efb-muted)!important;font-size:.76rem!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs label+label{
  border-left:1px solid var(--efb-component-border)!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input{
  box-sizing:border-box!important;width:39px!important;height:36px!important;
  margin:0!important;padding:2px 3px!important;
  border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:var(--efb-text)!important;box-shadow:none!important;
  font-size:1rem!important;line-height:1.1!important;font-weight:700!important;
  text-align:center!important;font-variant-numeric:tabular-nums!important;
  user-select:text!important;-webkit-user-select:text!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardEstimatedBlockInputs input:focus{
  background:var(--efb-surface)!important;color:var(--primary)!important;
  border-color:var(--primary)!important;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent)!important;
  outline:none!important;
}
/* Search touch gestures belong to the results region, never the app
   underneath. JS scrolls the results, including when the keyboard is open. */
body .efbDocSearchOverlay:not([hidden]),
body .efbDocSearchOverlay:not([hidden]) #efbDocumentSearchResults{
  touch-action:none!important;overscroll-behavior:none!important;
}

/* DEV .91 — Top-right OFF/ON UTC; bottom-anchored block timer actions. */
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric{
  position:relative!important;display:flex!important;flex-direction:column!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric .flightDashboardBlockTopRow{
  display:flex;align-items:flex-start;justify-content:space-between;
  width:100%;min-width:0;gap:6px;min-height:20px;flex:0 0 auto;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric .flightDashboardBlockTopRow #dashboardBlockHeading{flex:0 1 auto;min-width:0}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric .flightDashboardBlockTopRow .flightDashboardBlockTimes{
  display:flex!important;flex:0 0 auto!important;flex-direction:column!important;
  align-items:flex-end!important;justify-content:flex-start!important;
  margin:0!important;padding:0!important;gap:2px!important;
  text-align:right!important;font-size:clamp(.56rem,1.7vw,.77rem)!important;
  line-height:1.15!important;white-space:nowrap!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric .flightDashboardBlockTopRow .flightDashboardBlockTimes span{
  display:block!important;min-height:0!important;margin:0!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric .flightDashboardBlockControls{
  margin-top:auto!important;flex:0 0 auto!important;
}
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric #dashboardBlockEnd{align-self:stretch!important}

/* DEV .92 — Five page circles stay visible, a few pixels smaller. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
  max-width:266px!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages .dashboardScratchpadPage{
  font-size:clamp(.71rem,2.4vw,.88rem)!important;
}
/* Flight-status stage pill vertically aligns with the METAR control. */
body[data-efb-app="dashboard"] #dashboardView .flightDashboardStatusRow{
  display:flex!important;align-items:center!important;
}
body[data-efb-app="dashboard"] #dashboardView .flightDashboardStatusRow #dashboardFlightStatus,
body[data-efb-app="dashboard"] #dashboardView .flightDashboardStatusRow #dashboardMetarOpen{
  align-self:center!important;
}
/* Make the flight-only extended footer shorter and bring its checklist
   shortcuts closer to Documents/Home without changing navigation buttons. */
body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"]{
  --efb-footer-extra-height:64px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"] > #efbProtectedNavigationArea > #dashboardFlightActions{
  top:3px!important;padding:3px!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"] > #efbProtectedNavigationArea > #dashboardFlightActions > button{
  min-height:52px!important;padding:5px 7px!important;
}
@media(orientation:landscape) and (max-height:540px){
  body[data-efb-app="dashboard"] #dashboardView .flightDashboardScratchpadPages{
    max-width:250px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"]{
    --efb-footer-extra-height:57px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"] > #efbProtectedNavigationArea > #dashboardFlightActions{
    top:2px!important;padding:3px!important;
  }
  body.menuHeaderInstalled[data-efb-app="dashboard"][data-flight-stage="flight"] > #efbProtectedNavigationArea > #dashboardFlightActions > button{
    min-height:45px!important;padding:4px 7px!important;
  }
}

/* Preflight regression guard: the block timer belongs to Active Flight only.
   Keep this more specific than the shared block-card display:flex rule. */
body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] #dashboardBlockMetric{
  display:none!important;
}

/* Native hidden attribute must override shared block-card display rules. */
body[data-efb-app="dashboard"] #dashboardView #dashboardBlockMetric[hidden]{display:none!important;}

/* DEV .95 — Purple Performance action, green only once Initialise is available. */
body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] #dashboardInitialise.performance-required{
  background:#7243b0!important;border-color:#7243b0!important;color:#fff!important;
  box-shadow:none!important;
}
body[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"] #dashboardInitialise.performance-required:active{
  background:#5e3598!important;border-color:#5e3598!important;
}

/* DEV .99: Manual weather is collected before the first performance result. */
body[data-efb-app="calculator"] #manualWeatherEntry[hidden],
body[data-efb-app="calculator"] .performanceWeatherEntryCard[hidden]{display:none!important}
body[data-efb-app="calculator"] .performanceManualWeatherEntry{
  grid-column:1 / -1;min-width:0;
  padding:15px;margin:14px 0 16px;border:1px solid var(--efb-hairline,#d4dae2);
  border-radius:17px;background:var(--efb-surface,#fff);min-width:0;
}
body[data-efb-app="calculator"] .performanceManualWeatherEntry h3{margin:0 0 5px;font-size:1rem}
body[data-efb-app="calculator"] .performanceManualWeatherEntry>p{margin:0 0 12px;font-size:.83rem;line-height:1.45;color:var(--efb-muted,#626d7b)}
body[data-efb-app="calculator"] .performanceWeatherEntryCard{
  margin:10px 0 12px;min-width:0;padding:10px;border:1px solid var(--efb-hairline,#d4dae2);
  border-radius:14px;background:transparent;
}
body[data-efb-app="calculator"] .performanceWeatherEntryCard legend{font-weight:650;font-size:.85rem;padding:0 5px}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid label{display:grid;gap:4px;min-width:0;font-size:.8rem;font-weight:650}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid label span{font-weight:450;font-size:.72rem;color:var(--efb-muted,#626d7b)}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid input{
  box-sizing:border-box;width:100%;min-width:0;min-height:43px;font-size:16px;padding:9px 10px;
  border-radius:10px;border:1px solid var(--efb-hairline,#bfc9d3);background:var(--efb-surface,#fff);
  color:var(--efb-text,#18222f);
}
body[data-efb-app="calculator"] #manualWeatherError.performanceWeatherEntryError{color:#b42333;margin:4px 0 0;font-weight:650}

/* DEV .101 – Compact retry and accessible weather-field validation on iPhone/iPad. */
body[data-efb-app="calculator"] .performanceWeatherEntryHeading{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:8px;
}
body[data-efb-app="calculator"] .performanceWeatherEntryHeading h3{margin:0}
body[data-efb-app="calculator"] #retryPerformanceWeather[hidden]{display:none!important}
body[data-efb-app="calculator"] .performanceWeatherRetry{
  border:1px solid var(--efb-hairline,#cbd5df);background:var(--efb-surface,#fff);
  color:var(--efb-text,#243244);border-radius:10px;font:inherit;font-size:.81rem;
  font-weight:650;min-height:39px;padding:7px 12px;touch-action:manipulation;
}
body[data-efb-app="calculator"] .performanceWeatherRetry:active{opacity:.78}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid input[aria-invalid="true"]{
  border:2px solid #bb2938!important;outline:2px solid rgba(187,41,56,.13);outline-offset:1px;
}
body[data-efb-app="calculator"] .performanceWeatherEntryGrid input:focus-visible{
  outline:2px solid var(--efb-primary,#245ca4);outline-offset:2px;
}

/* DEV .102 — Per-airport weather completion text (never substitutes source verification). */
body[data-efb-app="calculator"] .performanceWeatherEntryProgress{
  margin:9px 1px 1px;color:var(--efb-muted,#626d7b);font-size:.77rem;line-height:1.4;
}
body[data-efb-app="calculator"] .performanceWeatherEntryProgress[data-state="complete"]{color:#207449}
body[data-efb-app="calculator"] .performanceWeatherEntryProgress[data-state="invalid"]{color:#b42333}

/* DEV .104 – Distinguish incomplete weather from a tappable Calculate action. */
body[data-efb-app="calculator"] #loadFlightData[disabled] {
  opacity:.67;cursor:not-allowed;
}
body[data-efb-app="calculator"] #loadFlightData[disabled]:active {
  transform:none!important;
}

/* DEV .105: Performance setup — reduced clutter, clearer field hierarchy.
   Scoped to the Performance view; no footer, checklists or dashboard changes. */
body[data-efb-app="calculator"] #setupPhase .routeGrid > .performanceHybridNotice{
  display:none;margin:0;padding:0 2px;line-height:1.4;
  font-size:.78rem;color:var(--efb-muted,var(--text-secondary,#667085));
}
body[data-efb-app="calculator"] #setupPhase .routeGrid > .performanceHybridNotice:not([hidden]){
  display:block;
}
body[data-efb-app="calculator"] #setupPhase .routeGrid > .performanceHybridNotice[hidden]{
  display:none!important;
}
body[data-efb-app="calculator"] #setupPhase .performanceRunwayOverrides{
  gap:10px;margin:0 0 3px;
}
body[data-efb-app="calculator"] #setupPhase .performanceRunwayOverride{
  padding:12px 13px;gap:7px;border-radius:var(--efb-radius-md);
  border:1px solid var(--efb-hairline);
  background:var(--efb-surface);
  box-shadow:none;overflow:visible;
}
body[data-efb-app="calculator"] #setupPhase .performanceRunwayOverride[data-status="missing"]{
  border:1px solid #b94c55;
  box-shadow:inset 3px 0 0 #b94c55;
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridHeading strong{
  font-size:.87rem;line-height:1.3;font-weight:650;
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridStatus{
  font-size:.72rem;font-weight:600;line-height:1.3;
}
body[data-efb-app="calculator"] #setupPhase .performanceRunwayOverride p{
  font-size:.76rem;line-height:1.4;
  color:var(--efb-muted,var(--text-secondary,#667085));
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridFields{
  display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
  align-items:end;column-gap:10px;row-gap:8px;
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridField{
  display:grid;align-content:end;grid-template-rows:auto 44px;gap:5px;min-width:0;
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridField label{
  font-size:.76rem;line-height:1.3;white-space:normal;
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridField input{
  width:100%;min-width:0;height:44px;min-height:44px;
  font-size:16px;box-sizing:border-box;
  border-radius:10px;border:1px solid var(--efb-component-border,var(--efb-border,#cbd5df));
  background:var(--efb-surface-raised,var(--surface,#fff));
  color:var(--efb-text,var(--text,#202a37));
}
body[data-efb-app="calculator"] #setupPhase .performanceHybridField input:focus-visible{
  outline:2px solid var(--primary,#275b94);outline-offset:2px;
}
/* Weather request is a distinct, full-width step before Calculate. */
body[data-efb-app="calculator"] #manualWeatherEntry.performanceManualWeatherEntry{
  border:1px solid var(--efb-hairline);
  border-radius:var(--efb-radius-lg);padding:clamp(12px,2vw,17px);
  margin:12px 0 3px;background:var(--efb-surface);
  box-shadow:none;min-width:0;overflow:visible;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryHeading{
  gap:8px;align-items:center;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryHeading h3{
  margin:0;font-size:.96rem;font-weight:650;letter-spacing:-.01em;
}
body[data-efb-app="calculator"] #manualWeatherEntry #manualWeatherEntrySummary{
  max-width:68ch;margin:3px 0 10px;font-size:.79rem;line-height:1.45;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCards{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;min-width:0;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCards:has(> .performanceWeatherEntryCard[hidden]){
  grid-template-columns:minmax(0,1fr);
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard{
  min-width:0;margin:0;padding:11px 12px 10px;
  background:var(--efb-surface-subtle);
  border:1px solid var(--efb-hairline);
  border-radius:var(--efb-radius-sm);box-shadow:none;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard legend{
  font-size:.8rem;font-weight:650;max-width:100%;white-space:normal;overflow-wrap:anywhere;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px 10px;min-width:0;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid label{
  min-width:0;gap:5px;font-size:.77rem;line-height:1.25;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input{
  min-height:44px;height:44px;border-radius:10px;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryProgress{
  min-height:1.1em;margin:9px 0 0;font-size:.76rem;line-height:1.35;
}
body[data-efb-app="calculator"] #manualWeatherEntry #retryPerformanceWeather{
  min-height:44px;padding:8px 13px;
  border-radius:11px;white-space:nowrap;
}
body[data-efb-app="calculator"] #manualWeatherError:empty{display:none}
body[data-efb-app="calculator"] #manualWeatherError:not(:empty){margin:11px 0 0;line-height:1.4}
body[data-efb-app="calculator"] #manualWeatherEntry + .routeActions{
  margin-top:10px;
}
@media(max-width:760px){
  body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCards{
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:365px){
  body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid{
    gap:8px;
  }
  body[data-efb-app="calculator"] #setupPhase .performanceHybridFields{
    grid-template-columns:minmax(0,1fr);
  }
}

/* DEV .106: one-row airport headings, without a nested button inside a label. */
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair{
  align-items:end!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .routeField{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(30px,auto) 44px!important;
  align-content:end!important;gap:7px!important;min-width:0!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  flex-wrap:nowrap!important;gap:4px!important;min-width:0!important;margin:0!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading > .routeFieldTitle{
  display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;
  align-items:center!important;justify-content:flex-start!important;gap:4px!important;
  width:auto!important;min-width:0!important;height:auto!important;
  padding:0!important;margin:0!important;line-height:1.15!important;white-space:nowrap!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading .routeFieldTitle > span:first-child{
  display:grid!important;flex:0 0 21px!important;
  width:21px!important;height:21px!important;margin:0!important;
  grid-column:auto!important;grid-row:auto!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading .routeFieldName{
  display:inline!important;flex:0 1 auto!important;
  grid-column:auto!important;grid-row:auto!important;
  overflow:hidden!important;text-overflow:ellipsis!important;
  white-space:nowrap!important;min-width:0!important;
  font-size:clamp(.68rem,2.8vw,.82rem)!important;font-weight:650!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading > .performanceFollowRoute{
  display:inline-flex!important;flex:0 0 auto!important;
  align-items:center!important;justify-content:center!important;
  grid-column:auto!important;grid-row:auto!important;justify-self:auto!important;
  min-height:30px!important;height:30px!important;
  padding:3px 6px!important;margin:0!important;max-width:none!important;
  border-radius:10px!important;white-space:nowrap!important;
  line-height:1!important;font-size:.64rem!important;font-weight:700!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading + .airportSearch{
  grid-column:1!important;grid-row:2!important;min-width:0!important;
}
body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair > #reverseRoute{
  align-self:end!important;justify-self:center!important;margin:0 0 1px!important;
  width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
}
@media(max-width:700px){
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair{
    grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr)!important;gap:7px!important;
  }
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .routeField{
    padding:9px 8px!important;min-height:0!important;border-radius:15px!important;
  }
}
@media(max-width:380px){
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair{gap:4px!important;}
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .routeField{padding:8px 6px!important;}
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading > .performanceFollowRoute{
    width:28px!important;min-width:28px!important;max-width:28px!important;
    padding:0!important;font-size:0!important;
  }
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading > .performanceFollowRoute::after{
    content:"↔";font-size:15px;line-height:1;
  }
  body[data-efb-app="calculator"] #calculatorView #airportRouteFields.routePair .performanceAirportHeading > .performanceFollowRoute[data-overridden="true"]::after{
    content:"↺";
  }
}
/* Compact transition to schedule and weight without changing protected footer. */
body[data-efb-app="calculator"] #setupPhase .routeGrid{row-gap:10px!important;}
body[data-efb-app="calculator"] #setupPhase .weightPlanner{margin-top:10px!important;padding-top:10px!important;}

/* DEV .109 — iOS manual-weather controls honour the selected app theme.
   The old white inline declarations prevented dark-mode contrast. */
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input {
  -webkit-appearance:none;appearance:none;
  background:var(--surface-solid,#fff)!important;
  color:var(--text,#202a37)!important;
  -webkit-text-fill-color:var(--text,#202a37)!important;
  opacity:1!important;
  border-color:var(--hairline)!important;
  caret-color:var(--text,#202a37);
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input::placeholder {
  color:var(--muted,#697586);
  opacity:1;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input[aria-invalid="true"] {
  border-color:#b42333!important;
  box-shadow:inset 0 0 0 1px #b42333!important;
}
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input {
  background:var(--surface-solid,#101011)!important;
  border-color:rgba(255,255,255,.24)!important;
  color:var(--text,#f4f4f5)!important;
  -webkit-text-fill-color:var(--text,#f4f4f5)!important;
}
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input[aria-invalid="true"] {
  border-color:#ff818b!important;
  box-shadow:inset 0 0 0 1px #ff818b!important;
}
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryProgress[data-state="complete"] {
  color:#77e0aa;
}
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryProgress[data-state="invalid"],
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherError.performanceWeatherEntryError {
  color:#ff969d;
}
/* Keep the arrival/departure identity and selected time readable on iPhone.
   This only changes layout; all displayed values and calculations are retained. */
@media(max-width:620px){
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseHeader{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) max-content;
    align-items:center!important;
    column-gap:10px!important;row-gap:7px!important;
    padding:12px 14px!important;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIdentity,
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIdentity>div:last-child{
    min-width:0!important;max-width:100%;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIdentity{
    gap:8px!important;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIdentity h2{
    margin:1px 0 0;line-height:1.22;overflow-wrap:anywhere;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIdentity h2 small{
    display:block;font-size:.7rem;line-height:1.3;
    font-weight:600;white-space:normal;overflow-wrap:anywhere;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseMeta{
    margin:0!important;justify-self:end;
    max-width:min(42vw,170px);
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseMeta .timeChip{
    max-width:100%;white-space:normal;text-align:center;
    font-size:.7rem;line-height:1.3;overflow-wrap:anywhere;
  }
}
@media(max-width:355px){
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseHeader {
    grid-template-columns:minmax(0,1fr);
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseMeta{
    justify-self:start;margin-left:48px!important;max-width:calc(100% - 48px);
  }
}

/* DEV .110 — the legacy theme hid all Calculate status messages, including errors.
   Restore a compact, full-width, accessible status beneath the action. */
body[data-efb-app="calculator"] #setupPhase #flightDataStatus.inlineStatus {
  display:block!important;
  grid-column:1/-1;
  width:100%;min-width:0;max-width:100%;
  box-sizing:border-box;
  margin:8px 0 0!important;
  padding:8px 11px!important;
  font-size:.79rem;line-height:1.4;font-weight:650;
  white-space:normal;overflow-wrap:anywhere;
  border-radius:10px;
}
body[data-efb-app="calculator"] #setupPhase #flightDataStatus.inlineStatus.neutral {
  padding:5px 2px!important;
  background:transparent!important;
  color:var(--muted,#667085)!important;
  border:0!important;
}
body[data-efb-app="calculator"] #setupPhase #flightDataStatus.inlineStatus.bad {
  border-left:3px solid var(--bad,#bd2939)!important;
}
body[data-efb-app="calculator"] #setupPhase #flightDataStatus.inlineStatus.warn {
  border-left:3px solid var(--warn,#b07c1a)!important;
}
body[data-efb-app="calculator"] #setupPhase .manualDistanceControl input[aria-invalid="true"]{
  border:2px solid var(--bad,#bd2939)!important;
  box-shadow:inset 0 0 0 1px var(--bad,#bd2939)!important;
}
body[data-efb-app="calculator"] #setupPhase .manualDistanceControl input[aria-invalid="true"]:focus-visible{
  outline:2px solid var(--bad,#bd2939);outline-offset:2px;
}

/* DEV .111 — Persistent take-off/landing weather editor.
   Mirror the runway cards without introducing another enclosing white card. */
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry.performanceManualWeatherEntry {
  display:block;
  grid-column:1 / -1;
  min-width:0;max-width:100%;
  margin:10px 0 3px!important;
  padding:0!important;border:0!important;
  background:transparent!important;box-shadow:none!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry[hidden] {
  display:none!important;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherSectionHeading {
  display:flex;align-items:baseline;justify-content:space-between;
  flex-wrap:wrap;gap:4px 10px;
  margin:0 0 9px;padding:0 2px;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherSectionHeading h3 {
  margin:0;color:var(--text);
  font-size:.94rem;font-weight:650;letter-spacing:-.02em;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherSectionHeading span {
  font-size:.72rem;font-weight:600;color:var(--muted);
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCards {
  gap:10px;align-items:stretch;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard {
  border-radius:15px;
  border-color:var(--efb-component-border,var(--border));
  background:var(--efb-surface-subtle,var(--surface-2));
  padding:12px 13px;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard .manualRunwayHeader {
  margin-bottom:10px;padding-bottom:8px;
  border-bottom:1px solid var(--hairline);
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid {
  min-width:0;gap:10px;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid label {
  min-width:0;line-height:1.3;font-weight:700;
}
body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid input {
  min-height:44px;height:44px;
  font-size:16px;font-variant-numeric:tabular-nums;
}
@media(max-width:760px) {
  body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCards {
    grid-template-columns:minmax(0,1fr);
  }
}
@media(max-width:365px) {
  body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard {
    padding:10px;
  }
  body[data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryGrid {
    column-gap:8px;row-gap:10px;
  }
}
body[data-theme="dark"][data-efb-app="calculator"] #manualWeatherEntry .performanceWeatherEntryCard {
  background:var(--surface-2,#171718);
}

/* DEV .112 — Quiet, coherent Performance UI; operational risk is not a readiness cue.
   Scoped to calculator only, preserving the app's protected bottom navigation. */
body[data-efb-app="calculator"] #calculatorView .performanceTab[data-decision="good"] { --performance-decision-dot:var(--good,#298954); }
body[data-efb-app="calculator"] #calculatorView .performanceTab[data-decision="warn"] { --performance-decision-dot:var(--warn,#bb820c); }
body[data-efb-app="calculator"] #calculatorView .performanceTab[data-decision="bad"] { --performance-decision-dot:var(--bad,#c83b43); }
body[data-efb-app="calculator"] #calculatorView .performanceTab[data-decision="neutral"] { --performance-decision-dot:var(--neutral,#89909a); }
body[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab.ready .performanceTabIcon {
  position:relative;
}
body[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab.ready .performanceTabIcon::after {
  content:"";display:block;position:absolute;
  top:-3px;right:-3px;width:9px;height:9px;
  box-sizing:border-box;border:2px solid var(--efb-surface-raised,var(--surface-solid));
  border-radius:50%;
  background:var(--performance-decision-dot,var(--neutral))!important;
  box-shadow:none!important;
}
body[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab.locked .performanceTabIcon::after {
  content:none!important;
}
/* The Details status area is reserved for errors or input guidance, not success banners. */
body[data-efb-app="calculator"] #setupPhase #flightDataStatus[hidden],
body[data-efb-app="calculator"] #setupPhase #flightDataStatus:empty {
  display:none!important;
}
/* One understated surface treatment for controls, runway/weather cards and results. */
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab {
  border-radius:var(--efb-radius-interactive)!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
  transition:background-color .16s ease,border-color .16s ease!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab.active {
  background:var(--efb-surface-raised,var(--surface-solid))!important;
  border-color:var(--efb-component-border,var(--border))!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab:not(.active):not(:disabled):hover {
  background:var(--efb-surface-subtle,var(--surface-2))!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTabIcon {
  border-radius:10px!important;box-shadow:none!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase).phaseCard.card {
  border:1px solid var(--efb-component-border,var(--border))!important;
  border-radius:var(--efb-radius-content-card)!important;
  box-shadow:none!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseHeader {
  background:var(--efb-surface-raised,var(--surface))!important;
  box-shadow:none!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard) {
  border-radius:var(--efb-radius-content-group)!important;
  border:1px solid var(--efb-component-border,var(--border))!important;
  background:var(--efb-component-fill,var(--efb-surface-subtle,var(--surface-2)))!important;
  box-shadow:none!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayHeader,.performanceWeatherSectionHeading) {
  letter-spacing:0;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayHeader .routeFieldTitle,.performanceWeatherSectionHeading h3) {
  font-weight:700!important;
}
body[data-efb-app="calculator"] #setupPhase .routeActions #loadFlightData {
  border-radius:12px!important;
  box-shadow:none!important;
  font-weight:700!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) :is(.outputPanel,.runwayScaleViewport,.windVisual,.calculationGroup,.calculationSubsection) {
  box-shadow:none!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .runwayScaleViewport {
  border-radius:12px!important;
}
body[data-efb-app="calculator"] #calculatorView :is(button,input,select):focus-visible {
  outline:2px solid var(--primary)!important;
  outline-offset:2px;
}
@media(prefers-reduced-motion:reduce) {
  body[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab {
    transition:none!important;
  }
}

/* DEV .113 — consistent, restrained Performance typography and surfaces. */
body[data-efb-app="calculator"] #setupPhase :is(.performanceSectionHeading,.performanceWeatherSectionHeading){
  display:flex;align-items:baseline;justify-content:space-between;
  flex-wrap:wrap;gap:5px 12px;margin:0 0 10px!important;padding:0 2px;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayGrid > .performanceSectionHeading {
  grid-column:1/-1;align-self:end;
}
body[data-efb-app="calculator"] #setupPhase :is(.performanceSectionHeading,.performanceWeatherSectionHeading) h3{
  margin:0;color:var(--efb-text);
  font-size:var(--efb-type-row-title);font-weight:650!important;letter-spacing:-.015em;
}
body[data-efb-app="calculator"] #setupPhase :is(.performanceSectionHeading,.performanceWeatherSectionHeading) span{
  color:var(--efb-muted,var(--muted));font-size:.7rem;font-weight:500;
}
body[data-efb-app="calculator"] #setupPhase .flightPlan .sectionTitle {margin-bottom:11px}
body[data-efb-app="calculator"] #setupPhase .flightPlan .sectionTitle h2 {
  margin:0;font-size:1rem;font-weight:650;letter-spacing:-.02em;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard) {
  padding:13px!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard) .manualRunwayHeader {
  min-height:0;margin:0 0 10px!important;padding:0!important;border-bottom:0!important;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayHeader .routeFieldTitle {
  font-size:.78rem!important;font-weight:650!important;letter-spacing:0;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayHeader .routeFieldTitle .uiIcon {
  color:var(--efb-muted,var(--muted))!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualControlTopline>label,.manualHeadingControl>span,.performanceWeatherEntryGrid label){
  color:var(--efb-muted,var(--muted));font-size:.71rem!important;
  line-height:1.3;font-weight:500!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseIcon {
  background:var(--efb-surface-subtle,var(--surface-2))!important;
  border:1px solid var(--efb-component-border,var(--border))!important;
  border-radius:12px!important;box-shadow:none!important;color:var(--primary)!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .phaseHeader .eyebrow {
  color:var(--efb-muted,var(--muted))!important;font-weight:650;letter-spacing:.055em;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .outputPanel > .panelHeading{
  margin:0 0 12px!important;gap:8px;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .outputPanel > .panelHeading .panelIcon{
  display:none!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .outputPanel > .panelHeading h3{
  font-size:.92rem!important;font-weight:650!important;letter-spacing:-.02em;
  color:var(--efb-text)!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .outputPanel > .panelHeading .basis{
  margin-left:auto;border:0;box-shadow:none;background:transparent;
  color:var(--efb-muted,var(--muted));font-size:.68rem;font-weight:550;
  white-space:nowrap;padding:0;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .outputPanel > .permitBanner{
  min-height:56px!important;border-radius:12px!important;
  border-left:3px solid currentColor!important;box-shadow:none!important;
  padding:10px 13px!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) :is(.supportingResults>div,.atmosphereReadout>div,.windVisual){
  border:1px solid var(--efb-hairline)!important;
  background:var(--efb-surface-subtle)!important;
  border-radius:var(--efb-radius-sm)!important;box-shadow:none!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults>div{
  padding:11px 12px!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults strong{
  font-weight:700!important;font-variant-numeric:tabular-nums;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .runwayScaleViewport{
  border-color:var(--efb-hairline)!important;
  background:var(--efb-surface-subtle)!important;
}
@media(max-width:390px){
  body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard){
    padding:11px!important;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults>div{
    padding:9px 10px!important;
  }
}

/* DEV .114 — consistent, readable Performance controls and measurement hierarchy.
   Scoped to presentation; never change values, validation, decision or navigation. */
body[data-efb-app="calculator"] #setupPhase .flightPlan {
  min-width:0;
}
body[data-efb-app="calculator"] #setupPhase .routeGrid {
  row-gap:12px!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayGrid,.performanceWeatherEntryCards) {
  min-width:0;width:100%;align-items:stretch;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard) {
  min-width:0;overflow:visible;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid {
  gap:10px 12px;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid label {
  display:flex;flex-direction:column;gap:4px;
  min-width:0;line-height:1.35;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid label span {
  font-size:.69rem;color:var(--efb-muted,var(--muted));
  font-weight:450;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualDistanceControl input,.performanceWeatherEntryGrid input:not([aria-invalid="true"])) {
  width:100%;min-width:0;min-height:44px;
  border:1px solid var(--efb-component-border,var(--border))!important;
  border-radius:var(--efb-radius-interactive)!important;
  background:var(--efb-surface-raised,var(--surface-solid))!important;
  color:var(--efb-text,var(--text))!important;
  -webkit-text-fill-color:var(--efb-text,var(--text))!important;
  box-shadow:none!important;font-size:16px!important;
  font-variant-numeric:tabular-nums;
}
body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid input[aria-invalid="true"],
body[data-efb-app="calculator"] #setupPhase .manualDistanceControl input[aria-invalid="true"] {
  border:2px solid var(--bad,#c33)!important;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualDistanceControl input,.performanceWeatherEntryGrid input):focus-visible {
  outline:2px solid var(--primary)!important;outline-offset:2px;
}
body[data-efb-app="calculator"] #setupPhase :is(.manualDistanceControl input,.performanceWeatherEntryGrid input)[aria-invalid="true"]:focus-visible {
  outline-color:var(--bad,#c33)!important;
}
/* Results are an instrument readout: labels subdued, figures high-contrast. */
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults span,
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .atmosphereReadout span {
  font-size:.71rem!important;line-height:1.35;
  font-weight:600!important;color:var(--efb-muted,var(--muted))!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults strong,
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .atmosphereReadout strong {
  color:var(--efb-text,var(--text))!important;
  font-variant-numeric:tabular-nums;
  line-height:1.25!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .runwayEnd span {
  font-size:.7rem!important;
  font-weight:600!important;line-height:1.3;
  color:var(--efb-muted,var(--muted))!important;
}
body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .runwayEnd strong {
  font-variant-numeric:tabular-nums;
}
@media(max-width:390px){
  body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid {
    gap:9px 8px;
  }
  body[data-efb-app="calculator"] #setupPhase :is(.manualRunwayBlock,.performanceWeatherEntryCard) {
    padding:11px!important;
  }
  body[data-efb-app="calculator"] #calculatorView :is(#depPhase,#arrPhase) .supportingResults span {
    font-size:.68rem!important;
  }
}
@media(max-width:335px){
  body[data-efb-app="calculator"] #setupPhase .performanceWeatherEntryGrid {
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* Stage 12.3 — Apple HIG-inspired visual polish, scoped to three working views.
   Contents remain opaque and grouped; selection is visibly raised; navigation
   uses capsules. Deliberately do not restyle operational alerts, flight-stage
   colours, METAR risk, active timers or checked/deferred/emergency item fills. */

/* Dashboard: one quiet card hierarchy. Time and fuel readouts keep their
   existing state-specific treatments, widths and compact-flight layouts. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView
  :is(#dashboardFlightDetailsMetric,#dashboardMetarMetric){
  border:1px solid var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-card)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView
  :is(.flightDashboardPickerTrigger,.flightDashboardRefresh){
  border-radius:var(--efb-radius-interactive)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView
  .flightDashboardCardHeading>span{
  font-weight:600!important;
  letter-spacing:-.015em!important;
}
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView
  #dashboardFlightActions>.flightDashboardAction{
  border-radius:999px!important;
}

/* Performance: a clear grouped-content layer and a single raised selection.
   Keep GO/CAUTION/NO-GO permits, tab status dots and runway graphics intact. */
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
  .performanceSwitcher.card{
  border:1px solid var(--efb-hairline)!important;
  border-radius:18px!important;
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
  .performanceSwitcher .performanceTab{
  border-radius:var(--efb-radius-interactive)!important;
  transition:background-color var(--efb-feedback-duration) ease,
             border-color var(--efb-feedback-duration) ease,
             box-shadow var(--efb-feedback-duration) ease!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
  .performanceSwitcher .performanceTab.active{
  background:var(--efb-surface-raised)!important;
  border-color:var(--efb-hairline)!important;
  box-shadow:var(--efb-shadow-segment)!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
  :is(#depPhase,#arrPhase).phaseCard.card{
  border:1px solid var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-card)!important;
  background:var(--efb-surface)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
  :is(#depPhase,#arrPhase) :is(.inputPanel,.outputPanel){
  border-color:var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-group)!important;
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #setupPhase
  :is(.manualRunwayBlock,.performanceWeatherEntryCard){
  border-color:var(--efb-hairline)!important;
  border-radius:var(--efb-radius-content-group)!important;
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="calculator"] #setupPhase
  .routeActions #loadFlightData:not(:disabled){
  border-radius:999px!important;
  background:var(--efb-action-primary)!important;
  color:#fff!important;
  box-shadow:none!important;
}

/* Checklists: rounded grouped rows with intentionally distinct alert classes.
   Do not modify the current/done/deferred styling or status indicators. */
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  .checklistGroupCard{
  border-radius:var(--efb-radius-content-card)!important;
}
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  .checklistGroupCard:not(.abnormal):not(.emergency){
  background:var(--efb-surface)!important;
  border-color:var(--efb-hairline)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  :is(.checklistLibrary,.activeChecklistList,.checklistEditorGroup,.checklistEditorItems){
  border-radius:var(--efb-radius-content-card)!important;
  box-shadow:none!important;
}
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  .checklistRunItem:not(.current){
  border-radius:var(--efb-radius-content-group)!important;
}
body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
  .checklistActionDock>button{
  border-radius:999px!important;
  transition:background-color var(--efb-feedback-duration) ease,
             color var(--efb-feedback-duration) ease!important;
}
@media(min-height:640px){
  body.menuHeaderInstalled[data-efb-app="checklists"] #checklistsView
    .checklistTopActions button{
    min-height:44px!important;
    border-radius:var(--efb-radius-interactive)!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView
    .performanceSwitcher .performanceTab{
    transition:none!important;
  }
}

/* Stage 12.5 — compact responsive typography, without moving protected bars.
   Short landscape keeps six Home targets in the established grid. */
@media(orientation:landscape) and (max-height:540px) and (max-width:760px){
  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{
    font-size:clamp(.71rem,1.7vw,.85rem)!important;
    overflow-wrap:anywhere!important;line-height:1.18!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(max-width:390px) and (orientation:portrait){
  body[data-efb-app="settings"] #settingsView .settingsCard .cardTitleRow > div{
    min-width:0;overflow-wrap:anywhere;
  }
  body[data-efb-app="documents"] #documentsView:not(.isReading) .docBrowserGroupTitle{
    min-width:0;flex-wrap:wrap;row-gap:5px;
  }
}
@media(prefers-reduced-motion:reduce){
  body[data-efb-app="home"] #homeView.efbHomeFlightFirst .efbAppGrid > .efbAppTile,
  body[data-efb-app="settings"] #settingsView .settingsNav button,
  body[data-efb-app="documents"] #documentsView:not(.isReading) #docBrowserPane
    :is(.docOpenFolder,.docItemLink),
  body[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab,
  body[data-efb-app="checklists"] #checklistsView .checklistActionDock > button{
    transition:none!important;
  }
}

/* Stage 12.6 — high-contrast selection cues, without changing normal
   flight severity colours, component footprints, or focus ring priority. */
@media(prefers-contrast:more){
  body.menuHeaderInstalled[data-efb-app="home"] #homeView .efbAppGrid > .efbAppTile:not([data-app-id="dashboard"]),
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsCard,
  body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) .docBrowserRows{
    border-color:var(--efb-border)!important;
  }
  body.menuHeaderInstalled[data-efb-app="settings"] #settingsView .settingsNav button.active:not(:focus-visible),
  body.menuHeaderInstalled[data-efb-app="calculator"] #calculatorView .performanceSwitcher .performanceTab.active:not(:focus-visible){
    outline:2px solid var(--efb-text)!important;
    outline-offset:-2px!important;
  }
  body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading) .docItemSelected{
    box-shadow:inset 4px 0 0 var(--efb-accent)!important;
  }
}

/* Stage 12.7 — iPhone screenshot-driven finishing pass.
   Ordinary navigation and search should not compete visually with operational
   actions. Keep every element's DOM, tap location, route and state unchanged. */

/* 1. Documents selection: the folder-back action must say "Documents",
   not "Docum…". The header already scrolls horizontally on compact screens. */
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading)
  .docHeaderActions #docBackFolder:not(.hidden){
  flex:0 0 auto!important;
  width:max-content!important;
  max-width:none!important;
  min-width:0!important;
  white-space:nowrap!important;
}
body.menuHeaderInstalled[data-efb-app="documents"] #documentsView:not(.isReading)
  .docHeaderActions #docBackFolder:not(.hidden) > span{
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
}

/* 2. Reset is a destructive secondary action, not an equally prominent
   red affirmative button. Do not change Initialise/Performance state cues. */
body.menuHeaderInstalled[data-efb-app="dashboard"] #dashboardView[data-flight-stage="preflight"]
  #dashboardPreflightActions > #dashboardPreflightReset:not(:disabled){
  background:color-mix(in srgb,var(--efb-button-danger) 9%,var(--efb-surface-subtle))!important;
  color:var(--efb-button-danger)!important;
  border:1px solid color-mix(in srgb,var(--efb-button-danger) 20%,var(--efb-hairline))!important;
  box-shadow:none!important;
  font-weight:600!important;
}

/* 3. Back is navigation, not a primary action. Match the neutral Home
   footer's visual weight, with blue typography as the navigation cue.
   Preserve the existing fixed 46px geometry and accessibility labels. */
body.menuHeaderInstalled:not([data-efb-app="home"]):not(.efbDocumentReaderOpen)
  > #efbHistoryBackButton:not(.hidden):not(:disabled){
  background:color-mix(in srgb,var(--efb-accent) 6%,var(--efb-surface-subtle))!important;
  color:var(--efb-accent)!important;
  border:1px solid var(--efb-hairline)!important;
  box-shadow:none!important;
  font-weight:600!important;
}

/* 4. Home search feels like a quiet search field rather than another hero.
   Its protected position, touch area and click target are unchanged. */
body.menuHeaderInstalled[data-efb-app="home"]:not(.efbDocumentReaderOpen):not(.efbDocSearchOpen)
  > #efbDocumentSearchButton{
  border-radius:999px!important;
  background:var(--efb-surface-subtle)!important;
  box-shadow:none!important;
  font-weight:600!important;
}
body.menuHeaderInstalled[data-efb-app="home"] > #efbDocumentSearchButton .efbSearchLabel{
  font-weight:600!important;
}

/* Keep the Date and EOBT controls visually aligned; compress headings, not hit targets. */
#calculatorView .routeGrid > .performanceScheduleRow{
  column-gap:clamp(7px,1.8vw,12px)!important;
}
#calculatorView .performanceScheduleRow #flightDateField,
#calculatorView .performanceScheduleRow .eobtField{
  grid-template-rows:27px 44px!important;row-gap:3px!important;
}
#calculatorView .performanceScheduleRow #flightDateField{
  line-height:27px!important;
}
#calculatorView .performanceScheduleRow .eobtHeading{
  height:27px!important;min-height:27px!important;max-height:27px!important;
}
#calculatorView .performanceScheduleRow .eobtHeading .timeModeToggle{
  padding:1px!important;gap:2px!important;
}
#calculatorView .performanceScheduleRow .eobtHeading .timeModeToggle button{
  height:25px!important;min-height:25px!important;
  min-width:36px!important;padding:0 5px!important;
}
#calculatorView .performanceScheduleRow #flightDateField .dateControl,
#calculatorView .performanceScheduleRow .eobtControlRow,
#calculatorView .performanceScheduleRow .eobtControlRow #eobt,
#calculatorView .performanceScheduleRow .eobtControlRow #eobtNow{
  height:44px!important;min-height:44px!important;max-height:44px!important;
}

/* DEV: five fields in exactly two rows, on real iPhone-sized weather cards.
   Grid tracks are 6 units: 2+2+2 then 3+3; no long fifth-field orphan. */
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
  column-gap:7px!important;row-gap:8px!important;align-items:start;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label{
  min-width:0!important;grid-column:span 2;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label:nth-child(n+4){
  grid-column:span 3;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherFieldCaption{
  white-space:normal!important;overflow-wrap:normal!important;
  min-height:2.4em;display:block!important;line-height:1.2!important;
  font-size:clamp(.66rem,1.6vw,.78rem)!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherFieldUnit{
  white-space:nowrap;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid input{
  width:100%!important;min-width:0!important;height:42px!important;
  min-height:42px!important;box-sizing:border-box!important;
  font-size:16px!important;padding:6px 7px!important;
}
/* Available distance and runway selector have balanced space, not
   a disproportionately wide distance field. Preserve both directions. */
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:8px!important;align-items:end!important;
}
body[data-efb-app="calculator"] #setupPhase #manualRouteFields .manualRunwayBlock{
  padding:10px!important;
}
body[data-efb-app="calculator"] #setupPhase #manualRouteFields .manualRunwayHeader{
  margin:0 0 7px!important;padding:0!important;
  min-height:26px!important;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls .manualControl{
  min-width:0!important;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls input{
  min-width:0!important;width:100%!important;box-sizing:border-box!important;
}
/* Completed values don't need a third informational line; errors remain. */
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryProgress[data-state="complete"]{
  display:none!important;
}
@media(max-width:350px){
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid{
    column-gap:5px!important;
  }
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherFieldCaption{
    font-size:.65rem!important;letter-spacing:-.01em;
  }
}


/* Review pass: keep the status line out of the flow until it has a message. */
body[data-efb-app="calculator"] #setupPhase #flightDataStatus:empty{display:none!important}
/* Visually paired runway and weather cards with aligned headings, labels and
   numeric controls. Field values remain high-contrast with normal focus styles. */
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryCards{
  align-items:stretch!important;gap:10px!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryCard{
  min-width:0!important;margin:0!important;padding:10px!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .manualRunwayHeader{
  min-height:30px!important;margin:0 0 7px!important;padding:0!important;
  display:flex!important;align-items:center!important;justify-content:space-between!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label{
  display:flex!important;flex-direction:column!important;gap:4px!important;
  min-width:0!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherFieldCaption{
  display:block!important;min-height:2.4em!important;
  font-size:clamp(.68rem,1.7vw,.78rem)!important;line-height:1.2!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherFieldCaption .performanceWeatherFieldUnit{
  display:inline!important;font-size:inherit!important;font-weight:450!important;
  color:var(--efb-muted,#626d7b)!important;white-space:nowrap!important;
}
body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryProgress[hidden]{
  display:none!important;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls .manualDistanceControl,
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls .manualHeadingControl{
  display:flex!important;flex-direction:column!important;justify-content:end!important;
  gap:5px!important;min-width:0!important;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls .manualControlTopline{
  min-height:2.4em;display:flex;align-items:end;
}
body[data-efb-app="calculator"] #setupPhase .manualRunwayControls .manualHeadingControl>span:first-child{
  min-height:2.4em;display:flex;align-items:end;
}
/* Only the very narrow phone layout sacrifices the 3+2 grouping.
   This avoids clipped input values on old 320px devices. */
@media(max-width:340px){
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label,
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label:nth-child(n+4){
    grid-column:auto!important;
  }
  body[data-efb-app="calculator"] #setupPhase #manualWeatherEntry .performanceWeatherEntryGrid>label:last-child{
    grid-column:span 2!important;
  }
}
