/* ==========================================================================
   86HC 全站统一收银台组件 (Unified Cashier Component)
   结构：.hkc 卡片 → 摘要 / 支付方式 / 支付面 / 状态行；data-device 区分桌面扫码与移动唤端
   ========================================================================== */

@keyframes hkSpin {
    to { transform: rotate(360deg); }
}
@keyframes hkcIn {
    from { opacity: 0; transform: translateY(8px) scale(0.985); }
    to   { opacity: 1; transform: none; }
}
@keyframes hkcSheetIn {
    from { transform: translateY(100%); }
    to   { transform: none; }
}
@keyframes hkModalFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@keyframes hkcSkeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- iOS Safari Scroll Lock & Viewport Defenses ---------- */
html.hkc-locked {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}
body.hkc-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    touch-action: none;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto;
}

/* ---------- Overlay ---------- */
#hkFilingPayModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 100000000 !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.55) !important;
    backdrop-filter: blur(10px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(160%) !important;
    overscroll-behavior: contain;
}
#hkFilingPayModal.is-prewarming {
    display: flex !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* 顾问弹窗须叠在收银台之上（.geo-lead-modal-overlay 的 !important z-index 会把两者压到同层） */
#hkWecomConnectModal {
    z-index: 100000010 !important;
}

/* 凭手机号找回 7 天已购凭证浮层 */
#hkRetrievePassesModal {
    z-index: 100000015 !important;
}

/* 微信内打开引导遮罩须置于最顶层，覆盖收银台与顾问弹窗 */
#hkWechatBrowserGuide {
    z-index: 100000020 !important;
}

/* ---------- Tokens ---------- */
.hkc {
    --hkc-bg: #ffffff;
    --hkc-sub: #f6f8fb;
    --hkc-hover: #eef3f9;
    --hkc-border: #e1e7ef;
    --hkc-border-strong: #cbd5e1;
    --hkc-text: #0d192b;
    --hkc-text-2: #334155;
    --hkc-muted: #5b6b7f;
    --hkc-blue: #1d6ff2;
    --hkc-blue-hover: #1558cc;
    --hkc-blue-text: #1558cc;
    --hkc-blue-soft: #eef4ff;
    --hkc-alipay: #1677ff;
    --hkc-alipay-hk: #0a8ee8;
    --hkc-ok: #0d9f6e;
    --hkc-warn: #b45309;
    --hkc-warn-bg: #fff7ed;
    --hkc-err: #dc2626;
    --hkc-err-bg: #fef2f2;
    --hkc-radius: 16px;
    --hkc-radius-sm: 10px;
    --hkc-shadow: 0 24px 60px -16px rgba(10, 22, 40, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.04);
}
html.dark .hkc,
[data-theme="dark"] .hkc,
body.dark-theme .hkc {
    --hkc-bg: #0f1f35;
    --hkc-sub: #142a45;
    --hkc-hover: #1a3352;
    --hkc-border: rgba(255, 255, 255, 0.10);
    --hkc-border-strong: rgba(255, 255, 255, 0.22);
    --hkc-text: #f1f5f9;
    --hkc-text-2: #cbd5e1;
    --hkc-muted: #94a3b8;
    --hkc-blue-text: #38bdf8;
    --hkc-blue-soft: rgba(56, 189, 248, 0.10);
    --hkc-warn-bg: rgba(180, 83, 9, 0.16);
    --hkc-err-bg: rgba(220, 38, 38, 0.14);
    --hkc-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(56, 189, 248, 0.18);
}

