@layer legacy {
:root {
  font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { scrollbar-width: none; }
body::-webkit-scrollbar { display: none; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; line-height: 1.4; }
p { color: var(--muted); }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.icon {
  display: inline-block; flex-shrink: 0; vertical-align: middle; background: currentColor;
  mask: var(--icon) center / contain no-repeat;
  -webkit-mask: var(--icon) center / contain no-repeat;
}
#app { --page-gutter: 20px; width: 100%; max-width: 430px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 0 var(--page-gutter); }
.header {
  position: sticky; top: 0; z-index: 50; background: var(--bg);
  margin-inline: calc(-1 * var(--page-gutter));
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  min-height: 82px; padding: 20px var(--page-gutter);
  border-bottom: 1px solid var(--soft-line);
}
.header-leading { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.header-menu { position: relative; }
.menu-button {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 38px; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); color: var(--text);
}
.menu-button:hover, .menu-button[aria-expanded="true"] {
  background: var(--hover-surface); color: var(--accent-dark);
}
.menu-bars, .menu-bars::before, .menu-bars::after {
  display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ''; position: absolute; left: 0; }
.menu-bars::before { top: -5px; }
.menu-bars::after { top: 5px; }
.header-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex: 1; min-width: 0;
}
.brand { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; font-size: 16px; font-weight: 750; letter-spacing: -.8px; line-height: 1; }
/* 标志与导航靠左排列，品牌文字由页眉的对称网格独立居中。 */
.header-logo { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-logo { display: block; flex-shrink: 0; width: 36px; height: 36px; object-fit: contain; }
.header .brand { justify-content: center; justify-self: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 43px; padding: 10px 16px; font-size: 14px; font-weight: 500;
  line-height: 1.5; border: 1px solid transparent; border-radius: 10px;
  transition: background .15s, border-color .15s;
}
.button.primary { background: var(--accent-fill); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-fill-hover); }
.button.secondary { background: var(--soft-surface); color: var(--accent-dark); border-color: var(--line); }
.button.secondary:hover { background: var(--hover-surface); }
.button:disabled { opacity: .65; cursor: wait; }
.wallet-button {
  position: relative; min-width: 0; gap: 6px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; font-weight: 500; min-height: 38px; padding: 7px 10px;
  white-space: nowrap; border-radius: 999px;
}
.wallet-button > .icon:first-child { color: var(--accent); }
.wallet-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wallet-button::after { content: ''; position: absolute; inset: -3px 0; border-radius: inherit; }
.wallet-button:hover { background: var(--hover-surface); }
.language-button {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; min-height: 38px; padding: 0; border-radius: 6px; flex-shrink: 0;
  border: 0; background: transparent; color: var(--muted); font-size: 12px;
  transition: background .15s, border-color .15s, color .15s;
}
.language-button::after { content: ''; position: absolute; inset: -4px 0; }
.language-button:hover, .language-button:focus-visible {
  background: var(--surface); color: var(--accent);
}
.language-button:active { background: var(--hover-surface); }
.language-options { display: grid; gap: 8px; margin-top: 20px; }
.language-option {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px;
  border: 1px solid var(--soft-line); border-radius: 14px;
  background: var(--surface); color: var(--text); text-align: left;
  transition: background .15s, border-color .15s;
}
.language-option-icon {
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px;
  background: var(--soft-surface); color: var(--accent-soft);
}
.language-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border: 1.3px solid currentColor; border-radius: 6px;
  background: var(--surface); font-size: 10px; font-weight: 650; letter-spacing: -.3px;
  line-height: 1; box-shadow: 3px 3px 0 -1px var(--soft-surface), 3px 3px 0 0 currentColor;
  transform: translate(-1.5px, -1.5px);
}
.language-option[lang="zh-Hant"] .language-glyph { font-size: 13px; }
.language-option-label { flex: 1; font-size: 15px; }
.language-option-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
}
.language-option:hover, .language-option[aria-pressed="true"] {
  border-color: var(--line); background: var(--hover-surface); color: var(--accent-dark);
}
.language-option[aria-pressed="true"] .language-option-icon {
  background: var(--selected-surface); color: var(--accent-dark);
}
.language-option[aria-pressed="true"] .language-glyph {
  box-shadow: 3px 3px 0 -1px var(--selected-surface), 3px 3px 0 0 currentColor;
}
.language-option[aria-pressed="true"] .language-option-check {
  background: var(--accent-fill); color: var(--on-accent);
}
.navigation {
  position: absolute; top: calc(100% + 10px); left: 0;
  display: flex; flex-direction: column; gap: 4px; width: 220px;
  max-width: calc(100vw - 2 * var(--page-gutter));
  max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px); overflow-y: auto; padding: 8px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); box-shadow: 0 12px 32px var(--shadow);
}
.navigation[hidden] { display: none; }
.nav-item { padding: 11px 14px; border-radius: 8px; font-size: 14px; line-height: 1.6; }
.nav-item.active { font-weight: 700; background: var(--selected-surface); color: var(--accent-dark); }
.nav-item-pending {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--muted); cursor: default;
}
.nav-item-pending small { flex-shrink: 0; font-size: 10px; }
.nav-item:not(.nav-item-pending):hover { background: var(--hover-surface); color: var(--accent-dark); }
main { padding-top: 31px; }
main:has(.home-hero) { padding-top: 42px; }
.home-hero { position: relative; }
.home-hero h1 { font-size: 39px; font-weight: 750; letter-spacing: -1.8px; line-height: 1.32; }
.asset-nodes { position: absolute; width: 101px; height: 121px; object-fit: contain; top: -4px; right: 0; }
.home-hero p { margin-top: 15px; font-size: 12px; letter-spacing: .5px; color: var(--muted); white-space: nowrap; }
.home-hero p span { font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: .4px; }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.page-heading { margin-bottom: 25px; }
.eyebrow { color: var(--accent-dark); font: 10px 'Courier New', monospace; letter-spacing: 1.4px; margin-bottom: 9px; }
.page-heading h1 { font-size: 27px; letter-spacing: -.8px; }
.page-heading p { font-size: 13px; margin-top: 6px; }
.asset-form { margin-bottom: 20px; padding: 20px; border-radius: 18px; background: var(--tonal); }
.field-label { display: block; font-size: 13px; font-weight: 500; margin: 19px 0 7px; }
input:not([type=checkbox]):not([type=file]), textarea, select {
  width: 100%; min-height: 45px; padding: 12px 13px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; min-height: 180px; padding: 26px 17px; text-align: center; position: relative;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); color: var(--accent-soft);
}
.dropzone strong { font-weight: 500; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.dropzone > span:not(.icon) { font-size: 11px; color: var(--muted); }
.dropzone.has-file { border-style: solid; border-color: var(--line); }
.dropzone.drag-over { background: var(--hover-surface); border-color: var(--accent); }
.text-button { padding: 0; border: 0; background: none; color: var(--accent-dark); font-size: 13px; }
.text-button:hover, .text-link:hover { color: var(--accent-dark); }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--accent-dark); }
.sample-button { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin: 11px 0 0 auto; font-size: 11px; }
.optional-field { margin: 18px 0 20px; }
.optional-field summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 7px 0; }
.optional-field summary span { font-size: 11px; color: var(--muted); margin-left: 4px; }
.optional-field textarea { margin-top: 8px; }
.full-width { width: 100%; }
.form-note { color: var(--muted); font-size: 11px; margin-top: 10px; text-align: center; }
.record-section { padding: 20px; margin-bottom: 24px; border: 1px solid var(--soft-line); border-radius: 18px; background: var(--surface); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.section-heading h2 { font-size: 17px; }
.count { font-size: 11px; font-weight: 500; margin-left: 4px; color: var(--accent); }
.subtle { font-size: 11px; color: var(--muted); }
.asset-record { padding: 15px 0; border-bottom: 1px solid var(--soft-line); }
.asset-record:last-child { border-bottom: 0; }
.record-heading { display: flex; align-items: center; gap: 12px; }
.record-heading > div { min-width: 0; }
.record-heading h3 { font-size: 14px; overflow-wrap: anywhere; }
.record-heading p { font-size: 11px; margin-top: 3px; }
.record-icon { color: var(--accent-soft); display: flex; width: 32px; flex-shrink: 0; justify-content: center; }
.record-actions { margin-top: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.verification-records { display: grid; gap: 10px; }
.verification-record {
  padding: 14px; border-bottom: 0; border-radius: 13px; background: var(--soft-surface);
}
.verification-asset-title {
  display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0;
  color: inherit; background: none; font: inherit; font-weight: inherit; text-align: left;
}
.verification-asset-title .icon { color: var(--muted); flex-shrink: 0; }
.verification-failed-tag {
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
}
.verification-failed-tag .icon { color: var(--muted); }
.verification-failure-detail {
  padding: 11px 12px; margin-top: 12px; border-radius: 9px; background: var(--surface);
}
.verification-failure-detail strong { font-size: 11px; font-weight: 600; }
.verification-failure-detail p { font-size: 12px; line-height: 1.7; margin-top: 4px; }
.verification-failure-detail > span {
  display: block; margin-top: 7px; font-size: 11px; line-height: 1.6; color: var(--muted);
}
.verification-chain { padding: 12px; margin-top: 12px; border-radius: 9px; background: var(--surface); }
.verification-chain-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.verification-chain-title .icon { color: var(--accent); }
.verification-chain-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin: 12px 0 0; }
.verification-chain-fields dt { font-size: 10px; color: var(--muted); }
.verification-chain-fields dd { margin: 3px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.verification-chain-fields .verification-chain-hash { grid-column: 1 / -1; }
.verification-chain-hash dd { font: 11px 'Courier New', monospace; color: var(--accent-dark); }
.verification-chain-details { margin-top: 12px; }
.verification-chain-details summary { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--muted); cursor: pointer; list-style: none; }
.verification-chain-details summary::-webkit-details-marker { display: none; }
.verification-chain-details[open] summary .icon { transform: rotate(180deg); }
.verification-chain-details code { display: block; margin-top: 8px; font-size: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.verification-chain-details > span, .verification-receipt-missing { display: block; font-size: 10px; color: var(--muted); margin-top: 8px; }
.verification-chain-pending { display: flex; align-items: flex-start; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.verification-chain-pending .icon { flex-shrink: 0; margin-top: 2px; }
.verification-token { margin-top: 10px; padding: 12px; border-radius: 9px; background: var(--surface); }
.verification-token-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.verification-token-heading > strong { font-size: 11px; font-weight: 600; }
.verification-token-heading .tag { color: var(--accent-dark); }
.verification-token-body { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.verification-token-symbol { display: flex; color: var(--accent); flex-shrink: 0; }
.verification-token-body > div { min-width: 0; flex: 1; }
.verification-token-body > div strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.verification-token-body > div span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.verification-token-body > p { flex: 1; font-size: 11px; color: var(--muted); line-height: 1.6; }
.verification-token-body .text-button { display: flex; align-items: center; gap: 4px; flex-shrink: 0; font-size: 11px; }
.record-asset { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; padding: 3px 7px; color: var(--accent-soft); background: var(--soft-surface); font-size: 10px; white-space: nowrap; }
.empty-state { padding: 23px 0; text-align: center; color: var(--accent-soft); }
.empty-state p { font-size: 12px; }
.token-empty { padding: 30px 0 40px; }
.token-empty h2 { font-size: 19px; margin: 15px 0 7px; }
.token-empty .button { margin-top: 21px; }
.token-symbol { font-size: 10px; color: var(--accent); margin-left: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.overview-panel { padding: 20px; background: var(--tonal); border-radius: 18px; margin-bottom: 14px; }
.balance-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.balance-summary > div + div { border-left: 1px solid var(--line); padding-left: 14px; }
.balance-summary span { display: block; font-size: 12px; color: var(--muted); }
.balance-summary strong { display: block; font-size: 21px; font-weight: 650; margin-top: 5px; overflow-wrap: anywhere; }
.balance-summary small { font-size: 10px; font-weight: 500; white-space: nowrap; }
.text-accent { color: var(--accent-dark); }
.access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; margin: 0 2px 14px; }
.access-row a { color: var(--accent-dark); display: flex; align-items: center; gap: 5px; }
.plan-list { background: var(--tonal); border-radius: 18px; padding: 20px 16px 8px; margin-bottom: 20px; }
.plan-list .section-heading { margin: 0 4px 7px; }
.plan-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 3px 10px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.plan-row:last-child { border-bottom: 0; }
.plan-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--accent); background: var(--surface); border-radius: 50%; }
.plan-copy h3 { font-size: 13px; overflow-wrap: anywhere; }
.plan-copy p { font-size: 11px; margin-top: 2px; }
.plan-rate strong { font-size: 18px; font-weight: 650; color: var(--accent-dark); white-space: nowrap; }
.plan-rate small { font-size: 12px; }
.plan-row .button { font-size: 12px; min-height: 36px; padding: 7px 12px; border-radius: 10px; }
.plan-minimum { grid-column: 2 / -1; font-size: 10px; margin-top: 3px; }
.earn-note { margin: 10px 3px 20px; text-align: left; }
.position { padding: 18px 0; border-bottom: 1px solid var(--soft-line); }
.position:last-child { border: 0; }
.position-title { display: flex; align-items: center; justify-content: space-between; }
.position-title h3 { font-size: 15px; }
.position-title p { font-size: 11px; margin-top: 3px; }
.position-values { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 19px 0; }
.position-values span { display: block; font-size: 11px; color: var(--muted); }
.position-values strong { display: block; font-size: 20px; font-weight: 500; margin-top: 4px; }
.position-values small { font-size: 10px; }
.progress-label { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--muted); }
.progress-label strong { color: var(--accent); font-size: 11px; font-weight: 500; margin-left: 3px; }
.progress-track { height: 6px; background: var(--track); border-radius: 6px; margin-top: 9px; overflow: hidden; }
.progress-track > div { height: 100%; min-width: 6px; border-radius: 6px; background: var(--accent); }
.progress-end { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; margin-top: 6px; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 18px 0; border: 1px solid var(--soft-line); border-radius: 16px; background: var(--surface); margin-bottom: 12px; padding-inline: 16px; }
.account-icon { color: var(--accent); display: flex; }
.account-row h2 { font-size: 15px; }
.account-row p { font-size: 11px; margin-top: 3px; }
.account-row .text-button { margin-left: auto; }
.portfolio-summary { padding: 20px; background: var(--tonal); border-radius: 18px; margin-bottom: 26px; }
.portfolio-summary > span { color: var(--text); font-size: 15px; font-weight: 600; }
.portfolio-summary > strong { display: block; font-size: 33px; letter-spacing: -1px; line-height: 1.4; margin-top: 7px; }
.portfolio-summary > strong small { font-size: 14px; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.portfolio-summary > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.portfolio-summary b { display: block; font-size: 21px; margin-top: 3px; font-weight: 600; color: var(--accent-dark); }
.group-heading { font-size: 18px; margin-bottom: 12px; }
.profile-modules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.profile-module {
  position: relative; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); transition: background .15s, border-color .15s;
}
.profile-module:hover { background: var(--surface); border-color: var(--line); }
.module-top { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: center; color: var(--accent); }
.module-top > span:not(.icon) { font-size: 13px; color: var(--text); font-weight: 600; }
.module-top > .icon:last-child { position: absolute; right: 16px; bottom: 48px; color: var(--text); }
.profile-module > strong { font-size: 28px; line-height: 1.3; margin: 8px 24px 8px 36px; font-weight: 600; }
.module-label { font-size: 14px; margin-top: 4px; }
.profile-module > small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.collection-back { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; color: var(--muted); font-size: 12px; }
.collection-back > .icon { transform: rotate(180deg); }
.collection-heading { margin-top: 16px; }
.collection-tabs { display: flex; gap: 8px; margin: 22px 0 18px; padding: 5px; border-radius: 12px; background: var(--soft-surface); }
.collection-tabs a { flex: 1; min-width: 0; padding: 9px 6px; text-align: center; font-size: 13px; border-radius: 9px; color: var(--muted); }
.collection-tabs a[aria-current="page"] { background: var(--surface); color: var(--accent-dark); box-shadow: 0 2px 5px var(--shadow); }
.collection-list { display: grid; gap: 10px; margin-bottom: 28px; }
.collection-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 16px 14px; border: 1px solid var(--soft-line); border-radius: 14px; background: var(--surface);
}
.collection-item:hover { border-color: var(--line); }
.collection-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--soft-surface); color: var(--accent); }
.collection-icon img, .record-icon img { width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; }
.collection-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.collection-copy > strong { font-size: 14px; font-weight: 600; color: var(--text); }
.collection-copy > small { font-size: 11px; color: var(--muted); }
.collection-status { font-size: 10px; color: var(--accent-dark); }
.collection-item > .icon { color: var(--muted); }
.collection-empty { padding-block: 36px; }
.collection-empty > .icon { color: var(--accent-soft); margin-bottom: 14px; }
.collection-empty h2 { font-size: 18px; }
.collection-empty .button { margin-top: 20px; }
.detail-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 22px; text-align: center; }
.detail-hero h3 { max-width: 100%; overflow-wrap: anywhere; }
.detail-fields { margin: 24px 0; }
.detail-fields > div { display: flex; justify-content: space-between; align-items: start; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); }
.detail-fields dt { font-size: 12px; color: var(--muted); }
.detail-fields dd { margin: 0; max-width: 60%; text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.detail-fields .text-button { white-space: normal; text-align: right; }
.detail-description { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; border-radius: 12px; background: var(--soft-surface); margin-bottom: 20px; font-size: 12px; }
.invitation-panel { padding: 20px; background: var(--surface); border: 1px solid var(--soft-line); border-radius: 16px; margin-bottom: 20px; }
.invitation-panel form { display: flex; gap: 9px; }
.invitation-panel form input { min-width: 0; }
.invitation-panel .button { min-width: 70px; padding: 10px; }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 9px; }
.invitation-bound { display: flex; align-items: center; justify-content: space-between; }
.invitation-bound strong { font-family: monospace; font-size: 16px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 20px; display: flex; align-items: center; justify-content: center; background: var(--backdrop); backdrop-filter: blur(5px); }
.modal { width: 390px; max-height: 90vh; max-height: 90dvh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 20px 70px var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h2 { font-size: 18px; }
/* 语言等选择面板在所有页面统一从底部弹出。 */
.sheet-backdrop { align-items: flex-end; padding: 0; }
.sheet-backdrop .modal {
  width: 430px; max-width: 100%; border-radius: 22px 22px 0 0;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
/* 购买面板采用选定图片的紧凑底部布局，高度随内容收拢，所有步骤共用底部锚点。 */
.checkout-backdrop { align-items: flex-end; padding: 0; }
.checkout-dialog {
  display: flex; flex-direction: column; width: 430px; max-width: 100%;
  height: auto; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: hidden;
  border-radius: 22px 22px 0 0; padding: 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.checkout-dialog > .modal-header { flex-shrink: 0; margin-bottom: 22px; }
.checkout-dialog > .modal-header h2 { font-size: 21px; }
.checkout-content {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
}
.checkout-content::-webkit-scrollbar { display: none; }
.purchase-summary { padding-bottom: 17px; border-bottom: 1px solid var(--soft-line); }
.purchase-summary h3 { font-size: 17px; }
.purchase-summary p { font-size: 12px; line-height: 1.8; margin-top: 5px; }
.checkout-content > #buy-form { margin-top: 20px; }
.purchase-amount-input {
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  min-height: 58px; border: 1px solid var(--line); border-radius: 12px;
}
.purchase-amount-input:focus-within { border-color: var(--accent); }
.purchase-amount-input input[type=text] {
  min-width: 0; flex: 1; height: 56px; padding: 0; border: 0; background: transparent;
  box-shadow: none; font-size: 22px;
}
.purchase-amount-input > span { color: var(--muted); font-size: 15px; }
.purchase-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 0; margin-top: 13px; border-bottom: 1px solid var(--soft-line); font-size: 13px; }
.purchase-wallet > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.purchase-wallet .icon { color: var(--muted); }
.purchase-network { color: var(--accent-dark); font-size: 11px; padding: 4px 9px; border-radius: 7px; background: var(--soft-surface); }
.checkout-dialog .checkbox-field { margin: 15px 0 19px; min-height: 36px; align-items: center; }
.checkout-dialog .button.primary { min-height: 49px; border-radius: 12px; font-size: 14px; }
.purchase-disclaimer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 14px; }
.checkout-steps { display: flex; gap: 8px; padding: 0; margin: 0 0 20px; list-style: none; counter-reset: checkout; }
.checkout-steps li { flex: 1; font-size: 11px; color: var(--muted); border-bottom: 2px solid var(--soft-line); padding-bottom: 8px; counter-increment: checkout; }
.checkout-steps li::before { content: counter(checkout) '. '; }
.checkout-steps li[aria-current="step"] { color: var(--accent-dark); border-color: var(--accent); }
.checkout-amount { text-align: center; margin: 20px 0 8px; }
.checkout-amount > span { color: var(--muted); font-size: 12px; }
.checkout-amount > strong { display: block; font-size: 32px; font-weight: 600; margin-top: 4px; }
.checkout-amount small { font-size: 14px; color: var(--muted); font-weight: 400; }
.checkout-note { font-size: 12px; line-height: 1.8; min-height: 44px; margin: 17px 0; }
.checkout-status { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 22px 0; }
.checkout-status p { font-size: 12px; }
.checkout-status .spinner { width: 26px; height: 26px; border-color: var(--track); border-top-color: var(--accent); }
.checkout-dialog .modal-later { margin: 7px auto 0; min-height: 36px; }
.purchase-receipt { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 8px 0 24px; text-align: center; }
.receipt-check { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); margin-bottom: 5px; }
.purchase-receipt h3 { font-size: 21px; }
.purchase-receipt p { font-size: 12px; }
.purchase-receipt > strong { font-size: 32px; font-weight: 600; margin-top: 12px; }
.purchase-receipt small { font-size: 14px; font-weight: 400; color: var(--muted); }
.icon-button { display: flex; border: 0; background: none; padding: 7px; color: var(--muted); }
.modal-intro { margin: 17px 0 23px; font-size: 13px; line-height: 1.9; }
.wallet-option { display: flex; align-items: center; width: 100%; gap: 12px; text-align: left; padding: 16px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft-surface); }
.wallet-provider { display: flex; color: var(--accent); }
.wallet-option strong { font-size: 14px; color: var(--text); font-weight: 500; }
.wallet-option small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.wallet-option > .icon { margin-left: auto; color: var(--accent); }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 13px; margin-top: 18px; border-radius: 9px; background: var(--soft-surface); font-size: 11px; color: var(--muted); }
.notice .icon { color: var(--accent); margin-top: 2px; }
.wallet-modal-icon { display: flex; justify-content: center; align-items: center; width: 62px; height: 62px; margin: 24px auto 0; border-radius: 50%; color: var(--accent); background: var(--soft-surface); }
.wallet-modal-icon + .modal-intro { text-align: center; }
.address-box { overflow-wrap: anywhere; background: var(--soft-surface); padding: 13px; font-size: 12px; border-radius: 9px; margin-bottom: 20px; color: var(--accent-dark); }
.modal-later { display: block; margin: 19px auto 0; color: var(--muted); font-size: 12px; }
.checkbox-field { display: flex; align-items: center; gap: 9px; font-size: 12px; margin: 20px 0 6px; color: var(--muted); }
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; }
.info-inline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; margin: 18px 0; }
.info-inline .icon { color: var(--accent); }
.score-circle { display: flex; align-items: center; justify-content: center; flex-direction: column; width: 114px; height: 114px; border: 2px solid var(--line); border-radius: 50%; margin: 25px auto 17px; background: var(--soft-surface); }
.score-circle strong { font-size: 37px; font-weight: 500; color: var(--accent); line-height: 1.25; }
.score-circle span { font-size: 10px; color: var(--muted); }
.modal-center { text-align: center; font-size: 16px; overflow-wrap: anywhere; }
.modal-center + .modal-intro { text-align: center; font-size: 12px; }
.assessment { display: flex; justify-content: space-between; border-top: 1px solid var(--soft-line); padding: 16px 0 23px; font-size: 11px; color: var(--muted); }
.assessment strong { display: block; font-weight: 500; color: var(--accent-dark); margin-top: 4px; }
.center { text-align: center; }
.spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
#toast { position: fixed; bottom: 25px; left: 50%; transform: translate(-50%, 15px); max-width: calc(100vw - 40px); width: max-content; padding: 11px 18px; border-radius: 10px; background: var(--toast); color: var(--text); box-shadow: 0 8px 25px var(--shadow); z-index: 200; pointer-events: none; opacity: 0; font-size: 12px; text-align: center; transition: .2s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 374px) {
  #app { --page-gutter: 17px; }
  .brand { font-size: 16px; letter-spacing: -.7px; }
  .wallet-label { display: none; }
  .header { gap: 9px; }
  .header-actions { gap: 8px; }
  .language-button { gap: 4px; font-size: 11px; }
  .wallet-button { font-size: 11px; padding-inline: 8px; gap: 4px; }
  .home-hero h1 { font-size: 34px; }
  .asset-nodes { width: 83px; height: 106px; top: -2px; }
  .home-hero p { font-size: 10px; letter-spacing: .2px; }
  .home-hero p span { font-size: 9px; }
  .plan-row { gap: 3px 7px; grid-template-columns: 30px minmax(0, 1fr) auto auto; }
  .plan-icon { width: 30px; height: 30px; }
  .plan-row .button { padding-inline: 9px; }
  .plan-rate strong { font-size: 16px; }
  .asset-form, .record-section, .overview-panel { padding: 16px; }
  .balance-summary strong { font-size: 20px; }
  .position-values strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *:not(.asset-introduction *),
  *:not(.asset-introduction *)::before,
  *:not(.asset-introduction *)::after {
    animation: none !important; transition: none !important;
  }
}

