
/* Mobile comfort, 21 October 2026.
   Component-only overrides for the retained native cascade: Home has a six-ID
   control rule and the shared header has a five-ID rule. Repeated IDs below
   address those existing rules without changing desktop or reader controllers. */
@media (max-width: 760px) {
  body.nahwa-mobile-app:not(.reader-screen-active):not(.nd-native-reader-tools-active):not(.nd-reading-focus) {
    --app-header-height: 72px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home {
    --mobile-comfort-gutter: 24px;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home > [data-app-panel][hidden] {
    display: none !important;
  }

  /* Native shared header: a readable full name and three separate tap targets. */
  #nd-shell#nd-shell#nd-shell#nd-shell#nd-shell#nd-shell .nb-header {
    grid-template-columns: minmax(0, 1fr) 144px !important;
    align-items: center !important;
    width: calc(100% - 48px) !important;
    max-width: none !important;
    min-height: 72px !important;
    gap: 8px !important;
    padding: 12px 0 !important;
    box-sizing: border-box !important;
  }
  #nd-shell#nd-shell#nd-shell#nd-shell#nd-shell#nd-shell .nb-brand {
    min-width: 0 !important;
    max-width: 100% !important;
    font-size: 20px !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-decoration: none !important;
  }
  #nd-shell#nd-shell#nd-shell#nd-shell#nd-shell#nd-shell .nb-header-actions {
    grid-template-columns: repeat(3, 44px) !important;
    width: 144px !important;
    min-width: 144px !important;
    gap: 6px !important;
    margin: 0 !important;
  }
  #nd-shell#nd-shell#nd-shell#nd-shell#nd-shell#nd-shell .nb-header-actions > .nd-dropdown > .nb-icon-button {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 10px !important;
    border-radius: 12px !important;
    box-sizing: border-box !important;
  }

  /* Hosted header has the same spacing budget, with its existing menu control. */
  body.nahwa-mobile-app .site-header {
    grid-template-columns: minmax(0, 1fr) 44px auto;
    gap: 6px;
    min-height: calc(72px + var(--app-safe-top, 0px));
    padding: calc(12px + var(--app-safe-top, 0px)) 24px 12px;
  }
  body.nahwa-mobile-app .site-header .wordmark {
    display: block;
    align-content: center;
    font-size: 20px;
    line-height: 1.12;
    letter-spacing: -.035em;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-decoration: none;
  }
  body.nahwa-mobile-app .site-header .header-actions { gap: 6px; }
  body.nahwa-mobile-app .site-header .header-nav > .nav-disclosure > summary {
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 13px;
  }
  body.nahwa-mobile-app .site-header .header-nav > .nav-disclosure > summary > svg { display: none; }

  /* Open content rhythm; the scenic background and its motion remain intact. */
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-wrap {
    width: calc(100% - 2 * var(--mobile-comfort-gutter)) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 28px !important;
    min-height: 0 !important;
    padding-block: 30px 28px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-hero-copy h1 {
    margin: 0 !important;
    max-width: none !important;
    font-size: clamp(34px, 8.8vw, 42px) !important;
    line-height: 1.12 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-hero-copy h1 .hero-close { margin: 0 !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .daily-verse {
    margin: 20px 0 0 !important;
    max-width: none !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .daily-verse blockquote { margin: 0 !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .daily-verse blockquote p {
    margin: 0 !important;
    min-block-size: 0 !important;
    font-size: 19px !important;
    line-height: 1.85 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .daily-verse figcaption {
    margin-top: 10px !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .daily-verse figcaption > a {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 44px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-command {
    width: 100% !important;
    max-width: none !important;
    min-height: 58px !important;
    margin-top: 22px !important;
    padding: 6px !important;
    gap: 8px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-command input {
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 8px 6px 8px 10px !important;
    font-size: 16px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-command button {
    flex: 0 0 44px !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 11px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-links {
    gap: 8px 24px !important;
    margin-top: 16px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-links > a {
    min-height: 44px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .hero-purpose {
    margin: 16px 0 0 !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  /* All fourteen connected slides share an intrinsic track. Long titles and
     metadata grow that track; no fixed frame or line clamp crops their copy. */
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-scene[data-home-companion] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] {
    grid-template-rows: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: visible !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] > .cover-card {
    grid-area: 1 / 1 !important;
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    min-height: 248px !important;
    max-height: none !important;
    padding: 20px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-top {
    min-height: 24px !important;
    max-height: none !important;
    padding-bottom: 8px !important;
    overflow: visible !important;
    font-size: 13px !important;
    line-height: 1.7 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-card h2 {
    margin: 18px 0 12px !important;
    max-width: none !important;
    font-size: 24px !important;
    line-height: 1.5 !important;
    overflow-wrap: break-word !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .feature-showcase-copy {
    margin-bottom: 12px !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-bottom {
    flex-wrap: wrap !important;
    gap: 12px 16px !important;
    margin-top: auto !important;
    padding-top: 12px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-bottom > span {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-bottom a {
    min-height: 44px !important;
    padding: 9px 14px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  /* The fixed 120px contact capsule keeps its existing position and behavior.
     These two rows reserve its horizontal footprint without moving any nodes. */
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-scene .cover-controls {
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 16px !important;
    padding: 0 128px 0 0 !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-scene .cover-controls > .cover-nav {
    display: grid !important;
    grid-template-columns: 48px 44px 44px !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-scene .cover-count {
    width: 48px !important;
    min-width: 0 !important;
    padding: 0 !important;
    text-align: start !important;
    white-space: nowrap !important;
    font: 500 12px/1.5 Geist, Arial, system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-scene .cover-controls .icon-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 12px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .feature-showcase-tools {
    justify-content: start !important;
    margin-top: 12px !important;
    padding-inline-end: 128px !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .feature-showcase-paths {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    text-align: start !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .feature-showcase-paths > summary {
    min-height: 44px !important;
    max-width: 100% !important;
    padding: 9px 12px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
  }

  /* Separate useful readings, rather than one enclosing box with touching rows. */
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    margin-block: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility > a {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    grid-column: auto !important;
    gap: 4px 12px !important;
    min-width: 0 !important;
    min-height: 112px !important;
    padding: 18px !important;
    background: #f3f9fe !important;
    border: 1px solid #dce8f0 !important;
    border-radius: 18px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility > a:nth-child(2) {
    background: #fff5ed !important;
    border-color: #f0e1d5 !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility > a > svg {
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    width: 22px !important;
    height: 22px !important;
    margin-top: 4px !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility > a > :is(small, strong, .utility-detail) { grid-column: 2 !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility strong {
    font-size: 18px !important;
    line-height: 1.6 !important;
    font-variant-numeric: tabular-nums !important;
    overflow-wrap: anywhere !important;
  }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility :is(small, .utility-detail) {
    font-size: 13px !important;
    line-height: 1.7 !important;
  }

  /* The actual comment source and slideshow remain in place. */
  #ndf-home-voices#ndf-home-voices {
    margin-top: 36px !important;
    padding: 28px 24px 32px !important;
  }
  #ndf-home-voices#ndf-home-voices .ndf-h-header { margin-bottom: 20px !important; }
  #ndf-home-voices#ndf-home-voices h2 { font-size: 23px !important; line-height: 1.5 !important; }
  #ndf-home-voices#ndf-home-voices .ndf-h-all { min-height: 44px !important; font-size: 13px !important; }
  #ndf-home-voices#ndf-home-voices .ndf-h-shell { padding: 20px !important; }
  #ndf-home-voices#ndf-home-voices .ndf-h-controls {
    flex-wrap: wrap !important;
    gap: 14px !important;
    margin-top: 16px !important;
    padding-top: 14px !important;
    padding-inline-end: 128px !important;
  }
  #ndf-home-voices#ndf-home-voices .ndf-h-steps button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Presentation only: navigation visibility stays with the existing reader. */
  body.nahwa-mobile-app .mobile-app-nav.mobile-app-nav {
    column-gap: 2px !important;
    padding: 7px max(12px, env(safe-area-inset-right, 0px)) calc(7px + var(--app-safe-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)) !important;
    box-sizing: border-box !important;
  }
  body.nahwa-mobile-app .mobile-app-nav .mobile-app-tab.mobile-app-tab {
    grid-template-rows: 30px auto !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 56px !important;
    padding: 2px 0 !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    text-underline-offset: 0 !important;
  }
  body.nahwa-mobile-app .mobile-app-nav .mobile-app-tab > span {
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }
  body.nahwa-mobile-app .mobile-app-nav .mobile-app-tab svg { width: 21px !important; height: 21px !important; }
  body.nahwa-mobile-app .mobile-app-nav .mobile-app-tab::before { top: 2px !important; height: 30px !important; }

  /* When the footer itself offers the return link, one floating action suffices. */
  body.mobile-comfort-footer-visible > button.nd-back-top:not(:focus) {
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 380px) {
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home { --mobile-comfort-gutter: 20px; }
  #nd-shell#nd-shell#nd-shell#nd-shell#nd-shell#nd-shell .nb-header { width: calc(100% - 40px) !important; }
  body.nahwa-mobile-app .site-header { padding-inline: 20px; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-hero { padding-block: 28px 26px !important; gap: 26px !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] > .cover-card { padding: 18px !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .cover-stack[data-feature-showcase] .cover-card h2 { font-size: 23px !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility { gap: 12px !important; }
  #nd-home#nd-home#nd-home#nd-home#nd-home#nd-home#nd-home .ref-utility > a { padding: 17px 16px !important; }
  #ndf-home-voices#ndf-home-voices { padding-inline: 20px !important; }
  #ndf-home-voices#ndf-home-voices .ndf-h-shell { padding: 18px !important; }
  body.nahwa-mobile-app .mobile-app-nav .mobile-app-tab.mobile-app-tab { font-size: 12px !important; }
}
