#modal:has(.profile-panel){width:360px;max-width:calc(100% - 24px);max-height:calc(100dvh - 28px);padding:0;min-height:0}
#modal:has(.profile-panel) #modal-body{padding:22px 20px 15px}
.profile-identity{display:flex;align-items:center;gap:10px;padding:0 22px 13px 0;border-bottom:1px solid #eeede1}
.profile-identity>.avatar{width:38px;height:38px;font-size:16px;flex:none}
.profile-identity>div{flex:1;min-width:0}
.profile-identity h2{font-size:17px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.profile-identity div>span{font-size:10px;color:#929581}
.profile-summary{display:grid;grid-template-columns:1.15fr 1fr;gap:8px;margin:13px 0 0}
.profile-summary>button{min-width:0;padding:12px 13px 10px;border:1px solid #f0e7c7;border-radius:8px;background:#fff9df}
.profile-summary>button+button{background:#f7f8ee;border-color:#e9ecdf}
.profile-summary .profile-metric-label{font-size:12px;font-weight:550;color:#8a7c4c}
.profile-summary .profile-metric-value{margin:5px 0 0;font-size:28px;font-weight:750;line-height:1.2;letter-spacing:-.04em;color:#51482c;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.profile-summary .profile-metric-value small{font-size:14px;font-weight:550;margin-left:4px}
.profile-summary .profile-metric-value.is-unconfigured{font-size:23px;line-height:1.46;color:#7d856b}
.profile-summary .profile-metric-caption{font-size:10px;line-height:1.4;margin:6px 0 0;color:#a09676}
.profile-summary>button+button .profile-metric-label,.profile-summary>button+button .profile-metric-caption{color:#929c7d}
.profile-today{display:flex;align-items:center;gap:5px;font-size:11px;color:#929981;margin:10px 0}
.profile-today strong{font-size:11px;font-weight:600;color:#77835e}
.profile-today>span{margin-left:auto;font-size:9px;color:#a0a58f}
.profile-sync{font-size:10px;color:#9ca28b;margin:7px 0}
.profile-sync.is-error{color:#a28245}
.profile-sync button{font-size:10px;padding:0;color:inherit;text-decoration:underline}
.profile-progress{padding:10px 11px;background:#f8f8ee;border-radius:6px;font-size:11px}
.profile-progress>div{display:flex;justify-content:space-between;color:#778063}
.profile-progress strong{color:#6b764f;font-size:12px}
.profile-progress progress{display:block;appearance:none;width:100%;height:5px;border:0;border-radius:6px;overflow:hidden;margin:8px 0 5px;background:#e8e9da;accent-color:#d1ac31}
.profile-progress progress::-webkit-progress-bar{background:#e8e9da}
.profile-progress progress::-webkit-progress-value{background:#d1ac31}
.profile-progress>p{font-size:10px;margin:5px 0 0;color:#969b85}
.profile-menu{display:grid;grid-template-columns:1fr 1fr;gap:0 12px;margin-top:10px}
.profile-menu>button,.profile-menu>a{display:flex;align-items:center;gap:7px;min-height:39px;padding:5px 0;border-bottom:1px solid #eeeee5;text-align:left;font-size:12px;color:#646f50}
.profile-menu svg,.profile-footer svg{width:15px;height:15px}
.profile-menu small{margin-left:auto;font-size:11px;color:#9a9e88}
.profile-footer{display:flex;align-items:center;justify-content:space-between;margin-top:9px}
.profile-footer button{display:flex;align-items:center;gap:6px;padding:6px 0;font-size:11px;color:#959a84}
.profile-status{font-size:12px;line-height:1.65;color:#919780;margin:12px 0}
.profile-panel>h2{font-size:19px;margin:0 25px 10px 0}
.profile-ledger article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #eeeede}
.profile-ledger article>div{min-width:0}
.profile-ledger strong{display:block;font-size:12px;font-weight:550;overflow-wrap:anywhere}
.profile-ledger small{display:block;font-size:10px;color:#9da28a;margin-top:4px}
.profile-ledger b{font-size:13px;flex:none;color:#858675}
.profile-ledger b.is-credit{color:#92751b}
@media(max-width:760px){#modal:has(.profile-panel) #modal-body{padding:20px 18px 14px}.profile-identity h2{font-size:17px}.profile-menu>button,.profile-menu>a{font-size:13px;min-height:41px}}

.profile-summary>button{position:relative;display:block;text-align:left;cursor:pointer;transition:border-color .15s,background-color .15s}
.profile-metric-label,.profile-metric-value,.profile-metric-caption{display:block}
.profile-summary>button:hover{border-color:#d5be6b;background:#fff3c5}
.profile-summary>button:focus-visible{outline:2px solid #b49130;outline-offset:2px}
.profile-summary>button>svg{position:absolute;top:12px;right:8px;width:10px;height:10px;color:#b4aa82}
.profile-back{display:block;padding:0;min-height:24px;margin:0 0 7px;font-size:11px;color:#8c957c}
.profile-detail-value{padding:14px 13px;background:#fff8dc;border:1px solid #f1e5b7;border-radius:8px;margin:10px 0 12px}
.profile-detail-value>span{display:block;font-size:12px;color:#9b8b50}
.profile-detail-value>strong{display:block;font-size:29px;line-height:1.3;margin-top:4px;font-weight:750;color:#5d502b;font-variant-numeric:tabular-nums}
.profile-detail-value strong small{font-size:15px;margin-left:4px;font-weight:500}
.profile-point-totals{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 17px}
.profile-point-totals>div{padding:8px 10px;border-radius:6px;background:#f7f8ef}
.profile-point-totals span{display:block;font-size:11px;color:#939d7d}
.profile-point-totals strong{display:block;font-size:17px;margin-top:4px;color:#667549;font-variant-numeric:tabular-nums}
.profile-detail-heading{font-size:12px;font-weight:600;margin:15px 0 0;color:#7b8569}
.profile-panel>h2>small{font-size:14px;margin-left:8px;color:#a88b32}

.profile-community-total{display:flex;justify-content:space-between;gap:10px;padding:9px 0 2px;font-size:11px;color:#9aa384}
.profile-community-total strong{font-size:12px;color:#7c895e}
.profile-level-basis{font-size:11px;color:#9ca684;margin:0 0 10px}

.member-level-icon{display:inline-block;object-fit:contain;image-rendering:pixelated;vertical-align:middle;flex-shrink:0}.member-level-icon-slot[hidden]{display:none}.profile-metric-value .member-level-icon{width:24px;height:24px;margin-right:5px;vertical-align:-2px}.profile-panel h2 .member-level-icon{width:20px;height:20px;margin-right:4px;vertical-align:-3px}.comment-name .member-level-icon{width:14px;height:14px;margin-right:3px;vertical-align:-2px}

.profile-identity>.profile-rank,.profile-level-heading>.profile-rank{display:flex;flex:none;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:62px;min-width:62px}.profile-rank>.member-level-icon{width:48px;height:48px;object-fit:contain;image-rendering:pixelated}.profile-rank>span{font-size:9px!important;line-height:1.25;color:#8d815a!important;white-space:nowrap}.profile-level-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-right:20px;margin-bottom:10px}.profile-level-heading>h2{margin:0;font-size:19px;line-height:1.5}.profile-level-heading>h2>small{display:block;margin-top:2px;font-size:13px;font-weight:600;color:#9d8b47}.comments-section .comment-header .comment-name{display:flex;align-items:center;gap:4px;max-width:72%;min-width:0}.comment-name>.member-level-icon{width:20px;height:20px;margin:0;vertical-align:middle}.comment-name>.comment-nickname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-name>.comment-level{flex:none;font-size:9px;font-weight:500;color:#a49b7c;white-space:nowrap}

.author-identity{display:inline-flex;align-items:center;gap:4px;min-width:0}.author-identity>.member-level-icon{width:20px;height:20px;flex:none}.author-identity>.comment-nickname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.author-identity>.comment-level{font-size:10px;font-weight:500;color:#a49b7c;white-space:nowrap}.home-community-author:has(.official-account-badge){display:flex;align-items:center;justify-content:flex-end;gap:3px}.home-community-author>.official-account-badge{width:18px;height:18px;flex:none}.home-community-author>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Keep at least999,999P readable as one amount at360px without reducing the28px type. */
.profile-summary{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)}
.profile-summary>.profile-metric-value{min-width:0}
.profile-summary .profile-metric-value.is-money{display:inline-flex;align-items:baseline;gap:3px;white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none}
.profile-summary .profile-metric-value.is-money>small{flex:none;margin-left:0}
.profile-summary.has-wide-balance{grid-template-columns:minmax(0,1fr)}
.profile-detail-value>strong{white-space:nowrap;overflow-wrap:normal}

.profile-menu>a[data-operator-navigation]>span{flex:1}.profile-menu>a[data-operator-navigation]>small{white-space:nowrap;font-size:10px}

/* Badges sit immediately before the nickname, within the existing author grid. */
.home-community-row .home-community-author:has(>.member-level-icon){display:flex;align-items:center;justify-content:flex-end;gap:3px}
.home-community-row .home-community-author>.member-level-icon{width:15px;height:15px;flex:none;margin:0;object-fit:contain}
.home-community-row .home-community-author>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.comments-section .comment-name>.member-level-icon,.author-identity>.member-level-icon{width:17px;height:17px;flex:none;margin:0}
