:root {
  color-scheme: light;
  --ink: #171a19;
  --ink-soft: #29322f;
  --muted: #77827f;
  --line: rgba(24, 37, 33, .11);
  --line-strong: rgba(24, 37, 33, .18);
  --canvas: #f4f7f5;
  --sidebar: rgba(247, 250, 248, .45);
  --paper: rgba(255, 255, 255, .88);
  --paper-solid: #fff;
  --topbar: rgba(248, 250, 249, .82);
  --accent: #10a77f;
  --accent-strong: #078260;
  --accent-soft: #ddf5ec;
  --blue: #5d7cf2;
  --blue-soft: #e8edff;
  --coral: #e97663;
  --coral-soft: #ffebe6;
  --danger: #c94b59;
  --hero: #15221f;
  --hero-ink: #f1fff8;
  --shadow: 0 18px 45px rgba(29, 64, 54, .08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f7f6;
  --ink-soft: #d9e2de;
  --muted: #98a7a1;
  --line: rgba(233, 245, 239, .12);
  --line-strong: rgba(233, 245, 239, .2);
  --canvas: #0d1210;
  --sidebar: rgba(16, 22, 19, .55);
  --paper: rgba(24, 31, 28, .92);
  --paper-solid: #181f1c;
  --topbar: rgba(16, 22, 19, .82);
  --accent: #62e0b5;
  --accent-strong: #82ecc7;
  --accent-soft: #183d32;
  --blue: #8ca2ff;
  --blue-soft: #202a52;
  --coral: #ff9b86;
  --coral-soft: #4a2923;
  --danger: #ff8894;
  --hero: #10251e;
  --hero-ink: #f1fff8;
  --shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { color-scheme: dark; --ink: #f5f7f6; --ink-soft: #d9e2de; --muted: #98a7a1; --line: rgba(233,245,239,.12); --line-strong: rgba(233,245,239,.2); --canvas: #0d1210; --sidebar: rgba(16,22,19,.55); --paper: rgba(24,31,28,.92); --paper-solid: #181f1c; --topbar: rgba(16,22,19,.82); --accent: #62e0b5; --accent-strong: #82ecc7; --accent-soft: #183d32; --blue: #8ca2ff; --blue-soft: #202a52; --coral: #ff9b86; --coral-soft: #4a2923; --danger: #ff8894; --hero: #10251e; --hero-ink: #f1fff8; --shadow: 0 20px 50px rgba(0,0,0,.2); }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button { border: 0; font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.account-topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 68px; align-items: center; justify-content: space-between; gap: 18px; padding: 0 max(22px, calc((100vw - 1440px) / 2)); background: var(--topbar); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.account-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 760; }
.account-brand em { margin-left: 3px; padding-left: 12px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-style: normal; font-weight: 560; }
.brand-mark { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: var(--ink); color: var(--canvas); font-size: 13px; box-shadow: 0 5px 12px rgba(20, 42, 34, .14); }
.topbar-actions { display: flex; align-items: center; gap: 18px; min-width: 0; }
#accountIdentity { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-strong); font-size: 12px; font-weight: 680; white-space: nowrap; transition: color .18s, transform .18s; }
.topbar-link:hover { color: var(--ink); transform: translateY(-1px); }

.account-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); max-width: 1440px; min-height: calc(100vh - 68px); margin: 0 auto; }
.account-sidebar { position: sticky; top: 68px; display: flex; height: calc(100vh - 68px); flex-direction: column; padding: 30px 16px 22px; border-right: 1px solid var(--line); background: var(--sidebar); }
.profile-card { display: flex; align-items: center; gap: 11px; min-width: 0; margin: 0 7px 32px; }
.profile-avatar { position: relative; display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(16, 167, 127, .35); border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; font-weight: 800; text-transform: uppercase; }
.profile-copy { display: grid; min-width: 0; gap: 3px; }
.profile-card strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.profile-card > .profile-copy span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.account-sidebar nav { display: grid; gap: 5px; }
.account-sidebar nav button { position: relative; display: flex; width: 100%; min-height: 42px; align-items: center; gap: 11px; padding: 0 12px; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; transition: background .2s, color .2s, transform .2s; }
.account-sidebar nav button:hover { background: rgba(16, 167, 127, .07); color: var(--ink); transform: translateX(2px); }
.account-sidebar nav button.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 740; }
.account-sidebar nav button::before { position: absolute; left: -16px; width: 3px; height: 20px; border-radius: 0 4px 4px 0; background: var(--accent); content: ""; opacity: 0; transform: scaleY(.5); transition: opacity .2s, transform .24s cubic-bezier(.2,.8,.2,1); }
.account-sidebar nav button.is-active::before { opacity: 1; transform: scaleY(1); }
.nav-icon { display: inline-grid; width: 19px; place-items: center; color: currentColor; font-size: 16px; font-weight: 650; line-height: 1; }
.sidebar-admin { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 15px 11px 3px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 680; transition: color .18s; }
.sidebar-admin > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.sidebar-admin:hover { color: var(--accent-strong); }

