/* Splash modal — mobile / tablet */
#demoSplash {
  padding: 12px !important;
  align-items: flex-end !important;
}
#demoSplash > div {
  max-width: 100% !important;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border-radius: 16px 16px 0 0 !important;
}
#demoSplash [style*="padding:28px"] {
  padding: 20px 18px 0 !important;
}
#demoSplash [style*="padding:22px 28px"] {
  padding: 16px 18px !important;
}
#demoSplash [style*="padding:0 28px 24px"] {
  padding: 0 18px 18px !important;
  flex-direction: column !important;
}
#demoSplash [style*="padding:0 28px 24px"] button,
#demoSplash [style*="padding:0 28px 24px"] a {
  width: 100% !important;
  min-width: 0 !important;
}

/* Inline grid overrides (pages use style= grids) */
[style*="grid-template-columns:1fr 340px"],
[style*="grid-template-columns:320px 1fr"],
[style*="grid-template-columns:1fr 1fr 1fr"],
[style*="grid-template-columns:1fr 1fr"] {
  grid-template-columns: 1fr !important;
}

[style*="minmax(480px"],
[style*="minmax(260px"] {
  grid-template-columns: 1fr !important;
}

/* Search / filter bars */
[style*="max-width:280px"],
[style*="max-width:300px"] {
  max-width: 100% !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  .demo-bar {
    font-size: 10px !important;
    gap: 8px !important;
    padding: 0 10px !important;
    justify-content: flex-start !important;
    overflow: hidden;
  }
  .demo-bar span:not(.demo-dot):not(strong) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }
  .demo-bar a {
    flex-shrink: 0;
    font-size: 10px !important;
    padding: 2px 8px !important;
  }
}

@media (max-width: 480px) {
  .demo-bar span:not(.demo-dot):not(strong) {
    display: none;
  }
  .demo-bar a span {
    display: inline !important;
  }
}