/* ---------- Card ---------- */
.hkc {
    width: 100%;
    max-width: 440px;
    max-height: min(92vh, 760px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--hkc-bg);
    color: var(--hkc-text);
    border-radius: var(--hkc-radius);
    box-shadow: var(--hkc-shadow);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    text-wrap: pretty;
    animation: hkcIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.hkc *,
.hkc *::before,
.hkc *::after {
    box-sizing: border-box;
}
.hkc svg {
    flex-shrink: 0;
}
.hkc .hk-modal-mobile-handle {
    display: none;
}

/* ---------- Header ---------- */
.hkc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 4px;
    flex-shrink: 0;
}
.hkc-header-copy {
    min-width: 0;
}
.hkc-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--hkc-text);
    text-wrap: balance;
}
.hkc-subtitle {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--hkc-muted);
}
.hkc-close {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--hkc-sub);
    color: var(--hkc-muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.hkc-close::after {
    content: '';
    position: absolute;
    inset: -6px;
}
.hkc-close:hover {
    background: var(--hkc-hover);
    color: var(--hkc-text);
}

/* ---------- Body & Dual-Mode Columns ---------- */
.hkc-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 14px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hkc-col-summary,
.hkc-col-pay {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* ---------- Summary ---------- */
.hkc-summary {
    background: var(--hkc-sub);
    border: 1px solid var(--hkc-border);
    border-radius: var(--hkc-radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hkc-summary-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    font-weight: 650;
    color: var(--hkc-text);
}
.hkc-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--hkc-border-strong);
    font-size: 10.5px;
    font-weight: 600;
    color: var(--hkc-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.hkc-summary-target {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--hkc-muted);
    overflow-wrap: anywhere;
}
.hkc-summary-target strong {
    font-weight: 600;
    color: var(--hkc-text-2);
}
.hkc-summary-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--hkc-muted);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.hkc-barcode-val {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
    font-size: 12px;
    font-weight: 600;
    color: var(--hkc-text-2);
    background: transparent;
    padding: 0;
}
.hkc-lines {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hkc-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--hkc-muted);
}
.hkc-line dt,
.hkc-line dd {
    margin: 0;
}
.hkc-line dd {
    font-variant-numeric: tabular-nums;
    color: var(--hkc-text-2);
    text-align: right;
}
.hkc-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12.5px;
    color: var(--hkc-text-2);
}
.hkc-features li {
    position: relative;
    padding-left: 16px;
}
.hkc-features li::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0.42em;
    width: 7px;
    height: 4px;
    border-left: 1.6px solid var(--hkc-ok);
    border-bottom: 1.6px solid var(--hkc-ok);
    transform: rotate(-45deg);
}
.hkc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--hkc-border);
    font-size: 13px;
    color: var(--hkc-text-2);
}
.hkc-total-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hkc-breakdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid var(--hkc-border-strong);
    background: var(--hkc-bg);
    color: var(--hkc-blue-text);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.hkc-breakdown-toggle svg {
    transition: transform 0.2s ease;
}
.hkc.is-breakdown-open .hkc-breakdown-toggle svg {
    transform: rotate(180deg);
}
.hkc-total strong {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--hkc-text);
    text-align: right;
}
.hkc-usd {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--hkc-muted);
}

/* ---------- Desktop Institutional Trust Suite ---------- */
.hkc-trust-suite {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 13px 14px;
    border-radius: var(--hkc-radius-sm);
    border: 1px solid var(--hkc-border);
    background: linear-gradient(145deg, rgba(29, 111, 242, 0.035) 0%, rgba(13, 159, 110, 0.03) 100%), var(--hkc-sub);
}
html.dark .hkc .hkc-trust-suite,
[data-theme="dark"] .hkc .hkc-trust-suite,
body.dark-theme .hkc .hkc-trust-suite {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%), var(--hkc-sub);
    border-color: rgba(56, 189, 248, 0.16);
}
.hkc-trust-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--hkc-ok);
    padding-bottom: 7px;
    border-bottom: 1px dashed var(--hkc-border);
}
.hkc-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hkc-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.hkc-trust-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--hkc-blue-soft);
    color: var(--hkc-blue-text);
    margin-top: 1px;
}
.hkc-trust-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.hkc-trust-copy strong {
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.3;
    color: var(--hkc-text);
}
.hkc-trust-copy span {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--hkc-muted);
}