/* 多语言保持移动端单列布局，长文案允许换行，避免固定宽度裁切。 */
html:not(:lang(zh-Hant)) .home-hero h1 {
  max-width: calc(100% - 90px); font-size: 29px; letter-spacing: -.8px;
  line-height: 1.35; overflow-wrap: anywhere;
}
html:lang(ja) .home-hero h1 { font-size: 25px; }
html:lang(ko) .home-hero h1 { font-size: 29px; }
.position-title { gap: 10px; }
.position-title > div { min-width: 0; }
.progress-label { flex-wrap: wrap; }
.account-row .text-button { flex-shrink: 0; }
.invitation-bound { gap: 12px; flex-wrap: wrap; }
@media (max-width: 374px) {
  html:not(:lang(zh-Hant)) .home-hero h1 { font-size: 26px; }
  html:lang(ja) .home-hero h1 { font-size: 22px; }
  html:not(:lang(zh-Hant)) .wallet-button { font-size: 11px; }
}

/* 资产来源汇入 AI 评估，经过上链存证形成档案，再分支到核验与追溯。 */
main:has(.home-intro-hero) { padding-top: 18px; padding-bottom: 16px; }
.home-kicker { display: block; color: var(--accent-dark); font-size: 11px; margin-bottom: 8px; }
.home-intro-hero h1 { font-size: 31px; letter-spacing: -1px; line-height: 1.28; }
.home-intro-hero p { margin-top: 10px; font-size: 12px; line-height: 1.7; white-space: normal; letter-spacing: 0; color: var(--muted); }
html:not(:lang(zh-Hant)) .home-intro-hero h1 { max-width: none; font-size: 28px; }
html:lang(ja) .home-intro-hero h1 { font-size: 25px; }
.asset-introduction { padding: 16px; margin-top: 16px; border-radius: 20px; background: var(--diagram-surface); }
.intro-caption { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 9px 'Courier New', monospace; letter-spacing: 1px; color: var(--muted); }
.asset-introduction > h2 { font-size: 17px; margin-top: 0; letter-spacing: -.4px; }
.asset-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.asset-sources > span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border: 1px solid var(--line); background: var(--soft-surface); border-radius: 10px; color: var(--muted); font-size: 11px; }
.asset-sources .icon { color: var(--accent-soft); }
.source-convergence { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); height: 19px; margin-inline: 16.666%; }
.source-convergence::after { content: ''; position: absolute; left: 0; right: 0; top: 9px; border-top: 1px solid var(--line); }
.source-convergence i { position: absolute; top: 0; height: 10px; border-left: 1px solid var(--line); }
.source-convergence i:nth-child(1) { left: 0; }
.source-convergence i:nth-child(2) { left: 50%; height: 19px; }
.source-convergence i:nth-child(3) { right: 0; }
.asset-assessment { display: flex; align-items: center; gap: 11px; padding: 9px 14px; border-radius: 13px; background: var(--accent-fill); color: var(--on-accent); }
.assessment-symbol { display: flex; flex-shrink: 0; }
.asset-assessment h3 { font-size: 15px; }
.asset-assessment p { margin-top: 3px; font-size: 10px; color: var(--on-accent-muted); }
.asset-assessment > div { min-width: 0; }
.asset-link { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; padding: 5px 0 3px; font-size: 10px; color: var(--muted); }
.asset-passport { position: relative; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 5px 0 -2px var(--line); }
.passport-heading { display: flex; gap: 10px; align-items: center; }
.passport-symbol { display: flex; align-items: center; justify-content: center; width: 37px; height: 37px; border-radius: 11px; background: var(--soft-surface); color: var(--accent); flex-shrink: 0; }
.passport-heading > div { min-width: 0; }
.passport-kicker { display: block; font: 8px 'Courier New', monospace; letter-spacing: 1px; color: var(--muted); margin-bottom: 2px; }
.passport-heading h3 { font-size: 16px; }
.passport-seal { display: flex; align-items: center; justify-content: center; margin-left: auto; width: 23px; height: 23px; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); flex-shrink: 0; }
.passport-description { font-size: 11px; margin-top: 9px; line-height: 1.6; }
.passport-evidence { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 11px; }
.passport-evidence > span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 2px; border-radius: 7px; background: var(--soft-surface); font-size: 10px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.passport-evidence .icon { color: var(--accent-soft); }
.evidence-branches { height: 22px; width: 50%; margin: 0 auto; position: relative; }
.evidence-branches::before { content: ''; position: absolute; top: 3px; left: 50%; height: 8px; border-left: 1px solid var(--line); }
.evidence-branches::after { content: ''; position: absolute; top: 11px; bottom: 0; left: 0; right: 0; border: 1px solid var(--line); border-bottom: 0; border-radius: 5px 5px 0 0; }
.asset-outcomes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.asset-outcomes > div { display: grid; grid-template-columns: 21px minmax(0, 1fr); gap: 5px 7px; padding: 10px; background: var(--soft-surface); border-radius: 12px; align-content: start; }
.outcome-symbol { display: flex; color: var(--accent); }
.asset-outcomes h3 { font-size: 14px; align-self: center; }
.outcome-action { grid-column: 1 / -1; font-size: 10px; color: var(--accent-dark); margin-top: 2px; }
.asset-outcomes p { grid-column: 1 / -1; font-size: 11px; line-height: 1.6; }
@media (max-width: 374px) {
  main:has(.home-intro-hero) { padding-top: 16px; padding-bottom: 18px; }
  .home-intro-hero h1 { font-size: 27px; }
  html:not(:lang(zh-Hant)) .home-intro-hero h1 { font-size: 26px; }
  html:lang(ja) .home-intro-hero h1 { font-size: 23px; }
  .home-intro-hero p { font-size: 11px; }
  .asset-introduction { padding: 14px; margin-top: 16px; }
  .asset-introduction > h2 { font-size: 15px; }
  .asset-sources { gap: 5px; margin-top: 12px; }
  .asset-sources > span { gap: 4px; padding-block: 7px; }
  .asset-assessment { padding: 9px 11px; }
  .asset-passport { padding: 12px; }
  .passport-heading h3 { font-size: 15px; }
  .asset-outcomes > div { padding: 10px; gap: 4px; }
  .asset-outcomes h3 { font-size: 13px; }
}

