.account-menu { position: relative; min-width: 0; }
.account-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
}
.account-trigger::-webkit-details-marker { display: none; }
.account-trigger:hover, .account-menu[open] .account-trigger { background: var(--cream); }
.account-trigger:focus-visible, .account-panel a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.account-trigger > .icon { flex: 0 0 auto; }
.account-identity { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-status { font-size: var(--text-caption); line-height: 1.3; color: var(--muted); }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-small); font-weight: 700; line-height: 1.4; }
.account-chevron { width: 14px; height: 14px; flex: 0 0 auto; }
.account-menu[open] .account-chevron { transform: rotate(180deg); }
.account-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    max-width: calc(100vw - 36px);
    max-height: calc(100dvh - 180px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 12px 32px #0000001a;
}
.account-panel-identity { display: flex; flex-direction: column; gap: 4px; padding: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.account-panel-identity strong { font-size: var(--text-small); }
.account-panel-identity > span { font-size: var(--text-note); color: var(--muted); }
.account-panel nav { display: flex; flex-direction: column; }
.account-panel a { display: block; padding: 11px 12px; border-radius: 6px; font-size: var(--text-small); }
.account-panel a:hover, .account-panel a:focus-visible { background: var(--cream); }
.account-panel .account-sign-out { border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 6px 6px; }

@media (max-width: 1200px) {
    .has-account .desktop-nav { display: none; }
    .has-account .mobile-menu-button { display: inline-flex; }
}

@media (max-width: 700px) {
    .has-account .header-inner { position: relative; height: 121px; padding-bottom: 52px; }
    .account-menu { position: absolute; bottom: 7px; left: 0; right: 0; border-top: 1px solid var(--line); }
    .account-trigger { padding: 9px 8px; gap: 8px; }
    .account-identity { flex-direction: row; align-items: baseline; gap: 8px; flex: 1; }
    .account-status { flex: 0 0 auto; }
    .account-name { max-width: none; }
    .account-panel { top: calc(100% + 8px); }
}
