/* TQ-PAY 同款视觉（cf-tq） */
*,::after,::before{box-sizing:border-box;margin:0;padding:0}
:root{
  --brand-blue:#2367d8;
  --brand-blue-dark:#174fb5;
  --brand-red:#ff3b5c;
  --ink:#1a1d29;
  --muted:#94a3b8;
  --muted-dark:#6b7280;
  --line:#eef0f5;
  --panel:#f6f8fb;
  --orange:#f5a623;
  --orange-dark:#c47b09;
}
body,html{height:100%}
body.tq-body{
  font-family:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans Myanmar",Pyidaungsu,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:linear-gradient(135deg,#667eea 0,#764ba2 100%);
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom));
  -webkit-font-smoothing:antialiased;
}
.d-none,.hidden{display:none!important}
.checkout-wrapper{width:100%;max-width:768px;margin:0 auto}
.card,.tq-card{
  background:#f8f8f8;
  border-radius:16px;
  width:100%;
  padding:16px;
  position:relative;
  box-shadow:0 8px 32px rgba(102,92,92,.15);
  border:0;
}
.lang-switcher{position:absolute;top:10px;right:20px;z-index:10}
.lang-select{
  background:rgba(255,255,255,.92);border:1px solid #ddd;border-radius:15px;
  min-width:86px;padding:6px 10px;font-size:12px;font-weight:400;color:#666;
  cursor:pointer;font-family:inherit;line-height:1.25;
}
.lang-select:focus,.lang-select:hover{background:#fff;border-color:#c9cdd6;outline:0}

.full-state,.state-overlay{
  min-height:360px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:40px 20px;text-align:center;background:#f8f8f8;border-radius:16px;
}
#checkout-loading{
  position:fixed;z-index:9999;inset:0;width:100%;height:100vh;
  background:#34495e;display:flex;align-items:center;justify-content:center;flex-direction:column;
  color:#efeffa;
}
.loader{width:64px;height:64px;border-radius:50%;perspective:800px;position:relative;margin-bottom:12px}
.loader .inner{position:absolute;box-sizing:border-box;width:100%;height:100%;border-radius:50%}
.loader .inner.one{left:0;top:0;animation:rotate-one 1s linear infinite;border-bottom:3px solid #efeffa}
.loader .inner.two{right:0;top:0;animation:rotate-two 1s linear infinite;border-right:3px solid #efeffa}
.loader .inner.three{right:0;bottom:0;animation:rotate-three 1s linear infinite;border-top:3px solid #efeffa}
@keyframes rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotateZ(0)}100%{transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}
@keyframes rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotateZ(0)}100%{transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}
@keyframes rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotateZ(0)}100%{transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}

