/* Shared CN account presentation; scoped to preserve each page body. */
.home-account-modal, .home-account-menu { font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; font-size: 16px; line-height: 1.5; }
.home-account-modal, .home-account-modal *, .home-account-menu, .home-account-menu * { box-sizing: border-box; }
.home-account-panel a { color: inherit; text-decoration: none; }
.home-account-panel form { margin: 0; padding: 0; }
.home-account-panel h2 { font-weight: 700; line-height: 1.5; }
.account-entry-page { max-width: 600px; margin: 64px auto; padding: 24px; text-align: center; }
.account-entry-page button { margin: 12px 6px; padding: 12px 20px; border: 0; border-radius: 7px; color: #fff; background: #1d1d1f; cursor: pointer; font: inherit; }
/* Homepage account dialog; the shared visitor API retains account ownership. */
body.home-account-open { overflow: hidden; }
#usercontainer { position: relative; }
#home-account-menu[hidden], #login-modal[hidden], #login-modal [hidden] { display: none !important; }
.home-account-menu { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); z-index: 10; min-width: 230px; padding: 12px; border-radius: 12px; background: #fff; color: #1d1d1f; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.home-account-menu a, .home-account-menu button, .home-account-menu span { display: block; padding: 15px 8px; width: 100%; text-align: left; overflow-wrap: anywhere; font-size: 0.875rem; }
.home-account-menu button { border: 0; background: transparent; cursor: pointer; }
.home-account-menu > :not(:first-child) { border-top: 1px solid #e5e5e5; }
.home-account-menu > a, .home-account-menu > button, .home-account-menu > span { border-radius: 6px; color: inherit; transition: background-color .15s ease, color .15s ease; }
.home-account-menu > a:hover, .home-account-menu > button:hover, .home-account-menu > span:hover, .home-account-menu > a:focus-visible, .home-account-menu > button:focus-visible { background: #f0f4ff; color: #0071e3; }
.home-account-menu > a:focus-visible, .home-account-menu > button:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.home-account-menu #useraccount { display: inline; padding: 0; width: auto; }
.home-account-menu-icon { width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-account-menu .home-account-unavailable { color: #6e6e73; cursor: default; }
.home-account-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; background: rgba(0,0,0,.48); color: #1d1d1f; }
.home-account-panel { position: relative; width: min(100%, 440px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 34px; border-radius: 18px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.2); }
.home-account-panel h2 { margin: 0 0 10px; font-size: 26px; }
.home-account-intro, .home-account-legal { color: #666; font-size: 13px; line-height: 1.7; }
.home-account-intro { margin: 0 0 22px; }
.home-account-panel form > label { display: block; margin: 15px 0 7px; font-size: 14px; }
.home-account-panel input:not([type=checkbox]) { width: 100%; min-width: 0; height: 44px; padding: 10px 12px; border: 1px solid #ccc; border-radius: 7px; background: #fff; font: inherit; font-size: 0.875rem; }
.home-account-mobile .home-account-panel input:not([type=checkbox]) { font-size: 16px; }
.home-account-panel input:focus-visible, .home-account-panel button:focus-visible, .home-account-panel a:focus-visible { outline: 2px solid #1d1d1f; outline-offset: 3px; }
.home-account-panel button { cursor: pointer; font: inherit; font-size: 0.875rem; }
.home-account-panel button:disabled { opacity: .55; cursor: wait; }
.home-account-panel .home-account-close { position: absolute; right: 14px; top: 10px; width: 36px; height: 36px; border: 0; background: transparent; font-size: 28px; }
.home-account-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; font-size: 13px; }
.home-account-options label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.home-account-submit { width: 100%; min-height: 44px; margin-top: 20px; border: 0; border-radius: 7px; background: #1d1d1f; color: #fff; }
.home-account-switch { display: block; width: 100%; margin-top: 12px; padding: 8px; border: 1px solid #ccc; border-radius: 7px; background: #fff; }
.home-account-bottom { margin: 20px 0 0; text-align: center; font-size: 14px; }
.home-account-bottom button { border: 0; background: transparent; text-decoration: underline; }
.home-account-legal { margin: 20px 0 0; text-align: center; }
.home-account-legal a, .home-account-options a { text-decoration: underline; }
.home-account-alert { padding: 10px 12px; border-radius: 7px; background: #fff1ed; color: #9c3527; font-size: 0.8rem; line-height: 1.5; }
.home-account-code { display: flex; gap: 8px; }
.home-account-code button { flex: 0 0 116px; border: 1px solid #ccc; border-radius: 7px; background: #fff; font-size: 13px; }
.home-account-wechat-code { display: flex; justify-content: center; min-height: 100px; }
.home-account-wechat-code iframe { width: 300px; max-width: 100%; height: 240px; border: 0; }
.home-account-wechat-loader { position: relative; min-height: 240px; }
.home-account-wechat-loading .home-account-wechat-code { visibility: hidden; min-height: 240px; }
.home-account-wechat-progress { position: absolute; top: calc(50% - 2px); left: 50%; width: 180px; height: 4px; transform: translateX(-50%); overflow: hidden; border-radius: 4px; background: #e5e5e5; }
.home-account-wechat-progress span { display: block; width: 40%; height: 100%; border-radius: inherit; background: #0071e3; animation: home-account-wechat-progress 1.2s ease-in-out infinite; }
@keyframes home-account-wechat-progress { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
@media (prefers-reduced-motion: reduce) { .home-account-wechat-progress span { animation: none; width: 100%; } }
#refresh-wechat-code { padding: 0; border: 0; color: #0071e3; background: transparent; font-size: 0.8rem; }
@media (max-width: 760px) {
    .home-account-page .header-actions { margin-right: 44px; }
    .home-account-page .header-icon-list { display: flex; }
    .home-account-page .header-icon-list > li:not(#usercontainer) { display: none; }
    .home-account-menu { transform: translateX(calc(18px - 100%)); }
    .home-account-panel { padding: 28px 22px; }
}
