:root { color-scheme: light; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fbfafe; color: #2b263d; font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.wx-main { width: min(720px, calc(100% - 40px)); margin: 30px auto 60px; }
.wx-main [hidden], .wx-dialog[hidden] { display: none !important; }
.wx-main a { text-decoration: none; }
.wx-back { display: inline-block; color: #77658f; font-size: 13px; margin-bottom: 24px; }
.wx-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.wx-heading p, .wx-eyebrow { color: #9077aa; font-size: 12px; letter-spacing: .08em; margin: 0 0 9px; }
.wx-heading h1 { font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(28px, 5vw, 36px); font-weight: 600; margin: 0 0 12px; }
.wx-heading span:not(.wx-heading-mark) { color: #776c86; font-size: 14px; line-height: 1.8; }
.wx-heading-mark { display: grid; place-items: center; flex: 0 0 66px; width: 66px; height: 66px; border-radius: 22px; background: #eee6f8; color: #8860c4; font-family: "Songti SC", serif; font-size: 30px; transform: rotate(5deg); }
.wx-status-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
#wx-status { font-size: 13px; color: #776c86; margin: 0; line-height: 1.7; }
#wx-status[data-tone="error"] { color: #985164; }
#wx-status[data-tone="success"] { color: #637f6f; }
.wx-card { margin: 0 0 18px; padding: 26px; background: #fff; border: 1px solid #e8e0f0; border-radius: 20px; }
.wx-card h2, .wx-dialog h2 { font-size: 20px; line-height: 1.5; margin: 0; font-weight: 600; }
.wx-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.wx-text-link { color: #8860c4; font-size: 13px; line-height: 1.6; }
.wx-profile-name { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.wx-profile-name > span { display: grid; place-items: center; background: #f2ecf9; color: #9374b9; border-radius: 12px; width: 40px; height: 40px; font-family: serif; font-size: 19px; }
.wx-profile-name h3 { margin: 0; font-size: 18px; }
.wx-profile-name small { color: #95879f; font-size: 11px; }
.wx-profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; margin: 0 0 20px; }
.wx-profile-details dt { color: #978aa3; font-size: 12px; margin-bottom: 6px; }
.wx-profile-details dd { margin: 0; color: #51445f; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.wx-muted, .wx-footer-note { font-size: 12px; color: #908299; line-height: 1.8; }
.wx-muted { margin: 12px 0 0; }
.wx-footer-note { text-align: center; margin: 26px 12px 0; }
.wx-lead { font-size: 14px; color: #776c86; line-height: 1.8; margin: 12px 0 18px; }
.wx-consent { display: flex; gap: 10px; align-items: flex-start; padding: 15px; border-radius: 12px; background: #fcfaff; margin: 18px 0 22px; color: #6d5c7d; font-size: 13px; line-height: 1.8; cursor: pointer; }
.wx-consent input { appearance: auto; accent-color: #8860c4; width: 16px; height: 16px; flex: 0 0 16px; margin: 4px 0 0; }
.wx-button, .wx-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 12px; font: inherit; font-size: 14px; cursor: pointer; border: 1px solid transparent; }
.wx-button { background: linear-gradient(135deg, #8860c4, #7952b8); color: #fff; }
.wx-secondary { background: #fcfaff; color: #80639c; border-color: #dfd2ec; }
.wx-text-button { border: 0; background: transparent; color: #8860c4; padding: 6px 0; font: inherit; font-size: 13px; line-height: 1.6; cursor: pointer; flex-shrink: 0; }
.wx-main button:disabled, .wx-dialog button:disabled { opacity: .5; cursor: not-allowed; }
.wx-main :focus-visible, .wx-dialog :focus-visible { outline: 1px solid #8860c4; outline-offset: 2px; box-shadow: none; }
.wx-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.wx-qr-panel { width: fit-content; margin: 22px auto 16px; padding: 16px; text-align: center; border: 1px solid #e8e0f0; border-radius: 16px; }
.wx-qr-panel canvas { display: block; max-width: 100%; height: auto; }
.wx-qr-panel p { font-size: 12px; color: #85728e; margin: 12px 0 0; }
.wx-code-panel { padding: 18px; border-radius: 12px; background: #fcfaff; }
.wx-code-panel > p:first-child { font-size: 13px; color: #78648a; margin: 0 0 12px; }
.wx-code-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.wx-code-row code { font-size: clamp(18px, 5vw, 22px); font-weight: 600; letter-spacing: .05em; color: #765297; overflow-wrap: anywhere; }
.wx-notice { padding: 14px 18px; font-size: 13px; line-height: 1.8; background: #f4eff9; color: #81678c; border-radius: 12px; }
.wx-badge { display: inline-block; font-size: 12px; padding: 5px 10px; color: #718577; background: #f1f7f2; border-radius: 20px; white-space: nowrap; }
.wx-sync-panel { background: #fcfaff; padding: 18px; border-radius: 14px; }
.wx-sync-panel h3 { font-size: 15px; margin: 0 0 9px; }
.wx-sync-panel > p { font-size: 13px; line-height: 1.8; color: #867291; margin: 0; }
.wx-sync-panel .wx-consent { padding: 0; }
.wx-unlink { color: #95859b; margin-top: 20px; }
.wx-empty { padding-top: 18px; padding-bottom: 18px; }
.wx-empty p { color: #83708f; font-size: 14px; line-height: 1.8; }
.wx-dialog { width: min(430px, calc(100% - 36px)); padding: 28px; background: #fff; color: #2b263d; border: 1px solid #e8e0f0; border-radius: 20px; }
.wx-dialog::backdrop { background: rgba(43, 38, 61, .28); }
.wx-dialog > p { color: #807087; line-height: 1.8; font-size: 14px; }
.wx-memory-records { display: grid; gap: 12px; margin-top: 18px; }
.wx-memory-record { min-width: 0; padding: 15px; background: #fcfaff; border-radius: 12px; }
.wx-memory-record small { display: block; color: #908299; font-size: 11px; line-height: 1.6; }
.wx-memory-record p { margin: 9px 0 0; color: #51445f; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
#wx-memory-status[data-tone="error"] { color: #985164; }
@media (max-width: 520px) {
  .wx-main { width: calc(100% - 28px); margin-top: 22px; }
  .wx-back { margin-bottom: 20px; }
  .wx-heading { align-items: flex-start; }
  .wx-heading-mark { flex-basis: 50px; width: 50px; height: 50px; border-radius: 17px; font-size: 25px; }
  .wx-card { padding: 21px 18px; border-radius: 17px; }
  .wx-profile-details { gap: 17px 18px; }
  .wx-profile-name small { width: 100%; padding-left: 50px; margin-top: -8px; }
  .wx-status-bar { gap: 12px; }
  .wx-actions .wx-button, #wx-create, #wx-sync { flex: 1; width: 100%; }
}