.account-content { min-width: 0; max-width: 1180px; padding: 42px 52px 84px; }
.content-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.eyebrow, .hero-kicker, .section-kicker { margin: 0 0 8px; color: var(--accent-strong); font-size: 10px; font-weight: 780; letter-spacing: .14em; line-height: 1; }
h1, h2 { margin: 0; }
h1 { font-size: 32px; line-height: 1.12; }
h2 { font-size: 17px; line-height: 1.25; }
.heading-subtitle { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.refresh-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font-size: 11px; font-weight: 700; box-shadow: 0 4px 12px rgba(30, 58, 48, .04); transition: border-color .18s, color .18s, transform .18s, background .18s; }
.refresh-button:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-1px); }
.refresh-button:active { transform: scale(.97); }
.button-icon { display: inline-grid; place-items: center; font-size: 17px; line-height: 1; }
.refresh-button.is-loading .button-icon { animation: account-spin .7s linear infinite; }
.account-message { min-height: 22px; margin: 13px 0 2px; color: var(--accent-strong); font-size: 12px; font-weight: 600; }
.account-message.error { color: var(--danger); }
.account-message:not(:empty) { animation: account-message-in .22s ease both; }

.account-hero { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; min-height: 164px; align-items: stretch; margin-top: 25px; padding: 24px 26px; overflow: hidden; border: 1px solid rgba(16, 167, 127, .2); border-radius: 8px; background: var(--hero); color: var(--hero-ink); box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; align-self: center; min-width: 0; }
.hero-kicker { color: var(--accent); }
.hero-copy h2 { overflow-wrap: anywhere; font-size: 28px; }
.hero-copy > p:last-child { max-width: 450px; margin: 10px 0 0; color: rgba(241, 255, 248, .66); font-size: 12px; }
.hero-score { display: grid; align-content: center; justify-items: end; padding-left: 22px; border-left: 1px solid rgba(241, 255, 248, .16); text-align: right; }
.hero-score span, .hero-score small { color: rgba(241, 255, 248, .63); font-size: 11px; }
.hero-score strong { margin: 4px 0 2px; color: var(--accent); font-size: 42px; font-weight: 780; line-height: 1; font-variant-numeric: tabular-nums; }


.entry-panel { margin-top: 14px; }
.entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.entry-tile { position: relative; display: flex; min-height: 86px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 9px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper-solid); color: var(--ink); text-align: left; transition: border-color .2s, transform .2s, background .2s; }
.entry-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.entry-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: 16px; }
.entry-label { font-size: 13px; font-weight: 660; }
.entry-badge { position: absolute; top: 10px; right: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }
.overview-todo { display: flex; width: 100%; min-height: 50px; align-items: center; gap: 11px; margin-top: 14px; padding: 0 18px; border: 1px solid rgba(16, 167, 127, .25); border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; font-weight: 640; text-align: left; transition: background .2s; }
.overview-todo:hover { background: var(--accent-soft); filter: brightness(.97); }
.overview-todo.is-quiet { border-color: var(--line); background: var(--paper); color: var(--muted); font-weight: 560; cursor: default; }
.todo-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }
.overview-todo.is-quiet .todo-dot { background: var(--muted); opacity: .5; }
.todo-arrow { margin-left: auto; font-size: 15px; }

