/* Keep the lavender desktop composition; allow every nested track to shrink. */
.calendar-layout>*,.calendar-grid>*,.split-layout>*,.groceries-layout>*,.home-overview-grid>*,
.home-together-grid>*,.record-grid>*,.filter-grid>*,.form-row>*{min-width:0}
.calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-cell{min-width:0;overflow:hidden}
.transaction-filter-field,.transaction-filter-field input{min-width:0;max-width:100%}
.transaction-filter-field{flex:1 1 160px}
.calendar-head{gap:8px}
.calendar-head .icon-button{flex-shrink:0}
.calendar-head h2{text-align:center;min-width:0}
.panel-heading,.home-section-heading{flex-wrap:wrap}
.record-card h3,.journal-entry p,.agenda-item strong,.notification-copy,
.home-greeting>div:first-child{overflow-wrap:anywhere;min-width:0}
.modal-header>div{min-width:0}
.modal-close{flex-shrink:0}
.modal input,.modal textarea,.modal select,.custom-select{min-width:0;max-width:100%}
.table-wrap{min-width:0;max-width:100%}
.grocery-item span{min-width:0;overflow-wrap:anywhere}

@media(min-width:851px) and (max-width:1100px){
  .calendar-layout,.groceries-layout{grid-template-columns:minmax(0,1fr)}
  .home-overview-grid,.home-together-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:850px){
  .calendar-layout,.split-layout{grid-template-columns:minmax(0,1fr)}
  .content{min-width:0}
  .calendar-grid{gap:3px}
  .calendar-dayname{padding:6px 0}
  .calendar-cell{padding:5px 3px}
  .transaction-filter-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
  .transaction-filter-field input{width:100%;box-sizing:border-box}
  .transaction-filter-reset{min-height:44px}
  .form-field input:not([type=checkbox]),.form-field textarea,.form-field select,
  .grocery-form input,.custom-select-trigger{font-size:16px;min-height:44px}
  .grocery-form input{min-width:0}
  .grocery-form .btn{flex-shrink:0}
  .side-nav .subnav button{min-height:44px}
  .modal-close,.home-add-agenda,.home-money-visibility,.task-check{min-width:44px;min-height:44px}
  .form-actions{gap:10px;flex-wrap:wrap}
  .account-menu{max-height:calc(100dvh - 100px);overflow:auto;overscroll-behavior:contain}
  .sidebar{max-width:calc(100vw - 32px);height:100dvh;overscroll-behavior:contain}
  .home-greeting{gap:12px}
  .home-shortcut{min-height:90px}
  .home-date-plan{flex-wrap:wrap}
}
@media(max-width:380px){
  .transaction-filter-bar,.filter-grid{grid-template-columns:minmax(0,1fr)}
  .topbar{padding-left:14px;padding-right:14px}
  .top-actions{gap:4px}
  .mobile-brand strong{font-size:17px}
  .calendar-head h2{font-size:14px}
  .calendar-event-dot{padding:2px 1px}
  .home-agenda,.home-money,.home-together,.home-journal,.home-upcoming{padding:16px}
}
@media(prefers-reduced-motion:reduce){
  .sidebar,.home-shortcut-icon{transition:none}
}