@media (max-width: 374px) {
  .header { gap: 6px; }
  .header-actions { gap: 6px; }
  .wallet-button > .icon:last-child, .language-button > .icon:last-child { display: none; }
}

/* 社区入口沿用个人页面板；人数与奖励分别分组，避免金额挤在窄屏双列中。 */
.community-entry {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  margin-bottom: 24px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); min-height: 76px;
}
.community-entry:hover { background: var(--hover-surface); }
.community-entry-icon {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--soft-surface); color: var(--accent);
}
.community-entry-copy { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.community-entry-copy strong { font-size: 15px; font-weight: 600; }
.community-entry-copy small { font-size: 12px; color: var(--muted); }
.community-entry > .icon { color: var(--accent-dark); }
.community-section {
  padding: 20px; background: var(--tonal); border-radius: 18px; margin-bottom: 18px;
}
.community-section h2 { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.community-section h2 .icon { color: var(--accent); }
.community-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
  margin: 20px 0 0;
}
.community-stats dt { color: var(--muted); font-size: 12px; min-height: 38px; }
.community-stats dd { margin: 6px 0 0; font-size: 32px; line-height: 1.3; overflow-wrap: anywhere; }
.community-rewards { border: 1px solid var(--line); background: var(--surface); }
.community-reward-list { display: grid; gap: 12px; margin: 18px 0 0; }
.community-reward-list > div { background: var(--soft-surface); padding: 16px; border-radius: 12px; }
.community-reward-list dt { color: var(--muted); font-size: 13px; }
.community-reward-list dd {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin: 6px 0 0; font-size: 25px; font-weight: 600; color: var(--accent-dark);
  overflow-wrap: anywhere;
}
.community-reward-list small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* 理财、存证与发射平台共用理财风格的底部导航，内容留白避免末尾操作被遮挡。 */
.wealth-content { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
.wealth-navigation {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 40;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 430px); padding: 10px 12px max(12px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: var(--bg);
  box-shadow: none;
}
.wealth-nav-item {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 7px; min-height: 62px; padding: 6px 3px; border-radius: 10px;
  color: var(--muted); font-size: 12px; text-align: center; line-height: 1.4;
}
.wealth-nav-item:hover { background: var(--hover-surface); color: var(--accent-dark); }
.wealth-nav-item[aria-current="page"] {
  background: var(--soft-surface); color: var(--accent); font-weight: 600;
}
/* 四个子页共用选中效果，避免高亮依赖主页专属的 body 类。 */
.wealth-nav-item[aria-current="page"]::after {
  content: ''; position: absolute; bottom: 0; width: 36%; max-width: 44px;
  border-bottom: 2px solid var(--accent);
}

/* 购买币种使用原生单选框，支持键盘选择并保留表单输入。 */
.purchase-currency { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.purchase-currency legend { padding: 0; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.purchase-currency > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purchase-currency label { position: relative; min-width: 0; cursor: pointer; }
.purchase-currency input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.purchase-currency label > span {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px;
  min-height: 44px; padding: 9px 8px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 9px; background: var(--surface); font-size: 14px;
}
.purchase-currency small { font-size: 10px; }
.purchase-currency input:checked + span { background: var(--selected-surface); color: var(--accent-dark); border-color: var(--accent); }
.purchase-currency input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.purchase-currency-note { font-size: 11px; line-height: 1.7; margin-top: 8px; }
.platform-investment { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--soft-line); }

/* 账户余额支付与链上钱包支付分别展示，hidden 必须覆盖面板的布局样式。 */
.purchase-account[hidden], .purchase-wallet[hidden] { display: none; }
.purchase-account { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.purchase-account > span { display: block; color: var(--muted); font-size: 12px; }
.purchase-account > p { font-size: 11px; margin-top: 6px; }
.account-payment-summary { padding: 18px 0 22px; }
.account-payment-summary > p:first-child { color: var(--accent); font-size: 14px; }
.account-payment-summary dl { margin: 14px 0; }
.account-payment-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.account-payment-summary dt { font-size: 13px; color: var(--muted); }
.account-payment-summary dd { margin: 0; font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.account-payment-summary dl > div:last-child { border-top: 1px solid var(--soft-line); }

}
