        .site-header { background: #0d2f4f; color: white; padding: 8px 20px 8px 6px; display: flex; align-items: center; gap: 8px; }
        .site-header-col { flex: 1 1 0; min-width: 0; display: flex; align-items: center; }
        .site-header-col-start { justify-content: flex-start; }
        .site-header-col-center { justify-content: flex-start; flex-grow: 1; }
        .site-header-col-end { justify-content: flex-end; flex: 0 1 auto; margin-left: auto; }
        .site-header .brand-block { min-width: 0; text-align: left; overflow-wrap: anywhere; }
        .site-header .brand-home { color: inherit; text-decoration: none; }
        .site-header .brand-home { display: inline-flex; align-items: center; vertical-align: middle; }
        .site-header .brand-icon { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; opacity: .92; }
        .site-header .brand-attribution { font-size: 11px; font-weight: 700; letter-spacing: normal; }
        .site-header .brand-attribution a { color: inherit; }
        .site-header .brand { display: grid; grid-template-columns: 52px minmax(0, auto); align-items: center; column-gap: 4px; font-size: 20px; font-weight: 700; letter-spacing: 0.3px; }
        .site-header .brand-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
        .site-header .brand-name { color: #f5b400; text-decoration: none; }
        .site-header .tagline { font-size: 12px; color: #a9c6de; margin-top: 2px; }

        .user-menu { position: relative; text-align: right; display: flex; align-items: center; gap: 10px; }
        .user-menu-trigger { display: flex; align-items: center; cursor: pointer; border-radius: 50%; transition: box-shadow 0.2s; }
        .user-menu-trigger:hover { box-shadow: 0 0 0 3px rgba(255,255,255,0.18); }
        .header-credit-badge { cursor: pointer; color: white; font-size: 16px; font-weight: 700; padding: 7px 10px; border-radius: 999px; white-space: nowrap; transition: filter 0.15s; }
        .header-credit-badge:hover { filter: brightness(1.12); }
        .header-credit-badge.unknown { background: rgba(255,255,255,0.14); }
        .header-credit-badge.unknown:hover { background: rgba(255,255,255,0.24); filter: none; }
        .header-credit-badge.positive { background: #2e7d32; }
        .header-credit-badge.zero { background: #c62828; }
        .header-credit-badge.low { background: #ffb74d; color: #3e2400; }
        .header-credit-badge { text-decoration: none; white-space: normal; text-align: center; max-width: 100%; }
        .user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #4CAF50; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: white; flex-shrink: 0; background-size: cover; background-position: center; }
        .profile-pill { display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: #e3f2fd; border-radius: 20px; cursor: pointer; transition: background 0.2s; font-size: 12px; font-weight: 600; color: #1976d2; }
        .profile-pill:hover { background: #bbdefb; }
        .profile-pill > span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .profile-pill .user-avatar { width: 28px; height: 28px; font-size: 13px; margin: 0; }
        .user-menu-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: white; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.2); min-width: 240px; overflow: hidden; z-index: 1000; text-align: left; }
        .user-menu-dropdown.show { display: block; }
        .user-menu-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #eee; }
        .user-menu-dropdown-header .user-avatar { width: 36px; height: 36px; font-size: 15px; }
        .user-menu-dropdown-header-text { min-width: 0; }
        .user-menu-dropdown-header-name { font-size: 17px; font-weight: 700; color: #222; }
        .user-menu-dropdown-header-email { font-size: 12px; color: #888; word-break: break-all; }
        .user-menu-dropdown .user-menu-credits { display: inline-flex; align-items: center; gap: 8px; margin: 10px 12px; padding: 10px 18px; font-size: 16px; font-weight: 700; color: white; border-radius: 999px; cursor: pointer; transition: filter 0.15s; }
        .user-menu-dropdown .user-menu-credits:hover { filter: brightness(1.1); }
        .user-menu-dropdown .user-menu-credits.positive { background: #2e7d32; }
        .user-menu-dropdown .user-menu-credits.zero { background: #c62828; }
        .user-menu-dropdown .user-menu-credits.low { background: #ffb74d; color: #3e2400; }
        .user-menu-dropdown .user-menu-credits { text-decoration: none; white-space: normal; max-width: 100%; box-sizing: border-box; }
        .user-menu-dropdown .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 16px; background: none; border: none; cursor: pointer; font-size: 14px; color: #333; }
        .user-menu-dropdown .menu-item:hover { background: #f5f5f5; }
        .user-menu-dropdown .menu-item .menu-item-icon { width: 18px; text-align: center; flex-shrink: 0; }
        .user-menu-dropdown .menu-item.disabled { color: #aaa; cursor: default; }
        .user-menu-dropdown .menu-item.disabled:hover { background: none; }
        .user-menu-dropdown .menu-item.disabled .menu-item-badge { margin-left: auto; font-size: 11px; color: #aaa; background: #f0f0f0; padding: 2px 8px; border-radius: 10px; }
        .user-menu-dropdown hr { border: none; border-top: 1px solid #d8ad45; margin: 2px 0; opacity: .7; }


#site-top-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.site-header { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.4; }
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header .header-login { display: inline-block; margin: 0; padding: 10px 16px; border-radius: 6px; background: #4caf50; color: white; font-size: 14px; font-weight: 600; text-decoration: none; text-align: center; }
.standalone-menu { position: relative; }
.standalone-menu summary { list-style: none; }
.standalone-menu .user-menu-dropdown { display: block; max-width: calc(100vw - 24px); }
.standalone-menu .menu-item { text-decoration: none; }
@media (max-width: 600px) {
    .site-header { padding: 6px 8px 6px 4px; flex-wrap: nowrap; gap: 6px; }
    .site-header-col-start { display: none; }
    .site-header-col-center { flex: 1 1 0; min-width: 0; justify-content: flex-start; }
    .site-header .brand { grid-template-columns: 42px minmax(0, auto); column-gap: 3px; font-size: 18px; }
    .site-header .brand-icon { width: 42px; height: 42px; flex-basis: 42px; }
    .site-header .brand-attribution { font-size: 10px; white-space: nowrap; }
    .header-credit-badge { font-size: 14px; padding: 6px 8px; }
    .profile-pill { gap: 4px; padding: 3px 6px; }
    .profile-pill > span { max-width: 64px; }
    .site-header .brand-name { white-space: nowrap; }
    .site-header .brand-block { text-align: left; }
    .site-header .brand { justify-content: flex-start; }
    .site-header-col-end { flex: 0 1 auto; margin-left: auto; max-width: 100%; }
    #user-menu-container { min-width: 0; max-width: 100%; }
    .site-header .header-login { padding: 7px 9px; font-size: 12px; }
}
