/* TRONIFY - Design System
   Colors & metrics per doc/TRONIFY_視覺規格.txt */

:root {
    --primary: #D32F2F;
    --primary-hover: #B71C1C;
    --primary-light: #FEECEC;
    --bg: #FFFFFF;
    --surface: #F5F5F7;
    --text-primary: #1D1D1F;
    --text-secondary: #424245;
    --border: #E8E8ED;

    --silver: #94A3B8;
    --gold: #F59E0B;
    --diamond: #3B82F6;

    --success-bg: #E8F5E9;
    --success-text: #1B5E20;
    --danger-bg: #FFEBEE;
    --danger-text: #B71C1C;

    --shadow-sm: 0 1px 2px rgba(29, 29, 31, 0.06);
    --shadow-md: 0 6px 16px rgba(29, 29, 31, 0.1);
    --shadow-lg: 0 16px 40px rgba(29, 29, 31, 0.16);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-btn: 24px;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "微軟正黑體", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
select,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

/* ---------- Screens ---------- */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* 落地頁與錢包瀏覽器自動進入的第二頁（screen-app）共用同一套主視覺：
   兩頁的舊 header 都隱藏，只剩主視覺一列吃滿視窗 */
#screen-landing.active {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-height: 100svh;
    background: #071D23;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease,
        border-color 0.2s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
    min-height: 48px;
}

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--border);
}

.btn-danger {
    background: transparent;
    color: var(--danger-text);
    border-color: var(--border);
}

.btn-danger:hover {
    background: var(--danger-bg);
    border-color: var(--primary);
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.address-chip {
    max-width: 150px;
    padding: 6px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(211, 47, 47, 0.3);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23424245' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

/* ---------- Landing ---------- */
.landing {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.hero {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ---------- Landing campaign（2026-11-23 活動落地頁） ----------
   主視覺換成活動圖，舊 header 隱藏；按鈕直接壓在「圖片最下方」（絕對定位貼底）。
   圖片用 contain + 靠上對齊：手機上幾乎剛好填滿，桌機置中留深綠底，
   標題「開戶贈USDT體驗金」與網址都不會被按鈕蓋掉。 */
.landing-campaign {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: #071D23;
}

/* 圖片用絕對定位：不參與內容高度計算，按鈕永遠貼在視窗最下方 */
.landing-campaign .hero {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #071D23;
}

.landing-campaign .hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* 垂直置中（2026-11-23）：圖片按寬度縮放後只有 ~335px 高，
       靠上對齊會在按鈕上方留下一大片深綠。置中後上下留白平均，
       安卓瀏覽器與錢包內建瀏覽器都用同一條規則，兩邊看起來一致。 */
    object-position: center center;
}

/* 平版／桌機：讓圖片區先扣掉按鈕高度，避免按鈕蓋掉圖下方的社區福利與網址 */
@media (min-width: 600px) {
    .landing-campaign .hero-image {
        inset: 0 auto auto 0;
        width: 100%;
        height: calc(100% - 60px);
    }
}

/* 錢包內建瀏覽器會自動進到 screen-app（會員中心）：拿掉原本的 520px 窄框與內距，
   讓它跟一般瀏覽器看到的落地頁是同一套滿版主視覺 */
#screen-app .app-shell {
    max-width: none;
    margin: 0;
    padding: 0;
}

/* 按鈕＝海報最下方那一條（底色取自巴基斯坦版主視覺的深藍 #020A1E），寬度吃滿、貼底 */
.hero-cta-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #020A1E;
}

.hero-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    /* 高度照使用者指定（2026-11-24）：clamp(41px, 22vw, 83px) */
    height: clamp(41px, 22vw, 83px);
    /* 文字往上貼近按鈕條上緣那條線（原本垂直置中，離線太遠） */
    padding: 0 16px 6px;
    border: 0;
    border-top: 1px solid rgba(242, 200, 121, 0.28);
    border-radius: 0;
    background: #020A1E;
    color: #F2C879;
    font-size: clamp(15px, 4vw, 18px);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}


