* { box-sizing: border-box; }
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #111; background: #fff; }
html, body { margin: 0; min-height: 100%; background: #fff; }
body { min-height: 100vh; min-height: 100dvh; }
button, input { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.app { width: 100%; max-width: 420px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: #fff; text-align: center; }
.brand { padding-top: 25px; font-size: 16.8px; line-height: 24px; font-weight: 600; }
.home-amount { display: flex; justify-content: center; align-items: baseline; gap: 4px; margin-top: 23px; height: 54px; }
.currency { font-size: 27px; font-weight: 600; }
.amount-input { width: auto; min-width: 1ch; padding: 0; border: 0; outline: 0; background: transparent; color: #111; font-size: 44px; line-height: 54px; font-weight: 700; text-align: center; field-sizing: content; }
.amount-input[data-empty="true"] { color: #999; }
.amount-hint { margin-top: 11px; color: #999; font-size: 14px; line-height: 20px; }
.home-amount.is-empty .currency { color: #d1d5db; }
.primary-button { display: flex; align-items: center; justify-content: center; width: calc(100% - 40px); height: 51px; margin: 22px auto 0; border: 0; border-radius: 7px; background: #1677ff; color: #fff; font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer; }
.primary-button:disabled { background: #b8d5ff; cursor: default; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 18px; background: #e5e5e5; }
.key { height: 57px; padding: 0; border: 0; background: #fff; color: #111; font-size: 22px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.key:active { background: #f5f5f5; }
.key-delete { font-size: 14px; }
.key-empty { background: #fafafa; }
.subpage { padding: 0 20px 36px; }
.order-amount { margin-top: 24px; font-size: 40px; line-height: 48px; font-weight: 700; }
.order-merchant { margin-top: 8px; color: #858b95; font-size: 14px; line-height: 20px; }
.order-status { margin-top: 18px; color: #1677ff; font-size: 14px; line-height: 20px; }
.qr-link { display: flex; width: 210px; height: 210px; margin: 16px auto 0; align-items: center; justify-content: center; color: #111; text-decoration: none; }
.qr-link svg { display: block; width: 100%; height: 100%; }
.scan-hint { margin-top: 9px; color: #858b95; font-size: 14px; line-height: 24px; }
.order-home { width: 100%; margin-top: 20px; }
.generating-amount { margin-top: 24px; font-size: 44px; line-height: 56px; font-weight: 700; }
.generating-hint { margin-top: 13px; color: #858b95; font-size: 16px; line-height: 24px; }
.spinner { width: 36px; height: 36px; margin: 24px auto 0; border: 4px solid #bfdbff; border-top-color: #1677ff; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.generating-title { margin-top: 26px; font-size: 23px; line-height: 32px; font-weight: 700; }
.steps { width: 190px; margin: 31px auto 0; text-align: left; }
.step { position: relative; display: grid; grid-template-columns: 30px 1fr; column-gap: 20px; min-height: 80px; }
.step:nth-child(2) { min-height: 84px; }
.step:last-child { min-height: 48px; }
.step:not(:last-child)::after { position: absolute; top: 29px; left: 14px; width: 2px; height: 51px; background: #dedfe2; content: ""; }
.step:nth-child(2)::after { height: 55px; }
.step.done:not(:last-child)::after { background: #1677ff; }
.step-icon { position: relative; z-index: 1; display: flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 2px solid #aeb3bb; border-radius: 50%; color: #fff; font-size: 20px; }
.step-check { display: block; width: 22px; height: 22px; filter: brightness(0) invert(1); }
.step.done .step-icon { border-color: #1677ff; background: #1677ff; }
.step.active .step-icon { border-color: #1677ff; }
.step.active .step-icon::after { width: 12px; height: 12px; border-radius: 50%; background: #1677ff; content: ""; }
.step-copy { padding-top: 2px; }
.step-name { font-size: 17px; line-height: 24px; white-space: nowrap; }
.step-detail { white-space: nowrap; }
.step-detail { margin-top: 5px; color: #858b95; font-size: 14px; line-height: 20px; }
.step.pending .step-name, .step.pending .step-detail { color: #a6abb3; }
.keep-hint { margin-top: 42px; color: #858b95; font-size: 14px; line-height: 22px; }
.guide { padding: 0 22px; }
.safari-icon { display: block; width: 68px; height: 68px; object-fit: contain; margin: 44px auto 0; }
.guide-title { margin: 31px 0 0; font-size: 23px; line-height: 32px; font-weight: 700; }
.guide-copy { margin: 18px 0 0; color: #858b95; font-size: 17px; line-height: 26px; }
.guide-actions { margin-top: 34px; }
.guide-actions .primary-button { width: 100%; margin-top: 0; height: 54px; border-radius: 7px; font-size: 18px; }
.secondary-button { width: 100%; height: 54px; margin-top: 12px; border: 1px solid #aeb3bb; border-radius: 7px; background: #fff; color: #111; font-size: 17px; cursor: pointer; }
.continue-button { width: 100%; height: 44px; margin-top: 9px; border: 0; background: transparent; color: #1677ff; font-size: 15px; cursor: pointer; }
.guide-foot { margin: 14px 0 0; color: #858b95; font-size: 15px; line-height: 24px; }
.copy-fallback { width: 100%; height: 38px; margin-top: 12px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 5px; color: #555; font-size: 13px; }
.copy-toast { min-height: 20px; margin-top: 7px; color: #858b95; font-size: 13px; }
.guide-manual { position: relative; padding-bottom: 220px; }
.guide-manual .safari-icon { margin-top: 48px; }
.guide-manual .guide-title { margin-top: 22px; }
.guide-manual .guide-copy { margin-top: 12px; }
.guide-manual .guide-actions { margin-top: 24px; }
.guide-manual .copy-toast:empty { display: none; }
.guide-manual .secondary-button { border: 0; background: #1677ff; color: #fff; font-size: 18px; }
.guide-manual #open-safari[hidden] ~ #copy-link { margin-top: 0; }
.guide-manual .guide-foot { font-size: 14px; }
.tg-browser-pointer { position: absolute; right: 12px; bottom: 10px; width: 190px; height: 193px; pointer-events: none; color: #1677ff; text-align: left; }
.tg-browser-pointer span { position: relative; z-index: 1; display: block; font-size: 17px; line-height: 24px; font-weight: 600; }
.tg-browser-pointer img { position: absolute; right: 0; bottom: 0; width: 190px; height: 190px; }
@media (max-width: 360px) { .guide-title { font-size: 25px; } .qr-link { width: 190px; height: 190px; } }
