
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#f5f7fb;--bg-1:#e0e7ff;--bg-2:#fce7f3;
  --card:#fff;--border:#e5e9f0;
  --text:#0f172a;--text-2:#64748b;--text-3:#94a3b8;
  --primary:#6366f1;--grad:linear-gradient(135deg,#6366f1 0%,#8b5cf6 100%);
  --success:#10b981;--danger:#ef4444;
  --radius:16px;--radius-sm:12px;
  --shadow:0 4px 16px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.04);
}
html{height:100%}
body{
  min-height:100vh;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:var(--bg);
  background-image:
    radial-gradient(700px circle at 15% -10%,var(--bg-1) 0%,transparent 45%),
    radial-gradient(700px circle at 85% 110%,var(--bg-2) 0%,transparent 45%);
  background-attachment:fixed;
  color:var(--text);padding:24px 14px 40px;
  -webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;
}
.app{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.hero{text-align:center;padding:2px 0 6px}
.title{font-size:22px;font-weight:800;letter-spacing:-.02em;line-height:1.2}
.subtitle{font-size:12.5px;color:var(--text-2);margin-top:4px}

.settings-wrap{position:fixed;top:14px;right:14px;z-index:1000}
.settings-btn{width:40px;height:40px;border-radius:12px;
  background:var(--card);color:var(--text-2);border:1px solid var(--border);
  cursor:pointer;font-size:18px;line-height:1;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(15,23,42,.08);
  transition:all .2s;font-family:inherit;position:relative;overflow:hidden}
.settings-btn:hover{color:var(--primary);border-color:var(--primary)}
.settings-btn.open{background:var(--grad);color:#fff;border-color:transparent}
.settings-panel{position:absolute;top:calc(100% + 8px);right:0;
  background:var(--card);border:1px solid var(--border);
  border-radius:14px;padding:12px 14px;
  box-shadow:0 16px 40px rgba(15,23,42,.16);
  min-width:220px;
  opacity:0;pointer-events:none;visibility:hidden;
  transform:translateY(-6px) scale(.96);
  transform-origin:top right;
  transition:all .2s cubic-bezier(.16,1,.3,1)}
.settings-wrap.open .settings-panel{
  opacity:1;pointer-events:auto;visibility:visible;
  transform:translateY(0) scale(1)}
.settings-title{font-size:10.5px;font-weight:700;color:var(--text-3);
  text-transform:uppercase;letter-spacing:.1em;margin-bottom:6px}
.opt-row{display:flex;align-items:center;justify-content:space-between;
  padding:8px 0;font-size:13px;color:var(--text-2);
  cursor:pointer;user-select:none;gap:12px;border-top:1px solid #f1f5f9}
.opt-row:first-of-type{border-top:none}
.opt-row span:first-child{flex:1;min-width:0}
.opt-row input{display:none}
.opt-switch{position:relative;width:36px;height:20px;flex-shrink:0;
  background:#cbd5e1;border-radius:999px;transition:background .2s}
.opt-switch::after{content:'';position:absolute;top:2px;left:2px;
  width:16px;height:16px;background:#fff;border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,.15);transition:transform .2s}
.opt-row input:checked+.opt-switch{background:var(--primary)}
.opt-row input:checked+.opt-switch::after{transform:translateX(16px)}

.net-banner{padding:8px 14px;border-radius:10px;font-size:12.5px;
  font-weight:500;text-align:center;display:none;
  background:rgba(245,158,11,.12);color:#92400e;
  border:1px solid rgba(245,158,11,.3)}
.net-banner.show{display:block}

.panel{background:var(--card);border:1px solid var(--border);
  border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.panel.flash{animation:flash 1s ease-out}
@keyframes flash{0%{box-shadow:0 0 0 0 rgba(99,102,241,.45)}100%{box-shadow:0 0 0 20px rgba(99,102,241,0)}}

.panel-label{font-size:11px;font-weight:700;color:var(--text-3);
  text-transform:uppercase;letter-spacing:.1em;margin-bottom:10px}
.panel-head{display:flex;align-items:center;justify-content:space-between;
  margin-bottom:10px;gap:10px}
.panel-head .panel-label{margin-bottom:0}

.field-input{width:100%;height:48px;padding:0 16px;font-size:16px;
  font-family:inherit;color:var(--text);background:#f8fafc;
  border:1.5px solid var(--border);border-radius:var(--radius-sm);
  outline:none;transition:all .18s}
.field-input::placeholder{color:var(--text-3)}
.field-input:focus{background:#fff;border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(99,102,241,.12)}

.btn{height:44px;padding:0 14px;border-radius:var(--radius-sm);
  font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;
  transition:all .18s;border:none;display:inline-flex;
  align-items:center;justify-content:center;gap:6px;
  white-space:nowrap;flex:1;min-width:0;
  position:relative;overflow:hidden}
.btn-primary{background:var(--grad);color:#fff;
  box-shadow:0 4px 12px rgba(99,102,241,.3);flex:1.6}
.btn-primary:hover:not(:disabled){transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(99,102,241,.4)}
.btn-primary:disabled{background:#cbd5e1;color:#94a3b8;
  cursor:not-allowed;box-shadow:none}
.btn-light{background:#f1f5f9;color:var(--text-2)}
.btn-light:hover{background:#e2e8f0;color:var(--text)}
.btn-ghost{background:#fff;color:var(--text-2);border:1.5px solid var(--border)}
.btn-ghost:hover{background:#f8fafc;color:var(--text);border-color:#cbd5e1}
.btn-mini{height:28px;padding:0 10px;border-radius:7px;font-size:11.5px;
  font-weight:600;font-family:inherit;cursor:pointer;
  background:#f1f5f9;color:var(--text-2);border:none;
  display:inline-flex;align-items:center;justify-content:center;
  transition:all .15s;flex:0 0 auto;position:relative;overflow:hidden}
.btn-mini:hover{background:#e2e8f0;color:var(--text)}
.btn-mini.primary{background:var(--grad);color:#fff;
  box-shadow:0 2px 8px rgba(99,102,241,.3)}
.btn-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}

.status-line{display:flex;align-items:center;gap:8px;
  padding-top:12px;margin-top:12px;
  border-top:1px solid var(--border);font-size:13px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#cbd5e1;
  flex-shrink:0;transition:all .2s}
.status-dot.busy{background:var(--primary);animation:pulse 1.4s ease-in-out infinite}
.status-dot.ok{background:var(--success);box-shadow:0 0 0 3px rgba(16,185,129,.15)}
.status-dot.err{background:var(--danger);box-shadow:0 0 0 3px rgba(239,68,68,.15)}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(99,102,241,.5)}50%{box-shadow:0 0 0 6px rgba(99,102,241,0)}}
.status-msg{color:var(--text);font-weight:500;flex:1;min-width:0;
  word-break:break-word;line-height:1.35;font-size:13px}
.status-time{font-size:11.5px;color:var(--text-3);
  font-family:"SF Mono",Consolas,monospace}

.badge{font-size:10.5px;font-weight:700;padding:2px 9px;
  border-radius:999px;background:#f1f5f9;color:var(--text-3);letter-spacing:.03em}
.badge.ok{background:rgba(16,185,129,.12);color:#059669}
.badge.err{background:rgba(239,68,68,.12);color:#dc2626}

.result-box{padding:14px;background:#f8fafc;border:1px solid var(--border);
  border-radius:var(--radius-sm);
  font-family:"SF Mono","JetBrains Mono",Consolas,Menlo,monospace;
  font-size:12.5px;line-height:1.6;color:var(--text);
  word-break:break-all;white-space:pre-wrap;
  min-height:64px;max-height:180px;overflow-y:auto;margin-bottom:10px}
.result-box.error{color:var(--danger);background:rgba(239,68,68,.04);
  border-color:rgba(239,68,68,.2)}

.product-wrap{margin-top:14px;padding-top:14px;
  border-top:1px solid var(--border)}
.product-card{
  position:relative;
  padding:14px;
  border-radius:18px;
  background:linear-gradient(135deg,
    rgba(255,255,255,.75) 0%,
    rgba(238,242,255,.55) 50%,
    rgba(252,231,243,.45) 100%);
  backdrop-filter:blur(24px) saturate(180%);
  -webkit-backdrop-filter:blur(24px) saturate(180%);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:
    0 8px 32px rgba(99,102,241,.12),
    0 2px 8px rgba(99,102,241,.06),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(255,255,255,.5);
  overflow:hidden;
  animation:glassIn .4s cubic-bezier(.16,1,.3,1) both;
}
@keyframes glassIn{
  from{opacity:0;transform:translateY(6px) scale(.98)}
  to{opacity:1;transform:none}
}
.product-card::before{
  content:'';position:absolute;
  top:0;left:0;right:0;height:55%;
  background:linear-gradient(180deg,
    rgba(255,255,255,.6) 0%,
    rgba(255,255,255,0) 100%);
  pointer-events:none;
  border-radius:18px 18px 0 0;
}
.product-card::after{
  content:'';position:absolute;
  top:-50%;right:-50%;
  width:200%;height:200%;
  background:radial-gradient(circle at 75% 20%,
    rgba(139,92,246,.18) 0%,
    transparent 40%);
  pointer-events:none;
  opacity:.8;
}
.product-header{
  position:relative;z-index:1;
  display:flex;align-items:center;gap:14px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(148,163,184,.15);
}
.product-icon-box{
  flex-shrink:0;
  width:64px;height:64px;
  border-radius:16px;
  background:linear-gradient(135deg,#f1f5f9,#e0e7ff);
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
  box-shadow:
    0 6px 18px rgba(99,102,241,.18),
    inset 0 1px 0 rgba(255,255,255,.9);
  position:relative;
}
.product-icon{
  width:100%;height:100%;
  object-fit:cover;display:block;
  transition:opacity .3s ease;
}
.product-icon.loading{opacity:0}
.product-icon-fallback{
  position:absolute;top:0;right:0;bottom:0;left:0;
  display:flex;align-items:center;justify-content:center;
  font-size:26px;font-weight:800;color:#fff;
  background:linear-gradient(135deg,#6366f1,#8b5cf6);
  letter-spacing:-.02em;
}
.product-icon.loaded + .product-icon-fallback{display:none}
.product-info{flex:1;min-width:0}
.product-name{
  font-size:16px;font-weight:800;
  color:var(--text);line-height:1.25;
  margin-bottom:4px;
  overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;
}
.product-title{
  font-size:12.5px;color:var(--text-2);
  line-height:1.4;
  overflow:hidden;text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-line-clamp:2;-webkit-box-orient:vertical;
}
.product-times{
  position:relative;z-index:1;
  display:grid;grid-template-columns:1fr 1fr;
  gap:10px;padding-top:12px;
}
.product-time{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 2px 6px rgba(99,102,241,.06);
}
.product-time-label{
  font-size:10px;font-weight:700;
  color:var(--text-3);
  text-transform:uppercase;letter-spacing:.08em;
  margin-bottom:4px;
}
.product-time-value{
  font-size:12.5px;font-weight:700;
  color:var(--text);
  font-family:"SF Mono",Consolas,monospace;
  line-height:1.35;
  word-break:break-all;
}
.product-time-value.highlight{color:var(--primary)}
.product-empty{
  text-align:center;color:var(--text-3);
  font-size:12.5px;padding:14px 0;
}

.panel-raw{padding:0;overflow:hidden}
.panel-raw summary{padding:14px 16px;font-size:12.5px;font-weight:600;
  color:var(--text-2);cursor:pointer;list-style:none;user-select:none;
  display:flex;align-items:center;gap:8px;transition:background .15s}
.panel-raw summary:hover{background:#f8fafc}
.panel-raw summary::-webkit-details-marker{display:none}
.panel-raw summary::before{content:'▸';font-size:10px;color:var(--text-3);
  transition:transform .2s;display:inline-block}
.panel-raw[open] summary::before{transform:rotate(90deg)}
.panel-raw .summary-text{flex:1;min-width:0}
.raw-area{width:100%;min-height:100px;max-height:160px;
  padding:0 16px 14px;border:none;background:transparent;
  font-family:"SF Mono",Consolas,monospace;font-size:11.5px;
  color:var(--text-2);line-height:1.5;resize:vertical;outline:none}

.more-panel{padding:0;overflow:hidden}
.more-panel summary{padding:14px 16px;font-size:12.5px;font-weight:600;
  color:var(--text-2);cursor:pointer;list-style:none;user-select:none;
  display:flex;align-items:center;gap:8px;transition:background .15s}
.more-panel summary:hover{background:#f8fafc}
.more-panel summary::-webkit-details-marker{display:none}
.more-panel summary::before{content:'▸';font-size:10px;color:var(--text-3);
  transition:transform .2s;display:inline-block}
.more-panel[open] summary::before{transform:rotate(90deg)}
.more-section{padding:12px 16px;border-top:1px solid #f1f5f9}
.more-title{font-size:10.5px;font-weight:700;color:var(--text-3);
  text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;
  display:flex;justify-content:space-between;align-items:center}

.recent-list{display:flex;flex-wrap:wrap;gap:6px}
.recent-chip{padding:6px 11px;border-radius:999px;background:#f1f5f9;
  color:var(--text-2);font-family:"SF Mono",Consolas,monospace;
  font-size:11.5px;cursor:pointer;transition:all .15s;
  border:1px solid transparent;display:inline-flex;align-items:center;gap:5px;
  user-select:none}
.recent-chip:hover{background:#e2e8f0;color:var(--text);border-color:#cbd5e1}
.recent-chip .icn{color:var(--primary);font-weight:700;font-size:11px}

.history-list{display:flex;flex-direction:column;gap:4px}
.history-item{padding:8px 10px;border-radius:9px;
  display:flex;flex-direction:column;gap:3px;
  transition:background .15s;cursor:pointer}
.history-item:hover{background:#f8fafc}
.history-item .meta{display:flex;justify-content:space-between;align-items:center;
  font-size:10.5px;color:var(--text-3);gap:8px}
.history-item .tok{font-family:"SF Mono",Consolas,monospace;font-size:11.5px;
  color:var(--text-2);word-break:break-all;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}

.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.stat-item{text-align:center;min-width:0}
.stat-num{font-size:16px;font-weight:800;color:var(--text);
  font-family:"SF Mono",Consolas,monospace;line-height:1.2}
.stat-num.ok{color:var(--success)}
.stat-num.err{color:var(--danger)}
.stat-label{font-size:9.5px;color:var(--text-3);
  text-transform:uppercase;letter-spacing:.05em;margin-top:2px;font-weight:600}

.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,16px);
  padding:10px 20px;background:rgba(15,23,42,.92);color:#fff;
  font-size:13px;font-weight:500;border-radius:999px;
  opacity:0;pointer-events:none;
  transition:all .3s cubic-bezier(.16,1,.3,1);
  z-index:9999;box-shadow:0 8px 24px rgba(0,0,0,.25);
  max-width:80vw;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.ok{background:rgba(16,185,129,.95)}
.toast.err{background:rgba(239,68,68,.95)}

.confetti-wrap{position:fixed;left:50%;top:38%;width:0;height:0;
  pointer-events:none;z-index:9998}
.confetti-piece{position:absolute;width:9px;height:9px;border-radius:2px;
  animation:confettiFall 1.4s cubic-bezier(.16,1,.3,1) forwards}
@keyframes confettiFall{
  0%{opacity:1;transform:translate(-50%,-50%) scale(1) rotate(0)}
  100%{opacity:0;transform:translate(calc(-50% + var(--tx)),calc(-50% + var(--ty))) scale(.3) rotate(var(--rot))}
}
.ripple{position:absolute;border-radius:50%;
  background:rgba(255,255,255,.55);pointer-events:none;
  transform:scale(0);animation:rippleAnim .6s ease-out}
@keyframes rippleAnim{to{transform:scale(1);opacity:0}}
.btn-light .ripple,.btn-ghost .ripple,.btn-mini:not(.primary) .ripple,.settings-btn .ripple{
  background:rgba(99,102,241,.35)}

.modal{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(15,23,42,.65);
  z-index:10000;display:flex;align-items:center;justify-content:center;
  padding:20px;opacity:0;pointer-events:none;transition:opacity .22s}
.modal.show{opacity:1;pointer-events:auto}
.modal-box{background:var(--card);border-radius:20px;padding:20px;
  max-width:300px;width:100%;box-shadow:0 24px 80px rgba(0,0,0,.3);
  display:flex;flex-direction:column;align-items:center;gap:14px;
  transform:scale(.92);transition:transform .24s cubic-bezier(.16,1,.3,1)}
.modal.show .modal-box{transform:scale(1)}
.modal-box h3{font-size:15.5px;font-weight:700;color:var(--text);margin:0}
.qr-hint{font-size:11.5px;color:var(--text-3);text-align:center;margin-top:-4px}
.qr-wrap{width:220px;height:220px;background:#fff;border-radius:14px;
  padding:12px;display:flex;align-items:center;justify-content:center;
  box-shadow:inset 0 0 0 1px #f1f5f9}
.qr-wrap canvas,.qr-wrap img{width:100%!important;height:100%!important;
  object-fit:contain;display:block}
.modal-actions{display:flex;gap:8px;width:100%}

.hidden{display:none!important}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}
::selection{background:rgba(99,102,241,.25)}

body.dark{--bg:#0f172a;--bg-1:#1e293b;--bg-2:#312e81;
  --card:#1e293b;--border:#334155;--text:#f1f5f9;--text-2:#cbd5e1;--text-3:#64748b;
  --shadow:0 4px 20px rgba(0,0,0,.4),0 1px 3px rgba(0,0,0,.3)}
body.dark .field-input{background:#0f172a;color:var(--text);border-color:#334155}
body.dark .field-input::placeholder{color:#475569}
body.dark .btn-light{background:#334155;color:var(--text-2)}
body.dark .btn-light:hover{background:#475569;color:var(--text)}
body.dark .btn-ghost{background:#1e293b;color:var(--text-2);border-color:#334155}
body.dark .btn-ghost:hover{background:#334155;color:var(--text)}
body.dark .btn-mini{background:#334155;color:var(--text-2)}
body.dark .btn-mini:hover{background:#475569;color:var(--text)}
body.dark .result-box{background:#0f172a}
body.dark .panel-raw summary:hover,body.dark .more-panel summary:hover{background:#334155}
body.dark .history-item:hover{background:#334155}
body.dark .opt-row{border-color:#334155}
body.dark .badge{background:#334155;color:var(--text-3)}
body.dark .status-dot{background:#475569}
body.dark .recent-chip{background:#334155;color:var(--text-2)}
body.dark .recent-chip:hover{background:#475569}
body.dark .settings-btn{background:#1e293b;border-color:#334155}
body.dark .settings-panel{background:#1e293b}
body.dark .more-section{border-color:#334155}
body.dark .status-line{border-color:#334155}
body.dark .product-wrap{border-color:#334155}
body.dark .product-card{
  background:linear-gradient(135deg,
    rgba(51,65,85,.7) 0%,
    rgba(30,41,59,.55) 50%,
    rgba(49,46,129,.35) 100%);
  border-color:rgba(148,163,184,.25);
  box-shadow:
    0 8px 32px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(255,255,255,.03);
}
body.dark .product-card::before{
  background:linear-gradient(180deg,rgba(255,255,255,.06) 0%,transparent 100%);
}
body.dark .product-header{border-color:rgba(148,163,184,.2)}
body.dark .product-icon-box{
  background:linear-gradient(135deg,#1e293b,#334155);
  box-shadow:0 6px 18px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.06);
}
body.dark .product-time{
  background:rgba(15,23,42,.5);
  border-color:rgba(148,163,184,.15);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

@media (max-width:520px){
  body{padding:20px 12px 36px}
  .title{font-size:20px}
  .panel{padding:14px;border-radius:14px}
  .settings-wrap{top:10px;right:10px}
  .settings-btn{width:36px;height:36px;font-size:16px}
  .settings-panel{min-width:200px;padding:10px 12px}
  .qr-wrap{width:180px;height:180px}
  .stat-num{font-size:15px}
  .product-icon-box{width:56px;height:56px;border-radius:14px}
  .product-name{font-size:15px}
  .product-times{gap:8px}
  .product-time{padding:8px 10px}
  .product-time-value{font-size:12px}
}



.code-input-row{display:flex;align-items:center;gap:8px}
.code-input-row .field-input{flex:1;min-width:0;width:0}
.code-input-row #pasteBtn{flex:0 0 auto;height:48px;padding:0 16px}
.identity-preview{margin:8px 0 0;font-size:12px;line-height:1.6;font-weight:400;color:var(--text-2);overflow-wrap:anywhere}
#identityActionRow .btn{min-width:56px}
#identityActionRow #btn1{min-width:104px}
#identityActionRow #getIdentityPreset{min-width:92px;white-space:nowrap}

.code-input-row #randomizeDeviceCode{flex:0 0 auto;height:48px;padding:0 10px;white-space:nowrap}
.device-code-preview{margin-top:3px;font-family:ui-monospace,Consolas,monospace;font-size:11px;overflow-wrap:anywhere}

/* ===== 全屏液态玻璃加载蒙层 ===== */
.glass-loading{
  position:fixed;top:0;right:0;bottom:0;left:0;z-index:9990;
  min-height:100vh;min-height:100dvh;
  display:flex;align-items:center;justify-content:center;
  padding:24px;
  overscroll-behavior:contain;
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.30) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.26) 0%,transparent 58%),
    radial-gradient(620px circle at 50% 50%,rgba(56,189,248,.18) 0%,transparent 65%),
    rgba(15,23,42,.30);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%);
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .3s ease,visibility .3s ease;
}
.glass-loading.show{opacity:1;visibility:visible;pointer-events:auto}
body.loading-lock{overflow:hidden}

.gl-card{
  position:relative;z-index:2;
  width:340px;max-width:86vw;
  padding:26px 22px 20px;
  border-radius:30px;
  text-align:center;
  background:linear-gradient(155deg,
    rgba(255,255,255,.62) 0%,
    rgba(238,242,255,.42) 42%,
    rgba(252,231,243,.34) 100%);
  border:1px solid rgba(255,255,255,.75);
  box-shadow:
    0 28px 70px rgba(79,70,229,.26),
    0 6px 18px rgba(15,23,42,.14),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(255,255,255,.45),
    inset 0 0 60px rgba(255,255,255,.28);
  -webkit-backdrop-filter:blur(28px) saturate(190%);
  backdrop-filter:blur(28px) saturate(190%);
  overflow:hidden;isolation:isolate;
  transform:translateY(14px) scale(.94);
  transition:transform .42s cubic-bezier(.16,1,.3,1);
}
.glass-loading.show .gl-card{transform:none}
.gl-card::before{
  content:'';position:absolute;top:-45%;right:-45%;bottom:-45%;left:-45%;z-index:-1;
  background:
    radial-gradient(circle at 30% 28%,rgba(139,92,246,.42) 0%,transparent 42%),
    radial-gradient(circle at 72% 66%,rgba(56,189,248,.34) 0%,transparent 44%),
    radial-gradient(circle at 50% 92%,rgba(236,72,153,.30) 0%,transparent 45%);
  filter:blur(26px);
  animation:glFloat 9s ease-in-out infinite alternate;
  pointer-events:none;
}
.gl-card::after{
  content:'';position:absolute;top:0;left:0;right:0;height:52%;z-index:-1;
  border-radius:30px 30px 0 0;
  background:linear-gradient(180deg,rgba(255,255,255,.55) 0%,rgba(255,255,255,0) 100%);
  pointer-events:none;
}
@keyframes glFloat{
  0%{transform:translate3d(-4%,-3%,0) scale(1)}
  50%{transform:translate3d(3%,4%,0) scale(1.06)}
  100%{transform:translate3d(-2%,5%,0) scale(.98)}
}

.gl-orb-wrap{position:relative;width:76px;height:76px;margin:2px auto 16px}
.gl-orb{
  position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;
  background:conic-gradient(from 0deg,#6366f1,#8b5cf6,#ec4899,#38bdf8,#6366f1);
  filter:blur(1px);opacity:.92;
  box-shadow:0 10px 26px rgba(99,102,241,.45),inset 0 0 18px rgba(255,255,255,.55);
  animation:glSpin 3.4s linear infinite,glMorph 5.2s ease-in-out infinite;
}
.gl-orb-core{
  position:absolute;top:16px;right:16px;bottom:16px;left:16px;border-radius:50%;
  background:radial-gradient(circle at 34% 30%,rgba(255,255,255,.96) 0%,rgba(255,255,255,.66) 46%,rgba(255,255,255,.32) 100%);
  box-shadow:inset 0 0 14px rgba(255,255,255,.85),0 4px 14px rgba(79,70,229,.22);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  animation:glMorph 6.4s ease-in-out infinite reverse;
}
@keyframes glSpin{to{transform:rotate(360deg)}}
@keyframes glMorph{
  0%,100%{border-radius:50% 50% 50% 50% / 50% 50% 50% 50%}
  25%{border-radius:56% 44% 52% 48% / 48% 56% 44% 52%}
  50%{border-radius:46% 54% 44% 56% / 54% 46% 56% 44%}
  75%{border-radius:52% 48% 58% 42% / 46% 54% 42% 58%}
}

.gl-title{font-size:16.5px;font-weight:800;letter-spacing:-.01em;color:#1e1b4b}
.gl-text{margin-top:6px;font-size:12.5px;line-height:1.5;color:#4c4f7a;
  min-height:36px;word-break:break-word;
  display:flex;align-items:center;justify-content:center}
.gl-bar{position:relative;height:9px;margin-top:12px;border-radius:999px;
  background:rgba(148,163,184,.26);
  box-shadow:inset 0 1px 2px rgba(15,23,42,.14),inset 0 0 0 1px rgba(255,255,255,.5);
  overflow:hidden}
.gl-bar-fill{position:absolute;top:0;left:0;bottom:0;width:0;border-radius:inherit;
  background:linear-gradient(90deg,#6366f1 0%,#8b5cf6 45%,#ec4899 100%);
  box-shadow:0 0 14px rgba(139,92,246,.55);
  transition:width .32s cubic-bezier(.16,1,.3,1),background .3s}
.gl-bar-fill::after{content:'';position:absolute;top:0;right:0;bottom:0;left:0;
  background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.85) 50%,transparent 100%);
  transform:translateX(-100%);animation:glSheen 1.25s linear infinite}
@keyframes glSheen{to{transform:translateX(100%)}}
.gl-bar-fill.err{background:linear-gradient(90deg,#f87171 0%,#ef4444 100%);
  box-shadow:0 0 14px rgba(239,68,68,.5)}
.gl-meta{display:flex;justify-content:space-between;align-items:center;margin-top:9px;
  font-family:"SF Mono",Consolas,monospace;font-size:11px;color:#6b7280;letter-spacing:.02em}

body.dark .glass-loading{
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.34) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.26) 0%,transparent 58%),
    rgba(2,6,23,.58);
}
body.dark .gl-card{
  background:linear-gradient(155deg,
    rgba(51,65,85,.66) 0%,
    rgba(30,41,59,.52) 45%,
    rgba(49,46,129,.44) 100%);
  border-color:rgba(148,163,184,.32);
  box-shadow:
    0 28px 70px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(255,255,255,.04);
}
body.dark .gl-card::after{background:linear-gradient(180deg,rgba(255,255,255,.10) 0%,transparent 100%)}
body.dark .gl-title{color:#f1f5f9}
body.dark .gl-text{color:#cbd5e1}
body.dark .gl-meta{color:#94a3b8}
body.dark .gl-bar{background:rgba(15,23,42,.6);
  box-shadow:inset 0 1px 2px rgba(0,0,0,.5),inset 0 0 0 1px rgba(148,163,184,.2)}

@media (max-width:520px){
  .gl-card{padding:22px 18px 18px;border-radius:26px;width:320px;max-width:90vw}
  .gl-orb-wrap{width:66px;height:66px;margin-bottom:14px}
  .gl-orb-core{top:14px;right:14px;bottom:14px;left:14px}
  .gl-title{font-size:15.5px}
  .gl-text{font-size:12px;min-height:34px}
}
@media (prefers-reduced-motion: reduce){
  .gl-orb,.gl-orb-core,.gl-card::before,.gl-bar-fill::after{animation:none}
  .glass-loading,.gl-card{transition:none}
}
/* ===== 卡密授权层 ===== */
.license-gate{
  position:fixed;top:0;right:0;bottom:0;left:0;z-index:99995;
  min-height:100vh;min-height:100dvh;
  display:flex;align-items:center;justify-content:center;
  padding:20px;
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.30) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.26) 0%,transparent 58%),
    rgba(15,23,42,.55);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%);
  overscroll-behavior:contain;
  overflow:auto;
}
.license-gate.hidden{display:none}
body.gate-lock{overflow:hidden}

.license-box{
  width:100%;max-width:360px;
  padding:26px 22px 20px;
  border-radius:24px;
  text-align:center;
  background:linear-gradient(155deg,
    rgba(255,255,255,.68) 0%,
    rgba(238,242,255,.5) 42%,
    rgba(252,231,243,.42) 100%);
  border:1px solid rgba(255,255,255,.8);
  box-shadow:
    0 24px 60px rgba(79,70,229,.22),
    0 6px 16px rgba(15,23,42,.12),
    inset 0 1px 0 rgba(255,255,255,.95);
  -webkit-backdrop-filter:blur(26px) saturate(190%);
  backdrop-filter:blur(26px) saturate(190%);
  flex-shrink:0;
}
.license-title{font-size:16.5px;font-weight:800;color:#1e1b4b;margin-bottom:6px;letter-spacing:-.01em}
.license-desc{font-size:12.5px;color:#4c4f7a;margin-bottom:16px;line-height:1.5}

.license-input{
  display:block;width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1.5px solid rgba(148,163,184,.42);
  background:rgba(255,255,255,.75);
  color:#1e1b4b;
  font:600 15px/1.2 ui-monospace,Consolas,monospace;
  text-align:center;
  letter-spacing:.06em;
  outline:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
  -webkit-appearance:none;
  appearance:none;
}
.license-input::placeholder{
  color:#94a3b8;font-weight:400;letter-spacing:.02em;font-size:13px;
}
.license-input:focus{
  border-color:#6366f1;background:#fff;
  box-shadow:0 0 0 4px rgba(99,102,241,.14);
}

.license-actions{display:flex;gap:9px;margin-top:12px}
.license-actions .btn{height:42px;flex:1;min-width:0}

.license-msg{
  font-size:12px;line-height:1.45;
  color:#dc2626;min-height:17px;margin-top:10px;
  word-break:break-word;
}

@media (max-width:380px){
  .license-box{padding:22px 18px 18px;border-radius:20px}
  .license-title{font-size:15.5px}
  .license-input{font-size:14px;padding:11px 12px}
}

/* 暗色主题 */
body.dark .license-gate{
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.34) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.26) 0%,transparent 58%),
    rgba(2,6,23,.68);
}
body.dark .license-box{
  background:linear-gradient(155deg,
    rgba(51,65,85,.78) 0%,
    rgba(30,41,59,.66) 45%,
    rgba(49,46,129,.55) 100%);
  border-color:rgba(148,163,184,.34);
  box-shadow:0 24px 60px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.08);
}
body.dark .license-title{color:#f1f5f9}
body.dark .license-desc{color:#cbd5e1}
body.dark .license-input{
  background:rgba(15,23,42,.65);color:#f1f5f9;border-color:rgba(148,163,184,.3);
}
body.dark .license-input:focus{border-color:#818cf8;background:rgba(15,23,42,.85)}
/* ===== 购买 / 查单 ===== */
.license-links{margin-top:14px;padding-top:12px;border-top:1px solid rgba(148,163,184,.22);
  display:flex;align-items:center;justify-content:center;gap:8px}
.license-link{background:none;border:none;padding:4px 6px;font:inherit;font-size:12.5px;
  color:#6366f1;cursor:pointer;font-weight:600;transition:opacity .15s}
.license-link:hover{opacity:.75}
.license-link.buy{color:#059669}
.license-sep{color:#cbd5e1;font-size:11px}

.buy-pkgs{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.buy-pkg{padding:12px 14px;border-radius:12px;border:1.5px solid rgba(148,163,184,.3);
  background:rgba(255,255,255,.5);cursor:pointer;transition:all .15s;
  display:flex;align-items:center;justify-content:space-between;gap:10px}
.buy-pkg:hover{border-color:#6366f1}
.buy-pkg.on{border-color:#6366f1;background:rgba(99,102,241,.1);
  box-shadow:0 0 0 3px rgba(99,102,241,.12)}
.buy-pkg-name{font-size:14px;font-weight:700;color:#1e1b4b}
.buy-pkg-desc{font-size:11.5px;color:#64748b;margin-top:2px}
.buy-pkg-price{font-size:16px;font-weight:800;color:#6366f1;white-space:nowrap}
.buy-pkg-price small{font-size:11px;font-weight:600}

.buy-label{display:block;font-size:11.5px;color:#64748b;font-weight:600;
  margin:10px 0 6px;text-transform:none;letter-spacing:0}

.query-result{margin-top:12px}
.query-box{padding:12px 14px;border-radius:11px;background:rgba(16,185,129,.1);
  border:1px solid rgba(16,185,129,.3);font-size:13px;line-height:1.9}
.query-box .row{display:flex;justify-content:space-between;gap:10px}
.query-box .k{color:#64748b;font-size:12px}
.query-box .v{font-family:ui-monospace,Consolas,monospace;font-size:12.5px;
  color:#1e1b4b;word-break:break-all;text-align:right;flex:1}
.query-card{margin-top:8px;padding:12px;border-radius:10px;background:#fff;
  border:1.5px dashed #10b981;font-family:ui-monospace,Consolas,monospace;
  font-size:14px;font-weight:700;color:#059669;text-align:center;
  letter-spacing:.04em;word-break:break-all;cursor:pointer}

body.dark .license-links{border-color:rgba(148,163,184,.18)}
body.dark .license-link{color:#818cf8}
body.dark .license-link.buy{color:#34d399}
body.dark .buy-pkg{background:rgba(15,23,42,.5);border-color:rgba(148,163,184,.25)}
body.dark .buy-pkg.on{background:rgba(99,102,241,.18);border-color:#818cf8}
body.dark .buy-pkg-name{color:#f1f5f9}
body.dark .buy-pkg-desc{color:#94a3b8}
body.dark .buy-label{color:#94a3b8}
body.dark .query-box{background:rgba(16,185,129,.12)}
body.dark .query-box .v{color:#f1f5f9}
body.dark .query-card{background:rgba(6,78,59,.5);color:#34d399;border-color:#059669}
/* ===== 卡密层之上的弹窗（购买 / 查单）===== */
/* license-gate 是 99995，这些必须更高 */
#buyModal,
#queryModal{z-index:100000}
#buyModal .modal-box,
#queryModal .modal-box{max-height:88vh;overflow:auto}
/* 卡密层在弹窗打开时变暗 */
.license-gate.dimmed{opacity:.28;pointer-events:none}
/* ===== 购买 / 查单：液态玻璃弹窗 ===== */
#buyModal,
#queryModal{
  z-index:100000;
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.28) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.24) 0%,transparent 58%),
    rgba(15,23,42,.5);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  backdrop-filter:blur(20px) saturate(180%);
}

#buyModal .modal-box,
#queryModal .modal-box{
  max-height:88vh;overflow:auto;
  background:linear-gradient(155deg,
    rgba(255,255,255,.68) 0%,
    rgba(238,242,255,.5) 42%,
    rgba(252,231,243,.42) 100%);
  border:1px solid rgba(255,255,255,.8);
  border-radius:24px;
  padding:24px 20px 18px;
  box-shadow:
    0 24px 60px rgba(79,70,229,.22),
    0 6px 16px rgba(15,23,42,.12),
    inset 0 1px 0 rgba(255,255,255,.95);
  -webkit-backdrop-filter:blur(26px) saturate(190%);
  backdrop-filter:blur(26px) saturate(190%);
  transform:translateY(14px) scale(.95);
  transition:transform .34s cubic-bezier(.16,1,.3,1);
  align-items:stretch;
}
#buyModal.show .modal-box,
#queryModal.show .modal-box{transform:none}

#buyModal .modal-box h3,
#queryModal .modal-box h3{
  color:#1e1b4b;font-size:16.5px;font-weight:800;
  letter-spacing:-.01em;margin-bottom:2px;
}

/* 玻璃内输入框 */
#buyModal .license-input,
#queryModal .license-input{
  background:rgba(255,255,255,.72);
  border:1.5px solid rgba(148,163,184,.38);
  color:#1e1b4b;
}
#buyModal .license-input:focus,
#queryModal .license-input:focus{
  border-color:#6366f1;background:#fff;
  box-shadow:0 0 0 4px rgba(99,102,241,.14);
}
#buyModal .license-input::placeholder,
#queryModal .license-input::placeholder{color:#94a3b8}

/* 玻璃套餐卡 */
.buy-pkg{
  background:rgba(255,255,255,.5);
  border:1.5px solid rgba(255,255,255,.75);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 2px 8px rgba(99,102,241,.06);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
.buy-pkg:hover{border-color:rgba(99,102,241,.6);background:rgba(255,255,255,.68)}
.buy-pkg.on{
  border-color:#6366f1;
  background:linear-gradient(135deg,rgba(255,255,255,.85),rgba(224,231,255,.75));
  box-shadow:0 0 0 3px rgba(99,102,241,.16),0 4px 14px rgba(99,102,241,.14);
}
.buy-pkg-name{color:#1e1b4b}
.buy-pkg-desc{color:#64748b}
.buy-pkg-price{color:#6366f1}

.buy-label{color:#64748b}

/* 玻璃查单结果 */
.query-box{
  background:linear-gradient(135deg,rgba(236,253,245,.85),rgba(209,250,229,.6));
  border:1px solid rgba(16,185,129,.35);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
.query-box .k{color:#64748b}
.query-box .v{color:#065f46}
.query-card{
  background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(236,253,245,.9));
  border:1.5px dashed rgba(16,185,129,.6);
  color:#047857;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 3px 12px rgba(16,185,129,.12);
}

/* 玻璃按钮组 */
#buyModal .modal-actions .btn-ghost,
#queryModal .modal-actions .btn-ghost{
  background:rgba(255,255,255,.6);
  border:1.5px solid rgba(148,163,184,.36);
  color:#475569;
  -webkit-backdrop-filter:blur(8px);
  backdrop-filter:blur(8px);
}
#buyModal .modal-actions .btn-ghost:hover,
#queryModal .modal-actions .btn-ghost:hover{
  background:rgba(255,255,255,.85);color:#1e293b;
}

/* 暗色主题 */
body.dark #buyModal,
body.dark #queryModal{
  background:
    radial-gradient(760px circle at 20% 8%,rgba(99,102,241,.34) 0%,transparent 58%),
    radial-gradient(720px circle at 84% 92%,rgba(236,72,153,.26) 0%,transparent 58%),
    rgba(2,6,23,.62);
}
body.dark #buyModal .modal-box,
body.dark #queryModal .modal-box{
  background:linear-gradient(155deg,
    rgba(51,65,85,.78) 0%,
    rgba(30,41,59,.66) 45%,
    rgba(49,46,129,.55) 100%);
  border-color:rgba(148,163,184,.34);
  box-shadow:0 24px 60px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.08);
}
body.dark #buyModal .modal-box h3,
body.dark #queryModal .modal-box h3{color:#f1f5f9}
body.dark #buyModal .license-input,
body.dark #queryModal .license-input{background:rgba(15,23,42,.62);color:#f1f5f9;border-color:rgba(148,163,184,.3)}
body.dark .buy-pkg{background:rgba(15,23,42,.45);border-color:rgba(148,163,184,.26)}
body.dark .buy-pkg.on{background:linear-gradient(135deg,rgba(99,102,241,.28),rgba(139,92,246,.2));border-color:#818cf8}
body.dark .buy-pkg-name{color:#f1f5f9}
body.dark .buy-pkg-desc{color:#94a3b8}
body.dark .buy-pkg-price{color:#a5b4fc}
body.dark .buy-label{color:#94a3b8}
body.dark .query-box{background:linear-gradient(135deg,rgba(6,78,59,.6),rgba(6,95,70,.4));border-color:rgba(16,185,129,.4)}
body.dark .query-box .v{color:#6ee7b7}
body.dark .query-card{background:rgba(6,78,59,.7);color:#34d399;border-color:rgba(16,185,129,.6)}
body.dark #buyModal .modal-actions .btn-ghost,
body.dark #queryModal .modal-actions .btn-ghost{background:rgba(15,23,42,.55);border-color:rgba(148,163,184,.3);color:#cbd5e1}
/* ===== 支付二维码面板 ===== */
.pay-panel{
  margin-top:16px;padding:18px 16px 14px;border-radius:20px;
  background:linear-gradient(155deg,rgba(255,255,255,.72),rgba(238,242,255,.55));
  border:1px solid rgba(255,255,255,.85);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 4px 16px rgba(99,102,241,.1);
  -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  text-align:center;
}
.pay-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.pay-title{font-size:13.5px;font-weight:700;color:#1e1b4b}
.pay-amount{font-size:17px;font-weight:800;color:#6366f1;font-family:ui-monospace,Consolas,monospace}
.pay-qr{
  width:190px;height:190px;margin:0 auto 12px;border-radius:14px;
  background:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 20px rgba(99,102,241,.16),inset 0 0 0 1px rgba(148,163,184,.2);
  padding:8px;
}
.pay-qr img,.pay-qr canvas{width:100%;height:100%;object-fit:contain;display:block}
.pay-qr .qr-placeholder{font-size:12px;color:#94a3b8}
.pay-order{font-size:12px;color:#64748b;margin-bottom:8px}
.pay-order b{font-family:ui-monospace,Consolas,monospace;color:#1e1b4b;font-size:13px;
  letter-spacing:.03em;cursor:pointer}
.pay-tip{font-size:11.5px;color:#64748b;line-height:1.6;margin-bottom:12px;text-align:left;
  background:rgba(99,102,241,.07);padding:9px 11px;border-radius:9px;
  border-left:3px solid rgba(99,102,241,.45)}
.pay-actions{display:flex;gap:8px}
.pay-actions .btn{flex:1;height:40px}

body.dark .pay-panel{
  background:linear-gradient(155deg,rgba(51,65,85,.72),rgba(30,41,59,.6));
  border-color:rgba(148,163,184,.3);
}
body.dark .pay-title{color:#f1f5f9}
body.dark .pay-amount{color:#a5b4fc}
body.dark .pay-qr{background:rgba(255,255,255,.95)}
body.dark .pay-order{color:#94a3b8}
body.dark .pay-order b{color:#e2e8f0}
body.dark .pay-tip{color:#cbd5e1;background:rgba(99,102,241,.12);border-left-color:#818cf8}
/* ===== 支付方式选择 ===== */
.pay-types{display:flex;gap:8px;flex-wrap:wrap}
.pay-type{
  flex:1;min-width:90px;padding:10px 8px;border-radius:11px;
  border:1.5px solid rgba(255,255,255,.75);
  background:rgba(255,255,255,.5);
  text-align:center;font-size:12.5px;font-weight:600;color:#475569;
  cursor:pointer;transition:all .15s;
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
.pay-type:hover{border-color:rgba(99,102,241,.5);background:rgba(255,255,255,.68)}
.pay-type.on{
  border-color:#6366f1;color:#4338ca;
  background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(224,231,255,.8));
  box-shadow:0 0 0 3px rgba(99,102,241,.14);
}
.pay-type .pt-icon{display:block;font-size:17px;margin-bottom:2px;line-height:1}

body.dark .pay-type{background:rgba(15,23,42,.45);border-color:rgba(148,163,184,.26);color:#cbd5e1}
body.dark .pay-type.on{background:linear-gradient(135deg,rgba(99,102,241,.28),rgba(139,92,246,.2));border-color:#818cf8;color:#e0e7ff}
/* =========================================================
   移动端适配（购买 / 查单 / 支付）
   ========================================================= */
@media (max-width: 520px){
  /* 卡密层 */
  .license-gate{padding:16px 14px;align-items:center}
  .license-box{padding:22px 18px 16px;border-radius:20px;max-width:100%}
  .license-title{font-size:15.5px}
  .license-desc{font-size:12px;margin-bottom:14px}
  .license-input{padding:11px 12px;font-size:15px}
  .license-actions .btn{height:40px;font-size:13.5px}
  .license-links{margin-top:12px;padding-top:10px;gap:6px}
  .license-link{font-size:12px;padding:3px 5px}

  /* 购买 / 查单弹窗：垂直居中 */
  #buyModal,#queryModal{
    padding:16px 12px;
    -webkit-box-align:center;
    -webkit-align-items:center;
    align-items:center;
    -webkit-box-pack:center;
    -webkit-justify-content:center;
    justify-content:center;
  }
  #buyModal .modal-box,
  #queryModal .modal-box{
    width:100%;max-width:100%;
    border-radius:20px;
    padding:20px 16px;
    max-height:calc(100vh - 32px);
    max-height:calc(100dvh - 32px);
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
    transform:none;
    margin:auto;
  }
  #buyModal.show .modal-box,
  #queryModal.show .modal-box{transform:none}
  /* 查单弹窗内容少时也居中，不再靠底 */
  #queryModal .modal-box{max-height:auto}
  #buyModal .modal-box h3,
  #queryModal .modal-box h3{font-size:15.5px;margin-bottom:4px}

  /* 套餐卡片紧凑化 */
  .buy-pkgs{gap:7px;margin-bottom:12px}
  .buy-pkg{padding:10px 12px;border-radius:11px}
  .buy-pkg-name{font-size:13.5px}
  .buy-pkg-desc{font-size:11px}
  .buy-pkg-price{font-size:15px}
  .buy-label{font-size:11px;margin:8px 0 5px}

  /* 支付方式按钮 */
  .pay-types{gap:6px}
  .pay-type{padding:8px 6px;font-size:12px;min-width:0}
  .pay-type .pt-icon{font-size:15px}

  /* 支付面板 */
  .pay-panel{padding:14px 12px 12px;border-radius:16px;margin-top:12px}
  .pay-qr{width:158px;height:158px;padding:6px}
  .pay-head{margin-bottom:10px}
  .pay-title{font-size:12.5px}
  .pay-amount{font-size:15px}
  .pay-tip{font-size:11px;padding:8px 9px;line-height:1.55}
  .pay-actions .btn{height:38px;font-size:13px}

  /* 查单结果 */
  .query-box{padding:10px 12px;font-size:12.5px}
  .query-box .v{font-size:12px}
  .query-card{padding:10px;font-size:13px}

  .modal-actions{gap:7px}
  .modal-actions .btn{height:40px;font-size:13.5px}
}

/* 超小屏 */
@media (max-width: 360px){
  .license-box{padding:18px 14px 14px}
  .license-title{font-size:14.5px}
  .license-desc{font-size:11.5px}
  .license-input{font-size:14px;padding:10px}
  .buy-pkg{padding:9px 10px}
  .buy-pkg-name{font-size:13px}
  .buy-pkg-price{font-size:14px}
  .pay-qr{width:140px;height:140px}
  .license-link{font-size:11.5px}
}

/* 横屏矮屏：允许弹窗滚动 */
@media (max-height: 560px){
  #buyModal,#queryModal{align-items:flex-start;padding:8px}
  #buyModal .modal-box,
  #queryModal .modal-box{
    border-radius:16px;max-height:calc(100vh - 16px);
    padding:16px 14px;transform:none;
  }
  .pay-qr{width:120px;height:120px}
}
/* =========================================================
   iOS / 安卓 WebView 兼容修复
   ========================================================= */

/* 1. 关闭 iOS 的自动缩放与弹性滚动干扰 */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{-webkit-overflow-scrolling:touch}

/* 2. 固定层在 iOS 上的兜底（万一 top/left 未生效） */
.license-gate,
.modal{
  width:100%;
  height:100%;
  max-width:100vw;
  max-height:100vh;
}

/* 3. 输入框在 iOS 上出现圆角/内阴影，统一掉 */
input,textarea,select,button{
  -webkit-appearance:none;
  appearance:none;
  border-radius:inherit;
}
.license-input{
  border-radius:12px;
  -webkit-appearance:none;
  appearance:none;
}

/* 4. iOS 上 backdrop-filter 需要独立层，否则可能整块消失 */
.license-box,
#buyModal .modal-box,
#queryModal .modal-box{
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
  -webkit-backface-visibility:hidden;
  backface-visibility:hidden;
}

/* 5. flex + gap 在旧版 iOS 的兜底：给子元素补 margin */
@supports not (gap: 1px){
  .license-actions > *{margin-right:9px}
  .license-actions > *:last-child{margin-right:0}
  .modal-actions > *{margin-right:8px}
  .modal-actions > *:last-child{margin-right:0}
  .buy-pkgs > *{margin-bottom:8px}
  .pay-types > *{margin-right:8px;margin-bottom:8px}
}

/* 6. 小屏下卡密框强制不超出 */
@media (max-width: 520px){
  .license-gate{
    display:-webkit-box;
    display:-webkit-flex;
    display:flex;
    -webkit-box-align:center;
    -webkit-align-items:center;
    align-items:center;
    -webkit-box-pack:center;
    -webkit-justify-content:center;
    justify-content:center;
  }
  .license-box{
    width:100%;
    max-width:100%;
    margin:0 auto;
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
  }
  /* 弹窗兜底：垂直居中 */
  #buyModal,#queryModal{
    display:-webkit-box;
    display:-webkit-flex;
    display:flex;
    -webkit-box-align:center;
    -webkit-align-items:center;
    align-items:center;
    -webkit-box-pack:center;
    -webkit-justify-content:center;
    justify-content:center;
  }
}

/* 7. 减少动画开销，避免低端机卡顿 */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}