/* Compact shared HiBiker header: the wordmark already contains all brand text. */
.topbar-home { min-height: 73px; padding-block: 5px; }
/* The floating-glass navigation has more specific header rules. Override only
   dimensions here, retaining its shared material, border and inset treatment. */
.app-shell > header.topbar-home { min-height: 62px; padding-block: 4px; gap: 8px; }
.topbar-home .brand-home { flex: 0 1 auto; min-width: 0; align-items: center; }
.topbar-home .brand-home .hb-header-logo {
  display: block;
  width: 52px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.topbar-home .home-user-chip { min-width: 0; }
.topbar-home .home-user-chip[aria-expanded='true'] { border-color: #d58955; background: #fff6ef; }
.topbar-home .home-user-chip:focus-visible,
.topbar-home .brand-home:focus-visible { outline: 2px solid #db652b; outline-offset: 3px; }

.hb-account-popover {
  position: fixed;
  z-index: 950;
  width: min(284px, calc(100vw - 18px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(169, 144, 126, .35);
  border-radius: 16px;
  background: rgba(255, 254, 252, .99);
  color: #292621;
  box-shadow: 0 17px 40px rgba(36, 28, 21, .16), 0 3px 9px rgba(36, 28, 21, .05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform-origin: 92% 0;
  animation: hb-account-popover-in .15s cubic-bezier(.2, .75, .3, 1) both;
}
.hb-account-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #302c28;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hb-account-row:hover, .hb-account-row:focus-visible { background: #f6f0e9; }
.hb-account-row:focus-visible { outline: 2px solid #dc6b30; outline-offset: -2px; }
.hb-account-row.is-current { background: #fff0e3; color: #97451b; }
.hb-account-row.is-danger { color: #a34239; }
.hb-account-row.is-danger:hover { background: #fff0ee; }
.hb-account-row-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #f4eee8;
  color: #675b52;
}
.hb-account-row-symbol svg { display: block; width: 18px; height: 18px; }
.hb-account-row.is-danger .hb-account-row-symbol { color: #af5144; background: #fff0ed; }
.hb-account-row-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  overflow: hidden;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #efded0;
  color: #a34f24;
  font-size: 14px;
  font-weight: 800;
}
.hb-account-row-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hb-account-row-text { display: grid; gap: 1px; flex: 1 1 auto; min-width: 0; }
.hb-account-row-label, .hb-account-switch-toggle > .hb-account-row-text {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hb-account-row-caption { overflow: hidden; color: #867b73; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.hb-account-current-check { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: #e77032; color: #fff; }
.hb-account-current-check svg { width: 12px; height: 12px; }
.hb-account-switcher { margin-top: 3px; padding-top: 4px; border-top: 1px solid #f0e8e0; }
.hb-account-switch-toggle { color: #5f4535; }
.hb-account-count { display: grid; place-items: center; min-width: 21px; height: 20px; padding: 0 5px; border-radius: 7px; background: #f7eee5; color: #a15a2e; font-size: 10px; font-weight: 800; }
.hb-account-chevron { display: grid; place-items: center; width: 17px; height: 17px; color: #88796f; transition: transform .16s ease; }
.hb-account-chevron.is-open { transform: rotate(180deg); }
.hb-account-chevron svg { width: 16px; height: 16px; }
.hb-account-switch-list { max-height: min(37vh, 280px); overflow-y: auto; margin: 3px 0 0 6px; padding: 2px 0 2px 6px; border-left: 2px solid #f3e7da; overscroll-behavior: contain; }
.hb-account-switch-list[hidden] { display: none !important; }
.hb-account-switch-list .hb-account-row { min-height: 44px; }
.hb-account-status { margin: 7px 9px; color: #786e67; font-size: 11px; line-height: 1.4; }
.hb-account-status.is-error { color: #aa5041; }
.hb-account-footer-line { margin: 5px 0 2px; border-top: 1px solid #eee5dd; }
@keyframes hb-account-popover-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 760px) {
  .topbar-home { min-height: 63px; padding: 4px 10px; gap: 6px; }
  .app-shell > header.topbar-home { min-height: 58px; padding-block: 3px; gap: 5px; }
  .topbar-home .brand-home .hb-header-logo { width: 47px; }
  .topbar-home .home-head-actions { gap: 4px; margin-left: auto; }
  .app-shell > header.topbar-home .home-head-actions { gap: 4px; }
  .topbar-home .home-user-chip { padding-left: 0; }
  .topbar-home .home-user-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
}
@media (max-width: 380px) {
  .topbar-home { padding-inline: 8px; gap: 4px; }
  .topbar-home .brand-home .hb-header-logo { width: 43px; }
  .topbar-home .home-head-actions { gap: 2px; }
  .app-shell > header.topbar-home .home-head-actions { gap: 2px; }
  .topbar-home .head-icon { width: 35px; flex-basis: 35px; }
  .topbar-home .home-user-chip img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-account-popover { animation: none; }
  .hb-account-chevron { transition: none; }
}
