/* Responsive layout corrections. Loaded after the theme styles. */
.header-inner > *, .intro > *, .detail-panel > *, .footer-inner > * { min-width:0; }
.brand, .brand-mark, .theme-toggle, .support-link { flex-shrink:0; }
.header-search-field { min-width:0; }
.wallpaper-column .wallpaper-card { margin-bottom:0; }
.gallery-message { grid-column:1 / -1; flex-wrap:wrap; }
.filter-pill { flex-shrink:0; min-height:44px; }
.gallery-lead, .footer-inner { flex-wrap:wrap; }
.detail-copy, .detail-description, .detail-tag, .detail-metadata span,
.detail-mini-note, .micro-banner p { overflow-wrap:anywhere; }
.detail-tag { max-width:100%; }
.detail-breadcrumb, .detail-explore { flex-wrap:wrap; gap:12px; }
.donation-dialog { max-height:calc(100vh - 36px); max-height:calc(100dvh - 36px); overflow-y:auto; overscroll-behavior:contain; }
.social-toast { width:max-content; overflow-wrap:anywhere; }
.library-section { scroll-margin-top:150px; }
@media (max-width:1100px) {
  .header-inner { height:auto; min-height:73px; padding:12px 22px; gap:14px; flex-wrap:wrap; }
  .header-search { order:5; flex:0 0 100%; }
  .header-search-field { width:100%; }
  .header-search-field kbd { display:none; }
  .desktop-nav { margin-left:auto; gap:18px; }
  .theme-toggle-label { display:none; }
  .theme-toggle { width:44px; padding:0; }
}
@media (max-width:900px) {
  .detail-panel { grid-template-columns:minmax(0,1fr); gap:20px; }
  .detail-image-wrap { min-height:180px; }
  .detail-copy { padding-top:0; }
  .detail-download { max-width:none; }
  .filter-bar { display:block; padding:8px 0; }
  .filter-scroll { width:100%; }
  .toolbar-right { justify-content:space-between; }
}
@media (max-width:700px) {
  .desktop-nav { display:none; }
  .theme-toggle { margin-left:auto; }
  .header-spacer { display:none; }
  .micro-banner { flex-wrap:wrap; }
  .micro-banner a { margin-left:0; }
}
@media (max-width:620px) {
  .header-inner { padding:10px 13px; gap:10px; height:auto; }
  .header-search { order:5; }
  .theme-toggle, .support-link { height:44px; }
  .theme-toggle { width:44px; }
  .support-link { margin-left:0; }
  .header-search-field input, .sort-wrap select { font-size:16px; }
  .sort-wrap select { max-width:100%; }
  .gallery-lead { align-items:flex-start; gap:8px; }
  .gallery-lead > span:last-child { flex-basis:100%; }
  .detail-copy { padding:16px 3px 8px; }
  .detail-social .social-action { flex:1 1 110px; min-height:44px; }
}
@media (max-width:400px) {
  .support-link span { display:none; }
  .support-link { width:44px; padding:0; }
}
@media (hover:none), (pointer:coarse) {
  .card-download { width:44px; height:44px; }
}
/* One ascending breakpoint sequence; no gaps between fractional CSS widths. */
.wallpaper-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (min-width:560px) { .wallpaper-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (min-width:760px) { .wallpaper-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (min-width:1100px) { .wallpaper-grid { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media (min-width:1400px) { .wallpaper-grid { grid-template-columns:repeat(6,minmax(0,1fr)); } }