.account-section { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: 0 8px 22px rgba(28, 55, 45, .035); }
.page-panel { margin-top: 25px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-head > div { min-width: 0; }
.section-head .section-kicker { margin-bottom: 7px; }
.section-head p:not(.section-kicker) { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.section-head p b { color: var(--ink); font-weight: 760; }
.section-head > button { display: inline-flex; flex: none; align-items: center; gap: 5px; padding: 3px 0; background: transparent; color: var(--accent-strong); font-size: 11px; font-weight: 740; white-space: nowrap; transition: gap .18s, color .18s; }
.section-head > button:hover { gap: 8px; color: var(--ink); }

.reward-tasks { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; }
.reward-task { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto auto; min-height: 58px; align-items: center; gap: 11px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--canvas); transition: border-color .2s, transform .2s, background .2s; }
.reward-task:hover { border-color: rgba(16, 167, 127, .35); background: var(--paper-solid); transform: translateY(-1px); }
.reward-task.is-done { opacity: .6; }
.reward-task.is-done { animation: task-complete .42s cubic-bezier(.2,.72,.2,1) both; }
.task-icon, .row-icon { display: inline-grid; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent-strong); font-size: 15px; font-weight: 760; }
.reward-task:nth-child(2) .task-icon { background: var(--blue-soft); color: var(--blue); }
.reward-task:nth-child(3) .task-icon { background: var(--coral-soft); color: var(--coral); }
.reward-copy { display: grid; min-width: 0; gap: 3px; }
.reward-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.reward-copy span { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.reward-points { color: var(--accent-strong); font-size: 11px; font-weight: 780; font-variant-numeric: tabular-nums; }
.reward-claim { min-height: 30px; padding: 0 9px; border: 1px solid rgba(16, 167, 127, .35); border-radius: 6px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; font-weight: 760; transition: background .18s, transform .18s; }
.reward-claim:hover { background: rgba(16, 167, 127, .2); transform: translateY(-1px); }
.reward-claim:active { transform: scale(.96); }
.reward-done, .reward-locked { color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.reward-done span { color: var(--accent); font-size: 14px; vertical-align: -1px; }

.download-list, .subscription-list, .record-list, .invite-list { display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.download-row, .subscription-row { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto 16px; min-width: 0; min-height: 62px; align-items: center; gap: 11px; padding: 9px 1px; border-bottom: 1px solid var(--line); transition: padding .2s, background .2s; }
.subscription-row { grid-template-columns: 31px minmax(0, 1fr) auto; }
.record-row, .invite-row { display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; min-width: 0; min-height: 62px; align-items: center; gap: 11px; padding: 10px 1px; border-bottom: 1px solid var(--line); }
.invite-row { min-height: 72px; }
.download-row:hover, .subscription-row:hover { padding-right: 5px; padding-left: 5px; background: rgba(16, 167, 127, .045); }
.row-copy { display: grid; min-width: 0; gap: 3px; }
.row-copy strong { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.row-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.download-icon { background: var(--blue-soft); color: var(--blue); }
.subscription-icon { background: var(--coral-soft); color: var(--coral); }
.credit-icon { background: var(--blue-soft); color: var(--blue); }
.invite-icon { background: var(--coral-soft); color: var(--coral); }
.invite-row .row-copy small { overflow: visible; white-space: normal; line-height: 1.5; }
.invite-state { align-self: center; }
.state-tag { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border: 1px solid rgba(16, 167, 127, .2); border-radius: 5px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; font-weight: 720; white-space: nowrap; }
.row-arrow { color: var(--muted); font-size: 17px; line-height: 1; transition: color .18s, transform .18s; }
.download-row:hover .row-arrow, .subscription-row:hover .row-arrow { color: var(--accent-strong); transform: translate(2px, -2px); }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 30px 2px 8px; color: var(--muted); font-size: 11px; text-align: center; }
.empty-state a { display: inline-flex; min-height: 34px; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--accent-strong); font-size: 10px; font-weight: 740; transition: border-color .18s, background .18s, transform .18s; }
.empty-state a:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.loading-state { min-height: 88px; align-content: center; }

.account-tip { margin: 13px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-section + .settings-section { margin-top: 14px; }
.theme-options { display: flex; gap: 8px; margin-top: 20px; }
.theme-option { min-width: 84px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper-solid); color: var(--ink); font-size: 11px; font-weight: 720; transition: border-color .18s, background .18s, transform .18s; }
.theme-option:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-option.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.invite-create, .account-invite-code button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #092019; font-size: 11px; font-weight: 760; transition: background .18s, transform .18s, box-shadow .18s; }
.invite-create:hover, .account-invite-code button:hover { background: var(--accent-strong); box-shadow: 0 6px 16px rgba(16, 167, 127, .18); transform: translateY(-1px); }
.invite-create:disabled { cursor: wait; opacity: .55; }
.account-invite-code { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 17px; padding: 13px; border: 1px solid rgba(16, 167, 127, .24); border-radius: 7px; background: var(--accent-soft); color: var(--ink-soft); font-size: 11px; }
.account-invite-code code { padding: 6px 9px; border-radius: 5px; background: var(--paper-solid); color: var(--accent-strong); font-size: 13px; font-weight: 780; }
.account-invite-code button { margin-left: auto; min-height: 30px; padding: 0 10px; }
.account-invite-code button.is-success { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.subscription-remove { min-height: 30px; padding: 0 9px; border: 1px solid rgba(201, 75, 89, .28); border-radius: 6px; background: transparent; color: var(--danger); font-size: 10px; font-weight: 700; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.subscription-remove:hover { border-color: var(--danger); background: rgba(201, 75, 89, .08); transform: translateY(-1px); }
.subscription-remove:active { transform: scale(.96); }
.subscription-remove:disabled { cursor: progress; opacity: .62; }
.subscription-remove.is-pending { background-image: linear-gradient(90deg, transparent, rgba(201,75,89,.1), transparent); background-size: 220% 100%; animation: account-pending 1s ease-in-out infinite; }

.reward-rank { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.reward-rank li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.reward-rank li:last-child { border-bottom: 0; }
.reward-rank li.is-me { color: var(--accent-strong); font-weight: 700; }
.reward-rank li span { width: 20px; color: var(--muted); }
.reward-rank li b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: inherit; }
.reward-rank li em { color: var(--ink); font-style: normal; font-weight: 780; }

.account-gate { display: grid; min-height: calc(100vh - 68px); place-content: center; justify-items: center; padding: 40px 20px; text-align: center; }
.gate-icon { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 18px; border: 1px solid rgba(16,167,127,.25); border-radius: 16px; background: var(--accent-soft); color: var(--accent-strong); font-size: 22px; box-shadow: var(--shadow); }
.account-gate h1 { font-size: 26px; }
.account-gate p { max-width: 360px; margin: 10px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.account-gate a { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 15px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #092019; font-size: 12px; font-weight: 760; transition: transform .18s, box-shadow .18s; }
.account-gate a:hover { box-shadow: 0 8px 20px rgba(16,167,127,.2); transform: translateY(-1px); }

@media (max-width: 980px) {
  .account-content { padding-right: 28px; padding-left: 28px; }
  .account-sidebar { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 720px) {
  .account-topbar { height: 58px; padding: 0 14px; }
  .account-brand em, #accountIdentity { display: none; }
  .topbar-actions { gap: 0; }
  .topbar-link { font-size: 11px; }
  .account-shell { display: block; min-height: calc(100vh - 58px); }
  .account-sidebar { position: sticky; top: 58px; z-index: 20; display: block; width: 100%; height: auto; padding: 8px 12px 7px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--topbar); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .profile-card, .sidebar-admin { display: none; }
  .account-sidebar nav { display: flex; gap: 5px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .account-sidebar nav::-webkit-scrollbar { display: none; }
  .account-sidebar nav button { width: auto; min-height: 36px; flex: 0 0 auto; gap: 6px; padding: 0 11px; border: 1px solid transparent; border-radius: 6px; font-size: 11px; white-space: nowrap; }
  .account-sidebar nav button:hover { transform: none; }
  .account-sidebar nav button.is-active { border-color: rgba(16,167,127,.18); }
  .account-sidebar nav button.is-active::before { display: none; }
  .nav-icon { width: auto; font-size: 14px; }
  .account-content { padding: 26px 14px 64px; }
  .content-heading { align-items: center; }
  h1 { font-size: 26px; }
  .heading-subtitle { margin-top: 6px; font-size: 11px; }
  .refresh-button { width: 38px; height: 38px; min-height: 38px; justify-content: center; padding: 0; }
  .refresh-button > span:last-child { display: none; }
  .button-icon { font-size: 19px; }
  .account-hero { grid-template-columns: 1fr; gap: 18px; min-height: 0; margin-top: 20px; padding: 20px; }
  .hero-copy h2 { font-size: 24px; }
  .hero-score { display: block; padding: 15px 0 0; border-top: 1px solid rgba(241,255,248,.16); border-left: 0; text-align: left; }
  .hero-score strong { display: inline-block; margin: 2px 8px 0 0; font-size: 36px; }
  .hero-score small { font-size: 10px; }
  .entry-panel { margin-top: 14px; }
  .entry-grid { gap: 8px; margin-top: 14px; }
  .entry-tile { min-height: 76px; gap: 7px; padding: 10px 11px; }
  .entry-icon { width: 27px; height: 27px; font-size: 14px; }
  .entry-label { font-size: 11px; }
  .entry-badge { top: 7px; right: 7px; min-width: 16px; height: 16px; font-size: 9px; line-height: 16px; }
  .overview-todo { min-height: 46px; margin-top: 12px; padding: 0 13px; font-size: 12px; }
  .account-section { padding: 18px 15px; }
  .section-head { gap: 12px; }
  .section-head > button { font-size: 10px; }
  .reward-task { grid-template-columns: 29px minmax(0, 1fr) auto; gap: 9px; min-height: 56px; padding: 8px; }
  .reward-task .reward-points { grid-column: 2; grid-row: 2; margin-top: -5px; }
  .reward-task .reward-claim, .reward-task .reward-done, .reward-task .reward-locked { grid-column: 3; grid-row: 1 / span 2; }
  .reward-copy span { white-space: normal; }
  .download-row, .subscription-row { min-height: 60px; gap: 9px; }
  .record-row, .invite-row { min-height: 62px; gap: 9px; }
  .invite-row { align-items: start; padding: 12px 0; }
  .invite-row .row-icon { margin-top: 2px; }
  .invite-state { align-self: start; }
  .download-row { grid-template-columns: 29px minmax(0, 1fr) auto 12px; }
  .subscription-row { grid-template-columns: 29px minmax(0, 1fr) auto; }
  .row-icon, .task-icon { width: 29px; height: 29px; }
  .state-tag { padding: 0 6px; font-size: 9px; }
  .account-gate { min-height: calc(100vh - 58px); }
}

@media (max-width: 420px) {
  .account-brand { font-size: 13px; }
  .brand-mark { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: no-preference) {
  .account-shell, .account-gate { animation: account-fade-in .32s ease both; }
  .account-hero { animation: account-hero-in .5s cubic-bezier(.2,.72,.2,1) both; }
  .entry-panel { animation: account-content-in .36s .06s cubic-bezier(.2,.72,.2,1) both; }
  .overview-todo { animation: account-content-in .36s .12s cubic-bezier(.2,.72,.2,1) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
@keyframes account-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes account-content-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes account-hero-in { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes account-message-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes account-spin { to { transform: rotate(360deg); } }
@keyframes account-pending { to { background-position: -220% 0; } }
@keyframes task-complete { 45% { transform: scale(1.015); } to { opacity: .6; transform: scale(1); } }

/* 王者段位荣誉标：贴在头像右下角 */
.level-mark {
  position: absolute; right: -8px; bottom: -8px; z-index: 2;
  min-width: 26px; padding: 2px 5px; border-radius: 6px; border: 1px solid rgba(0,0,0,.35);
  color: #2b1a00; background: #D9A05B; font-size: 9.5px; font-weight: 900;
  line-height: 1.2; text-align: center; white-space: nowrap; pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.35);
}
.level-mark.lv1 { background: linear-gradient(135deg,#E8A96B,#B87333); color: #2b1600; }
.level-mark.lv2 { background: linear-gradient(135deg,#FFE08A,#E6A817); color: #4a3200; border-color: rgba(230,168,23,.7); }
.level-mark.lv3 { background: linear-gradient(135deg,#FFD08A,#FF5A2B 60%,#C42A0A); color: #3d0f00; border-color: #FF7A45; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 12px rgba(255,90,43,.6); }
.level-mark.lv4 { background: linear-gradient(135deg,#C9FFF2,#5FCDBB); color: #0c423b; border-color: rgba(95,205,187,.7); }
.level-mark.lv5 { background: linear-gradient(135deg,#BEEBFF,#3BA7E8); color: #062c4a; border-color: rgba(59,167,232,.7); }
.level-mark.lv6 { background: linear-gradient(135deg,#E2C7FF,#9B6BF0); color: #2d0a52; border-color: rgba(155,107,240,.7); }
.level-mark.lv7 { background: linear-gradient(135deg,#FFD08A,#FF8A3D); color: #4a1c00; border-color: rgba(255,138,61,.75); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 10px rgba(255,138,61,.5); }
.level-mark.lv8 { background: linear-gradient(135deg,#FFF3B0,#FFC423 55%,#FF7A18); color: #4a2b00; border-color: #FFD75E; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 14px rgba(255,196,35,.75); }

/* ---------------------------------------------------------------- 段位体系 */
:root {
  --level-gold: #F0B429; --level-silver: #C7D2E0; --level-bronze: #CD7F45;
  --level-platinum: #6FE0CC; --level-diamond: #4FB8F5; --level-star: #B388FF;
  --level-king: #FF9A45; --level-glory: #FF6A3D;
}
.level-tone-0 { --tone: #9FB0AA; }
.level-tone-1 { --tone: var(--level-bronze); }
.level-tone-2 { --tone: var(--level-gold); }
.level-tone-3 { --tone: var(--level-glory); }
.level-tone-4 { --tone: var(--level-platinum); }
.level-tone-5 { --tone: var(--level-diamond); }
.level-tone-6 { --tone: var(--level-star); }
.level-tone-7 { --tone: var(--level-king); }
.level-tone-8 { --tone: var(--level-glory); }

/* V 字段位徽章：金属盾形 + 切面 */
.rank-badge {
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 48px; color: #fff;
  clip-path: polygon(50% 0, 100% 18%, 100% 66%, 50% 100%, 0 66%, 0 18%);
  background: linear-gradient(150deg, color-mix(in srgb, var(--tone) 92%, #fff), color-mix(in srgb, var(--tone) 70%, #1a1a1a) 55%, color-mix(in srgb, var(--tone) 85%, #000));
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--tone) 45%, transparent));
}
.rank-badge::before {
  content: ""; position: absolute; inset: 3px;
  clip-path: polygon(50% 0, 100% 18%, 100% 66%, 50% 100%, 0 66%, 0 18%);
  background: linear-gradient(150deg, rgba(255,255,255,.34), transparent 45%);
}
.rank-badge b { position: absolute; top: 8px; font-size: 13px; font-weight: 900; font-style: italic; color: rgba(255,255,255,.95); text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.rank-badge em { position: absolute; bottom: 8px; font-size: 13px; font-weight: 900; font-style: normal; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.rank-badge.mini-mark { width: 32px; height: 36px; }
.rank-badge.mini-mark b { top: 5px; font-size: 10px; }
.rank-badge.mini-mark em { bottom: 5px; font-size: 10px; }
.rank-badge.benefit-badge { width: 34px; height: 38px; }
.rank-badge.benefit-badge b { top: 5px; font-size: 10px; }
.rank-badge.benefit-badge em { bottom: 6px; font-size: 10px; }
.rank-badge.card-emblem { width: 92px; height: 100px; }
.rank-badge.card-emblem b { top: 18px; font-size: 28px; }
.rank-badge.card-emblem em { bottom: 16px; font-size: 28px; }
.rank-badge.preview-badge { width: 58px; height: 63px; }
.rank-badge.preview-badge b { top: 11px; font-size: 17px; }
.rank-badge.preview-badge em { bottom: 10px; font-size: 17px; }

.membership-mini {
  --tone: var(--accent);
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--tone) 32%, var(--line)); border-radius: 10px;
  background: linear-gradient(120deg, rgba(255,255,255,.94), rgba(240,247,243,.86));
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.membership-mini::after {
  content: ""; position: absolute; inset: auto -20% -80% auto; width: 180px; height: 180px;
  border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tone) 26%, transparent), transparent 65%);
}
.mini-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.mini-copy small { color: var(--muted); font-size: 9.5px; letter-spacing: .12em; font-weight: 700; }
.mini-copy strong { color: var(--ink); font-size: 15px; line-height: 1.2; }
.mini-copy span { color: var(--muted); font-size: 11.5px; }
.mini-link { flex: none; border: 0; background: none; color: var(--accent-strong); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; position: relative; z-index: 1; }
.mini-link:hover { color: var(--accent); }

.level-card {
  --tone: var(--level-gold);
  position: relative; overflow: hidden; margin-top: 25px; padding: 30px 32px 26px;
  border: 1px solid color-mix(in srgb, var(--tone) 42%, transparent); border-radius: 14px;
  background: radial-gradient(ellipse at 85% -20%, color-mix(in srgb, var(--tone) 42%, transparent), transparent 48%),
              radial-gradient(ellipse at 5% 120%, color-mix(in srgb, var(--tone) 20%, transparent), transparent 50%),
              linear-gradient(135deg, #0d1412 0%, #16211d 52%, #0d1412 100%);
  color: #F1FFF8; box-shadow: 0 24px 60px -28px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.09);
}
.level-card-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(to bottom, #000, transparent 70%);
}
.level-card-sheen {
  position: absolute; inset: -120% -40%; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.12) 50%, transparent 58%);
  transform: rotate(8deg); animation: level-sheen 9s ease-in-out infinite;
}
.level-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.level-kicker { margin: 0 0 8px; color: var(--tone); font-size: 10px; letter-spacing: .22em; font-weight: 750; }
.level-card h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.05; letter-spacing: -.03em; text-shadow: 0 2px 18px color-mix(in srgb, var(--tone) 45%, transparent); }
.level-tagline { margin: 9px 0 0; color: rgba(241,255,248,.68); font-size: 12.5px; }
.level-growth { position: relative; z-index: 1; margin-top: 22px; }
.growth-track { position: relative; height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); box-shadow: inset 0 1px 3px rgba(0,0,0,.5); }
.growth-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 45%, #fff), var(--tone)); box-shadow: 0 0 14px color-mix(in srgb, var(--tone) 70%, transparent); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.growth-pip { position: absolute; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: rgba(255,255,255,.28); border: 1px solid rgba(0,0,0,.3); }
.growth-pip.is-on { background: #fff; box-shadow: 0 0 8px var(--tone); }
.growth-scale { display: flex; justify-content: space-between; margin-top: 6px; color: rgba(241,255,248,.5); font-size: 10px; }
.level-current-perks { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.level-current-perks li { padding: 6px 10px; border: 1px solid color-mix(in srgb, var(--tone) 22%, rgba(241,255,248,.14)); border-radius: 999px; background: rgba(255,255,255,.05); color: rgba(241,255,248,.88); font-size: 11.5px; }
.level-current-perks li span { margin-right: 5px; color: var(--tone); }
.level-card-foot { position: relative; z-index: 1; margin-top: 20px; padding-top: 15px; border-top: 1px solid rgba(241,255,248,.12); color: rgba(241,255,248,.66); font-size: 11.5px; }
.level-roadmap { margin-top: 14px; }
.level-route { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 18px 0 22px; }
.level-step { --tone: #9FB0AA; position: relative; display: grid; justify-items: center; gap: 5px; padding-top: 24px; text-align: center; border: 0; background: none; font: inherit; cursor: pointer; }
.level-step::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 2px; background: var(--line-strong); }
.level-step:first-child::before { display: none; }
.level-step.is-done::before, .level-step.is-current::before { background: var(--tone); }
.step-dot { position: absolute; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--paper-solid); color: var(--muted); font-size: 8.5px; font-weight: 900; }
.level-step.is-done .step-dot { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 22%, var(--paper-solid)); color: var(--tone); }
.level-step.is-current .step-dot { border-color: var(--tone); background: var(--tone); color: #1a1a1a; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 20%, transparent), 0 0 12px color-mix(in srgb, var(--tone) 60%, transparent); }
.level-step strong { color: var(--ink); font-size: 11.5px; }
.level-step small { color: var(--muted); font-size: 9.5px; }
.level-benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.level-benefit-card { --tone: #9FB0AA; position: relative; padding: 16px 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.level-benefit-card:hover, .level-step:hover { transform: translateY(-2px); }
.level-benefit-card:hover { border-color: color-mix(in srgb, var(--tone) 55%, transparent); box-shadow: 0 16px 34px -24px color-mix(in srgb, var(--tone) 85%, transparent); }
.level-preview-trigger { margin-left: 14px; border: 0; background: none; color: var(--tone); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.level-preview-trigger:hover { text-decoration: underline; }
.level-benefit-card.is-current { border-color: color-mix(in srgb, var(--tone) 65%, transparent); box-shadow: 0 12px 32px -20px color-mix(in srgb, var(--tone) 80%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--tone) 18%, transparent); }
.level-benefit-card.is-locked { opacity: .6; }
.benefit-head { display: flex; align-items: center; gap: 9px; }
.benefit-head b { color: var(--ink); font-size: 14px; }
.benefit-tier { margin-left: auto; color: var(--tone); font-size: 11px; letter-spacing: .1em; font-weight: 800; }
.level-benefit-card p { margin: 8px 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.level-benefit-card ul { margin: 0; padding-left: 16px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.7; }
.benefit-state { position: absolute; top: 14px; right: 14px; color: var(--tone); font-size: 10px; font-style: normal; font-weight: 700; }
@keyframes level-sheen { 0%, 70% { transform: translateX(-30%) rotate(8deg); } 100% { transform: translateX(35%) rotate(8deg); } }

/* 点击段位后的权益预览浮层 */
body.level-preview-open { overflow: hidden; }
.level-preview-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.level-preview-scrim { position: absolute; inset: 0; background: rgba(6, 12, 10, .58); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: level-preview-fade .18s ease both; }
.level-preview-panel {
  --tone: var(--level-gold); position: relative; width: min(440px, 100%); overflow: hidden;
  padding: 28px 28px 24px; border: 1px solid color-mix(in srgb, var(--tone) 48%, transparent); border-radius: 16px;
  background: radial-gradient(ellipse at 90% -10%, color-mix(in srgb, var(--tone) 34%, transparent), transparent 52%), linear-gradient(150deg, #111c18, #0b120f);
  box-shadow: 0 36px 90px -28px rgba(0,0,0,.8); color: #F1FFF8;
  animation: level-preview-in .22s cubic-bezier(.2,.8,.2,1) both;
}
.level-preview-panel::after { content: ""; position: absolute; inset: -70% -40% auto auto; width: 210px; height: 210px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.09), transparent 65%); pointer-events: none; }
.level-preview-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; background: rgba(255,255,255,.06); color: rgba(241,255,248,.8); font-size: 19px; line-height: 1; }
.level-preview-kicker { position: relative; z-index: 1; margin: 0 0 16px; color: var(--tone); font-size: 10px; font-weight: 750; letter-spacing: .2em; }
.level-preview-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.level-preview-head h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.02em; }
.level-preview-head p { margin: 6px 0 0; color: rgba(241,255,248,.66); font-size: 12px; line-height: 1.5; }
.level-preview-badge { width: 58px; height: 63px; flex: none; }
.level-preview-state { position: relative; z-index: 1; display: inline-block; margin-top: 18px; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--tone) 42%, transparent); border-radius: 999px; color: var(--tone); font-size: 10.5px; font-weight: 700; }
.level-preview-perks { position: relative; z-index: 1; display: grid; gap: 9px; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid rgba(241,255,248,.12); list-style: none; }
.level-preview-perks li { color: rgba(241,255,248,.9); font-size: 12.5px; }
.level-preview-perks li span { margin-right: 8px; color: var(--tone); font-weight: 800; }
.level-preview-unlock { position: relative; z-index: 1; margin: 16px 0 0; color: rgba(241,255,248,.58); font-size: 11.5px; line-height: 1.6; }
.level-preview-done { position: relative; z-index: 1; width: 100%; margin-top: 18px; padding: 10px; border-radius: 9px; background: var(--tone); color: #151a18; font-size: 12.5px; font-weight: 800; }
@keyframes level-preview-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes level-preview-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .level-preview-scrim, .level-preview-panel { animation: none; }
  .level-benefit-card, .level-step { transition: none; }
}
:root[data-theme="dark"] .membership-mini { background: linear-gradient(120deg, rgba(24,31,28,.95), rgba(30,42,36,.86)); }
@media (max-width: 980px) {
  .level-benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .level-route { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .membership-mini { gap: 10px; padding: 12px; }
  .mini-copy span { font-size: 10.5px; }
  .level-card { padding: 24px 18px 20px; }
  .level-card-top { align-items: flex-start; }
  .rank-badge.card-emblem { width: 68px; height: 74px; }
  .rank-badge.card-emblem b { top: 12px; font-size: 21px; }
  .rank-badge.card-emblem em { bottom: 11px; font-size: 21px; }
  .level-benefit-grid { grid-template-columns: 1fr; }
  .level-route { gap: 2px; overflow-x: auto; }
  .level-step { min-width: 34px; }
  .level-step strong { font-size: 10px; }
  .level-step small { font-size: 8.5px; }
}

/* iOS 聚焦 <16px 输入框会放大整页，表单也不能例外 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; }
input, textarea, select { font-size: 16px !important; }
