:root {
  color-scheme: light;
  --paper: #FFFDF9;
  --surface: #ffffff;
  --sand: #f4f1ec;
  --sand-2: #faf7f1;
  --sand-deep: #e8e2d8;
  --ink: #171717;
  --ink-soft: #33302b;
  --muted: #6e6a64;
  --dim: #a8a29a;
  --line: #e8e2d8;
  --line-soft: #f0ebe3;
  --coral: #F45145;
  --coral-dark: #d8392d;
  --coral-soft: #fdedeb;
  --orange: #ff7352;
  --cream: #f5de8a;
  --sky: #b9e3f1;
  --blush: #f3b7c4;
  --sage: #bfd79a;
  --ok: #2f7d4f;
  --ok-soft: #e8f4ec;
  --danger: #aa332d;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(23,23,23,.04), 0 8px 24px rgba(23,23,23,.05);
  --shadow-lg: 0 12px 40px rgba(23,23,23,.1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { color: #fff; background: var(--coral); }
:focus-visible { outline: 3px solid rgba(244, 81, 69, .35); outline-offset: 3px; }

.bar { position: sticky; z-index: 20; top: 0; display: flex; width: 100%; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(28px, calc((100vw - 1240px) / 2)); border-bottom: 1px solid rgba(232, 226, 216, .8); background: rgba(255, 253, 249, .9); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-size: 18px; font-weight: 760; letter-spacing: -.04em; white-space: nowrap; }
.brand::before { width: 30px; height: 30px; border-radius: 10px 10px 10px 4px; background: var(--coral); content: "米"; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }
.bar nav { display: flex; align-items: center; gap: 28px; color: var(--ink-soft); font-size: 13px; }
.bar nav a:not(.btn) { transition: color .18s ease; }
.bar nav a:not(.btn):hover { color: var(--coral-dark); }

.wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 88px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(32px, 5vw, 48px); line-height: 1.12; letter-spacing: -.055em; }
h2 { margin-bottom: 10px; font-size: 21px; line-height: 1.3; letter-spacing: -.035em; }
h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.4; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--coral-dark); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; background: var(--coral); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); background: var(--coral-dark); box-shadow: 0 8px 20px -12px rgba(216, 57, 45, .8); }
.btn:disabled { transform: none; cursor: wait; opacity: .62; }
.btn.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.btn.secondary:hover { border-color: var(--ink); background: var(--paper); box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.section { margin-top: 22px; }
.login-required { padding: 32px; }
.agent-loading { grid-column: 1 / -1; padding: 24px; }
.wrap > .card:not(.section) { padding: 24px; }
.section > h2 { padding: 24px 26px 18px; }
.notice { margin: 22px 0; padding: 16px 18px; border: 1px solid #eadcae; border-radius: var(--radius-sm); background: #fff9e9; color: #5d4b1b; font-size: 13px; }
.status { min-height: 24px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.status.error { color: var(--danger); }
.status.success, .success { color: #41612b; }

/* 登录：左侧清晰说明，右侧二维码；窄屏自动变为单列。 */
.login-page { position: relative; overflow: hidden; min-height: calc(100vh - 76px); padding: 72px 24px; background: radial-gradient(circle at 82% 20%, rgba(247, 232, 174, .56), transparent 30%), radial-gradient(circle at 9% 90%, rgba(244, 81, 69, .08), transparent 28%), var(--paper); }
.login-page::after { position: absolute; top: 12%; right: -110px; width: 380px; height: 380px; border: 1px solid rgba(33, 31, 29, .08); border-radius: 50%; content: ""; pointer-events: none; }
.login-card { position: relative; z-index: 1; width: min(1060px, 100%); margin: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,255,255,.95); box-shadow: var(--shadow); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 48px; align-items: center; padding: clamp(30px, 6vw, 72px); }
.login-copy { max-width: 520px; }
.login-copy > p { max-width: 480px; margin: 0 0 16px; color: var(--muted); }
.login-copy .notice { margin: 26px 0; }
.login-copy .actions { margin-top: 26px; }
.login-side { display: grid; justify-items: center; gap: 16px; padding: 26px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, #fff 10%, #fbf7ef 100%); text-align: center; }
.qrbox { display: grid; width: min(280px, 100%); aspect-ratio: 1; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; }
.qrbox img { display: block; width: 100%; height: 100%; padding: 12px; object-fit: contain; }
.qr-placeholder { display: grid; width: 100%; height: 100%; place-content: center; gap: 8px; padding: 24px; color: var(--muted); font-size: 13px; }
.qr-caption { color: var(--muted); font-size: 12px; }
.demo-notice { margin: 0; color: #55703e; font-size: 12px; }

/* 会员中心 */
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.welcome p { margin: 0; color: var(--muted); }
.local-demo-notice { margin: -12px 0 20px; padding: 12px 16px; border: 1px solid #d9e5cc; border-radius: var(--radius-sm); background: #f1f6eb; color: #486338; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { min-height: 160px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(145deg, #fff, #fbf8f2); }
.stat::before { display: block; width: 28px; height: 4px; margin-bottom: 18px; border-radius: 9px; background: var(--coral); content: ""; }
.stat b { display: block; margin: 5px 0 2px; font-size: 32px; line-height: 1.15; letter-spacing: -.055em; }
.stat > :first-child { color: var(--muted); font-size: 12px; }
.stat span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.card.section { overflow: hidden; }
.card.section > h2 { margin: 0; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.card.section > p { margin: 0; padding: 0 24px 20px; }
.card.section > p a { color: var(--coral-dark); font-size: 13px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th, td { padding: 14px 18px; border-bottom: 1px solid #f0ece6; text-align: left; }
th { background: #fbf9f5; color: var(--muted); font-size: 11px; font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffaf0; }
.table-wrap .muted { padding: 20px; }

/* 智能体目录与执行表单 */
#agentList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent { display: flex; min-height: 246px; flex-direction: column; align-items: flex-start; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: 0 12px 34px -28px rgba(36,30,24,.34); }
.agent-loading { grid-column: 1 / -1; padding: 24px; }
.agent.agent-unavailable { min-height: 0; }
.agent-message { grid-column: 1 / -1; padding: 24px; }
.agent p { margin: 0 0 10px; }
.agent .btn { min-height: 42px; margin-top: auto; }
.agent .success { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.agent .success::before { width: 7px; height: 7px; border-radius: 50%; background: #658b43; content: ""; }
.agent-disabled { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--sand); color: var(--muted); font-size: 12px; font-weight: 650; }
#runPanel { padding: 28px; }
#runPanel h2 { margin-bottom: 22px; }
.field { display: grid; gap: 8px; margin: 16px 0; color: var(--ink-soft); font-size: 13px; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; background: #fff; color: var(--ink); font-size: 14px; font-weight: 400; }
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(244, 81, 69, .12); }
#runStatus, #savedRunOutput { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .bar { min-height: 64px; padding: 0 20px; }
  .bar nav { gap: 14px; font-size: 12px; }
  .bar nav a:nth-child(2):not(.btn) { display: none; }
  .wrap { width: min(100% - 32px, 560px); padding: 38px 0 60px; }
  .login-page { min-height: calc(100vh - 64px); padding: 28px 16px 50px; }
  .login-card { border-radius: 24px; }
  .login-layout { grid-template-columns: 1fr; gap: 28px; padding: 28px 22px; }
  .login-side { grid-row: 1; padding: 16px; }
  .qrbox { width: min(230px, 100%); }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { min-height: 130px; padding: 18px; }
  .stat::before { margin-bottom: 12px; }
  .welcome { display: block; }
  .welcome .actions { margin-top: 18px; }
  #agentList { grid-template-columns: 1fr; }
  #runPanel { padding: 22px 18px; }
  th, td { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 会员端工作台：复用客户版的顶栏、会员主卡、快捷入口和记录区结构。 */
.topbar { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,253,249,.94); backdrop-filter: blur(12px); }
.topbar-in { display: flex; width: min(1160px, 100%); min-height: 62px; align-items: center; gap: 18px; margin: 0 auto; padding: 0 22px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.logo-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: linear-gradient(135deg, var(--coral), var(--orange)); color: #fff; font-size: 15px; font-weight: 800; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a { padding: 7px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav a:hover { background: var(--sand); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.topbar-right { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.points-chip { display: flex; height: 34px; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.points-chip b { color: var(--coral-dark); font-variant-numeric: tabular-nums; }
.btn.sm { min-height: 32px; padding: 0 14px; font-size: 12px; }
.btn.soft { background: var(--coral-soft); color: var(--coral-dark); }
.btn.soft:hover { background: #fbdfdb; box-shadow: none; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--cream); color: #7a5a00; font-size: 12px; font-weight: 800; cursor: pointer; }
.page { padding: 26px 0 60px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin-bottom: 0; font-size: 26px; font-weight: 800; letter-spacing: -.035em; }
.page-head h1 span { color: var(--coral-dark); }
.page-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.stat { min-height: 120px; padding: 18px 20px; border-radius: 20px; }
.stat::before { display: none; }
.stat .k { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.stat .v { margin-top: 6px; font-size: 27px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .v > span { display: inline; margin: 0; color: inherit; font-size: inherit; font-weight: inherit; }
.stat .v small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.stat .s { margin-top: 3px; color: var(--dim); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: 16px; margin-top: 16px; }
.membership-card { position: relative; display: flex; min-height: 260px; flex-direction: column; overflow: hidden; padding: 24px 26px; border-radius: 24px; background: linear-gradient(135deg,#2b2b2b 0%,#171717 55%,#3a2a26 100%); color: #fff; }
.membership-card::after { position: absolute; top: -120px; right: -80px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle,rgba(244,81,69,.35),transparent 70%); content: ""; }
.membership-card > * { position: relative; z-index: 1; }
.member-label { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.72); font-size: 13px; }
.member-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(245,222,138,.12); }
.member-balance { display: flex; align-items: baseline; gap: 9px; margin: 20px 0 0; }
.member-balance strong { font-size: 38px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.member-balance span { color: rgba(255,255,255,.72); font-size: 13px; }
.membership-card > p { margin: 2px 0 0; color: rgba(255,255,255,.66); font-size: 12px; }
.member-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: auto; padding-top: 20px; }
.member-actions .ghost-light { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.12); color: #fff; }
.member-actions .ghost-light:hover { background: rgba(255,255,255,.2); box-shadow: none; }
.quick-card { display: flex; flex-direction: column; gap: 8px; padding: 19px 20px; }
.quick-card h2 { margin: 0 0 2px; font-size: 16px; font-weight: 800; }
.quick-link { display: flex; min-height: 60px; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); transition: background .15s,border-color .15s,transform .15s; }
.quick-link:hover { transform: translateY(-1px); border-color: #dacfc2; background: var(--sand-2); }
.quick-icon { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 12px; font-size: 14px; font-weight: 750; }
.quick-icon.ai { background: #eaf6fb; color: #23647a; }
.quick-icon.coin { background: var(--coral-soft); color: var(--coral-dark); }
.quick-icon.order { background: #f4f1e5; color: #7a5a00; }
.quick-link > span:nth-child(2) { display: grid; gap: 1px; }
.quick-link b { font-size: 13px; }
.quick-link small { color: var(--muted); font-size: 11px; }
.quick-arrow { margin-left: auto; color: var(--dim); font-size: 18px; }
.section { margin-top: 20px; }
.card.section { padding: 0; border-radius: 19px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 18px 20px 12px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 800; }
.section-title a { color: var(--coral-dark); font-size: 12px; }
.section-title > span { color: var(--muted); font-size: 11px; }
.card.section > .table-wrap { overflow-x: auto; }
.record-more { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
.record-more button[hidden] { display: none; }
.card.section table { min-width: 560px; font-size: 12px; }
.card.section th { color: var(--muted); font-size: 11px; font-weight: 600; }
.card.section th,.card.section td { padding: 12px 16px; }
.records-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); align-items: start; gap: 16px; }
.records-grid .card.section { min-width: 0; }
.notice { background: #fbf3da; border-color: #eadba9; color: #6e5613; }
.login-required { padding: 28px; }

/* 扫码登录沿用客户版左右分区：品牌说明与登录操作各占一个清晰区域。 */
.auth-page { background: var(--paper); }
.auth { display: grid; min-height: 100vh; grid-template-columns: 1.02fr .98fr; }
.auth-brand { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 52px clamp(30px,6vw,76px); background: linear-gradient(150deg,#f45145 0%,#ff6a4d 52%,#ff8a5c 100%); color: #fff; }
.auth-brand::before,.auth-brand::after { position: absolute; border-radius: 50%; content: ""; pointer-events: none; }
.auth-brand::before { top: -135px; right: -145px; width: 460px; height: 460px; background: rgba(255,255,255,.1); }
.auth-brand::after { bottom: -160px; left: -120px; width: 320px; height: 320px; background: rgba(245,222,138,.18); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: inline-flex; width: max-content; align-items: center; gap: 9px; color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.auth-logo-mark { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; background: rgba(255,255,255,.22); font-size: 15px; }
.auth-brand-main { max-width: 560px; margin: 42px 0; }
.auth-overline { color: rgba(255,255,255,.72); font-size: 10px; font-weight: 750; letter-spacing: .18em; }
.auth-brand-main h1 { margin: 18px 0 14px; font-size: clamp(34px,4vw,48px); line-height: 1.18; letter-spacing: -.045em; }
.auth-brand-main > p { max-width: 440px; margin-bottom: 25px; color: rgba(255,255,255,.9); font-size: 15px; }
.auth-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.auth-list li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.94); font-size: 13px; }
.auth-list i { display: grid; width: 22px; height: 22px; flex: none; place-items: center; border-radius: 50%; background: rgba(255,255,255,.22); font-size: 11px; font-style: normal; }
.auth-foot { margin: 0; color: rgba(255,255,255,.76); font-size: 11px; }
.auth-panel { display: flex; min-width: 0; align-items: center; justify-content: center; padding: 48px 28px; background: var(--paper); }
.auth-card { width: 100%; max-width: 400px; }
.auth-back { display: inline-block; margin-bottom: 25px; color: var(--muted); font-size: 12px; }
.auth-back:hover { color: var(--coral-dark); }
.auth-card .eyebrow { display: flex; width: max-content; margin-bottom: 9px; }
.auth-card h2 { margin-bottom: 5px; font-size: 27px; font-weight: 800; letter-spacing: -.035em; }
.auth-lead { margin-bottom: 18px; color: var(--muted); font-size: 13px; }
.auth-card .notice { margin: 0 0 16px; padding: 11px 13px; font-size: 12px; }
.auth-card .qrbox { width: 196px; margin: 0 auto; border-radius: 14px; }
.auth-card .qrbox img { padding: 8px; }
.auth-card .qr-placeholder { padding: 18px; font-size: 12px; }
.qr-caption { margin: 9px 0 12px; color: var(--muted); font-size: 11px; text-align: center; }
.auth-actions { display: grid; gap: 9px; }
.auth-actions .block { width: 100%; }
.auth-actions .btn { min-height: 43px; }
.auth-actions .btn.soft { color: var(--coral-dark); }
.auth-card .status { margin-top: 10px; font-size: 12px; }
.auth-card .demo-notice { margin-top: 8px; color: var(--ok); font-size: 11px; }

@media (max-width: 760px) {
  .topbar-in { flex-wrap: wrap; gap: 7px 12px; padding: 8px 18px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin-left: 0; }
  .nav a { padding: 6px 11px; }
  .dashboard-grid,.records-grid { grid-template-columns: 1fr; }
  .membership-card { min-height: 236px; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 360px; padding: 28px 24px; }
  .auth-brand-main { margin: 28px 0; }
  .auth-brand-main h1 { font-size: 32px; }
  .auth-brand-main > p { margin-bottom: 16px; font-size: 13px; }
  .auth-list { gap: 8px; }
  .auth-list li { font-size: 11px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 34px 22px 46px; }
  .auth-back { margin-bottom: 18px; }
}
@media (max-width: 560px) {
  .topbar-in { min-height: 58px; }
  .logo { font-size: 15px; }
  .logo-mark { width: 28px; height: 28px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn { padding: 0 10px; font-size: 11px; }
  .points-chip { height: 30px; padding: 0 9px; font-size: 11px; }
  .page { padding: 22px 0 48px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 23px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat { min-height: 106px; padding: 14px; }
  .stat:first-child { grid-column: 1 / -1; }
  .stat .v { font-size: 23px; }
  .membership-card { min-height: 228px; padding: 21px; }
  .member-balance strong { font-size: 34px; }
  .quick-card { padding: 16px; }
  .section-title { padding: 16px 15px 10px; }
  .card.section th,.card.section td { padding: 11px 12px; }
}

/* 会员区依照官网纸白、珊瑚红与暖沙色变量统一层级。 */
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat:first-child { grid-column: auto; }
.dashboard-grid { grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); }
.membership-card {
  min-height: 212px; justify-content: center; gap: 10px; border: 1px solid var(--line);
  background: var(--sand); color: var(--ink);
}
.membership-card::after { display: none; }
.membership-card > * { position: relative; z-index: 1; }
.member-label { color: var(--muted); }
.member-state { display: inline-flex; min-height: 26px; align-items: center; padding: 0 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 700; }
.member-state.is-inactive { background: var(--sand-deep); color: var(--muted); }
.member-level { color: var(--ink); font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.04em; }
.membership-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-card { min-height: 212px; padding: 22px 24px; }
.profile-heading { display: flex; align-items: center; gap: 12px; }
.profile-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: var(--coral); color: #fff; font-weight: 800; }
.profile-heading h2 { margin: 0; font-size: 16px; }
.profile-heading p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.profile-avatar { display: block; width: 42px; height: 42px; flex: none; border: 1px solid var(--line); border-radius: 50%; background: var(--sand); object-fit: cover; }
.profile-avatar[hidden] { display: none; }
.profile-list { display: grid; gap: 12px; margin: 22px 0 0; }
.profile-list div { display: flex; justify-content: space-between; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.profile-list dt { color: var(--muted); font-size: 12px; }
.profile-list dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: 13px; font-weight: 650; text-align: right; }
.profile-edit { display: grid; gap: 9px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.profile-edit label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.profile-edit input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); }
.profile-edit input:focus-visible { border-color: var(--coral); }
.profile-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-edit-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.text-button { min-height: 36px; padding: 0 4px; border: 0; background: transparent; color: var(--coral-dark); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: var(--ink); }
#profileEditMessage { color: var(--muted); font-size: 12px; }

/* 登录页保持官网原有配色比例，珊瑚红用于识别与操作强调。 */
.auth-brand { background: var(--sand); color: var(--ink); }
.auth-brand::before,.auth-brand::after { display: none; }
.auth-logo { color: var(--ink); }
.auth-logo-mark { background: var(--coral); color: #fff; }
.auth-overline { color: var(--coral-dark); }
.auth-brand-main h1 { color: var(--ink); }
.auth-brand-main > p { color: var(--ink-soft); }
.auth-list li { color: var(--ink-soft); }
.auth-list i { background: var(--coral-soft); color: var(--coral-dark); }
.auth-foot { color: var(--muted); }
.auth-panel { background: var(--paper); }
.auth-card .qrbox { box-shadow: var(--shadow); }
.logo-mark,.auth-logo-mark { display: block; width: 32px; height: 32px; border-radius: 0; background: transparent; object-fit: contain; }

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .membership-card,.profile-card { min-height: 0; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; padding: 24px 22px 12px; }
  .auth-brand-main { margin: 18px 0 10px; }
  .auth-brand-main h1 { margin: 10px 0; font-size: 28px; }
  .auth-brand-main > p { margin-bottom: 12px; font-size: 13px; }
  .auth-list { gap: 7px; }
  .auth-list li { font-size: 12px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 18px 20px 36px; }
  .auth-back { margin-bottom: 14px; }
}

/* 手机端记录改为字段卡片，避免用户需要横向猜测被遮挡的列。 */
@media (max-width: 560px) {
  .card.section > .table-wrap { overflow: visible; }
  .card.section table { width: 100%; min-width: 0; white-space: normal; }
  .card.section thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
  .card.section tbody { display: grid; gap: 9px; padding: 10px 12px; }
  .card.section tbody tr { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
  .card.section tbody td { display: grid; grid-template-columns: minmax(70px, .7fr) minmax(0, 1.3fr); gap: 12px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; white-space: normal; }
  .card.section tbody td:last-child { border-bottom: 0; }
  .card.section tbody td[data-label]::before { color: var(--muted); content: attr(data-label); font-size: 11px; }
  .card.section tbody td[colspan] { display: block; padding: 16px 12px; border: 0; text-align: center; }
  .card.section tbody tr:hover td { background: var(--white); }
}
