/* Mobile workspace rail: keeps the desktop app structure in a compact phone layout. */
@media (max-width: 760px) {
  .app-shell {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 100dvh;
    padding-bottom: 78px;
  }

  .side {
    display: flex;
    position: sticky;
    top: 0;
    width: 72px;
    height: calc(100dvh - 78px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 6px 16px;
    gap: 10px;
    align-items: stretch;
    background: var(--brand-navy);
  }

  .brand {
    align-items: center;
    gap: 0;
  }

  .brand-logo-frame {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .brand-logo { display: block; object-position: center 26%; }
  .brand strong, .brand small, .side-foot { display: none; }

  .nav { gap: 4px; }
  .nav + .nav { margin-top: 0; }
  .nav button, .more-list button {
    width: 60px;
    min-height: 54px;
    padding: 7px 2px;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    font-size: 10px;
    line-height: 1.1;
  }

  .nav button .icon { width: 20px; height: 20px; font-size: 18px; }
  .nav-label {
    display: block;
    width: 58px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav:nth-of-type(2) { margin-top: auto; }
  .nav:nth-of-type(2)::before {
    content: "TOOLS";
    color: #aeb5ae;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    letter-spacing: .06em;
    padding: 4px 0 1px;
  }
  .nav:nth-of-type(2) .side-foot { display: none; }

  .main { padding: 20px 14px 30px; }
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: 24px; }
  .today-hero { border-top: 4px solid var(--brand-red); }
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .main:has(.today-hero) > .overview .metric { min-height: 118px; padding: 12px; overflow: hidden; }
  .main:has(.today-hero) > .overview .metric strong {
    font-size: clamp(18px, 6.4vw, 25px);
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.15;
  }
  .overview .metric span, .overview .metric small { overflow-wrap: anywhere; }

  .mobile-nav {
    left: 0;
    right: 0;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 359px) {
  .app-shell { grid-template-columns: 64px minmax(0, 1fr); }
  .side { width: 64px; padding-inline: 2px; }
  .nav button { width: 60px; }
  .nav-label { width: 56px; }
  .main { padding-inline: 12px; }
}
