/* A clear, thumb-friendly mobile home inspired by the Flo reference. */
.mobile-nav, .mobile-overview { display: none; }

@media (max-width: 800px) {
  :root { --paper: #fff8fa; --pink: #ef5680; --rose: #ffe4ec; --ink: #342d36; }
  html { scroll-padding-top: 80px; }
  body { background: #fff8fa; font-size: 16px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  main { padding: 0 16px; max-width: 620px; }
  .topbar { height: 68px; padding: 0 20px; background: #ffffffed; border-bottom: 1px solid #f7eaf0; }
  .topbar nav { display: none; }
  .brand { font-size: 23px; letter-spacing: -.9px; gap: 9px; }
  .brand-mark { width: 33px; height: 33px; background: #ffe0e9; color: #de4c79; font-size: 22px; }
  .privacy-pill { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px; background: #fff7fa; border-color: #f6e4ec; }
  .privacy-pill span:last-child { display: none; }
  .lock-icon { display: flex; align-items: center; font-size: 23px; color: #bd6b84; }
  .daily-welcome { padding: 26px 0 24px; }
  .daily-welcome .eyebrow { color: #9e7d8d; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 9px; }
  .daily-welcome h1 { font-size: clamp(30px, 8.5vw, 38px); letter-spacing: -1.3px; }
  .daily-welcome h1 span { color: #ed6e94; }
  .daily-welcome h2 { color: #9a7a89; font-size: 15px; margin-bottom: 18px; }
  .daily-welcome .care-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .daily-welcome .care-tip { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; padding: 14px 11px; min-height: 144px; border: 0; border-radius: 18px; background: #ffedf2; color: #624851; font-size: 13px; line-height: 1.5; }
  .daily-welcome .care-tip:nth-child(2) { background: #f0eafa; color: #60506e; }
  .daily-welcome .care-tip:nth-child(3) { background: #fff0dd; color: #75604b; }
  .daily-welcome .care-tip span { width: 34px; height: 34px; border-radius: 12px; background: #ffffffb0; font-size: 20px; }
  .daily-welcome .text-button { min-height: 48px; padding-top: 6px; color: #c5567b; font: 600 12px 'DM Sans', sans-serif; }
  .mobile-overview { position: relative; display: block; overflow: hidden; margin-top: 5px; padding: 24px; border-radius: 26px; background: linear-gradient(120deg, #ffe1eb, #fff0f4); box-shadow: 0 8px 24px #d8648510; }
  .mobile-cycle-kicker { position: relative; z-index: 1; margin: 0 0 12px; color: #ae5d78; font-size: 10px; font-weight: 700; letter-spacing: 1.4px; }
  .mobile-overview #mobilePeriodHeading { position: relative; z-index: 1; max-width: 270px; margin: 0; color: #513143; font: 700 clamp(28px, 8vw, 38px)/1.16 Manrope, sans-serif; letter-spacing: -1.2px; }
  #mobilePeriodDetail { position: relative; z-index: 1; margin: 11px 0 21px; color: #9b6a7d; font-size: 13px; line-height: 1.5; }
  .mobile-overview-actions { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
  .mobile-overview-actions .button { min-height: 48px; padding: 12px 20px; font-size: 15px; }
  .mobile-overview-actions a { display: inline-flex; align-items: center; min-height: 44px; color: #a05c77; font-size: 12px; font-weight: 600; text-decoration: none; }
  .mobile-overview-actions a span { margin-left: 5px; }
  .mobile-cycle-flower { position: absolute; right: -16px; top: 16px; color: #f5aac2; opacity: .37; font-size: 170px; line-height: 1; transform: rotate(15deg); pointer-events: none; }
  .button { min-height: 46px; font-family: 'DM Sans', sans-serif; font-size: 14px; border-radius: 14px; }
  .primary { background: #ec557f; box-shadow: 0 4px 14px #ec557f24; }
  .primary:hover { background: #db4770; }
  .secondary { background: #f7edf2; color: #946c80; }
  .card { border: 1px solid #f3e8ee; border-radius: 24px; box-shadow: 0 8px 28px #6b3d5610; background: #fff; }
  .dashboard { gap: 18px; }
  .cycle-card { padding: 24px 22px; }
  .card h2, .section-title h2 { font-size: 21px; letter-spacing: -.6px; }
  .eyebrow { font-size: 10px; color: #a48b97; }
  .cycle-visual { width: 225px; height: 225px; margin: 8px auto; }
  .ring-progress { stroke: #ed7497; }
  .ring-track { stroke: #fff0f5; }
  .ring-day { color: #684352; font-size: 52px; }
  .ring-caption { font-size: 14px; }
  .phase-chip { background: #fff0f5; color: #b56580; font-size: 12px; }
  .cycle-summary { gap: 10px; margin: 12px 0 20px; }
  .cycle-summary > div { gap: 8px; }
  .cycle-summary small { font-size: 11px; line-height: 1.5; }
  .cycle-summary strong { font-size: 13px; line-height: 1.5; white-space: normal; }
  .summary-icon { width: 34px; height: 34px; font-size: 18px; }
  .full { height: 48px; }
  .tiny-note { font-size: 10px; line-height: 1.6; margin-top: 12px; }
  .calendar-card { padding: 22px 14px; }
  .calendar-card .card-heading { align-items: center; padding: 0 5px; }
  .calendar-card .card-heading h2 { font-size: 20px; }
  .calendar-controls { gap: 2px; }
  .calendar-controls .icon-button { width: 44px; height: 44px; font-size: 26px; }
  .weekdays { font-size: 12px; margin-top: 19px; }
  .days { grid-auto-rows: 47px; }
  .day { width: 100%; max-width: 40px; min-width: 0; height: 40px; min-height: 40px; font-size: 14px; }
  .day.period { background: #ffdce7; color: #b54d72; }
  .day.today { outline-color: #d17496; }
  .legend { gap: 10px 14px; font-size: 10px; line-height: 1.5; margin-top: 15px; }
  .calendar-hint { font-size: 12px; }
  .forecast-heading h3 { font-size: 14px; }
  .forecast-item { min-height: 48px; font-size: 13px; border-radius: 12px; }
  .forecast-year { font-size: 10px; }
  .below-grid { margin-top: 18px; }
  .log-card { padding: 22px; }
  .mood-list { gap: 8px; }
  .mood-list button { display: flex; align-items: center; min-height: 44px; padding: 10px 13px; font: 500 13px 'DM Sans', sans-serif; }
  .mood-list button span { font-size: 17px; }
  .mood-list button.selected { background: #fff0f5; border-color: #e69bb4; color: #a24f70; }
  .note-label { font-size: 13px; margin: 18px 0 8px; }
  textarea, .modal input { font-size: 16px; font-family: 'DM Sans', sans-serif; padding: 12px; }
  .log-footer { gap: 12px; font-size: 10px; margin-top: 12px; }
  .log-footer .button { padding: 10px 14px; }
  .memory-section { padding-bottom: 24px; }
  .memory-intro { margin-bottom: 14px; }
  .memory-intro h2 { font-size: 23px; }
  .memory-carousel { border-radius: 23px; border-color: #eee3e8; }
  .memory-toolbar { background: white; }
  .memory-controls button { background: #fff5f8; border-color: #f2dfe7; color: #c47694; }
  .memory-message-editor form { border-color: #f0dee8; }
  .memory-message-editor textarea { background: #fffbfd; }
  .extra-care { margin-top: 22px; }
  .extra-care > summary { font-size: 14px; }
  .modal { width: calc(100vw - 32px); max-width: 430px; padding: 24px; border-radius: 24px; }
  .modal-actions .button { min-height: 48px; }
  .modal-close { min-width: 44px; min-height: 44px; }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); width: max-content; font-size: 13px; text-align: center; }
  footer { justify-content: center; padding: 18px; border-top: 0; }
  .footer-brand, .footer-brand + span, .footer-copy { display: none; }
  .footer-link { min-height: 44px; font-size: 12px; color: #b38d9e; }
  .mobile-nav { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; min-height: 76px; padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid #f4e6ed; background: #fffffffa; box-shadow: 0 -6px 24px #8f517208; backdrop-filter: blur(14px); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 56px; border-radius: 17px; color: #b5a0ab; font: 500 11px/1.3 'DM Sans', sans-serif; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .mobile-nav svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav a.is-active { color: #e35c87; background: #fff0f6; font-weight: 700; }
  .mobile-nav a:focus-visible, .mobile-overview a:focus-visible { outline: 3px solid #d47c9e; outline-offset: 2px; }
  .memory-viewer-open .mobile-nav { visibility: hidden; }
}

@media (min-width: 601px) and (max-width: 800px) {
  .dashboard { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .daily-welcome .care-tips { gap: 7px; }
  .daily-welcome .care-tip { padding: 12px 9px; font-size: 12px; }
  .mobile-overview { padding: 22px 20px; }
  .cycle-card, .log-card { padding: 21px 18px; }
  .cycle-summary { gap: 6px; }
  .cycle-summary > div { gap: 6px; }
}
