
/* StepJar compact mobile dashboard */
@media (max-width: 599px) {
  .app-shell {
    min-height: 100dvh;
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  main {
    padding: 10px 12px 12px;
  }

  .topbar {
    height: 48px;
    padding: 0 14px;
  }

  .notice {
    padding: 4px 8px;
    font-size: 9px;
  }

  .eyebrow {
    margin: 2px 0 8px;
    font-size: 9px;
  }

  .hero-card {
    padding: 10px 14px;
    border-radius: 18px;
  }

  .jar-wrap {
    width: 82px;
    height: 85px;
    padding-top: 9px;
    margin-bottom: 4px;
  }

  .jar-lid {
    width: 60px;
    height: 11px;
    left: 11px;
    border-width: 2px;
  }

  .jar {
    width: 66px;
    height: 73px;
    border-width: 3px;
  }

  .steps-number {
    font-size: clamp(27px, 8vw, 35px);
    line-height: 1.1;
  }

  .goal-row {
    margin: 10px 0 6px;
  }

  .progress-caption {
    margin-top: 5px;
    font-size: 9px;
  }

  .primary-btn {
    margin-top: 10px;
    padding: 10px;
  }

  .section-heading {
    margin: 12px 2px 7px;
  }

  .section-heading h2 {
    font-size: 15px;
  }

  .week-grid {
    gap: 4px;
  }

  .day {
    padding: 6px 0;
    border-radius: 8px;
  }

  .day .day-emoji {
    font-size: 13px;
    margin: 2px 0;
  }

  .streak-card,
  .tip-card {
    margin-top: 9px;
    padding: 10px;
  }

  .streak-card p,
  .tip-card p {
    margin: 5px 0 8px;
    font-size: 10px;
  }

  .streak-dots {
    gap: 5px;
  }

  .streak-dots span {
    max-width: 28px;
  }

  .bottom-nav {
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    box-sizing: border-box;
  }

  .nav-item {
    flex: 1;
    min-width: 0;
  }

  .nav-item span {
    font-size: 18px;
    height: 21px;
  }

  .nav-item small {
    font-size: 10px;
  }
}

/* Short phone screens: prioritise steps and navigation */
@media (max-width: 599px) and (max-height: 760px) {
  .tip-card {
    display: none;
  }

  .streak-card {
    margin-top: 7px;
    padding: 8px 10px;
  }

  .streak-card p {
    margin: 4px 0 6px;
  }

  .streak-dots span {
    aspect-ratio: auto;
    height: 22px;
  }

  .hero-card {
    padding-top: 7px;
    padding-bottom: 9px;
  }

  .jar-wrap {
    height: 70px;
  }

  .jar {
    height: 61px;
  }
}

/* Secondary screens may scroll if their content exceeds the viewport */
.page {
  min-width: 0;
}

.app-shell {
  overflow-x: clip;
}
