body.tm-market-page .tm-market-top-user { cursor: pointer; }
body.tm-market-page .tm-profile-dialog[hidden] { display: none !important; }
body.tm-market-page .tm-profile-dialog {
    position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
    padding: 10px; background: rgba(20, 25, 35, .54);
}
body.tm-market-page .tm-profile-panel {
    display: flex; flex-direction: column; width: min(750px, 100%); height: min(666px, calc(100vh - 20px));
    background: #fff; border-radius: 12px; overflow: hidden; color: #161d28; box-shadow: 0 16px 55px #12192335;
}
body.tm-market-page .tm-profile-panel > header { height: 56px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 17px; }
body.tm-market-page .tm-profile-panel h2 { margin: 0; font-size: 18px; font-weight: 400; }
body.tm-market-page #tm-profile-close { width: 31px; height: 31px; border: 0; background: transparent; color: #a5abb4; font-size: 24px; line-height: 1; cursor: pointer; }
body.tm-market-page .tm-profile-layout { display: grid; grid-template-columns: 195px minmax(0, 1fr); gap: 20px; flex: 1; min-height: 0; padding: 7px 16px 16px; }
body.tm-market-page .tm-profile-menu { overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 1px; }
body.tm-market-page .tm-profile-menu button,
body.tm-market-page .tm-profile-menu a {
    flex: 0 0 47px; display: flex; align-items: center; justify-content: flex-start;
    padding: 0 36px; border: 0; border-radius: 22px; color: #1d2330; background: #fff;
    text-decoration: none; font-size: 14px; white-space: nowrap; cursor: pointer;
}
body.tm-market-page .tm-profile-menu button.is-active { background: #0563f4; color: #fff; }
body.tm-market-page .tm-profile-content { min-width: 0; min-height: 0; padding: 8px 8px 0 0; background: #fff; border-radius: 10px; box-shadow: 0 0 16px #d5e0eb48; }
body.tm-market-page .tm-profile-account { display: flex; flex-direction: column; height: 100%; padding: 0 12px; }
body.tm-market-page .tm-profile-wallet { min-height: 102px; padding: 12px 10px; border-radius: 12px; box-shadow: 0 0 20px #dee6ef41; }
body.tm-market-page .tm-profile-wallet > strong { display: block; font-size: 19px; color: #5e6571; }
body.tm-market-page .tm-profile-wallet > div { display: grid; grid-template-columns: 1fr 1fr; margin-top: 15px; }
body.tm-market-page .tm-profile-wallet span { display: flex; flex-direction: column; gap: 5px; }
body.tm-market-page .tm-profile-wallet small { font-size: 12px; color: #aeb4bd; }
body.tm-market-page .tm-profile-wallet b { font-size: 14px; font-weight: 400; color: #0966fa; }
body.tm-market-page .tm-profile-wallet span + span b { color: #242a34; }
body.tm-market-page .tm-profile-account h3 { margin: 17px 9px 10px; font-weight: 400; font-size: 14px; }
body.tm-market-page .tm-profile-records { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px 0 16px; scrollbar-width: thin; }
body.tm-market-page .tm-profile-record { padding: 10px 0 14px; font-size: 12px; border-bottom: 1px solid #f0f1f5; }
body.tm-market-page .tm-profile-record:last-child { border-bottom: 0; padding-bottom: 6px; }
body.tm-market-page .tm-profile-record > div { display: flex; justify-content: space-between; gap: 15px; margin: 0 0 8px; }
body.tm-market-page .tm-profile-record em { flex: none; color: #b2b7bf; font-style: normal; }
body.tm-market-page .tm-profile-record span { flex: 1; text-align: right; overflow-wrap: anywhere; }
body.tm-market-page .tm-profile-record .tm-profile-amount { text-align: left; color: #252a34; }
body.tm-market-page .tm-profile-record .tm-profile-time { text-align: left; }
body.tm-market-page .tm-profile-more { align-self: center; margin: 5px; padding: 6px 12px; background: #fff; border: 1px solid #c5d7f9; border-radius: 12px; color: #0966fa; cursor: pointer; }
body.tm-market-page .tm-profile-more[hidden] { display: none; }
body.tm-market-page .tm-profile-state { padding: 45px 10px; text-align: center; color: #a1a8b2; font-size: 14px; }
body.tm-market-page #tm-profile-frame { width: 100%; height: 100%; border: 0; }
body.tm-market-page #tm-profile-frame[hidden], body.tm-market-page #tm-profile-account[hidden] { display: none !important; }

/* 退出登录确认层（盖过 z-index:1000 的个人中心弹窗） */
body.tm-market-page .tm-profile-signout { position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center; background: rgba(20, 25, 35, .45); }
body.tm-market-page .tm-profile-signout[hidden] { display: none !important; }
body.tm-market-page .tm-profile-signout-panel { width: 320px; padding: 22px 22px 18px; background: #fff; border-radius: 12px; box-shadow: 0 16px 55px #12192340; text-align: center; }
body.tm-market-page .tm-profile-signout-panel h4 { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: #161d28; }
body.tm-market-page .tm-profile-signout-panel p { margin: 0 0 18px; font-size: 13px; color: #6b7280; }
body.tm-market-page .tm-profile-signout-actions { display: flex; gap: 10px; }
body.tm-market-page .tm-profile-signout-actions button { flex: 1; height: 38px; border-radius: 19px; font-size: 14px; cursor: pointer; }
body.tm-market-page .tm-profile-signout-cancel { border: 1px solid #d9dde3; background: #fff; color: #404b60; }
body.tm-market-page .tm-profile-signout-ok { border: 0; background: #0563f4; color: #fff; }
body.tm-market-page .tm-profile-signout-ok:hover { background: #0458dd; }
@media (max-width: 700px) {
    body.tm-market-page .tm-profile-dialog { display: none !important; }
}
