/* Reference: compact topbar. Existing controls retain their own interactions. */
.langselector__code { display: none; }
.header-context { min-width: 0; position: relative; }
.header-context__summary { display: none; }
@media (min-width: 1025px) {
  #root .home .header { height: 78px; min-height: 78px; padding: 0 16px; gap: 18px; background: #fafafa; border-bottom: 1px solid #dedee2; box-shadow: none; }
  #root :is([data-theme="dark"], .theme-dark) .header, :is([data-theme="dark"], .theme-dark) #root .home .header { background: linear-gradient(180deg,#0d0e10,#090a0b); border-color: #202124; }
  #root .home .header__left { flex: 1 1 auto; min-width: 0; max-width: none; gap: 20px; }
  #root .home .header__right { flex: 0 0 auto; min-width: 0; gap: 8px; }
  #root .home .header__search-toggle { display: none; }
  #root .home .header__search-wrap { flex: 1 1 326px; min-width: 160px; max-width: 326px; }
  #root .home .header__search { display: flex; position: relative; inset: auto; width: 100%; max-width: none; height: 44px; min-height: 44px; padding: 0 10px; gap: 7px; border-radius: 999px; border: 1px solid #d6d7dd; background: #f0f1f3; box-shadow: inset 0 1px 0 #ffffff08; }
  #root .home .header__search-input { font-size: 15px !important; line-height: normal; text-overflow: ellipsis; min-width: 0; }
  #root .home .header__search-icon { width: 18px; height: 18px; }
  #root .home .header__search-shortcut { display: inline-block; flex: none; font-size: 14px !important; line-height: 22.4px; padding: 4px 8px; border: 0; border-radius: 4px; }
  #root .home .header__search-panel { position: absolute; top: calc(100% + 10px); left: 0; right: auto; width: min(500px,calc(100vw - 280px)); }
  #root .home .header__feedback-trigger { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 44px; padding: 0; border: 0; border-radius: 7px; background: transparent; box-shadow: none; color: var(--text-primary); font-size: 14px !important; font-weight: 600; white-space: nowrap; }
  #root .home .header__feedback-trigger > svg { display: block; flex: none; width: 20px; height: 20px; color: var(--text-secondary); }
  #root .home .header__sponsor-trigger { padding: 0 13px; background: #fff0de; color: #713600; }
  #root .home .header__sponsor-trigger > svg { color: #f56a0b; }
  #root .home .header :is(.header__icon-button,.themetoggle__button,.langselector__button) { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 5px; background: transparent; box-shadow: none; color: var(--text-primary); }
  #root .home .header :is(.header__icon-button,.themetoggle__button) svg { width: 20px; height: 20px; }
  #root .home .header .langselector__icon, #root .home .header .langselector__flag { display: none; }
  #root .home .header .langselector__code { display: inline; font-size: 14px !important; font-weight: 700; }
  #root .home .header .header__user-menu { padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--border); }
  #root .home .header__user-button { display: flex; gap: 10px; min-height: 48px; padding: 4px 0 4px 4px; background: transparent; border: 0; border-radius: 5px; color: var(--text-primary); }
  #root .home .header__user-avatar { width: 40px; height: 40px; border: 1px solid #666; box-shadow: none; }
  #root .home .header__user-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 65px; max-width: 150px; gap: 2px; }
  #root .home .header__user-name { font-size: 15px !important; line-height: normal; text-transform: none; }
  #root .home .header__user-role { font-size: 12px !important; color: var(--text-secondary); line-height: normal; text-transform: uppercase; letter-spacing: .04em; font-weight: 500; }
  #root .home .header__user-icon { width: 16px; height: 16px; margin-left: 0; }
  #root .home .header-context { width: 196px; flex: none; margin-right: 8px; }
  #root .home .header-context__summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); }
  #root .home .header-context__summary > svg:first-child { color: #f76b1c; flex: none; }
  #root .home .header-context__summary strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px !important; font-weight: 600; }
  #root .home .header-context__summary span { flex: 0 1 auto; max-width: 75px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px !important; line-height: 18px; padding: 0 4px; background: var(--surface-3); border-radius: 4px; color: var(--text-secondary); }
  #root .home .header-context > .branch-selector { position: absolute; inset: 0; width: 100%; min-width: 0; opacity: 0; }
  #root .home .header-context .branch-selector__label { display: none; }
  #root .home .header-context .branch-selector__control { width: 100%; max-width: none; min-width: 0; height: 100%; cursor: pointer; }
  #root .home .header-context:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
  #root .home .header :is(button,input):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
  :is([data-theme="dark"], .theme-dark) #root .home .header__search, #root :is([data-theme="dark"], .theme-dark) .home .header__search { background: linear-gradient(110deg,#202226,#1a1b1f); border-color: #303238; }
  :is([data-theme="dark"], .theme-dark) #root .home .header__sponsor-trigger, #root :is([data-theme="dark"], .theme-dark) .home .header__sponsor-trigger { background: #432007; color: #f9e7db; }
}
@media (min-width: 1025px) and (max-width: 1279px) {
  #root .home .header { gap: 10px; padding-inline: 12px; }
  #root .home .header__left { gap: 12px; }
  #root .home .header__search-wrap { min-width: 125px; }
  #root .home .header__right { gap: 5px; }
  #root .home .header-context { width: 162px; margin-right: 0; }
  #root .home .header__user-info { min-width: 48px; max-width: 65px; }
}

@media (min-width: 1025px) and (max-width: 1540px) {
 #root .home .header__search-toggle { display: grid; width: 44px; height: 44px; }
 #root .home .header__search-wrap { flex: 0 0 0; min-width: 0; max-width: 0; }
 #root .home .header__search:not(.header__search--focused) { display: none; }
 #root .home .header__search--focused { display: flex; position: fixed; top: 90px; left: 12px; right: 12px; width: auto; max-width: none; z-index: calc(var(--z-dropdown) + 22); }
 #root .home .header__search-panel { position: fixed; top: 144px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 164px); }
}
@media (min-width: 1025px) and (max-width: 1390px) {
 #root .home .header__user-info { display: none; }
}
@media (min-width: 1025px) and (max-width: 1190px) {
 #root .home .header :is(.header__icon-button,.themetoggle__button,.langselector__button) { width: 36px; min-width: 36px; }
}

@media(min-width:1025px){#root .home .header__updates-trigger > svg,#root .home .header__sponsor-trigger > svg{width:16px;height:16px}}
