.shared-header .shared-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, .55);
    color: #0068df;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.shared-menu-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}
dialog.site-menu-drawer {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: hidden;
    color: #1b1f24;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-menu-drawer::backdrop {
    background: rgba(25, 40, 60, .32);
}
.site-menu-drawer .site-menu-panel {
    display: flex;
    flex-direction: column;
    width: min(360px, calc(100% - 32px));
    height: 100%;
    margin-left: auto;
    box-sizing: border-box;
    background: #fff;
    border-left: 1px solid #d5e1f1;
    border-radius: 26px 0 0 26px;
    box-shadow: -12px 0 40px rgba(30, 50, 80, .14);
    overflow: hidden;
    transform: translateX(100%);
    transition: transform .24s ease;
}
.site-menu-drawer.is-visible .site-menu-panel {
    transform: translateX(0);
}
.site-menu-drawer .site-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: calc(18px + env(safe-area-inset-top)) 18px 18px;
    background: #e7f1ff;
    border-bottom: 1px solid #d5e1f1;
}
.site-menu-drawer .site-menu-heading {
    color: #0068df;
    font-size: 18px;
    font-weight: 600;
}
.site-menu-drawer .site-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: rgba(255, 255, 255, .65);
    border: 1px solid #c8ddf7;
    border-radius: 14px;
    color: #0068df;
    cursor: pointer;
}
.site-menu-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.site-menu-drawer .site-navigation {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 14px 12px calc(20px + env(safe-area-inset-bottom));
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.site-menu-drawer .site-navigation a,
.site-menu-drawer .site-navigation button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    border-radius: 14px;
    color: #0068df;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}
.site-menu-drawer .site-navigation a:hover,
.site-menu-drawer .site-navigation button:hover,
.site-menu-drawer .site-navigation a[aria-current="page"] {
    background: #e7f1ff;
}
.site-menu-drawer .site-navigation form {
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px solid #e3e9f1;
}
.site-menu-drawer .site-navigation form button {
    color: #c82736;
}
.site-menu-drawer .site-navigation form button:hover {
    background: #f9e4e6;
}
.site-menu-drawer a:focus-visible,
.site-menu-drawer button:focus-visible {
    outline: 2px solid #087bff;
    outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
    .site-menu-drawer .site-menu-panel {
        transition: none;
    }
}

/* Narrow drawer with a compact heading */
dialog.site-menu-drawer {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}
.site-menu-drawer .site-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, calc(100% - 40px));
    margin: 0;
    background: linear-gradient(160deg, #f6f8fb, #eaf0f6);
    animation: none !important;
    transition: none !important;
}
.site-menu-drawer .site-menu-top {
    padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
}
.site-menu-drawer .site-menu-heading {
    font-size: 16px;
}
.site-menu-drawer .site-menu-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}
.site-menu-drawer .site-menu-close svg {
    width: 20px;
    height: 20px;
}
.site-menu-drawer .site-navigation {
    background: transparent;
    padding-top: 10px;
}

/* Compact drawer menu with icons */
.site-menu-drawer .site-navigation {
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
}
.site-menu-drawer .drawer-menu-list {
    flex-shrink: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce3ed;
    border-radius: 20px;
}
.site-menu-drawer .site-navigation .drawer-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 9px 12px;
    border-radius: 0;
    color: #1b1f24;
    font-size: 14px;
    font-weight: 600;
}
.site-menu-drawer .drawer-menu-list > a + a {
    border-top: 1px solid #e3e9f1;
}
.site-menu-drawer .drawer-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid;
    border-radius: 11px;
}
.site-menu-drawer .drawer-menu-icon--blue {
    color: #0879ef;
    background: #e7f1ff;
    border-color: #b8d6ff;
}
.site-menu-drawer .drawer-menu-icon--green {
    color: #28895b;
    background: #e6f6ee;
    border-color: #b9e6cf;
}
.site-menu-drawer .drawer-menu-icon--purple {
    color: #7661d9;
    background: #efebff;
    border-color: #d3c9ff;
}
.site-menu-drawer .drawer-menu-icon--red {
    color: #c82736;
    background: #f9e4e6;
    border-color: #eeb9bf;
}
.site-menu-drawer .drawer-menu-icon svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.site-menu-drawer .drawer-menu-label {
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.site-menu-drawer .drawer-menu-arrow {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    color: #8e99a8;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.site-menu-drawer .site-navigation .drawer-menu-row[aria-current="page"] {
    color: #0063cc;
    background: #edf5ff;
}
.site-menu-drawer .site-navigation .drawer-menu-logout {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce3ed;
    border-radius: 20px;
}
.site-menu-drawer .site-navigation .drawer-menu-logout button {
    color: #c82736;
}

/* Drawer without a heading bar */
.site-menu-drawer .site-menu-top {
    display: contents;
}
.site-menu-drawer .site-menu-heading {
    display: none;
}
.site-menu-drawer .site-menu-close {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: 12px;
    z-index: 2;
}
.site-menu-drawer .site-navigation {
    padding-top: calc(56px + env(safe-area-inset-top));
}

/* Stable layout for the close button */
.site-menu-drawer .site-menu-top {
    display: block;
    flex: 0 0 0;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
