/* 首页右下角导航：低调的白色半透明图标与无边框选项面板。 */
.site-switcher {
    position: fixed;
    /* 按可见线条校正底边，较原位置上移 5px、右移 10px。 */
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    font-family: inherit;
    text-align: left;
}

.site-switcher__toggle {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.site-switcher__toggle img {
    display: block;
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.site-switcher__toggle:hover img,
.site-switcher__toggle[aria-expanded="true"] img {
    opacity: 0.75;
}

/* 按图标与文字的可见底边对齐，面板向上展开并适配手机安全区域。 */
.site-switcher__panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    box-sizing: border-box;
    width: min(208px, calc(100vw - 48px));
    max-height: calc(100vh - 81px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    color: #26342e;
}

.site-switcher__panel[hidden] {
    display: none;
}

.site-switcher__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 48px;
    padding: 12px;
    border-radius: 3px;
    color: #26342e;
    font-size: 15px;
    line-height: 24px;
    text-decoration: none;
}

.site-switcher__link:hover,
.site-switcher__link:focus-visible {
    background: #e9eeeb;
    color: #16271d;
    text-decoration: none;
}

.site-switcher__link span[aria-hidden] {
    color: #7c8981;
}

.site-switcher__toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.site-switcher__link:focus-visible {
    outline: 2px solid #3e6650;
    outline-offset: -2px;
}