/* ---------- Payment methods ---------- */
.hkc-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.hkc-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding: 10px 10px 9px;
    border: 1px solid var(--hkc-border-strong);
    border-radius: var(--hkc-radius-sm);
    background: var(--hkc-bg);
    color: var(--hkc-text);
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.hkc-method:hover {
    border-color: var(--hkc-muted);
}
.hkc-method:active {
    transform: scale(0.975);
}
.hkc-method:focus-visible {
    outline: 2px solid var(--hkc-blue);
    outline-offset: 2px;
}
.hkc-method.is-active {
    border-color: var(--hkc-blue);
    box-shadow: 0 0 0 1px var(--hkc-blue);
    background: var(--hkc-blue-soft);
}
.hkc-method-icon {
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 4px;
}
.hkc-method-icon--card {
    color: var(--hkc-text-2);
}
.hkc-method-name {
    max-width: 100%;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hkc-method-sub {
    max-width: 100%;
    font-size: 11px;
    color: var(--hkc-muted);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- Panels ---------- */
.hkc-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}
.hkc-panel.is-offscreen {
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 100% !important;
    visibility: hidden !important;
    pointer-events: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
    display: flex !important;
}

.hkc[data-device="desktop"] .hkc-mobile-only {
    display: none !important;
}
.hkc[data-device="mobile"] .hkc-desktop-only {
    display: none !important;
}
.hkc[data-device="mobile"]:not(.is-qr-open) .hkc-qr-block {
    display: none;
}
.hkc[data-device="mobile"]:not(.is-breakdown-open) #hkPayFeeBreakdown,
.hkc[data-device="mobile"]:not(.is-breakdown-open) #hkPayServiceFeatures,
.hkc[data-device="mobile"]:not(.is-breakdown-open) .hkc-summary-meta {
    display: none !important;
}

/* ---------- Desktop Two-Column Split Layout (>= 720px) ---------- */
@media (min-width: 720px) {
    .hkc[data-device="desktop"]:not(.is-stage-result) {
        max-width: 752px;
    }
    .hkc[data-device="desktop"]:not(.is-stage-result) .hkc-header {
        padding: 18px 24px 13px;
        border-bottom: 1px solid var(--hkc-border);
    }
    .hkc[data-device="desktop"]:not(.is-stage-result) #hkFilingPayBody {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 20px;
        padding: 18px 24px 20px;
        align-items: start;
    }
    .hkc[data-device="desktop"]:not(.is-stage-result) .hkc-col-pay {
        padding-left: 20px;
        border-left: 1px solid var(--hkc-border);
        min-height: 100%;
        justify-content: space-between;
    }
}

/* CTA buttons */
.hkc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--hkc-radius-sm);
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    color: #ffffff !important;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.hkc-cta:active {
    transform: scale(0.985);
}
.hkc-cta:focus-visible {
    outline: 2px solid var(--hkc-blue);
    outline-offset: 2px;
}
.hkc-cta--alipay {
    background: var(--hkc-alipay);
}
.hkc[data-method="alipay_hk"] .hkc-cta--alipay {
    background: var(--hkc-alipay-hk);
}
.hkc-cta--alipay:hover {
    filter: brightness(0.95);
}
.hkc-cta--card,
.hkc-cta--primary {
    background: var(--hkc-blue);
}
.hkc-cta--card:hover,
.hkc-cta--primary:hover {
    background: var(--hkc-blue-hover);
}
.hkc.has-wallet .hkc-cta--card {
    min-height: 46px;
    font-size: 15px;
    background: transparent;
    border-color: var(--hkc-border-strong);
    color: var(--hkc-text) !important;
}
.hkc.has-wallet .hkc-cta--card:hover {
    background: var(--hkc-sub);
}
.hkc-cta--ghost {
    background: var(--hkc-sub);
    border-color: var(--hkc-border);
    color: var(--hkc-text) !important;
    font-size: 14px;
    min-height: 44px;
}
.hkc-cta--wecom {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    font-size: 14px;
    min-height: 44px;
}
.hkc-cta.is-disabled {
    pointer-events: none;
    opacity: 0.55;
}

