/* Mobile interaction layer: optimized for quick garden updates in the field. */
@media (max-width: 767.98px) {
  body { padding-bottom: 5.25rem; }
  .cultivate-nav { position: sticky; padding: .6rem 0; }
  .cultivate-nav .navbar-toggler, .cultivate-nav .navbar-collapse { display: none !important; }
  .cultivate-brand .brand-mark { width: 2.15rem; height: 2.15rem; }
  .app-container { padding-left: .9rem; padding-right: .9rem; }
  .mobile-nav { position: fixed; z-index: 1050; left: 0; right: 0; bottom: 0; height: 4.6rem; display: grid; grid-template-columns: repeat(5,1fr); align-items:center; padding: .25rem max(.35rem,env(safe-area-inset-right)) calc(.25rem + env(safe-area-inset-bottom)) max(.35rem,env(safe-area-inset-left)); background: rgba(255,250,240,.97); border-top: 1px solid #ded2af; box-shadow: 0 -5px 24px #21342918; backdrop-filter: blur(12px); }
  .mobile-nav a { min-width: 0; min-height: 3.65rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; color: #738078; text-decoration: none; font-size: .62rem; font-weight: 800; }
  .mobile-nav a i { font-size: 1.2rem; }
  .mobile-nav a.active { color: var(--forest); }
  .mobile-nav .mobile-add i { width: 2.55rem; height: 2.55rem; margin-top: -.9rem; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; box-shadow: 3px 3px 0 var(--moss); }
  .garden-header { padding-top: 1.4rem; }
  .garden-header .back-link { margin-bottom: 1.2rem; }
  .garden-header h1 { font-size: 2.45rem; }
  .garden-header .d-flex.flex-wrap { display: grid !important; grid-template-columns: 1fr 1fr; width: 100%; }
  .garden-header .d-flex.flex-wrap .btn-leaf, .garden-header .d-flex.flex-wrap .btn-quiet { justify-content: center; min-height: 46px; }
  .garden-tabs { margin-top: 1.2rem; }
  .garden-tabs a { flex: 1; text-align: center; min-height: 46px; padding: .75rem .5rem; }
  .garden-dashboard { padding-top: 1rem; }
  .default-garden-callout { align-items: stretch; flex-direction: column; }
  .default-garden-callout .btn-quiet { justify-content: center; }
  .garden-cover { height: 180px; padding: 1.1rem; }
  .garden-cover strong { font-size: 1.5rem; }
  .metric { padding: .85rem; column-gap: .55rem; }
  .metric i { font-size: 1.2rem; }
  .metric span { font-size: 1.15rem; }
  .metric small { font-size: .68rem; }
  .dashboard-panel { padding: 1rem; }
  .dashboard-panel>header { align-items: flex-start; }
  .task-row { min-height: 54px; }
  .task-row>button { min-width: 44px; min-height: 44px; }
  .board-section { padding-top: 1rem; }
  .board-note span:first-of-type { font-size: .78rem; }
  .space-column,.space-add-card { flex-basis: calc(100vw - 2.5rem); }
  .space-edit,.plant-edit { min-width: 44px; min-height: 44px; }
  .space-edit { margin: -.45rem; }
  .plant-card { min-height: 76px; }
  .plant-edit { right: 2rem; }
  .drag-handle { min-width: 30px; padding: 1rem .25rem; }
  .modal-dialog { margin: .5rem; align-items: end; min-height: calc(100% - 1rem); }
  .modal-content { max-height: calc(100vh - 1rem); border-radius: 18px 18px 10px 10px; }
  .modal-body { overflow-y: auto; }
  .modal-footer { position: sticky; bottom: 0; background: var(--paper); }
  .modal-footer .btn-leaf,.modal-footer .btn-quiet { min-height: 44px; }
  .photo-choice { min-height: 86px; }
  .journal-hero { padding: 1.8rem 0 1.4rem; }
  .journal-hero>.app-container { align-items: flex-start; }
  .journal-hero h1 { font-size: 2.55rem; }
  .journal-hero p:last-child { font-size: .9rem; }
  .journal-hero .btn-leaf { width: 46px; height: 46px; padding: 0; justify-content: center; font-size: 0; flex: 0 0 auto; }
  .journal-hero .btn-leaf i { font-size: 1.1rem; }
  .journal-section { padding-top: .75rem; }
  .journal-composer { margin-left: -.2rem; margin-right: -.2rem; border-radius: 13px; }
  .journal-composer>footer { position: sticky; bottom: 4.8rem; margin: 1.2rem -1rem -1rem; padding: .85rem 1rem; background: var(--paper); border-radius: 0 0 13px 13px; z-index: 2; }
  .journal-composer>footer .btn-leaf { min-height: 46px; }
  .journal-toolbar { align-items: flex-end; }
  .journal-toolbar form { display: block; }
  .journal-toolbar label { display: block; margin-bottom: .25rem; }
  .journal-toolbar .form-select { min-width: 155px; }
  .journal-entry { grid-template-columns: 1fr; gap: .35rem; margin-bottom: 1rem; }
  .timeline-date { display: flex; gap: .35rem; text-align: left; padding: 0 .2rem; }
  .entry-photos { height: 58vw; max-height: 290px; }
  .entry-content { padding: 1rem; }
  .entry-meta { flex-wrap: wrap; }
  .entry-meta a { min-height: 36px; display: inline-flex; align-items: center; }
  .journal-empty { padding: 2.5rem 1rem; }
  .cultivate-footer { display: none; }
}

@media (max-width: 380px) {
  .photo-choices { grid-template-columns: 1fr; }
  .garden-header .d-flex.flex-wrap { grid-template-columns: 1fr; }
  .entry-meta>span:nth-child(2) { width: 100%; }
}
