/* EllGab Modern v1.0.11 — mobile header consolidation.
   Loaded after v1.0.9; no desktop rules. Keep real SMF navigation/search/actions. */
@media screen and (max-width: 700px) {
  #header div.frame { padding: 10px 12px 0; }
  #top_section { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px 10px; padding-bottom: 9px; min-height: 0; }
  #top_section .ellgab-brand-group { grid-column: 1 / -1; display: flex; min-width: 0; margin: 0; padding: 0; }
  #top_section h1.forumtitle { margin: 0; min-width: 0; font-size: clamp(1.18rem,5.3vw,1.5rem); line-height: 1.2; }
  #top_section .ellgab-header-center { grid-column: 1; grid-row: 2; justify-content: flex-start; margin: 0; }
  #top_section #wormhole_header_link { margin: 0; padding: 5px 10px; line-height: 1.3; min-height: 35px; display: inline-flex; justify-content: center; align-items: center; white-space: nowrap; font-size: .73rem; }
  #top_section .ellgab-header-actions { grid-column: 2; grid-row: 2; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; margin: 0; }
  #top_section #siteslogan { display: block !important; min-width: 0; max-width: 100%; margin: 0; padding: 0; font-size: .78rem; line-height: 1.25; white-space: nowrap; }
  #top_section #siteslogan a { display: inline-flex; min-height: 35px; align-items: center; font-size: inherit; white-space: nowrap; }
  #top_section img#upshrink { margin: 0; max-height: 28px; }
  #upper_section { display: grid; grid-template-columns: minmax(0,1fr); gap: 7px; padding: 9px 0 8px; margin: 0; min-height: 0; }
  div#upper_section div.user { display: flex; align-items: center; gap: 9px; margin: 0; min-width: 0; line-height: 1.25; }
  #upper_section div.user p.avatar { margin: 0; padding: 0; }
  #upper_section div.user .avatar img { width: 34px; height: 34px; object-fit: cover; border-radius: 8px; }
  #upper_section div.user ul.reset { margin: 0; padding: 0; line-height: 1.25; min-width: 0; }
  #upper_section div.user ul.reset > li { margin: 0; font-size: .72rem; line-height: 1.3; }
  #upper_section div.user ul.reset > li.greeting { margin: 0; font-size: .84rem; }
  div#upper_section .ellgab-news-center { justify-self: stretch; width: 100%; margin: 0; padding: 0; text-align: center; line-height: 1.3; }
  div#upper_section .ellgab-news-center h2, div#upper_section .ellgab-news-center p { display: inline; margin: 0; padding: 0; font-size: .78rem !important; line-height: 1.35; }
  div#upper_section .ellgab-news-center p { margin-left: 4px; }
  div#upper_section .ellgab-news-center p *, div#upper_section .ellgab-news-center a { font-size: .78rem !important; }
  div#upper_section .ellgab-search-side { justify-self: stretch; width: 100%; margin: 0; padding: 0; }
  div#upper_section .ellgab-search-side form { display: flex; align-items: center; justify-content: stretch; flex-wrap: nowrap; gap: 7px; width: 100%; margin: 0; padding: 0; }
  div#upper_section .ellgab-search-side input[name="search"] { width: auto; flex: 1 1 0%; min-width: 0; max-width: 100%; height: 40px; font-size: 16px !important; }
  div#upper_section .ellgab-search-side input[type="submit"] { flex: 0 0 auto; width: auto; min-height: 40px; margin: 0; padding: 7px 13px; font-size: .85rem; }
  #main_menu { margin: 0; padding: 6px 0 8px; }
  #ellgab_mobile_menu_toggle { min-height: 40px; padding: 7px 11px; }
  #header div.frame > br.clear { display: none; }
}
@media screen and (max-width: 360px) {
  #top_section { gap: 5px 6px; }
  #top_section #wormhole_header_link { padding: 5px 8px; font-size: .66rem; }
  #top_section #siteslogan { font-size: .7rem; }
  #top_section .ellgab-header-actions { gap: 4px; }
}
@media screen and (min-width: 701px) and (max-width: 860px) {
  #upper_section { gap: 8px; padding: 10px 0; }
  div#upper_section .ellgab-news-center { margin: 0; }
  div#upper_section .ellgab-search-side form { justify-content: center; flex-wrap: nowrap; }
  div#upper_section .ellgab-search-side input[name="search"] { min-width: 0; width: min(300px, 70vw); flex: 0 1 300px; font-size: 16px; }
}
