/* Mobile navigation: fixed-height rail, pinned Home, horizontal movement only. */
@media (max-width: 820px) {
  .dashboard-header {
    position: sticky;
    top: max(8px, env(safe-area-inset-top));
    z-index: 30;
    display: block;
    height: 74px;
    min-height: 74px;
    max-height: 74px;
    padding: 6px;
    overflow: hidden;
    border-radius: 22px;
  }

  .header-utilities { display: none !important; }

  .top-nav {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 62px;
    min-height: 62px;
    max-height: 62px;
    gap: 2px;
    padding: 0 4px 0 72px;
    overflow-x: auto;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar { display: none; }

  .top-nav-item {
    flex: 0 0 auto;
    min-width: 78px;
    height: 58px;
    min-height: 58px;
    max-height: 58px;
    margin: 0;
    padding: 5px 8px;
    gap: 3px;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    border-radius: 15px;
    font-size: .68rem;
    transform: none !important;
  }

  .top-nav-item > span:last-child {
    display: inline !important;
    line-height: 1.05;
  }

  .top-nav-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    font-size: 1.03rem;
  }

  .top-nav-item.active {
    background: rgba(38,59,53,.08);
    color: var(--forest);
    box-shadow: none;
  }

  .top-nav-item.home-nav-pinned {
    position: absolute !important;
    left: 4px !important;
    top: 0 !important;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 68px;
    min-width: 68px;
    height: 62px;
    min-height: 62px;
    max-height: 62px;
    padding: 0;
    margin: 0;
    background: #fffaf2;
    border-radius: 16px 0 0 16px;
    box-shadow: 9px 0 14px -13px rgba(38,59,53,.65);
  }

  .top-nav-item.home-nav-pinned.active::after {
    left: 10px;
    right: 10px;
    bottom: 1px;
  }

  .top-nav-item.home-nav-pinned > span:last-child {
    display: none !important;
  }

  .top-nav-item.home-nav-pinned .top-nav-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
  }

  .home-nav-logo {
    display: block;
    width: 47px;
    height: 47px;
    object-fit: contain;
    object-position: center;
    border-radius: 11px;
    transform: translateY(-7px);
  }

  .home-hero {
    position: relative;
    gap: 10px;
    padding-bottom: 12px;
  }

  .home-hero-actions {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .home-control-strip {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
  }

  .home-control-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(38,59,53,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.8);
    color: var(--forest);
    font-size: .95rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(38,59,53,.05);
  }

  .home-control-button .notification-badge {
    right: -3px;
    top: -4px;
  }

  .home-clock {
    margin-left: auto;
    text-align: right;
  }

  .home-clock strong { font-size: clamp(2.05rem,9vw,3rem); }
  .home-clock span { margin-top: 3px; font-size: .7rem; }
}

@media (max-width: 600px) {
  .home-hub { padding: 16px; }

  .home-hero {
    flex-direction: column;
    gap: 0;
  }

  .home-hero > div:first-child { width: 100%; }

  .home-hero h1 {
    max-width: 9ch;
    font-size: clamp(2.35rem,10.5vw,2.9rem);
    line-height: .92;
    letter-spacing: -.055em;
  }

  .home-hero .message {
    max-width: 34ch;
    margin-top: 7px;
    font-size: .82rem;
    line-height: 1.4;
  }

  .home-hero-actions {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    width: 100%;
    margin-top: 13px;
    padding: 10px 11px;
    border: 1px solid rgba(38,59,53,.08);
    border-radius: 16px;
    background: linear-gradient(100deg,rgba(247,240,228,.9),rgba(255,255,255,.72));
  }

  .home-clock {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    text-align: left;
  }

  .home-clock strong {
    font-size: clamp(1.85rem,8vw,2.2rem);
    line-height: .9;
  }

  .home-clock span {
    margin-top: 4px;
    font-size: .65rem;
  }

  .home-control-strip {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }
}