.hkc-fallback {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    color: var(--hkc-muted);
}
.hkc-fallback a,
.hkc-link {
    color: var(--hkc-blue-text) !important;
    font-weight: 600;
    text-decoration: none;
}
.hkc-fallback a:hover,
.hkc-link:hover {
    text-decoration: underline;
}
.hkc-link-btn {
    align-self: center;
    padding: 6px 8px;
    border: none;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--hkc-blue-text);
    cursor: pointer;
}
.hkc-link-btn:hover {
    text-decoration: underline;
}

/* QR */
.hkc-qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hkc-qr {
    position: relative;
    width: 192px;
    height: 192px;
    padding: 8px;
    border: 1px solid var(--hkc-border);
    border-radius: 12px;
    background: #ffffff;
}
.hkc-qr img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}
.hkc-qr-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 7px;
    box-shadow: 0 0 0 3px #ffffff;
    pointer-events: none;
}
.hkc-qr-badge svg {
    border-radius: 5px;
}
.hkc-qr-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    font-size: 12.5px;
    color: #475569;
    z-index: 2;
}
.hkc-qr-overlay--expired {
    font-weight: 600;
    color: #0d192b;
}
.hkc-btn-small {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    background: var(--hkc-blue);
    color: #ffffff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.hkc-btn-small:hover {
    background: var(--hkc-blue-hover);
}
.hkc-qr-caption {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--hkc-text);
    text-align: center;
}
.hkc-qr-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--hkc-sub);
    border: 1px solid var(--hkc-border);
    font-size: 11.5px;
    color: var(--hkc-muted);
    margin-top: 4px;
}
.hkc-qr-timer svg {
    color: var(--hkc-blue-text);
}
.hkc-qr-timer strong {
    color: var(--hkc-blue-text);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

/* Stripe Express Checkout Element */
.hkc-express {
    width: 100%;
    min-height: 48px;
    height: 48px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.25s ease;
    box-sizing: border-box;
}
.hkc-express.is-loading {
    background: #000000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: default;
    user-select: none;
}
.hkc-express.is-loading::before {
    content: attr(data-placeholder);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}
.hkc-express.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);
    background-size: 200% 100%;
    animation: hkcSkeleton 1.4s infinite linear;
    pointer-events: none;
    z-index: 2;
}
.hkc-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--hkc-muted);
}
.hkc-divider::before,
.hkc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hkc-border);
}
.hkc:not(.has-wallet) .hkc-divider {
    display: none;
}
.hkc-brands {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}
.hkc-brand {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid var(--hkc-border);
    border-radius: 4px;
    background: #ffffff;
    font-size: 10.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}
.hkc-brand--visa {
    font-style: italic;
    font-weight: 900;
    color: #1a1f71;
    letter-spacing: -0.3px;
}
.hkc-brand--amex {
    background: #016fd0;
    border-color: #016fd0;
    color: #ffffff;
}

/* Notes & alerts */
.hkc-note {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: var(--hkc-muted);
    text-align: center;
}
.hkc-alert {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
}
.hkc-alert a {
    color: var(--hkc-blue-text);
    font-weight: 600;
    margin-left: 4px;
}
.hkc-alert--warn {
    background: var(--hkc-warn-bg);
    color: var(--hkc-warn);
}
.hkc-alert--error {
    background: var(--hkc-err-bg);
    color: var(--hkc-err);
}

