.account-page { width: min(1220px, calc(100% - 2 * clamp(22px, 5vw, 86px))); margin: auto; padding: clamp(26px, 5vh, 66px) 0 60px; }
.account-page h1 { color: #fff8ea; font: 400 clamp(44px, 7vw, 100px)/1 'Instrument Serif', 'Songti SC', Georgia, serif; margin: 0; text-wrap: balance; }
.account-page h2 { margin: 25px 0 10px; font-size: clamp(21px, 3vw, 30px); line-height: 1.25; }
.account-name { margin: 9px 0 0; color: var(--gold); overflow-wrap: anywhere; }
.account-actions, .account-guest { display: flex; gap: 10px; align-items: center; }
.account-guest { flex-wrap: wrap; }
.account-notice { margin: 14px 0; color: #ffdab1; }
.account-outline { display: inline-flex; align-items: center; min-height: 39px; padding: 7px 13px; border: 1px solid var(--edge); border-radius: 7px; background: #101e2be0; }
.account-outline:hover { border-color: var(--gold); color: var(--gold); }
.account-summary, .account-card { min-width: 0; border: 1px solid var(--edge); border-radius: 12px; background: #0c1a29e8; backdrop-filter: blur(12px); }
.account-summary { display: grid; grid-template-columns: 1fr 1fr auto; gap: 22px; padding: clamp(16px, 4vw, 29px); margin: 24px 0; }
.account-summary span, .account-topup p, .account-list time, .account-list small { color: var(--muted); }
.account-summary strong { display: block; font: 400 clamp(27px, 4vw, 45px)/1.2 'Instrument Serif', 'Songti SC', Georgia, serif; }
.account-topup p { margin: 4px 0 0; font-size: 13px; }
.account-card { padding: 14px 16px; }
.account-card h2, .account-card h3 { color: #fff4e2; margin: 0 0 7px; font-size: 17px; }
.account-card h3 a:hover, .account-list a:hover { color: var(--gold); text-decoration: underline; }
.account-list { margin: 0; padding: 0; list-style: none; max-block-size: 330px; overflow: auto; scrollbar-width: thin; }
.account-list li { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid #e8e0d318; }
.account-list a, .account-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.account-list time { white-space: nowrap; font-size: 12px; }
.account-list small { display: block; }
.account-list .empty { color: var(--muted); }
.account-value { text-align: end; color: var(--gold); flex-shrink: 0; }
.account-tokens { margin-top: 18px; padding: clamp(16px, 4vw, 26px); scroll-margin-block-start: 12px; }
.token-header, .token-reveal > div { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.token-header p, .token-reveal p { color: var(--muted); margin: 0; }
.token-header .account-outline { flex-shrink: 0; }
.token-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 10px; align-items: end; max-width: 680px; margin: 17px 0; }
.token-form input, .token-form select, .token-form button, .token-reveal input { min-height: 44px; }
.token-form select, .token-reveal input { padding: 8px 11px; border: 1px solid var(--edge); border-radius: 7px; background: #0d1b28ec; }
.token-reveal { padding: 12px; border: 1px solid #f7ca8c72; border-radius: 8px; margin-block: 10px; }
.token-reveal p { margin-bottom: 8px; }
.token-reveal input { flex: 1 1 230px; min-width: 0; font-family: ui-monospace, monospace; }
.token-notice { color: var(--gold); margin: 8px 0; }
.token-notice:empty { display: none; }
.invite-summary { color: var(--muted); margin: 14px 0 4px; }
.token-list-name { display: block; }
.token-list-meta { color: var(--muted); font-size: 12px; }
.account-tokens .account-outline:disabled { opacity: .55; cursor: default; }
.admin-layout { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.admin-detail { display: grid; gap: 12px; min-width: 0; }
.admin-form { display: grid; gap: 4px; margin-block: 11px; }
.admin-form > div { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-form input { width: min(100%, 220px); padding: 7px 10px; border: 1px solid var(--edge); border-radius: 7px; background: #101e2b; }
.admin-pagination { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 10px; }
.admin-pagination button:disabled, .admin-detail button:disabled { opacity: .5; }
.admin-user { border: 0; background: none; padding: 0; text-align: start; overflow-wrap: anywhere; min-width: 0; }
.admin-user:hover, .admin-user[aria-pressed='true'] { color: var(--gold); }
.admin-works h3 { margin-top: 12px; }

:root:has(.account-dashboard) { scrollbar-gutter: stable; }
.profile-nav, .account-dashboard {
    width: min(1080px, calc(100% - 2 * clamp(16px, 5vw, 70px)));
    margin-inline: auto;
}
.profile-nav { padding-inline: 0; }
.profile-nav .account-actions { flex-wrap: wrap; max-inline-size: 100%; }
.account-dashboard { padding: clamp(20px, 4vh, 44px) 0 56px; }
.account-dashboard h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.08; }
.account-dashboard .account-notice:empty { display: none; }
.profile-tabs, .profile-subtabs, .profile-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.profile-tabs {
    gap: 4px 12px;
    margin: clamp(20px, 4vw, 32px) 0 16px;
    padding-inline: 4px;
    border-block-end: 1px solid var(--edge);
    border-radius: 10px 10px 0 0;
    background: #0c1a29f5;
}
.profile-tabs button, .profile-subtabs button {
    min-inline-size: 0;
    max-inline-size: 100%;
    padding: 8px 13px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.profile-tabs button {
    min-block-size: 48px;
    border: 0;
    border-block-end: 2px solid transparent;
}
.profile-tabs button[aria-selected="true"] { color: var(--gold); border-block-end-color: var(--gold); }
.profile-tabs button:hover, .profile-subtabs button:hover { color: #fff4e2; }
.profile-controls { justify-content: space-between; gap: 12px; margin-block-end: 14px; }
.profile-controls > a { margin-inline-start: auto; color: var(--gold); }
.profile-subtabs {
    width: fit-content;
    max-inline-size: 100%;
    gap: 3px;
    padding: 3px;
    border: 1px solid #e8e0d326;
    border-radius: 9px;
    background: #091522;
}
.profile-subtabs button { min-block-size: 40px; border: 1px solid transparent; border-radius: 6px; }
.profile-subtabs button[aria-selected="true"] { border-color: #f7ca8c65; background: #f7ca8c18; color: #ffe2b8; }
.profile-card, .account-dashboard .account-summary { padding: clamp(14px, 2.5vw, 24px); }
.profile-card > .profile-subtabs { margin-block-end: 14px; }
.account-dashboard .account-summary { margin: 0 0 14px; align-items: center; }
.account-dashboard .account-summary > div { min-width: 0; overflow-wrap: anywhere; }
.account-dashboard .account-tokens { margin-block-start: 0; }
.profile-records {
    --record-columns: minmax(0, 1fr) max-content;
    display: grid;
    grid-template-columns: var(--record-columns);
    column-gap: clamp(12px, 3vw, 30px);
    max-block-size: none;
    overflow: visible;
}
.profile-transactions { --record-columns: minmax(0, 1fr) minmax(9rem, .42fr) minmax(4rem, max-content); }
.profile-records > li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: var(--record-columns);
    grid-template-columns: subgrid;
    column-gap: normal;
    row-gap: 3px;
    align-items: start;
    padding: 12px 0;
}
.profile-movable { --record-columns: minmax(0, 1fr) max-content max-content; align-items: center; }
.profile-movable .profile-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.profile-movable .profile-move { min-height: 30px; padding: 3px 10px; font-size: 12px; }
.profile-movable .profile-move:disabled { opacity: .55; cursor: default; }
.profile-records > li.profile-trash { display: block; padding-block: 22px 6px; border-top-style: dashed; color: var(--muted); font-size: 13px; }
.profile-records > li:last-child { padding-block-end: 0; }
.profile-records > li.empty { display: block; padding-block: 16px 5px; }
.profile-records > li > a, .profile-detail { font-weight: 600; }
.profile-detail small { margin-block-start: 2px; font-weight: 400; }
.profile-timestamp, .profile-records .account-value { font-variant-numeric: tabular-nums; }
.profile-records .profile-timestamp { display: grid; gap: 2px; line-height: 1.45; }
.profile-records:not(.profile-transactions) .profile-timestamp { text-align: end; }
.profile-records .account-value { justify-self: end; white-space: nowrap; font-weight: 600; }

@media (min-width: 680px) {
    .profile-tabs { position: sticky; inset-block-start: 0; z-index: 1; }
}
@media (max-width: 620px) {
    .account-summary { grid-template-columns: 1fr 1fr; }
    .account-topup { grid-column: 1 / -1; }
    .account-actions { gap: 6px; }
    .account-actions select { max-width: 104px; }
    .account-list time { white-space: normal; }
    .token-form { grid-template-columns: minmax(0, 1fr) auto; }
    .token-form button { grid-column: 1 / -1; justify-self: start; }
    .admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .profile-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        gap: 2px;
    }
    .profile-tabs button { padding-inline: 5px; }
    .profile-subtabs { gap: 2px; }
    .profile-subtabs button { padding-inline: 10px; }
    .profile-transactions { --record-columns: minmax(0, 1fr) max-content; }
    .profile-transactions .profile-detail { grid-column: 1; grid-row: 1 / span 2; }
    .profile-transactions .account-value { grid-column: 2; grid-row: 1; }
    .profile-transactions time { grid-column: 2; grid-row: 2; text-align: end; }
}
@media (forced-colors: active) {
    .profile-tabs button[aria-selected="true"], .profile-subtabs button[aria-selected="true"] { border-color: Highlight; }
}
/* 设置：玩法模式（三选一，一行一种：名字 + 一句说明） */
.play-modes { border: 0; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.play-modes legend { padding: 0; margin-block-end: 10px; color: var(--muted); }
.play-modes label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); border-radius: 12px; cursor: pointer; }
.play-modes label:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.play-modes input { margin-block-start: 4px; accent-color: var(--gold); }
.play-modes span { display: grid; gap: 3px; }
.play-modes small { color: var(--muted); font-size: .92em; }
