.wrap { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 18px 4px 16px;
    margin-bottom: 14px;
}
.hero h1 {
    font-size: clamp(26px, 7.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.045em;
    color: #0a1f14;
    margin-bottom: 8px;
}
.hero p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    font-weight: 500;
    max-width: 440px;
    margin: 0 auto;
}

/* ── FOMO bar ─────────────────────────────────────────────────────────── */
.fomo-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 1px;
    background: #fed7aa;
    border: 1.5px solid #fed7aa;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 18px;
}
.fomo-item {
    background: #fff7ed;
    padding: 10px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
}
.fomo-item[hidden] { display: none; }
.fomo-ico { font-size: 13px; line-height: 1; }
.fomo-val {
    font-size: 16px;
    font-weight: 800;
    color: #7c2d12;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.fomo-cap {
    font-size: 10px;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ── Plan cards ───────────────────────────────────────────────────────── */
.plans-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    align-items: start;
}

.plan-card {
    position: relative;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 22px;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    transition: border-color .18s, box-shadow .18s;
}
.plan-card.pro {
    border-color: #16a34a;
    border-width: 2px;
    box-shadow: 0 10px 34px rgba(22, 163, 74, 0.12);
}
.plan-card.selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.plan-card.pro.selected {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.16);
}

.pc-ribbon {
    position: absolute;
    top: -11px;
    right: 18px;
    background: #16a34a;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.pc-head { margin-bottom: 14px; }
.pc-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0a1f14;
}
.pc-star { color: #f59e0b; font-size: 14px; letter-spacing: 0; }
.pc-sub {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-top: 3px;
}

/* Segmented toggle */
.pc-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    isolation: isolate;
}
.pc-toggle::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
}
.pc-toggle[data-active="2year"]::before { transform: translateX(100%); }

