.shared-header,
.account-ui.app-ui header.shared-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: calc(100% - 32px);
    max-width: 980px;
    margin: 16px auto 28px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid #dfe3ea;
    border-radius: 24px;
    box-shadow: none;
    z-index: 30;
}

.shared-header .shared-brand {
    color: #087bff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.03em;
    text-decoration: none;
    line-height: 1.2;
}

.shared-menu > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    color: #0068df;
    background: #e6f0ff;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.shared-menu > summary::-webkit-details-marker { display: none; }

.shared-menu summary svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.shared-menu .site-navigation {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(30, 50, 80, .12);
}

.shared-menu .site-navigation a,
.shared-menu .site-navigation button {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    text-align: left;
    color: #0068df;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
}

.shared-menu .site-navigation a:hover,
.shared-menu .site-navigation button:hover { background: #e6f0ff; }

.shared-menu .site-navigation form { margin: 0; }

.shared-header a:focus-visible,
.shared-header summary:focus-visible,
.shared-header button:focus-visible {
    outline: 3px solid #087bff;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .shared-header,
    .account-ui.app-ui header.shared-header {
        padding: 10px 12px;
        border-radius: 22px;
    }
    .shared-header .shared-brand { font-size: 20px; }
}

/* Shared guest layout */
.account-ui.guest-ui {
    min-height: 100vh;
    background: linear-gradient(160deg, #f6f8fb, #eaf0f6);
}
.account-ui.guest-ui .guest-content {
    padding: 8px 16px 40px;
}

/* Header width correction */
body:not(.account-ui) .shared-header {
    width: 100%;
}

/* Header aligned to page top */
body:not(.account-ui) {
    padding-top: 0;
}
.shared-header,
.account-ui.app-ui header.shared-header {
    margin-top: 0;
    min-height: 84px;
    padding: 20px;
    border-radius: 0 0 28px 28px;
}
@media (max-width: 600px) {
    .shared-header,
    .account-ui.app-ui header.shared-header {
        min-height: 80px;
        padding: 16px 18px;
        border-radius: 0 0 26px 26px;
    }
}

/* Blue header and full mobile width */
.shared-header,
.account-ui.app-ui header.shared-header {
    border-top: 0;
    background: linear-gradient(120deg, #e7f1ff, #dce9fb);
}
.shared-menu > summary {
    background: rgba(255, 255, 255, .55);
}
@media (max-width: 600px) {
    body:not(.account-ui) .shared-header {
        width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
    }
    .account-ui .shared-header,
    .account-ui.app-ui header.shared-header {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .shared-header,
    .account-ui.app-ui header.shared-header {
        border-left: 0;
        border-right: 0;
    }
}

/* Browser background tint */
html,
body,
body.account-ui,
body.account-ui.guest-ui {
    background-color: #e7f1ff;
}

/* Solid, compact header */
.shared-header,
.account-ui.app-ui header.shared-header {
    background: #e7f1ff;
    min-height: 74px;
    padding: 15px 20px;
}

@media (max-width: 600px) {
    .shared-header,
    .account-ui.app-ui header.shared-header {
        min-height: 70px;
        padding: 11px 18px;
    }
}
