:root {
  --ink: #24222b;
  --muted: #716e7b;
  --purple: #7350df;
  --purple-dark: #25105e;
  --purple-deep: #10062f;
  --purple-soft: #eee9ff;
  --gold: #f0d39b;
  --paper: #ffffff;
  --canvas: #f5f4f8;
  --line: #e8e4ef;
  --danger: #b43a4b;
  --success: #247a58;
  --shadow: 0 12px 32px rgba(33, 17, 67, .08);
}
* { box-sizing: border-box; }
html { background: #e9e6ef; color: var(--ink); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #c7b6ff; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .62; }
a { color: inherit; }
img { max-width: 100%; }
.app-shell { width: 100%; max-width: 520px; min-height: 100dvh; margin: 0 auto; background: var(--canvas); overflow: clip; }
.initial-loading { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); }
.brand-seal { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--purple-deep); color: var(--gold); font: 28px "STKaiti", "KaiTi", serif; box-shadow: var(--shadow); }
.page { min-height: 100dvh; padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
.page-plain { padding: 22px 16px calc(44px + env(safe-area-inset-bottom)); }
.page-heading { display: flex; align-items: center; gap: 12px; min-height: 54px; margin-bottom: 18px; }
.page-heading h1 { margin: 0; font-size: 23px; letter-spacing: .02em; }
.back-button { width: 46px; height: 46px; flex: 0 0 46px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 27px; }
.hero { position: relative; min-height: 640px; padding: 26px 22px 38px; overflow: hidden; color: #fff; background: radial-gradient(circle at 16% 26%, rgba(121, 80, 223, .65), transparent 31%), radial-gradient(circle at 90% 48%, rgba(49, 0, 190, .75), transparent 38%), linear-gradient(155deg, #1c0751, #10052e 65%, #1e0750); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(120deg, transparent 15%, rgba(255,255,255,.06) 15.5%, transparent 16%), radial-gradient(circle at 70% 10%, rgba(255,255,255,.2) 0 1px, transparent 2px); background-size: auto, 46px 46px; }
.hero-visual { position: absolute; width: 380px; height: 380px; right: -190px; top: 60px; border: 1px solid rgba(240,211,155,.17); border-radius: 50%; box-shadow: 0 0 0 50px rgba(158,113,255,.03), 0 0 0 100px rgba(158,113,255,.025); }
.hero-content { position: relative; z-index: 1; }
.activity-number { margin: 0 0 28px; color: #cfc4ed; font-size: 14px; }
.brand-line { display: flex; align-items: center; gap: 12px; color: #f4e8ff; font-size: 16px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(240,211,155,.65); color: var(--gold); font: 20px "STKaiti", "KaiTi", serif; }
.hero-title { max-width: 420px; margin: 78px 0 18px; color: #f4d7aa; font: 700 43px/1.25 "STKaiti", "KaiTi", "Noto Serif CJK SC", serif; letter-spacing: .06em; text-shadow: 0 5px 22px rgba(0,0,0,.28); }
.hero-subtitle { margin: 0; color: #e4d8fa; font-size: 17px; line-height: 1.8; }
.hero-rule { margin-top: 62px; display: grid; gap: 0; }
.hero-rule div { display: grid; grid-template-columns: 66px 1fr; gap: 16px; padding: 15px 4px; border-bottom: 1px solid rgba(230,215,255,.18); font-size: 14px; }
.hero-rule strong { color: #f4e5c9; font: 18px "STKaiti", "KaiTi", serif; letter-spacing: .12em; }
.hero-rule span { color: #d1c4e9; }
.profile-fab { position: absolute; z-index: 3; right: 22px; top: 82px; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #e84373; color: white; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.profile-fab svg, .icon-button svg, .function-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card { margin: 16px 14px 0; padding: 22px 20px; border: 1px solid rgba(112,85,170,.08); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.purchase-summary { margin-top: -20px; position: relative; z-index: 2; }
.card-label { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.price-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.price { color: var(--purple-dark); font-size: 38px; font-weight: 750; letter-spacing: -.04em; }
.price small { font-size: 16px; font-weight: 500; }
.original-value { color: var(--muted); font-size: 14px; }
.section-kicker { margin: 0 0 8px; color: var(--purple); font-size: 13px; font-weight: 650; letter-spacing: .12em; }
.section-title { margin: 0 0 18px; font-size: 22px; }
.countdown-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; text-align: center; }
.time-cell { padding: 12px 4px; border-radius: 12px; background: var(--purple-soft); color: var(--purple-dark); font-size: 25px; font-weight: 700; font-variant-numeric: tabular-nums; }
.time-label { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.quota-line { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.quota-line strong { color: var(--purple-dark); }
progress { width: 100%; height: 7px; margin-top: 12px; border: 0; border-radius: 8px; overflow: hidden; background: var(--purple-soft); }
progress::-webkit-progress-bar { background: var(--purple-soft); }
progress::-webkit-progress-value { background: linear-gradient(90deg, #b399ff, #6c43db); }
progress::-moz-progress-bar { background: #7350df; }
.metrics { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.benefit-list { display: grid; gap: 12px; }
.benefit-item { position: relative; padding: 16px 16px 16px 54px; border: 1px solid var(--line); border-radius: 13px; }
.benefit-number { position: absolute; left: 14px; top: 17px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--purple-soft); color: var(--purple); font-size: 13px; font-weight: 700; }
.benefit-name { font-size: 16px; font-weight: 650; }
.benefit-detail { margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.benefit-quantity { float: right; color: var(--purple-dark); font-weight: 650; }
.merchant-name { margin: 0 0 10px; font-size: 18px; }
.merchant-address { color: var(--muted); line-height: 1.75; }
.notice-list { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.9; font-size: 14px; }
.bottom-bar { position: fixed; z-index: 10; bottom: 0; left: 50%; width: 100%; max-width: 520px; transform: translateX(-50%); display: grid; grid-template-columns: 58px 58px 58px 1fr; align-items: center; gap: 3px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 0 -8px 30px rgba(35,21,61,.06); }
.icon-button { min-height: 50px; border: 0; background: transparent; color: #46414f; font-size: 12px; display: grid; justify-items: center; align-content: center; gap: 3px; }
.primary-button { min-height: 52px; padding: 13px 20px; border: 0; border-radius: 999px; background: linear-gradient(100deg, #27105e, #4314a0); color: white; font-weight: 650; box-shadow: 0 9px 20px rgba(60,26,141,.18); transition: transform 90ms ease, box-shadow 180ms ease; white-space: nowrap; font-size: 14px; }
.primary-button:active { transform: scale(.975); box-shadow: 0 3px 8px rgba(60,26,141,.15); }
.secondary-button { min-height: 48px; padding: 11px 20px; border: 1px solid #cfc4e9; border-radius: 999px; background: white; color: var(--purple-dark); font-weight: 600; }
.text-button { min-height: 44px; border: 0; background: transparent; color: var(--purple); }
.full-width { width: 100%; }
.sheet { width: min(100%, 520px); max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 22px 22px 0 0; background: white; color: var(--ink); box-shadow: 0 -20px 60px rgba(20,10,40,.18); }
.sheet::backdrop { background: rgba(14,7,30,.66); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheet-in 300ms cubic-bezier(.2,.8,.2,1); }
.sheet-body { padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); overflow: auto; max-height: 88dvh; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.sheet-header h2 { margin: 0; font-size: 21px; }
.close-button { width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--canvas); color: var(--muted); font-size: 23px; }
.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field label, .field-label { font-size: 14px; font-weight: 650; }
.field input { width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid #d9d3e3; border-radius: 12px; background: #faf9fc; color: var(--ink); font-size: 16px; }
.field input:focus { border-color: var(--purple); background: white; }
.field-error { min-height: 20px; color: var(--danger); font-size: 13px; }
.agreement-check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.agreement-check input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--purple); }
.agreement-check button { border: 0; padding: 0; background: transparent; color: var(--purple); }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.form-error { padding: 12px; border-radius: 10px; background: #fff0f1; color: var(--danger); font-size: 14px; line-height: 1.6; }
.form-error:empty { display: none; }
.result-panel { padding: 18px; border-radius: 14px; background: var(--purple-soft); }
.result-number { margin: 10px 0; color: var(--purple-dark); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.status { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; background: #fff3d9; color: #91631b; font-size: 12px; white-space: nowrap; }
.status-paid { background: #e9f4ff; color: #27698d; }
.status-refunded { background: #e5f5ed; color: var(--success); }
.status-refund_requested { background: #fff0e4; color: #a34c20; }
.poster { overflow: hidden; border-radius: 16px; background: var(--purple-deep); color: white; text-align: center; }
.poster-copy { padding: 30px 22px; }
.poster-copy h3 { margin: 8px 0 12px; color: var(--gold); font: 28px "STKaiti", "KaiTi", serif; }
.poster-copy p { color: #d8caef; line-height: 1.7; }
.poster-share { padding: 20px; background: white; color: var(--ink); }
.poster-share img { display: block; width: 180px; height: 180px; margin: 0 auto 12px; }
.poster-share p { margin: 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 36px); padding: 12px 18px; border-radius: 12px; background: rgba(26,20,35,.94); color: white; font-size: 14px; box-shadow: var(--shadow); }
.profile-hero { padding: 28px 20px 88px; background: linear-gradient(135deg, #815bea, #6940d0); color: white; }
.identity { display: flex; align-items: center; gap: 14px; }
.avatar { width: 66px; height: 66px; display: grid; place-items: center; flex: 0 0 66px; border-radius: 50%; background: #eee8ff; color: var(--purple-dark); font-size: 24px; font-weight: 700; object-fit: cover; }
.identity-name { max-width: 300px; margin: 0 0 7px; font-size: 21px; font-weight: 650; overflow-wrap: anywhere; }
.identity-meta { color: #e5dcff; font-size: 13px; }
.role-tag { display: inline-block; margin-right: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.14); }
.account-summary { position: relative; z-index: 1; margin-top: -66px; }
.amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.amount-grid strong { display: block; margin-bottom: 7px; font-size: 20px; font-variant-numeric: tabular-nums; }
.amount-grid span { color: var(--muted); font-size: 12px; }
.stats-table { width: 100%; margin-top: 22px; border-collapse: collapse; text-align: right; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 12px 5px; border-bottom: 1px solid #f0edf4; font-size: 13px; }
.stats-table th:first-child, .stats-table td:first-child { text-align: left; }
.stats-table th { color: var(--muted); font-weight: 500; }
.functions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 8px; }
.function-button { min-height: 70px; padding: 0; border: 0; background: transparent; color: var(--ink); display: grid; justify-items: center; gap: 9px; font-size: 12px; }
.function-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--purple); color: white; }
.function-button:nth-child(2) .function-icon { background: #ee676d; }
.function-button:nth-child(3) .function-icon { background: #f29c35; }
.function-button:nth-child(4) .function-icon { background: #e64d74; }
.function-button:nth-child(5) .function-icon { background: #4c9cdb; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 20px; }
.search-row input { min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid transparent; border-radius: 999px; background: white; font-size: 16px; }
.search-row button { min-width: 76px; border: 0; border-radius: 999px; background: var(--purple); color: white; }
.order-list { display: grid; gap: 14px; }
.order-card { padding: 18px; border-radius: 16px; background: white; box-shadow: 0 6px 20px rgba(33,17,67,.045); }
.order-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-id { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.order-title { margin: 13px 0 8px; font-size: 16px; font-weight: 650; line-height: 1.55; }
.order-meta { color: var(--muted); font-size: 13px; line-height: 1.85; }
.order-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.order-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty-state { min-height: 310px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 17px; }
.error-state { padding: 26px; text-align: center; }
.share-summary { padding: 24px; border-radius: 18px; background: linear-gradient(135deg, #815bea, #6940d0); color: white; }
.share-total { font-size: 38px; font-weight: 700; }
.share-periods { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; text-align: center; }
.share-periods strong { display: block; font-size: 21px; }
.share-periods span { color: #e5dcff; font-size: 12px; }
.rank-list { display: grid; gap: 12px; }
.rank-card { padding: 15px; border-radius: 16px; background: white; }
.rank-main { width: 100%; display: grid; grid-template-columns: 28px 46px 1fr 24px; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; }
.rank-number { color: var(--muted); text-align: center; }
.rank-card .avatar { width: 46px; height: 46px; flex-basis: 46px; font-size: 17px; }
.rank-name { display: block; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.rank-count { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.rank-detail { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.rank-detail-row { padding: 10px 0; border-bottom: 1px solid #f2eff5; font-size: 13px; }
.rank-detail-row span { display: block; margin-top: 4px; color: var(--muted); }
.account-hero { padding: 30px 20px; background: linear-gradient(135deg, #815bea, #6940d0); color: white; text-align: center; }
.account-available { margin: 12px 0 24px; font-size: 40px; font-weight: 700; }
.account-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.account-secondary strong { display: block; margin-bottom: 6px; font-size: 20px; }
.account-secondary span { color: #e5dcff; font-size: 12px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.tabs button { min-height: 48px; border: 0; border-bottom: 2px solid var(--line); background: transparent; color: var(--muted); }
.tabs button.active { border-color: var(--purple); color: var(--purple); font-weight: 650; }
.ledger-list { display: grid; }
.ledger-row { display: flex; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.ledger-row strong { display: block; margin-bottom: 5px; }
.ledger-row time { color: var(--muted); font-size: 12px; }
.ledger-amount { font-size: 18px; font-weight: 700; white-space: nowrap; }
.ledger-amount.positive { color: var(--success); }
.ledger-amount.negative { color: var(--danger); }
.segment { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 13px; background: #efecf4; }
.segment button { min-height: 46px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.segment button.active { background: var(--purple); color: white; }
.account-fields[data-kind="private"] .business-only, .account-fields[data-kind="business"] .private-only { display: none; }
@keyframes sheet-in { from { transform: translateY(32px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 700px) {
  .app-shell { box-shadow: 0 0 60px rgba(36,22,54,.12); }
  .hero { min-height: 670px; }
  .hero-title { font-size: 48px; }
}
@media (max-width: 360px) {
  .hero { padding-inline: 17px; }
  .hero-title { font-size: 36px; }
  .card { margin-inline: 10px; padding-inline: 16px; }
  .bottom-bar { grid-template-columns: 50px 50px 50px 1fr; padding-inline: 8px; }
  .primary-button { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