/* ---------- Footer / status ---------- */
.hkc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hkc-border);
    font-size: 12px;
    line-height: 1.4;
}
.hkc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hkc-text-2);
    font-size: 12px;
    font-weight: 500;
}
.hkc-guarantee-icon {
    color: var(--hkc-ok);
    flex-shrink: 0;
}
.hkc-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hkc-ok);
    box-shadow: 0 0 0 3px rgba(13, 159, 110, 0.15);
}
.hkc-foot-links {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hkc-muted);
    font-size: 12px;
}
.hkc-foot-links a {
    color: var(--hkc-blue-text) !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.hkc-foot-links a:hover {
    text-decoration: underline;
}
.hkc-foot-links a.is-disabled,
.js-btn-confirm-paid.is-disabled,
.hkc-btn-confirm.is-disabled {
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    text-decoration: none !important;
    user-select: none;
}
.hkc-verify {
    flex-basis: 100%;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
}
.hkc-verify.is-info {
    background: var(--hkc-blue-soft);
    color: var(--hkc-blue-text);
}

/* ---------- Results ---------- */
.hkc-result {
    align-items: center;
    text-align: center;
    padding: 28px 22px 24px;
}
.hkc-result-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(13, 159, 110, 0.10);
    color: var(--hkc-ok);
}
.hkc-result-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hkc-text);
}
.hkc-result-desc {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hkc-muted);
}
.hkc-result-meta {
    margin: 0;
    font-size: 13px;
    color: var(--hkc-muted);
}
.hkc-mono {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    color: var(--hkc-text);
}
.hkc-result #hkSuccessDocMode,
.hkc-result #hkSuccessServiceMode {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.hkc-success-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hkc-card {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--hkc-radius-sm);
    background: var(--hkc-sub);
    font-size: 12.5px;
    color: var(--hkc-muted);
    text-align: left;
}
.hkc-card strong {
    font-size: 14px;
    color: var(--hkc-text);
}
.hkc-card--dashed {
    background: transparent;
    border: 1px dashed var(--hkc-border-strong);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.hkc-card--dashed.is-synced {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid rgba(5, 150, 105, 0.3);
}
[data-theme="dark"] .hkc-card--dashed.is-synced {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.4);
}
.hkc-card-state {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}
.hkc-synced-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hkc-text);
}
.hkc-synced-title svg {
    color: #059669;
    flex-shrink: 0;
}
[data-theme="dark"] .hkc-synced-title svg {
    color: #10b981;
}
.hkc-synced-sub {
    font-size: 12px;
    color: var(--hkc-muted);
    line-height: 1.4;
}

.hkc-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--hkc-blue, #1d6ff2);
    border-top-color: transparent;
    border-radius: 50%;
    animation: hkSpin 0.8s linear infinite;
}

/* ---------- Mobile bottom sheet ---------- */
@media (max-width: 640px) {
    #hkFilingPayModal {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .hkc {
        position: relative;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        overflow: hidden;
        animation: hkcSheetIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .hkc .hk-modal-mobile-handle {
        display: block;
        width: 36px;
        height: 4px;
        margin: 8px auto 0;
        border-radius: 2px;
        background: var(--hkc-border-strong);
        flex-shrink: 0;
        cursor: grab;
        touch-action: none;
    }
    .hkc.is-dragging {
        transition: none !important;
        user-select: none;
    }
    .hkc.is-snapping {
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .hkc-header {
        padding: 10px 16px 2px;
        border-radius: 18px 18px 0 0;
        background: var(--hkc-bg);
    }
    .hkc-body {
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
        background: var(--hkc-bg);
    }
    .hkc-method {
        padding: 9px 8px 8px;
    }
    .hkc-qr {
        width: 168px;
        height: 168px;
    }
}
@media (max-width: 360px) {
    .hkc-method-sub {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hkc {
        animation: none;
    }
}

/* ---------- WeChat in-app browser guide overlay ---------- */
.hkc-wechat-guide {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.92);
    z-index: 100000020 !important;
    color: #ffffff;
    padding: 24px 20px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.hkc-wechat-guide-arrow {
    text-align: right;
    margin-bottom: 12px;
    color: #38bdf8;
}
.hkc-wechat-guide-box {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
}
.hkc-wechat-guide-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.4;
}
.hkc-wechat-guide-desc {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.5;
    margin: 0 0 20px;
}
.hkc-wechat-guide-btn {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: background 0.15s ease;
}
.hkc-wechat-guide-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

