/* Keep document panning vertical. Wide work surfaces own their horizontal scroll. */
html,body{max-inline-size:100%;overflow-x:hidden;overflow-x:clip;overscroll-behavior-x:none}
:where(.scroll,.payment-scroll,.packing-table-scroll,.song-table-wrap,.guest-table-wrap,.wedding-carousel-strip,.forecast-periods,.floor-viewport){overscroll-behavior-x:contain}
:where(.portal-shell,.shared-main,.portal-main,.portal-content,.modal-body,.panel,.field,.stack,.row,.wedding-public,.wedding-public>section){min-inline-size:0}
@media(max-width:800px){
  .portal-shell,.dashboard-layout,.dashboard-cards{grid-template-columns:minmax(0,1fr)}
  #portal-shell>*,#account-controls,.mast .wrap,.project-toolbar,.project-header-nav{min-inline-size:0;max-inline-size:100%}
  .mast .actions,.tabs,.guest-tabs,.portal-rail .rail-links{flex-wrap:wrap}
  .mast .actions{min-width:0;max-width:100%}
  :where(.shared-main,.public-wedding-body,dialog) :where(input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea,fieldset){min-inline-size:0;max-inline-size:100%}
  :where(.shared-main,.public-wedding-body,dialog) :where(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:max(1rem,1em)}
  :where(.shared-main,dialog,.wedding-public) :where(img,video,iframe){max-inline-size:100%}
  .wedding-public :where(h1,h2,h3,a,p,li),.portal-main :where(h1,h2,h3,p,a){overflow-wrap:anywhere}
  dialog{max-inline-size:calc(100% - 1rem)}
  .guest-dashboard{gap:.65rem}
  .guest-pie{max-width:38vw}
}
@media(max-width:480px){
  .mast .wrap,.shared-main{width:calc(100% - 1rem)}
  .wedding-public>section{padding-inline:1rem}
  .wedding-public .wedding-hero>div{padding-inline:.85rem}
  .wedding-public nav{flex-wrap:wrap}
}

.design-palette,.design-color-grid,.wedding-picker-groups,.wedding-picker-group,.wedding-color-picker{min-width:0;width:100%;max-width:100%}
.paint-palette{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,5.3rem),1fr));gap:.65rem}
.paint-palette li{min-width:0;text-align:center;overflow-wrap:anywhere}
.design-color-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,2rem),1fr))}
.design-color-grid button{width:100%;min-width:0}
.wedding-color-picker{grid-template-columns:repeat(auto-fill,minmax(min(100%,6.5rem),1fr))}
.wedding-color-picker button,.wedding-custom-color{min-width:0;overflow-wrap:anywhere}
@media(max-width:800px){
  .dashboard-layout[data-mobile-ordered]{grid-template-columns:minmax(0,1fr)}
  :is(#portal-dashboard,#event-home) .dashboard-layout[data-mobile-ordered] .dashboard-rail:empty{display:none}
  .dashboard-layout[data-mobile-ordered] .dashboard-main{display:grid;min-width:0;gap:.8rem}
  .dashboard-layout[data-mobile-ordered] .dashboard-main .messages-card{order:0}
  .dashboard-layout[data-mobile-ordered] .dashboard-main .dashboard-cards{grid-template-columns:minmax(0,1fr)}
  :is(.photo-toolbar,.floor-tools,.packing-list-tabs,.guest-filters,.song-tools,.schedule-tabs){align-items:start;justify-content:flex-start}
  #guest-panel .guest-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
  #guest-panel .guest-filters .field:first-child{grid-column:1/-1}
  #guest-panel .guest-filters select{width:100%}
}