/* 金色小箭頭，讓細長條看得出是可點的按鈕 */
.hero-cta::after {
    content: "\203A";
    font-size: 1.15em;
    line-height: 1;
    letter-spacing: 0;
}

.hero-cta:hover {
    background: #0B1E42;
}

.hero-cta:active {
    background: #081733;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 20px;
}

.hero-intro {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1.7;
}

.section {
    padding: 32px 0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Tiers */
.tiers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.tier-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.tier-card.basic {
    border-top: 4px solid var(--primary);
}

.tier-card.silver {
    border-top: 4px solid var(--silver);
}

.tier-card.gold {
    border-top: 4px solid var(--gold);
}

.tier-card.diamond {
    border-top: 4px solid var(--diamond);
}

.tier-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.tier-list {
    list-style: none;
    margin-bottom: 14px;
}

.tier-list li {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 5px 0 5px 16px;
    position: relative;
}

.tier-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.tier-bonus {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
}

.tier-card.silver .tier-bonus {
    background: #E7EBF1;
    color: var(--silver);
}

.tier-card.gold .tier-bonus {
    background: #FEF3C7;
    color: var(--gold);
}

.tier-card.diamond .tier-bonus {
    background: #DBEAFE;
    color: var(--diamond);
}

/* Notice */
.notice {
    background: var(--primary-light);
    border: 1px solid rgba(211, 47, 47, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.notice-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.notice p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* CTA */
.cta {
    text-align: center;
    padding-bottom: 48px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 28px 16px 40px;
}

.footer p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer .footer-copy {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.75;
    margin-bottom: 0;
}

/* ---------- Connecting ---------- */
.connecting {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.connecting h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.connecting p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- App / Member Center ---------- */
.app-shell {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.app-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.authorization-card {
    display: grid;
    gap: 14px;
}

.authorization-card h2,
.authorization-card p {
    margin: 0;
}

.authorization-card > p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.authorization-details {
    display: grid;
    gap: 12px;
    margin: 0;
}

.authorization-details > div {
    display: grid;
    gap: 4px;
}

.authorization-details dt {
    color: var(--text-secondary);
    font-size: 13px;
}

.authorization-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.authorization-details code {
    font-size: 13px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

/* User card */
.user-card {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-meta {
    min-width: 0;
}

.user-address {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-tier {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

/* App tiers */
.app-tiers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.app-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.app-tier.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.app-tier.silver.active {
    border-color: var(--silver);
    background: #E7EBF1;
}

.app-tier.gold.active {
    border-color: var(--gold);
    background: #FEF3C7;
}

.app-tier.diamond.active {
    border-color: var(--diamond);
    background: #DBEAFE;
}

.app-tier-name {
    font-size: 15px;
    font-weight: 600;
}

.app-tier-bonus {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
}

/* Referral */
.referral-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.referral-input {
    flex: 1 1 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    background: var(--bg);
    color: var(--text-primary);
}

/* Invite count */
.invite-count {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    padding: 8px 0;
}

/* Actions */
.actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Orders */
.orders-card {
    padding: 18px 14px;
}

.orders-list {
    list-style: none;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding: 24px 12px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
}

.order-item:last-child {
    border-bottom: none;
}

.order-type {
    font-size: 14px;
    font-weight: 500;
}

.order-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.order-amount {
    font-size: 14px;
    font-weight: 600;
}

.order-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}

.order-status.completed {
    background: var(--success-bg);
    color: var(--success-text);
}

.order-status.pending {
    background: #FFF8E1;
    color: #92400E;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1000;
}

.modal-panel {
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
    padding: 20px 20px 24px;
    position: relative;
    animation: slide-up 0.25s ease;
}

@media (min-width: 560px) {
    .modal {
        align-items: center;
        padding: 20px;
    }

    .modal-panel {
        border-radius: 24px;
        box-shadow: var(--shadow-lg);
    }
}

@keyframes slide-up {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border);
}

.modal-head {
    text-align: center;
    padding: 6px 0 18px;
}

.wallet-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-head h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-head p {
    font-size: 14px;
    color: var(--text-secondary);
}

.wallet-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wallet-btn:hover {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: var(--shadow-md);
}

/* 後台「錢包設定」把某家設成「不可用」：按鈕留在原位但不給點，
   使用者才看得出「這家存在但目前沒開」，而不是以為清單壞了。 */
.wallet-btn.wallet-btn-disabled,
.wallet-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(1);
}

.wallet-btn.wallet-btn-disabled:hover,
.wallet-btn:disabled:hover {
    border-color: var(--border);
    background: var(--surface);
    box-shadow: none;
}

.provider-off-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.wallet-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* 真實錢包 App 圖示（public/img/wallets/*.png，88×88） */
    object-fit: cover;
    background: #FFFFFF;
}

.wallet-icon.tronlink {
    background: #1A73E8;
}

.wallet-icon.imtoken {
    background: #26282C;
}

.wallet-icon.tokenpocket {
    background: #0088CC;
}

.wallet-icon.bitkeep {
    background: #F5A623;
}

.flow-status {
    position: fixed;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    z-index: 9998;
    max-width: 92vw;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #FFFFFF;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    pointer-events: none;
}

.wallet-icon.trust {
    background: #3375BB;
}

.wallet-icon.bitget {
    background: #00F0FF;
}

.wallet-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.installed-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--success-text);
    background: var(--success-bg);
    padding: 4px 10px;
    border-radius: 999px;
    display: none;
}

.installed-tag.show {
    display: inline-block;
}

.modal-foot {
    text-align: center;
    padding-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Auth modal */
.auth-panel .modal-head {
    padding-bottom: 14px;
}

.auth-step {
    text-align: center;
    padding: 8px 0 4px;
}

.step-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary);
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-done {
    background: var(--success-text);
}

.step-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 18px;
}

.bound-address {
    word-break: break-all;
}

/* 授權說明彈窗的按鈕列：直向堆疊，取消在上、繼續在下（拇指區最近） */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
}

.approval-panel {
    max-height: min(92vh, 760px);
    overflow-y: auto;
    text-align: left;
}

.approval-head {
    text-align: left;
    padding-bottom: 14px;
}

.approval-head h2 {
    margin: 4px 0 6px;
    font-size: 22px;
    line-height: 1.3;
}

.approval-kicker {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.approval-details {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 4px 14px;
}

.approval-detail-row {
    display: grid;
    grid-template-columns: minmax(90px, 0.35fr) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.approval-detail-row:last-child {
    border-bottom: 0;
}

.approval-detail-row dt {
    color: var(--text-secondary);
    font-weight: 600;
}

.approval-detail-row dd {
    min-width: 0;
}

.approval-detail-row code {
    display: block;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.approval-raw {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 13px;
}

.approval-note {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary, #b9c0cc);
}

.approval-wallet {
    margin-top: 12px;
}

.approval-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.approval-button {
    min-height: 48px;
    padding: 10px 14px;
    white-space: normal;
}

.approval-status {
    min-height: 1.5em;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 420px) {
    .approval-detail-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .approval-actions {
        grid-template-columns: 1fr;
    }
}

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

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 32px;
    }

    .actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Wallet Deep Link Overlay ---------- */
.wallet-overlay .overlay-content {
    width: 100%;
    max-width: 420px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.wallet-overlay .overlay-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.wallet-overlay .overlay-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    word-break: break-all;
}

.wallet-overlay .link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.wallet-overlay .link-box input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 12px;
    background: var(--surface);
    color: var(--text-primary);
}

.wallet-overlay .link-box button {
    padding: 10px 14px;
    background: var(--primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
}

.wallet-overlay .overlay-content > button {
    padding: 10px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 授權說明彈窗：貼額度提示 */
.auth-hint {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    text-align: left;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

/* ---------- 活動主視覺（2026-11-23）：背景漸變 + HTML 文字 + 圖形三段式 ----------
   為什麼不再用整張點陣海報：橫版海報比例 1.106，手機可用區 0.62，
   contain 會上下留一大片深綠、cover 會把標題兩端的「開／金」切掉。
   拆成三層之後，標題／福利／網址都是文字（任何螢幕都清晰、可換字），
   只有禮盒與 USDT 幣是圖形；整塊區域用 flex 平均分配＝真正鋪滿按鈕條以上。 */
.landing-campaign .hero.poster {
    display: flex;
    align-items: center;
    justify-content: center;
    /* 底部讓開「貼底按鈕條」（絕對定位、不算在 hero 高度裡）。 */
    padding: 0 0 clamp(41px, 22vw, 83px);
    /* 底色取自活動主視覺（巴基斯坦版）四角深藍，讓 contain 的上下留白看不出接縫 */
    background: #020A1E;
    /* 熱區層的定位基準 */
    position: relative;
}

/* 沒有貼底按鈕條的版本（2026-11-26：第一頁移除 JOIN NOW，入口只剩海報熱區）：
   不留那條 41–83px 的空隙，主視覺直接吃滿可用高度。 */
.landing-campaign .hero.poster.poster-nocta {
    padding-bottom: 0;
}

/* 海報上的可點熱區（2026-11-26）：
   - imToken／TronLink 兩個徽章 → 各自跳官方下載頁（token.im／tronlink.org）
   - GET 2% BONUS 整塊 → 第一頁開錢包清單、第二頁送授權（取代原本的貼底 JOIN NOW）
   熱區層的尺寸由 JS 依圖片實際繪製區域（object-fit: contain 之後）同步，
   所以百分比座標在任何視窗比例下都貼著圖上的元件。 */
.poster-hotspots {
    position: absolute;
    z-index: 1;
}

.poster-hotspot {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.poster-hotspot[data-hotspot="imtoken"] {
    /* 941×1672 烏爾都語版：徽章外框實測 x 72..430（7.65%..45.7%）、y 449..519 */
    left: 7.5%;
    top: 25.5%;
    width: 38.5%;
    height: 6.5%;
}

.poster-hotspot[data-hotspot="tronlink"] {
    /* 右徽章 x 525..870（55.8%..92.5%，含手指圖示） */
    left: 55.5%;
    top: 25.5%;
    width: 37%;
    height: 6.5%;
}

.poster-hotspot[data-hotspot="bonus"] {
    left: 3%;
    top: 71%;
    width: 84%;
    height: 18%;
}

.poster-hotspot:active {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.poster-hotspot:focus-visible {
    outline: 2px solid #F2C879;
    outline-offset: 3px;
    border-radius: 14px;
}

/* 直式主視覺（0.563，941×1672）：整張等比顯示、水平垂直都置中。
   直式塞進直式可用區幾乎剛好滿版，contain 只在桌面寬螢幕左右留底色，
   手機與錢包內建瀏覽器都是「滿寬、上下微留白」。 */
.poster-image {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.poster-title {
    margin: 0;
    font-size: clamp(24px, 8.2vw, 40px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: #B6F3E8;
    text-shadow:
        0 0 10px rgba(64, 224, 200, 0.7),
        0 0 24px rgba(38, 176, 158, 0.45),
        0 4px 0 rgba(6, 40, 44, 0.9);
}

.poster-art {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
}

.poster-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 2vw, 14px);
}

.poster-bonus {
    margin: 0;
    font-size: clamp(15px, 4.6vw, 22px);
    font-weight: 900;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #FFF0BE 0%, #F5C24A 52%, #C98A15 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.45));
}

.poster-url {
    font-size: clamp(11px, 3.4vw, 15px);
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #F5C24A;
    border: 1px solid rgba(245, 194, 74, 0.8);
    border-radius: 999px;
    padding: 0.42em 1.15em;
    background: rgba(8, 32, 36, 0.55);
}

/* ==========================================================================
   HELP LINKS — HOW TO CLAIM / SUPPORT（2026-11-29，選項 A）
   --------------------------------------------------------------------------
   兩顆純連結按鈕，導到「另外的頁面」（不開 sheet、不攔點擊）。
   樣式：
   - position: fixed 貼底：一般瀏覽器（#screen-landing）放在海報 contain 之後的
     深藍留白上；錢包內建瀏覽器（#screen-app）多一條貼底 CLAIM BONUS，
     整組往上墊開，不疊住主 CTA。
   - 兩頁各一份 markup：不靠 JS 搬節點，任何載入順序都看得到。
   - 位置安全：海報三個熱區（imToken／TronLink／GET 2% BONUS）最高到 89%，
     按鈕落在 92% 以下，不會蓋到可點區域。
   ========================================================================== */
:root {
    --help-gold: #F2C879;
    --help-gold-strong: #FFF0BE;
    --help-gold-line: rgba(242, 200, 121, 0.42);
    --help-cta-h: clamp(41px, 22vw, 83px);
}

.help-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 14px;
    /* 只有兩顆按鈕吃點擊，中間縫隙照樣可以點到下面的海報熱區 */
    pointer-events: none;
}

/* 錢包內建瀏覽器：貼底 CLAIM BONUS 條的高度 = clamp(41px, 22vw, 83px) + 安全區 */
#screen-app .help-dock {
    bottom: calc(var(--help-cta-h) + env(safe-area-inset-bottom, 0px) + 10px);
}

.help-chip {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--help-gold-line);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(10, 32, 66, 0.9) 0%, rgba(2, 10, 30, 0.94) 100%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    backdrop-filter: blur(10px) saturate(130%);
    color: var(--help-gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease, transform 0.12s ease;
}

.help-chip svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.help-chip:hover {
    color: var(--help-gold-strong);
    border-color: rgba(242, 200, 121, 0.85);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.help-chip:active {
    transform: translateY(1px) scale(0.985);
}

.help-chip:focus-visible {
    outline: 2px solid var(--help-gold-strong);
    outline-offset: 3px;
}

@media (max-width: 360px) {
    .help-dock {
        gap: 8px;
        padding: 0 10px;
    }

    .help-chip {
        gap: 6px;
        padding: 0 12px;
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .help-chip svg {
        width: 15px;
        height: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .help-chip {
        transition: none;
    }

    .help-chip:active {
        transform: none;
    }
}

/* ==========================================================================
   URDU LOCALE（2026-11-30）— 落地頁底欄改版 + 全站按鈕文案改烏爾都語
   --------------------------------------------------------------------------
   1. 阿拉伯字母（烏爾都語）不能拉字距：letter-spacing 會把連寫的字形切開，
      所以烏爾都語元素一律 letter-spacing: 0、取消 text-transform。
   2. 字體走系統 Naskh：Android = Noto Naskh Arabic、iOS = Geeza Pro／Al Bayan。
      不引入外部字體（錢包內建瀏覽器常擋跨網域字體，會退回豆腐字）。
   3. 底欄（.help-dock）改版：主入口做成金色實心膠囊、客服做成描邊膠囊，
      與海報底部那圈金色平台同色系；觸控高度與 pointer-events 規則維持不變，
      海報熱區照樣點得到。
   4. 貼底 CLAIM BONUS 條（#screen-app .hero-cta）在 RTL 下箭頭要指向左邊。
   ========================================================================== */
:root {
    --urdu-font: "Noto Naskh Arabic", "Noto Nastaliq Urdu", "Geeza Pro", "Al Bayan",
        "Segoe UI", Tahoma, sans-serif;
    --help-primary: #F2C879;
}

html[lang="ur"] body {
    font-family: var(--urdu-font);
}

/* 品牌名、地址這種拉丁字元仍用原本的無襯線字體，避免 Naskh 的拉丁字形太窄 */
html[lang="ur"] .wallet-name,
html[lang="ur"] .brand-name,
html[lang="ur"] .address-chip {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.help-dock,
.help-chip,
.help-chip-label,
.hero-cta {
    font-family: var(--urdu-font);
    letter-spacing: 0;
    text-transform: none;
}

/* 底欄改成「一條底頁」：整組膠囊底下墊一層深藍漸層與金色細線，
   讓它看起來是頁尾而不是浮在圖上的兩顆孤零零的藥丸。 */
.help-dock::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: calc(-1 * (env(safe-area-inset-bottom, 0px) + 10px));
    height: calc(100% + env(safe-area-inset-bottom, 0px) + 26px);
    background: linear-gradient(180deg,
            rgba(2, 10, 30, 0) 0%,
            rgba(2, 10, 30, 0.62) 44%,
            rgba(2, 10, 30, 0.94) 100%);
    border-top: 1px solid rgba(242, 200, 121, 0.18);
    pointer-events: none;
}

/* 錢包內建瀏覽器：底欄浮在 CLAIM BONUS 條上方，不墊漸層（下面是實心按鈕條） */
#screen-app .help-dock::before {
    display: none;
}

.help-chip {
    min-height: 46px;
    padding: 2px 16px 0;
    font-size: 14px;
    font-weight: 700;
}

.help-chip-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* 主入口（How to Claim → /how-to-claim）：金色實心，視線第一落點 */
.help-chip[data-tone="primary"] {
    border-color: rgba(255, 240, 190, 0.9);
    background: linear-gradient(180deg, #FFEDB8 0%, #F2C879 46%, #C8912E 100%);
    color: #071731;
    box-shadow: 0 10px 26px rgba(242, 200, 121, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.help-chip[data-tone="primary"] svg {
    stroke-width: 2.1;
}

.help-chip[data-tone="primary"]:hover {
    color: #04101F;
    border-color: #FFF6D8;
    box-shadow: 0 12px 30px rgba(242, 200, 121, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.help-chip[data-tone="primary"]:active {
    background: linear-gradient(180deg, #F6D79A 0%, #E2B45F 46%, #B57F26 100%);
}

.help-chip[data-tone="ghost"] {
    background: linear-gradient(180deg, rgba(9, 27, 56, 0.86) 0%, rgba(2, 10, 30, 0.92) 100%);
    color: #EBD3A0;
}

/* 貼底 CTA：烏爾都語字身比較高，字級放大一點、去掉英文的字距 */
#screen-app .hero-cta {
    /* 烏爾都語字身比拉丁高，字級上限壓到 19px、底部留 8px，
       避免 ی／ن 的尾巴被按鈕條下緣切掉（941×1672 原尺寸最明顯）。 */
    font-size: clamp(17px, 4.6vw, 19px);
    font-weight: 800;
    line-height: 1.6;
    padding-bottom: 8px;
}

/* RTL 下箭頭會跑到按鈕最左緣、離字很遠（flex 匿名文字盒的分配問題），
   烏爾都語版直接收掉箭頭，只留置中的文字與海報上的手指提示。 */
[dir="rtl"] .hero-cta::after {
    display: none;
}

/* 錢包清單（烏爾都語）：標題與「انسٹال شدہ」標籤跟著 RTL 對齊 */
.modal-head p[lang="ur"] {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
}

.installed-tag[lang="ur"] {
    font-size: 13px;
    padding: 3px 10px 4px;
}

#screen-connecting .connecting h2,
#screen-connecting .connecting p {
    font-family: var(--urdu-font);
    letter-spacing: 0;
}

/* 窄機（≤360px）：兩顆膠囊要擠在一行，字級與左右內距再收一點 */
@media (max-width: 360px) {
    .help-chip {
        padding: 2px 11px 0;
        font-size: 12.5px;
    }

    .help-chip-label {
        font-size: 12.5px;
    }

    .help-chip svg {
        width: 15px;
        height: 15px;
    }
}

/* 平板／桌機（≥600px）：海報是 941×1672 原尺寸顯示，貼底膠囊跟著放大，
   不然在 1672px 高的畫面裡只有 46px 高，看起來像貼在邊緣的一行小字。 */
@media (min-width: 600px) {
    .help-dock {
        gap: 14px;
        padding: 0 18px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    }

    .help-chip {
        min-height: 56px;
        padding: 3px 22px 0;
    }

    .help-chip-label {
        font-size: 17px;
    }

    .help-chip svg {
        width: 20px;
        height: 20px;
    }

    #screen-app .help-dock {
        bottom: calc(var(--help-cta-h) + env(safe-area-inset-bottom, 0px) + 18px);
    }
}