.state-icon,.icon-huge{
  width:68px;height:68px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;font-size:34px;font-weight:700;color:#fff;
  box-shadow:0 12px 28px rgba(0,0,0,.15);
}
.state-icon.success,.text-success.icon-huge{background:linear-gradient(135deg,#16a34a,#22c55e);font-size:34px!important}
.state-icon.failed,.state-icon.expired,.text-warning.icon-huge,.text-danger.icon-huge{
  background:linear-gradient(135deg,#ef4444,#f97316);font-size:34px!important
}
.state-title,h3.fw-bold,h4.fw-bold{font-size:20px;font-weight:700;color:var(--ink);margin-bottom:8px}
.state-desc,.text-muted.small{font-size:14px;color:var(--muted-dark);line-height:1.6;max-width:320px}

#checkout-main{padding-top:42px}
.steps{display:flex;align-items:center;justify-content:center;height:24px;margin:12px 0 16px}
.step-group{display:flex;flex-direction:column;align-items:center}
.step-circle{
  width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:16px;font-weight:700;flex-shrink:0;line-height:1;
}
.step-circle.active{background:#2196f3;color:#fff}
.step-circle.inactive{background:#fff;color:#999;border:0}
.step-line{width:120px;height:2px;background:#fff;margin:0 20px}
.step-label{display:none}

.badge-row{
  position:relative;display:flex;justify-content:space-between;align-items:center;
  margin-bottom:16px;min-height:40px;
}
.badge-row.no-channel{justify-content:flex-end}
.channel-badge{
  background:var(--brand-blue);color:#fff;font-weight:700;padding:8px 16px;border-radius:20px;
  display:inline-flex;align-items:center;min-height:40px;font-size:14px;
}
.channel-badge.d-none{display:none!important}
.countdown-bar{
  background:var(--brand-red);color:#fff;font-weight:700;font-size:14px;padding:8px 12px;
  border-radius:20px;display:inline-flex;align-items:center;gap:6px;min-height:40px;
}
.countdown-bar::before{
  content:'';width:14px;height:16px;flex-shrink:0;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M6 2h12v2H6V2zm0 18h12v2H6v-2zM7 4h10v2c0 2.76-2.24 5-5 5s-5-2.24-5-5V4zm0 14v-2c0-2.76 2.24-5 5-5s5 2.24 5 5v2H7z'/></svg>") center/contain no-repeat;
}
.countdown-bar strong{color:#fff;font-weight:700;font-size:14px}

.info-card{background:#fff;border:0;border-radius:10px;padding:16px 20px;margin-bottom:8px}
.info-label{color:#333;font-size:11px;margin-bottom:6px;font-weight:400}
.account-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;min-height:54px}
.account-row .info-label{grid-column:1;margin-bottom:4px}
.account-row .copy-btn{grid-row:1/span 2;grid-column:2;align-self:center}
.account-number{
  grid-column:1;font-size:21px;font-weight:700;color:#f44336;word-break:break-all;line-height:1.2;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}
.holder-row{margin-top:10px;padding-top:10px;border-top:1px dashed var(--line)}
.holder-name{font-size:17px;font-weight:700;color:#1f2937;line-height:1.3;overflow-wrap:anywhere}

.amount-card{
  text-align:center;min-height:128px;padding:16px 20px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
}
.amount-value{
  font-size:26px;font-weight:800;color:var(--brand-red);margin-bottom:8px;line-height:1.1;
}
.amount-card .copy-btn{margin-bottom:8px}
.amount-helper{font-size:14px;color:#666;text-align:center}
.copy-btn{
  background:#2196f3;color:#fff;border:none;border-radius:20px;padding:0 16px;width:64px;height:28px;
  font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;
  font-family:inherit;white-space:nowrap;flex-shrink:0;
}
.copy-btn:hover{background:var(--brand-blue-dark)}

.note-card{margin-bottom:8px}
.note-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;min-height:54px}
.note-row .info-label{grid-column:1;margin-bottom:4px}
.note-row .copy-btn{grid-row:1/span 2;grid-column:2;align-self:center}
.note-value{
  grid-column:1;font-size:22px;font-weight:700;color:#f44336;letter-spacing:.12em;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;line-height:1.2;
}
.note-helper{font-size:13px;color:#757575;margin-top:10px;line-height:1.45}
.note-card.d-none{display:none!important}

.tx-section{margin-bottom:16px;background:#fff;border-radius:25px;padding:2px 5px}
.tx-input-card{
  background:#fff;border:1px solid #dadce0;border-radius:12px;padding:10px;
  display:flex;align-items:center;gap:6px;width:100%;
}
.tx-input-card:focus-within{border-color:#4285f4;box-shadow:0 2px 6px rgba(66,133,244,.15)}
.tx-input-icon{width:18px;height:18px;color:#2196f3;flex-shrink:0}
.tx-input{
  flex:1;border:none;outline:0;padding:0;font-size:14px;font-family:inherit;background:transparent;
  color:#333;min-width:0;letter-spacing:.2em;text-transform:uppercase;font-weight:700;
}
.tx-submit-btn{
  width:34px;height:34px;border-radius:50%;background:#2196f3;border:none;
  display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;
  box-shadow:0 2px 8px rgba(66,133,244,.3);color:#fff;
}
.tx-submit-btn:hover{background:#3367d6}
.tx-submit-btn svg{width:18px;height:18px}
.tx-submit-btn.submitting{opacity:.85;cursor:wait;transform:scale(.96)}
.tx-submit-btn.submitting svg{opacity:.35}
.tx-helper{font-size:13px;color:#757575;margin:8px 0 8px 4px;padding:0 4px;line-height:1.5}
.verify-panel{
  background:#f8f9fa;border:1px solid #fff;border-radius:12px;padding:14px 16px;margin:0 0 8px;
  display:flex;flex-direction:column;align-items:flex-start;gap:10px;
}
.verify-panel.d-none{display:none!important}
.verify-cert-row{display:flex;align-items:center;gap:8px;font-size:15px;color:#1890ff;font-weight:500}
.verify-cert-row strong{color:var(--brand-red);font-size:20px;font-weight:600;letter-spacing:.06em}
.verify-status-row{display:flex;align-items:center;gap:10px;min-height:24px}
.verify-matching-text{color:#2196f3;font-size:15px;font-weight:500}
.verify-status-row.is-failed .verify-matching-text{color:var(--brand-red);font-weight:800}
.verify-countdown{color:var(--brand-red);font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.verify-spin{
  width:16px;height:16px;border-radius:50%;border:2px solid #f3f3f3;border-top-color:var(--brand-red);
  animation:cashierSpin .85s linear infinite;flex-shrink:0;
}
.verify-status-row.is-failed .verify-spin{display:none}
@keyframes cashierSpin{to{transform:rotate(360deg)}}
.outline-action{
  width:100%;min-height:44px;border-radius:22px;padding:8px 16px;font-weight:500;font-size:14px;
  cursor:pointer;font-family:inherit;border:1px solid #4caf50;background:#fff;color:#4caf50;
}
.outline-action:hover{background:#4caf50;color:#fff}

.supported-apps{margin-bottom:12px}
.supported-apps-label{color:#2196f3;font-size:15px;font-weight:700;margin-bottom:12px;display:block}
.channel-wake-wrap{
  display:inline-flex;align-items:center;gap:10px;cursor:pointer;
  padding:6px 14px 6px 6px;border-radius:999px;background:#eef6ff;
  border:1px solid rgba(33,150,243,.28);transition:transform .12s,background .15s;
}
.channel-wake-wrap:active{transform:scale(.96);background:#e0f0ff}
.channel-wake-hint{color:#1976d2;font-size:13px;font-weight:700;line-height:1.3}
.channel-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:55px;height:55px;border-radius:50%;overflow:hidden;
  background:#fff;padding:4px;
  border:3px solid var(--brand-blue);flex-shrink:0;
}
.channel-icon img{width:100%;height:100%;object-fit:contain;display:block}

.tips-card{
  background:#fff;border-left:4px solid var(--orange);border-radius:12px;padding:16px;margin:20px 0;
  color:var(--orange-dark);box-shadow:0 2px 8px rgba(0,0,0,.1);
  max-height:200px;overflow-y:auto;
}
html[lang^="zh"] .tips-card{max-height:none;overflow:visible}
.tips-title{color:var(--orange-dark);font-weight:700;font-size:15px;margin-bottom:12px}
.tips-list{list-style:none;padding:0 0 0 16px;margin:0;line-height:1.5}
.tips-list li{color:var(--orange-dark);font-size:13px;line-height:1.5;margin-bottom:8px}
.tips-list li::before{content:attr(data-idx);font-weight:700;margin-right:4px}

.order-footer{
  background:var(--panel);border-radius:8px;border:1px solid #fff;padding:12px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px;
}
.order-label{color:var(--muted-dark);font-size:14px;font-weight:500;flex-shrink:0}
.order-no{color:var(--brand-red);font-weight:600;font-size:14px;word-break:break-all;flex:1;text-align:center}
.copy-icon-btn{background:transparent;border:none;cursor:pointer;padding:4px;color:var(--muted)}
.copy-icon-btn:hover{color:var(--brand-blue)}
.copy-icon-btn svg{width:18px;height:18px;stroke:currentColor;fill:none}

.selection-placeholder{
  background:#fff;border-radius:12px;padding:22px 16px 10px;text-align:center;margin-bottom:8px;color:var(--muted-dark);
}
.selection-placeholder .icon-circle{
  width:48px;height:48px;border-radius:50%;background:#eef4ff;display:flex;align-items:center;justify-content:center;margin:0 auto 10px;
  color:var(--brand-blue);font-size:20px;font-weight:700;
}
.selection-placeholder .fw-bold{font-size:16px;font-weight:700;color:var(--ink);margin-bottom:4px}
.selection-placeholder .amount-helper{font-size:13px;color:var(--muted-dark);margin:0}

/* 银行网格：图标 + 名称，替代难看的原生 select */
.bank-pill-container{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;
  padding:4px 2px 14px;margin:0 0 8px;
}
.bank-pill-container.d-none{display:none!important}
.bank-pill-container.bank-locked{display:none!important}
.bank-pill{
  position:relative;background:#fff;border:1.5px solid #e5e7eb;border-radius:14px;
  padding:12px 8px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:8px;cursor:pointer;min-height:92px;user-select:none;
  transition:border-color .18s,box-shadow .18s,transform .18s;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
}
.bank-pill:hover{border-color:#93c5fd;transform:translateY(-1px);box-shadow:0 6px 16px rgba(35,103,216,.12)}
.bank-pill:active{transform:translateY(0)}
.bank-pill.active{
  border:2px solid var(--brand-blue);background:#f8fbff;
  box-shadow:0 6px 18px rgba(35,103,216,.16);
}
.bank-pill .bank-img-wrap{
  width:44px;height:44px;border-radius:12px;background:#f3f6fb;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.bank-pill .bank-img-wrap img,.bank-pill .bank-icon{
  max-width:34px;max-height:34px;object-fit:contain;display:block;
}
.bank-pill .bank-name{
  font-size:12px;font-weight:700;color:#334155;text-align:center;line-height:1.25;
  max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 2px;
}
.bank-pill .badge-bonus{
  position:absolute;top:0;right:0;background:linear-gradient(135deg,#ff4d4f,#e53935);
  color:#fff;font-size:10px;font-weight:700;padding:2px 7px;border-radius:0 12px 0 8px;line-height:1.2;
}
.bank-pill-empty{
  grid-column:1/-1;text-align:center;padding:16px 12px;color:var(--muted-dark);
  font-size:13px;background:#fff;border-radius:12px;border:1px dashed #d1d5db;
}
.selection-placeholder.is-no-banks{
  background:#fff5f5;border:1.5px solid #fecaca;box-shadow:0 8px 24px rgba(239,68,68,.08);
  padding:28px 18px 22px;
}
.selection-placeholder.is-no-banks .no-banks-icon{
  background:#fee2e2;color:#dc2626;font-size:26px;
}
.selection-placeholder.is-no-banks .fw-bold{color:#b91c1c;font-size:17px}
.selection-placeholder.is-no-banks .amount-helper{
  color:#7f1d1d;font-size:13px;line-height:1.55;max-width:280px;margin:6px auto 0;
}
.tq-retry-btn{
  margin-top:16px;min-height:42px;padding:0 22px;border:0;border-radius:22px;
  background:var(--brand-blue);color:#fff;font-size:14px;font-weight:700;
  font-family:inherit;cursor:pointer;box-shadow:0 4px 14px rgba(35,103,216,.25);
}
.tq-retry-btn:hover{background:var(--brand-blue-dark)}
.tq-retry-btn:active{transform:scale(.98)}

/* 原生下拉仅备用，不参与视觉 */
.tq-bank-pick{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.tq-bank-pick.d-none{display:none!important}
.alert{border-radius:10px;padding:10px 12px;margin:0 0 8px;font-size:13px}
.alert-warning{background:#fff7ed;color:#c2410c}
.alert-danger{background:#fef2f2;color:#b91c1c}

/* 兼容旧 JS 依赖的隐藏节点 */
#qr-display-area,#timer-stroke,#wake-app-btn,#quick-action-panel,
#deeplink-fallback,#cross-bank-fee-hint,#status-container,#btn-support-link,
.side-panel-container,#panel-overlay,.bank-selector-wrapper,.bank-selector-wrapper>.d-flex{display:none!important}

#tq-amount-block{display:contents}
.amount-display{display:contents}
#btn-copy-amount{display:none}

.toast-lite{
  position:fixed;top:36px;left:50%;transform:translateX(-50%) translateY(-20px);
  background:rgba(0,0,0,.82);color:#fff;padding:9px 22px;border-radius:8px;font-size:14px;
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:9999;
}
.toast-lite.show{opacity:1;transform:translateX(-50%) translateY(0)}

@media (max-width:420px){
  .card,.tq-card{border-radius:10px;min-height:calc(100dvh - 20px)}
  .step-line{width:100px}
  .account-number{font-size:20px}
  .amount-value{font-size:24px}
  .bank-pill-container{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .bank-pill{min-height:86px;padding:10px 6px 8px}
}

/* TQ 60s 提醒弹窗 */
.modal-overlay{
  position:fixed;inset:0;z-index:9998;display:flex;align-items:center;justify-content:center;
  padding:18px 14px;background:rgba(0,0,0,.55);
}
.modal-overlay.hidden{display:none!important}
.modal-dialog{
  width:min(390px,100%);background:#fff;border-radius:18px;position:relative;overflow:hidden;
  box-shadow:0 28px 78px rgba(0,0,0,.34);animation:modalIn .18s ease-out;
}
@keyframes modalIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.modal-header{padding:20px 52px 16px 22px;border-bottom:1px solid #edf0f5;display:flex;flex-direction:column;gap:10px}
.modal-close{position:absolute;top:16px;right:16px;width:34px;height:34px;border:0;background:transparent;color:#9a9a9a;font-size:28px;cursor:pointer;line-height:1}
.modal-close:hover{color:var(--ink)}
.modal-kicker{display:inline-flex;padding:4px 12px;border-radius:999px;background:var(--brand-blue);color:#fff;font-size:12px;font-weight:700;align-self:flex-start}
.modal-title{font-size:18px;font-weight:800;color:var(--ink);line-height:1.3}
.modal-body{padding:20px 22px 24px}
.modal-desc{color:var(--muted-dark);font-size:14px;line-height:1.5;text-align:center}
.modal-note{margin-top:16px;color:var(--brand-red);font-weight:600;font-size:13px;text-align:center}
.modal-input-row{display:flex;flex-direction:column;gap:10px;margin:22px 0 0}
.modal-input{
  width:100%;min-height:52px;border:2px solid var(--brand-blue);border-radius:12px;padding:0 16px;
  font-size:16px;font-weight:700;color:var(--ink);font-family:inherit;letter-spacing:.28em;text-transform:uppercase;text-align:center;
}
.modal-input:focus{outline:0;box-shadow:0 0 0 4px rgba(35,103,216,.15)}
.modal-submit-btn{
  width:100%;min-height:50px;margin-top:12px;border:0;border-radius:12px;background:var(--brand-blue);
  color:#fff;font-size:15px;font-weight:800;font-family:inherit;cursor:pointer;
}
.modal-submit-btn:disabled{opacity:.6;cursor:wait}
.modal-submit-btn.submitting{opacity:.85}
