#account-panel{margin-bottom:1rem}
#account-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
#account-form [hidden],[hidden]{display:none!important}
#account-form p{grid-column:1/-1}
#account-form button{align-self:end}
select{font:inherit;padding:.65rem;min-height:44px;max-width:100%;border-radius:10px}
details{margin-top:1rem}
summary{cursor:pointer;min-height:44px;padding:.6rem 0}
details form{max-width:460px}
.profile-line{display:flex;align-items:center;gap:1rem}
.profile-line img,#avatar-preview-image{object-fit:cover;border-radius:16px}
#avatar-preview-image{max-width:100%;height:auto;margin:1rem 0}
#recovery-receipt{padding:1rem;background:#fff3ce;color:#292514;border-radius:12px}
#recovery-code{overflow-wrap:anywhere;user-select:all}
.rank-tabs{display:flex;gap:8px;margin:14px 0}
.rank-tab{min-width:88px}
.rank-tab:not(.is-active){background:transparent;color:var(--green);border-color:#9aaca1}
#rank-list{margin:0;padding:0}
.rank-entry{display:grid;grid-template-columns:2rem 44px minmax(0,1fr);align-items:center;gap:10px;min-height:64px;padding:.6rem 0;border-bottom:1px solid #ddd}
.rank-position{text-align:center;font-weight:900;font-variant-numeric:tabular-nums}
.rank-avatar{display:grid;width:44px;height:44px;place-items:center;border-radius:50%;background:#eadfca;color:#163f36;object-fit:cover;font-weight:800}
.rank-copy{display:flex;min-width:0;align-items:baseline;justify-content:space-between;gap:8px 16px}
.rank-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-stats{opacity:.82;font-variant-numeric:tabular-nums;white-space:nowrap}
.seat-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover}
.playing-online #account-panel{display:none}
@media(max-width:600px){#account-form{grid-template-columns:1fr}.rank-copy{display:grid;gap:2px}.rank-stats{white-space:normal}}

.history-toolbar,.history-game-heading,.history-hand-heading,.history-scores>div{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.history-game{border:1px solid #ddcfb9;border-radius:14px;padding:16px;margin:16px 0;background:#fffdf8;overflow-wrap:anywhere}.history-game h3,.history-game p{margin:8px 0}.history-game-heading>span{font-size:14px;color:#665942}.history-game details{margin-top:8px}.history-game summary{padding:12px 0;min-height:44px}.history-points strong{font-size:22px;color:#174c40}.history-hands{list-style:none;margin:12px 0 0;padding:0}.history-hands>li{border-top:1px solid #ded4c3;padding:14px 0}.history-hands details{padding:0 12px;background:#f6efdf;border-radius:8px}.history-scores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px 0}.history-scores>div{padding:8px;background:#f3f0e8;border-radius:8px}.history-scores b{white-space:nowrap}.history-toolbar p{flex:1;margin:8px 0}#history-more{min-height:44px}@media(max-width:600px){.history-scores{grid-template-columns:1fr}.history-game{padding:12px}.history-game-heading h3{width:100%}}

.voice-preset-picker{border-bottom:1px solid #d7cdb8;padding:8px 0 18px;margin:0 0 18px}.voice-preset-picker h3{margin:0 0 6px}.voice-preset-picker select{width:100%;margin-top:6px}.voice-preset-picker .actions{margin:10px 0 0}.voice-preset-picker p{margin:6px 0}

/* 保留全身角色比例，避免帳號縮圖被固定寬高拉扁。 */
#account-avatar{display:block;width:auto;height:auto;max-width:72px;max-height:108px;object-fit:contain;flex-shrink:0}
