  :root {
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    --primary: #007AFF;
    --purple: #8b5cf6;
    --glass-opacity: 0.65;
    --glass-blur: 24px;
    --blue: #3d7eff;
    --blue2: #6aa4ff;
    --ink: #1c2533;
    --sub: #8b96a8;
    --line: #e8eef7;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-tap-highlight-color: transparent; }
  
  /* 修复：改为允许滚动，解决小屏或键盘弹起遮挡问题 */
  body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: block;
    padding: 20px 0;
    overflow-y: auto;
    transition: all 0.3s ease;
  }

  .hidden { display: none !important; }

  /* 滚动容器，保证卡片居中且可以滑动 */
  #auth-wrapper {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ================= 登录与注册页面 ================= */
  .card {
    background: var(--glass-bg); backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border); width: 88%; max-width: 360px;
    border-radius: 24px; padding: 32px 24px; box-shadow: var(--glass-shadow);
    text-align: center; position: relative; z-index: 1; animation: fadeIn 0.4s ease-out;
    margin: 20px 0; /* 保证上下有边距 */
  }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  .logo-container { text-align: center; margin-bottom: 24px; }
  .logo { font-size: 26px; font-weight: 800; color: var(--primary); font-style: italic; letter-spacing: 1px; display: inline-block; position: relative; overflow: hidden; padding: 0 5px; }
  .logo::after { content: ''; position: absolute; top: 0; left: -150%; width: 50%; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 100%); transform: skewX(-30deg); animation: shine 3s infinite ease-in-out; }
  @keyframes shine { 0% { left: -150%; } 20% { left: 150%; } 100% { left: 150%; } }

  .title { text-align: left; font-size: 28px; font-weight: 700; color: #1d1d1f; margin-bottom: 6px; letter-spacing: -0.5px; }
  .subtitle { text-align: left; font-size: 13px; color: #86868b; margin-bottom: 24px; }

  .input-group { background: rgba(255, 255, 255, 0.5); border-radius: 12px; margin-bottom: 16px; display: flex; align-items: center; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.4); }
  .input-group input { border: none; background: transparent; outline: none; flex: 1; font-size: 16px; color: #1d1d1f; width: 100%; }
  .input-group input::placeholder { color: #999; }
  .input-group svg.icon { width: 18px; height: 18px; fill: var(--primary); margin-right: 12px; opacity: 0.8; flex-shrink: 0; }
  
  .error-msg { color: #ff3b30; font-size: 13px; text-align: left; margin-top: -8px; margin-bottom: 12px; padding-left: 4px; display: none; font-weight: 500; }

  .btn { position: relative; width: 100%; padding: 16px; border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.1) 100%); backdrop-filter: blur(24px); border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 8px 20px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1); color: var(--primary); font-size: 17px; font-weight: 600; margin-top: 8px; margin-bottom: 24px; cursor: pointer; transition: all 0.2s ease; user-select: none; }
  .btn:active { transform: scale(0.96); }
  .footer { font-size: 11px; color: #86868b; margin-bottom: 8px; }
  .register { font-size: 13px; color: #86868b; }
  .register span { color: var(--primary); font-weight: 500; cursor: pointer; }

  /* ================= Face ID 动画 ================= */
  #faceid { position: fixed; inset: 0; z-index: 9998; display: none; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(120% 80% at 50% 20%, rgba(24,32,52,.92), rgba(8,12,22,.97)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #faceid.show { display: flex; animation: fdIn .28s ease-out; }
  @keyframes fdIn { from { opacity: 0; } to { opacity: 1; } }

  .fd-stage { position: relative; width: 168px; height: 168px; display: grid; place-items: center; }
  .fd-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(90,200,255,0), #5ad1ff 40%, #7c5cf6 65%, rgba(124,92,246,0)); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); animation: spin 1.15s linear infinite; opacity: .95; }
  .fd-ring2 { position: absolute; inset: 14px; border-radius: 50%; border: 1px solid rgba(120,190,255,.25); animation: pulse 1.6s ease-out infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes pulse { 0% { transform: scale(.92); opacity: .8; } 80% { transform: scale(1.12); opacity: 0; } 100% { opacity: 0; } }

  .fd-face { width: 96px; height: 96px; position: relative; z-index: 2; animation: faceFloat 2.4s ease-in-out infinite; }
  .fd-face path, .fd-face circle { stroke: #6fd0ff; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  @keyframes faceFloat { 0%,100% { transform: translateY(0); opacity: .95; } 50% { transform: translateY(-3px); opacity: 1; } }

  .fd-line { position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 3px; z-index: 3;
    background: linear-gradient(90deg, transparent, #7ce0ff, transparent); box-shadow: 0 0 14px #4fd0ff; animation: scan 1.5s ease-in-out infinite; }
  @keyframes scan { 0%,100% { top: 16%; opacity: .2; } 50% { top: 84%; opacity: 1; } }

  .fd-title { margin-top: 26px; color: #eaf4ff; font-size: 17px; font-weight: 600; letter-spacing: .3px; }
  .fd-sub { margin-top: 8px; color: #8ea3bf; font-size: 13px; height: 18px; transition: color .2s; }

  .fd-check { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
  .fd-check svg { width: 88px; height: 88px; }
  .fd-check circle { stroke: #2fd07a; stroke-width: 4; fill: none; stroke-dasharray: 260; stroke-dashoffset: 260; }
  .fd-check path { stroke: #2fd07a; stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }

  #faceid.ok .fd-face, #faceid.ok .fd-ring, #faceid.ok .fd-ring2, #faceid.ok .fd-line { opacity: 0; transition: opacity .18s; animation: none; }
  #faceid.ok .fd-check { opacity: 1; }
  #faceid.ok .fd-check circle { animation: draw .42s ease forwards; }
  #faceid.ok .fd-check path { animation: draw .3s .2s ease forwards; }
  #faceid.ok .fd-sub { color: #58e39a; }
  @keyframes draw { to { stroke-dashoffset: 0; } }

  /* ================= 主体应用框架 ================= */
  body.app-mode { display: block; padding: 0; background: #edf3fb; overflow-x: hidden; }
  #app { display: none; min-height: 100vh; }
  body.app-mode #app { display: block; animation: fadeIn .35s ease-out; }
  .wrap { max-width: 430px; margin: 0 auto; padding: 0 16px 112px; }

  .topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px;
    padding: 46px 16px 10px; background: rgba(240,246,253,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .brand-ico { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; background: #fff; display: grid; place-items: center; color: var(--blue); box-shadow: 0 6px 16px rgba(61,126,255,.14); }
  .brand h1 { font-size: 17.5px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; white-space: nowrap; }
  .brand p { font-size: 11px; color: #a3aec0; margin-top: 2px; }
  .top-actions { display: flex; gap: 7px; }
  .ibtn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #dfe9f8; background: #fff; color: var(--blue); display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
  .ibtn:active { transform: scale(.92); }

  /* 欢迎卡片 */
  .welcome { position: relative; overflow: hidden; border-radius: 26px; padding: 20px 20px 18px; margin-top: 2px;
    background: radial-gradient(130% 120% at 82% 8%, #dff3ff 0%, #eaf6ff 42%, #eef1ff 100%);
    box-shadow: 0 12px 30px rgba(74,126,196,.12); }
  .welcome h2 { font-size: 26px; line-height: 1.34; font-weight: 800; color: #1e2c3f; letter-spacing: -.5px; }
  .welcome h2 span { color: var(--blue); }
  .slogan { font-size: 12.5px; color: #8391a6; margin: 8px 0 16px; }
  .bal-row { font-size: 12.5px; color: #77869c; display: flex; align-items: center; gap: 8px; }
  .muted-btn { border: 0; background: transparent; color: #6f86a6; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
  .muted-btn:active { transform: scale(.95); }
  .balance { font-size: 31px; font-weight: 800; color: #16202e; letter-spacing: -.6px; margin: 2px 0 12px; }
  .chips { display: flex; gap: 8px; flex-wrap: wrap; }
  .chip { background: rgba(255,255,255,.9); border: 1px solid #fff; border-radius: 999px; padding: 6px 13px; font-size: 12px; color: #3a4c64; box-shadow: 0 3px 10px rgba(90,130,180,.08); }
  .myacc { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #2f6df6; cursor: pointer; }
  .myacc:active { opacity: .7; }
  .mascot { position: absolute; right: 4px; bottom: 4px; width: 128px; height: 128px; pointer-events: none; }
  .mascot-note { position: absolute; right: 20px; bottom: 16px; font-size: 10px; color: #9db0c8; }

  /* 公告 */
  .notice { margin-top: 14px; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 15px 16px; box-shadow: 0 8px 22px rgba(72,110,170,.07); cursor: pointer; }
  .notice:active { transform: scale(.99); }
  .badge-blue { background: #e9f1ff; color: #3d7eff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 9px; }
  .notice-text { flex: 1; font-size: 14px; color: #33465e; }
  .chev { color: #c3cfdf; font-size: 18px; }

  /* 主标签 */
  .mtabs { display: flex; gap: 28px; margin: 20px 2px 14px; }
  .mtab { position: relative; border: 0; background: none; font-size: 17.5px; font-weight: 800; color: #a2adbe; padding: 0 0 12px; cursor: pointer; letter-spacing: -.2px; }
  .mtab.active { color: #2f6df6; }
  .mtab.active::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 26px; height: 3.5px; border-radius: 3px; background: #2f6df6; }

  /* 药丸宫格 */
  .pill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .pill { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #fff; border-radius: 999px; padding: 9px 10px;
    font-size: 13px; font-weight: 700; color: #2b3a4f; cursor: pointer; box-shadow: 0 7px 18px rgba(72,110,170,.07); transition: transform .15s; min-width: 0; }
  .pill:active { transform: scale(.96); }
  .pill i { width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: #eef4ff; color: var(--blue); display: grid; place-items: center; font-style: normal; }
  .pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gtitle { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #a2adbe; margin: 18px 2px 10px; }
  .gtitle::before { content: ''; width: 3px; height: 12px; border-radius: 2px; background: #c9d8ee; }

  /* 底部导航 */
  .tabbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); width: calc(100% - 28px); max-width: 402px; z-index: 30;
    display: flex; padding: 7px; border-radius: 26px; background: rgba(255,255,255,.93); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 14px 32px rgba(50,80,140,.16); }
  .navbtn { flex: 1; border: 0; background: none; border-radius: 20px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: #a2adbe; font-size: 11px; font-weight: 700; cursor: pointer; }
  .navbtn.active { background: #e9f1ff; color: #2f6df6; }
  .navbtn svg { width: 22px; height: 22px; }

  /* ================= 子页面 ================= */
  .page { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: #f4f8fd;
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); pointer-events: none; }
  .page.open { transform: none; pointer-events: auto; }
  .page-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: rgba(244,248,253,.94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid #eaf1fa; }
  .back { border: 1px solid #e4ecf7; background: #fff; border-radius: 999px; padding: 8px 15px; font-size: 13.5px; font-weight: 700; color: #33465e; cursor: pointer; box-shadow: 0 4px 12px rgba(70,100,150,.06); }
  .back:active { transform: scale(.95); }
  .page-title { font-size: 15px; font-weight: 700; color: #93a0b3; }
  .page-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 44px; max-width: 430px; width: 100%; margin: 0 auto; }

  .cardw { background: #fff; border-radius: 22px; padding: 16px; box-shadow: 0 9px 24px rgba(72,110,170,.06); margin-bottom: 12px; }
  .cardw h4 { font-size: 15px; font-weight: 800; color: #2b3a4f; margin-bottom: 12px; }

  .row { display: flex; align-items: center; gap: 10px; }
  .between { justify-content: space-between; }
  .wrapx { flex-wrap: wrap; }
  .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
  .mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
  .small { font-size: 12px; color: #96a2b5; }
  .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

  /* 按钮 */
  .bp { border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--blue2), var(--blue)); color: #fff; font-size: 15px; font-weight: 700;
    padding: 13px 18px; width: 100%; cursor: pointer; box-shadow: 0 10px 22px rgba(61,126,255,.26); transition: transform .15s, filter .15s; }
  .bp:active { transform: scale(.97); filter: brightness(.96); }
  .bg { border: 1px solid #e4ecf7; background: #fff; color: #33465e; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer; }
  .bg:active { transform: scale(.96); }
  .bsm { padding: 8px 13px; font-size: 12.5px; border-radius: 999px; }
  .bdanger { background: #fff1f1; border: 1px solid #ffdada; color: #ef4444; }
  .bok { background: #ebfaf2; border: 1px solid #cdf0df; color: #0ea56a; }
  .bwarn { background: #f7ac3d; border: 0; color: #fff; box-shadow: 0 8px 18px rgba(247,172,61,.3); }
  .bpurple { background: #7c5cf6; border: 0; color: #fff; box-shadow: 0 8px 18px rgba(124,92,246,.28); }

  /* 表单 */
  .frow { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
  .flabel { flex: 0 0 62px; font-size: 14px; font-weight: 700; color: #33465e; }
  .finput { flex: 1; width: 100%; border: 1px solid #e6edf7; background: #fbfdff; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #23334a; outline: none; transition: border-color .15s; }
  .finput:focus { border-color: var(--blue); background: #fff; }
  .finput::placeholder { color: #b3bece; }
  .finput.countable { padding-right: 54px; }
  .fcount { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #b3bece; }
  .fholder { position: relative; flex: 1; }

  /* 下拉 */
  .dd { position: relative; flex: 1; }
  .dd-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #e6edf7; background: #fbfdff;
    border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #23334a; cursor: pointer; text-align: left; }
  .dd.open .dd-btn { border-color: #b9a4ff; box-shadow: 0 0 0 3px rgba(124,92,246,.12); }
  .dd-menu { position: absolute; left: 0; right: 0; top: calc(100% + 7px); background: #fff; border-radius: 15px; padding: 6px;
    box-shadow: 0 18px 44px rgba(45,75,125,.2); display: none; z-index: 8; max-height: 260px; overflow: auto; }
  .dd.open .dd-menu { display: block; animation: ddIn .16s ease-out; }
  @keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
  .dd-item { padding: 12px 13px; border-radius: 10px; font-size: 14px; color: #33465e; cursor: pointer; }
  .dd-item:active { background: #f5f7fc; }
  .dd-item.sel { color: #6b4df6; background: #f4f1ff; font-weight: 800; }

  /* 空状态 */
  .empty { padding: 40px 10px; text-align: center; color: #aab5c6; font-size: 14px; }
  .empty .art { font-size: 62px; line-height: 1; margin-bottom: 10px; opacity: .95; }

  /* 列表项 */
  .item { background: #fff; border-radius: 18px; padding: 14px; margin-bottom: 10px; box-shadow: 0 8px 20px rgba(72,110,170,.05); }
  .item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
  .item-title { font-size: 16px; font-weight: 800; color: #23334a; }
  .item-meta { font-size: 12.5px; color: #93a0b3; margin-top: 6px; line-height: 1.7; }
  .item-code { font-size: 13px; color: #3d7eff; margin-top: 6px; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; }
  .item-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #eef2f8; }
  .linkbtn { border: 0; background: none; color: #2f6df6; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 6px; }
  .linkbtn.red { color: #ef4444; }
  .tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
  .tag.blue { background: #eaf1ff; color: #2f6df6; }
  .tag.green { background: #e9f9ef; color: #10a86b; }
  .tag.pink { background: #ffe9ef; color: #f43f5e; }
  .tag.gray { background: #f1f4f9; color: #8593a8; }

  /* 分段 / 子标签 */
  .seg { display: flex; background: #fff; border-radius: 999px; padding: 5px; box-shadow: 0 8px 20px rgba(72,110,170,.06); margin-bottom: 14px; }
  .seg button { flex: 1; border: 0; background: none; border-radius: 999px; padding: 10px 6px; font-size: 13.5px; font-weight: 700; color: #7d8a9d; cursor: pointer; }
  .seg button.active { background: linear-gradient(135deg, var(--blue2), var(--blue)); color: #fff; box-shadow: 0 8px 18px rgba(61,126,255,.24); }

  .subtl { display: flex; gap: 18px; padding: 0 4px; margin-bottom: 12px; overflow-x: auto; }
  .subtl button { border: 0; background: none; padding: 0 0 9px; font-size: 14.5px; font-weight: 700; color: #98a5b8; white-space: nowrap; cursor: pointer; position: relative; }
  .subtl button.active { color: #2f6df6; }
  .subtl button.active::after { content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 24px; height: 3px; border-radius: 3px; background: #2f6df6; }

  .filterbar { display: flex; gap: 8px; margin-bottom: 12px; }
  .filterbar .dd { flex: 1; }
  .filterbar .dd-btn { padding: 10px 12px; font-size: 13px; border-radius: 12px; }
  .selbtn { border: 1px solid #e4ecf7; background: #fff; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; color: #33465e; cursor: pointer; }
  .selbtn.on { border-color: #2f6df6; color: #2f6df6; background: #f0f6ff; }

  .chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
  .fchip { border: 1px solid #e4ecf7; background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; color: #61708a; cursor: pointer; }
  .fchip.on { border-color: #2f6df6; color: #2f6df6; background: #f0f6ff; }

  /* 统计卡 */
  .statgrid { display: flex; gap: 9px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 3px; }
  .statcard { flex: 1 0 84px; background: #fff; border-radius: 17px; padding: 13px 12px; box-shadow: 0 8px 20px rgba(72,110,170,.06); }
  .statcard b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
  .statcard span { font-size: 11.5px; color: #94a1b4; line-height: 1.35; display: block; margin-top: 3px; }
  .c-blue { color: #2f6df6; } .c-green { color: #17ab5f; } .c-orange { color: #f59e0b; } .c-red { color: #ef4444; }

  /* 控制台玻璃卡 */
  .glass-card { position: relative; overflow: hidden; border-radius: 24px; padding: 20px; margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(232,213,255,.92) 0%, rgba(255,222,238,.9) 48%, rgba(226,232,255,.92) 100%);
    border: 1px solid rgba(255,255,255,.9); box-shadow: 0 14px 34px rgba(150,120,220,.22); }
  .gc-wm { position: absolute; right: -10px; top: 46%; font-size: 92px; font-weight: 800; font-style: italic;
    color: rgba(255,255,255,.5); letter-spacing: -4px; pointer-events: none; white-space: nowrap; }
  .gc-top { display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }
  .gc-avatar { width: 62px; height: 62px; border-radius: 50%; flex: 0 0 62px; border: 3px solid #fff; overflow: hidden;
    background: linear-gradient(160deg, #4f7dfa, #7ec0ff); display: grid; place-items: center; color: #fff; font-size: 26px; box-shadow: 0 6px 16px rgba(90,110,200,.3); }
  .gc-hi { font-size: 13.5px; color: #5d6a86; }
  .gc-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
  .gc-name b { font-size: 26px; font-weight: 800; color: #8b4df6; letter-spacing: -.4px; }
  .tag-teal { background: linear-gradient(135deg, #4be0c4, #2fc4ae); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 9px; }
  .gc-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; position: relative; z-index: 1; }
  .gc-tag { background: rgba(255,255,255,.9); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: #4b5b78; box-shadow: 0 4px 12px rgba(120,130,190,.12); }

  .stat2 { display: flex; gap: 10px; margin-bottom: 12px; }
  .stat2 .box { flex: 1; background: #fff; border-radius: 20px; padding: 16px 10px; text-align: center; box-shadow: 0 9px 22px rgba(72,110,170,.06); }
  .stat2 .box b { display: block; font-size: 24px; font-weight: 800; color: #c026d3; }
  .stat2 .box span { font-size: 12px; color: #93a0b3; }
  .stat2 .box.ghost { background: transparent; box-shadow: none; }
  .stat2 .box.warm { background: linear-gradient(135deg, #fff2f6, #f2efff); }

  .inforow { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f1f5fb; font-size: 14px; }
  .inforow:last-of-type { border-bottom: 0; }
  .inforow .k { color: #93a0b3; }
  .inforow .v { font-weight: 700; color: #23334a; text-align: right; }

  /* 抽屉 */
  .drawer-mask { position: fixed; inset: 0; background: rgba(15,25,40,.34); backdrop-filter: blur(2px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .28s; }
  .drawer-mask.show { opacity: 1; pointer-events: auto; }
  .drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 330px; background: #fff; z-index: 61;
    transform: translateX(102%); transition: transform .3s cubic-bezier(.4,0,.2,1); display: flex; flex-direction: column; overflow-y: auto; }
  .drawer.show { transform: none; }
  .dr-user { padding: 26px 18px 18px; display: flex; align-items: center; gap: 12px; background: linear-gradient(160deg, #f2f8ff, #fff); }
  .dr-avatar { width: 52px; height: 52px; border-radius: 16px; border: 2px solid #fff; overflow: hidden; background: linear-gradient(160deg, #4f7dfa, #7ec0ff); display: grid; place-items: center; color: #fff; font-size: 24px; box-shadow: 0 8px 18px rgba(90,120,200,.24); }
  .dr-name { font-size: 20px; font-weight: 800; color: #23334a; }
  .dr-qq { font-size: 12.5px; color: #9aa6b8; margin-top: 3px; }
  .dr-sec { padding: 4px 18px 0; }
  .dr-label { font-size: 12px; color: #a9b4c4; margin: 14px 0 8px; }
  .dr-seg { display: flex; background: #f3f6fb; border-radius: 12px; padding: 4px; }
  .dr-seg button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 9px; font-size: 13px; font-weight: 800; color: #a9b4c4; cursor: pointer; }
  .dr-seg button.active { background: #fff; color: #2f6df6; box-shadow: 0 4px 12px rgba(70,100,150,.1); }
  .dr-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; font-size: 15px; font-weight: 700; color: #33465e; cursor: pointer; border-bottom: 1px solid #f5f8fc; }
  .dr-item:active { opacity: .6; }
  .dr-item svg { width: 19px; height: 19px; color: #8e9db2; flex: 0 0 19px; }
  .dr-item.red { color: #ef4444; }
  .dr-item.red svg { color: #ef4444; }

  /* 弹窗 */
  .mask { position: fixed; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; padding: 18px;
    background: rgba(16,26,42,.42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
  .mask.show { display: flex; animation: fdIn .18s ease-out; }
  .sheet { width: 100%; max-width: 360px; background: #fff; border-radius: 24px; padding: 20px; max-height: 86vh; overflow-y: auto;
    box-shadow: 0 24px 60px rgba(20,40,70,.28); animation: sheetIn .24s cubic-bezier(.2,.9,.3,1.2); }
  @keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
  .sheet-head h3 { font-size: 17px; font-weight: 800; color: #23334a; }
  .xbtn { border: 0; background: #f3f6fb; color: #8695aa; width: 30px; height: 30px; border-radius: 50%; font-size: 17px; cursor: pointer; line-height: 1; }

  /* 颜色块 */
  .swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-bottom: 18px; }
  .sw { height: 42px; border-radius: 12px; border: 2px solid transparent; cursor: pointer; position: relative; }
  .sw.active { border-color: #23334a; }
  .sw.active::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
  .slider-row { margin-bottom: 14px; }
  .slider-row .lab { display: flex; justify-content: space-between; font-size: 12.5px; color: #7d8a9d; margin-bottom: 7px; }
  input[type=range] { width: 100%; -webkit-appearance: none; height: 5px; border-radius: 4px; background: #e9eff8; outline: none; }
  input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); box-shadow: 0 3px 8px rgba(50,80,140,.2); cursor: pointer; }

  /* 提示 */
  #toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 10px); z-index: 90; max-width: 82%;
    background: rgba(24,34,50,.92); color: #fff; font-size: 13.5px; font-weight: 600; padding: 11px 18px; border-radius: 14px;
    opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; text-align: center; }
  #toast.show { opacity: 1; transform: translate(-50%, 0); }

  /* 复选框 */
  .cb { width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid #d3dded; background: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: 0 0 20px; }
  .cb.on { background: #2f6df6; border-color: #2f6df6; }
  .cb.on::after { content: ''; width: 5px; height: 9px; border: 2px solid #fff; border-top: 0; border-left: 0; transform: rotate(45deg) translate(-1px, -1px); }

  @media (max-width: 359px) {
    .pill { font-size: 12px; padding: 8px; gap: 6px; }
    .balance { font-size: 27px; }
    .brand h1 { font-size: 16px; }
  }

  /* ===== 主题变量：卡片透明度 / 毛玻璃 / 背景光斑 ===== */
  #app::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
      radial-gradient(38% 28% at 12% 10%, rgba(120,170,255,.45), transparent 62%),
      radial-gradient(32% 26% at 90% 6%, rgba(180,140,255,.38), transparent 62%),
      radial-gradient(45% 32% at 62% 96%, rgba(110,220,200,.30), transparent 66%); }
  #app > .wrap { position: relative; z-index: 1; }
  .brand > div:last-child { min-width: 0; }
  .brand h1 { overflow: hidden; text-overflow: ellipsis; }
  .top-actions { gap: 6px; }
  .ibtn { width: 32px; height: 32px; }
  .cardw, .item, .pill, .statcard, .stat2 .box, .notice, .seg {
    background: rgba(255,255,255,var(--cardop,1));
    backdrop-filter: blur(var(--cardblur,0px)); -webkit-backdrop-filter: blur(var(--cardblur,0px));
  }

  /* 灵动岛 */
  #island { position: fixed; top: 9px; left: 50%; transform: translateX(-50%); z-index: 96; width: 108px; height: 31px;
    background: #000; border-radius: 20px; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: 0 8px 22px rgba(0,0,0,.26);
    transition: width .46s cubic-bezier(.2,.9,.25,1.05), height .46s cubic-bezier(.2,.9,.25,1.05), border-radius .4s; }
  #island.open { width: min(92vw, 356px); height: 94px; border-radius: 30px; }
  .isl-compact { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; opacity: 1; transition: opacity .18s; }
  #island.open .isl-compact { opacity: 0; pointer-events: none; }
  .isl-dot { width: 7px; height: 7px; border-radius: 50%; background: #31d158; box-shadow: 0 0 8px #31d158; }
  .isl-dot.off { background: #4b5563; box-shadow: none; }
  .isl-time { font-size: 11px; font-weight: 700; color: #e8eef8; letter-spacing: .4px; }
  .isl-exp { position: absolute; inset: 0; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; gap: 9px;
    opacity: 0; transform: translateY(5px); transition: opacity .2s .12s, transform .2s .12s; }
  #island.open .isl-exp { opacity: 1; transform: none; }
  .isl-row { display: flex; align-items: center; gap: 10px; }
  .isl-ico { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center;
    background: #12243b; color: #5ad1ff; font-size: 15px; font-weight: 800; }
  .isl-ico.ok { background: #0d2e1d; color: #39dc7b; }
  .isl-txt { flex: 1; min-width: 0; }
  .isl-txt b { display: block; font-size: 13.5px; color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .isl-txt span { display: block; font-size: 11.5px; color: #8b9bb4; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .isl-badge { background: #ff3b30; color: #fff; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
  .isl-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
  .isl-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, #5ad1ff, #7c5cf6); transition: width .3s linear; }
  .isl-bar i.done { background: #31d158; }

  .pg-on { background: #2f6df6 !important; color: #fff !important; border-color: #2f6df6 !important; }

  /* iPhone 底部安全区 */
  .tabbar { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .wrap { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }

  /* QQ 头像 */
  .dr-avatar, .gc-avatar { position: relative; overflow: hidden; }
  .av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; background: #eef4ff; }
  .mini-av { position: relative; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; overflow: hidden;
    background: #eef4ff; display: grid; place-items: center; font-size: 17px; }