.tg-btn {
    background: none;
    border: none;
    padding: 9px 4px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: color .18s;
    -webkit-tap-highlight-color: transparent;
}
.tg-btn.on { color: #0a1f14; }

/* Price */
.pc-price { margin-bottom: 16px; min-height: 128px; }
.pc-price.flip { animation: priceIn .28s cubic-bezier(.4, 0, .2, 1); }
@keyframes priceIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.p-was {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    line-height: 1.2;
}
.p-now {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0a1f14;
    line-height: 1.15;
    margin-top: 1px;
}
.p-term {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0;
    margin-left: 5px;
}
.p-save {
    display: inline-block;
    margin-top: 7px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    padding: 4px 10px;
    border-radius: 999px;
}
.p-day {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
}
.p-day b { color: #16a34a; font-weight: 800; }
.p-vs {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.4;
    margin-top: 5px;
    padding-top: 7px;
    border-top: 1px dashed #e2e8f0;
}
.p-vs b { color: #0a1f14; font-weight: 800; }

/* Features */
.pc-features {
    list-style: none;
    display: grid;
    gap: 9px;
    align-content: start;
    margin: 0 0 16px;
    padding: 0;
}
.pc-features li {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.35;
}
.pc-features li i {
    color: #16a34a;
    font-size: 13px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}
.pc-features li.missing { color: #94a3b8; }
.pc-features li.missing i { color: #cbd5e1; }

/* Coupon (Pro only) */
.pc-coupon {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-bottom: 16px;
}
.pc-coupon label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 7px;
}
.coupon-row { display: flex; gap: 8px; }
.coupon-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #0a1f14;
    outline: none;
    text-transform: uppercase;
}
.coupon-row input:focus { border-color: #16a34a; }
.coupon-row input::placeholder { text-transform: none; font-weight: 500; }
.btn-apply {
    padding: 0 18px;
    border-radius: 11px;
    border: none;
    background: #16a34a;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.coupon-msg { font-size: 12px; font-weight: 600; margin-top: 6px; min-height: 16px; }
.coupon-msg.ok { color: #15803d; }
.coupon-msg.err { color: #dc2626; }

/* CTA */
.pc-cta {
    margin-top: auto;
    width: 100%;
    height: 50px;
    border-radius: 14px;
    border: 2px solid #2563eb;
    background: #fff;
    color: #2563eb;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s, color .16s, border-color .16s;
    -webkit-tap-highlight-color: transparent;
}
.plan-card.pro .pc-cta {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}
.plan-card.selected .pc-cta { background: #2563eb; color: #fff; }
.plan-card.pro.selected .pc-cta { background: #15803d; border-color: #15803d; }

.plan-skeleton { text-align: center; padding: 40px 20px; color: #94a3b8; font-size: 14px; font-weight: 600; }

/* ── Payment section ──────────────────────────────────────────────────── */
.payment-section { margin-bottom: 14px; }
.pay-card {
    background: #fff;
    border: 1.5px solid #dbeafe;
    border-radius: 22px;
    padding: 20px 16px 16px;
}
.pay-title { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #2563eb; margin-bottom: 4px; }
.pay-plan { font-size: 16px; font-weight: 800; color: #0a1f14; margin-bottom: 2px; }
.pay-amount { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: #0a1f14; margin-bottom: 14px; }

.wallet-box {
    background: #f0fdf4; border: 1.5px dashed #86efac;
    border-radius: 16px; padding: 14px; text-align: center; margin-bottom: 12px;
}
.wallet-label { font-size: 12px; font-weight: 700; color: #166534; margin-bottom: 4px; }
.wallet-number { font-size: 20px; font-weight: 800; color: #15803d; letter-spacing: 0.02em; }
.wallet-meta { font-size: 11px; color: #65a765; margin-top: 4px; }

.ref-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: #f8fafc; border-radius: 12px; padding: 10px 12px;
    font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 14px;
}
.ref-row code { font-family: inherit; font-size: 13px; font-weight: 800; color: #0a1f14; background: #eff6ff; padding: 2px 8px; border-radius: 6px; }

.upload-box {
    background: #fff; border: 2px dashed #bfdbfe; border-radius: 18px;
    min-height: 130px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; margin-bottom: 14px; overflow: hidden;
    position: relative; padding: 16px; transition: border-color .15s, background .15s;
}
.upload-box:hover, .upload-box.drag { border-color: #2563eb; background: #eff6ff; }
.upload-box.has { border-style: solid; padding: 0; min-height: 160px; }
.upload-box .cam { width: 40px; height: 40px; }
.upload-box .hint { font-size: 12px; font-weight: 700; color: #2563eb; }
.upload-box img { display: none; width: 100%; height: 160px; object-fit: cover; }
.upload-box.has img { display: block; }
.upload-box.has .cam, .upload-box.has .hint { display: none; }
.upload-box input[type=file] { display: none; }

.txn-row { margin-bottom: 14px; }
.txn-row label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }
.txn-row input {
    width: 100%; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 600; color: #0a1f14; outline: none;
}
.txn-row input:focus { border-color: #2563eb; }

.go {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 52px; min-height: 52px;
    border-radius: 14px; border: 2px solid #2563eb;
    background: #2563eb; color: #fff;
    font-family: inherit; font-size: 16px; font-weight: 700;
    cursor: pointer; text-decoration: none;
}
.go:disabled { opacity: 0.65; cursor: wait; }
.err { text-align: center; margin-top: 10px; font-size: 13px; font-weight: 600; color: #dc2626; min-height: 18px; }

.success-card {
    background: #fff; border: 1.5px solid #bbf7d0;
    border-radius: 22px; padding: 28px 18px 22px; text-align: center;
    box-shadow: 0 10px 28px rgba(16, 32, 51, 0.05);
}
.success-card .blob { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: #f0fdf4; }
.success-card .blob svg { width: 38px; height: 38px; }
.success-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.success-card p { font-size: 14px; color: #475569; line-height: 1.5; font-weight: 500; }

.recent-popup {
    position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 14px;
    background: #fff; border: 1.5px solid #dbeafe; border-radius: 16px;
    padding: 10px 12px; display: flex; align-items: center; gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 100;
    max-width: 260px; animation: popIn .4s ease;
}
@keyframes popIn { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.rp-initial { width: 36px; height: 36px; border-radius: 50%; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.rp-body { flex: 1; min-width: 0; }
.rp-line { font-size: 12px; color: #475569; font-weight: 600; }
.rp-line b { color: #0a1f14; }
.rp-plan { font-size: 11px; font-weight: 700; color: #16a34a; margin-top: 1px; }
.rp-time { font-size: 10px; color: #94a3b8; margin-top: 1px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (min-width: 720px) {
    .plans-grid { grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
    .plan-card { padding: 24px 22px 20px; }
    .hero { padding: 26px 4px 20px; }
    .payment-section, .success-card { max-width: 520px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 359px) {
    .fomo-cap { font-size: 9px; }
    .fomo-val { font-size: 14px; }
    .p-now { font-size: 30px; }
    .plan-card { padding: 18px 15px 16px; }
}

@media (hover: hover) and (pointer: fine) {
    .plan-card:not(.pro) .pc-cta:hover { background: #2563eb; color: #fff; }
    .plan-card.pro .pc-cta:hover { background: #15803d; border-color: #15803d; }
    .tg-btn:not(.on):hover { color: #334155; }
    .go:hover { background: #153eb3; border-color: #153eb3; }
}

@media (prefers-reduced-motion: reduce) {
    .pc-toggle::before { transition: none; }
    .pc-price.flip { animation: none; }
}

.or-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0 14px; color: #94a3b8; font-size: 13px; font-weight: 600;
}
.or-divider::before, .or-divider::after {
    content: ''; flex: 1; height: 1px; background: #e2e8f0;
}
.pay-online-btn {
    width: 100%; padding: 14px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer; color: #fff !important;
    background: #10b981 !important;
}
.pay-online-btn:disabled { opacity: .6; cursor: not-allowed; }
.pay-online-btn:hover:not(:disabled) { background: #059669 !important; }
