.portal-auth-hero.buy-hero,
.neon-auth-hero.buy-hero {
    max-width: 760px;
}

.buy-tabs {
    display: flex;
    gap: 0.45rem;
    margin: 0 0 1rem;
}

.buy-tab {
    flex: 1;
    border: 1px solid var(--border, #bfdbfe);
    background: transparent;
    color: var(--text-muted, #64748b);
    border-radius: 0.5rem;
    padding: 0.62rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.buy-tab.active {
    color: #fff;
    background: var(--primary, #0d6efd);
    border-color: var(--primary, #0d6efd);
}

.buy-panel {
    display: none;
}

.buy-panel.active {
    display: block;
}

.buy-plans,
.buy-pays {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.95rem;
}

.buy-qty {
    max-width: 160px;
}

.buy-plan,
.buy-pay {
    display: block;
    border: 1px solid var(--border, #bfdbfe);
    border-radius: 0.65rem;
    padding: 0.75rem 0.8rem;
    background: var(--card, #fff);
    cursor: pointer;
}

.buy-pay {
    display: flex;
    align-items: center;
}

.pay-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    line-height: 1.2;
}

.pay-mark {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    display: block;
}

.buy-plan input,
.buy-pay input {
    margin-right: 0.35rem;
}

.buy-plan:has(input:checked),
.buy-pay:has(input:checked) {
    border-color: var(--primary, #0d6efd);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #0d6efd) 18%, transparent);
}

.buy-plan-name {
    font-weight: 700;
    color: var(--text, #1e293b);
}

.buy-plan-price {
    margin-top: 0.2rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary, #0d6efd);
}

.buy-plan-days {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.buy-note {
    margin: 0 0 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-muted, #64748b);
}

.buy-alert {
    margin: 0 0 0.85rem;
    padding: 0.7rem 0.8rem;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.875rem;
    line-height: 1.55;
}

.buy-alert-error {
    background: #fef2f2;
    color: #991b1b;
}

.buy-alert-ok {
    background: #ecfdf3;
    color: #166534;
}

.buy-result {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.buy-result-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.buy-result-row span {
    color: var(--text-muted, #64748b);
}

.buy-code {
    margin: 0.2rem 0 0.75rem;
    padding: 0.85rem;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    border-radius: 0.55rem;
    background: var(--primary-pale, #eff6ff);
    color: var(--text, #1e293b);
    word-break: break-all;
}

.buy-btn-secondary {
    margin-top: 0.55rem;
    background: transparent;
    color: var(--primary, #0d6efd);
    border: 1px solid var(--primary, #0d6efd);
}

.buy-lookup {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.buy-lookup .btn {
    margin-top: 0.65rem;
}

.agent-h2 {
    margin: 1.2rem 0 0.55rem;
    font-size: 1.05rem;
}

.agent-tabs .buy-tab {
    font-size: 0.82rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.agent-code-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.agent-code-row .input {
    flex: 1;
    min-width: 0;
}

.agent-code-btn {
    width: auto;
    margin-top: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

/* 支付弹层在 main 内且 position:fixed；页脚与 main 同 z-index 时后绘制的页脚会挡住底部「去支付」 */
.portal-auth-page .portal-main,
.neon-auth-page .neon-main {
    position: relative;
    z-index: 2;
}

.portal-auth-page .portal-footer,
.neon-auth-page .neon-footer {
    position: relative;
    z-index: 1;
}

.agent-modal {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 23, 42, 0.45);
}

.agent-modal[hidden] {
    display: none;
}

.agent-modal-card {
    width: min(440px, 100%);
    max-height: min(92vh, 640px);
    overflow: auto;
    padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 12px 12px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
}

.agent-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.agent-modal-head h3 {
    margin: 0;
    font-size: 1.05rem;
}

.agent-modal-close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

@media (min-width: 640px) {
    .agent-modal {
        align-items: center;
    }
    .agent-modal-card {
        border-radius: 16px;
    }
}

.agent-level,
.agent-pay {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-height: 0;
    padding: 0.8rem 0.75rem 0.75rem 2.05rem;
}

.agent-level input,
.agent-pay input {
    position: absolute;
    left: 0.7rem;
    top: 0.95rem;
    margin: 0;
}

.agent-level .buy-plan-price,
.agent-level .buy-plan-days,
.agent-level .buy-plan-name {
    display: block;
}

.agent-pay {
    min-height: 2.75rem;
    justify-content: center;
    font-weight: 600;
    color: var(--text, #1e293b);
}

.agent-switch {
    margin: 0.85rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.agent-switch-btn {
    border: 0;
    padding: 0;
    background: none;
    color: var(--primary, #0d6efd);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.agent-switch-btn:hover {
    text-decoration: underline;
}

.agent-table-wrap {
    overflow: auto;
    margin-bottom: 0.4rem;
}

.agent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.agent-table th,
.agent-table td {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
    text-align: left;
}

.agent-ok { color: #166534; }
.agent-off { color: #991b1b; }

@media (max-width: 560px) {
    .buy-plans,
    .buy-pays {
        grid-template-columns: 1fr;
    }
    .agent-level,
    .agent-pay {
        padding-left: 2.05rem;
    }
}

.agent-dash-page .neon-auth-main,
.agent-dash-page .portal-main {
    justify-content: flex-start;
}

.agent-dash-hero {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

.ad-layout,
.ad-layout * {
    box-sizing: border-box;
}

.ad-layout {
    display: grid;
    grid-template-columns: 188px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #0f172a;
}

.ad-side,
.ad-card {
    background: #fff;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(22, 93, 255, 0.06);
}

.ad-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.ad-nav {
    display: flex;
    align-items: center;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.ad-nav:hover {
    background: #f3f7ff;
    color: #165DFF;
}

.ad-nav.is-active {
    background: #e8f0ff;
    color: #165DFF;
    font-weight: 700;
}

.ad-nav:focus-visible,
.ad-btn:focus-visible,
.ad-logout:focus-visible {
    outline: 2px solid #165DFF;
    outline-offset: 2px;
}

.ad-card {
    min-width: 0;
    padding: 16px 20px 20px;
}

.ad-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    line-height: 1.4;
    color: #475569;
}

.ad-meta strong {
    color: #0f172a;
    font-weight: 700;
}

.ad-dot {
    color: #cbd5e1;
}

.ad-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #165DFF;
    font-size: 12px;
    font-weight: 700;
}

.ad-meta-muted {
    color: #64748b;
}

.ad-meta-balance {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    line-height: 1.4;
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ad-meta-balance:hover {
    color: #165DFF;
}

.ad-meta-balance:focus-visible {
    outline: 2px solid #165DFF;
    outline-offset: 2px;
    border-radius: 4px;
}

.ad-logout {
    color: #165DFF;
    font-weight: 600;
    text-decoration: none;
}

.ad-logout:hover {
    color: #0E42D2;
}

.ad-card .buy-alert {
    border-radius: 8px;
}

.ad-panel[hidden] {
    display: none !important;
}

.ad-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 1rem;
}

.ad-panel-head .ad-title {
    margin-bottom: 0.35rem;
}

.ad-panel-head .ad-desc {
    margin-bottom: 0;
}

.ad-money-in {
    color: #009a29;
    font-weight: 600;
}

.ad-money-out {
    color: #cb272d;
    font-weight: 600;
}

.ad-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: #0f172a;
}

.ad-desc {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #94a3b8;
}

.ad-label {
    display: block;
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.ad-form > label.ad-label:first-of-type {
    margin-top: 0;
}

.ad-input {
    display: block;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-input::placeholder {
    color: #c0c4cc;
}

.ad-input:hover {
    border-color: #165DFF;
}

.ad-input:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.ad-textarea {
    display: block;
    width: 100%;
    min-height: 148px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #1d2129;
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.ad-textarea:focus {
    border-color: #165DFF;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.ad-pays {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ad-pays-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ad-terms {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ad-terms .ad-pay {
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 58px;
    padding: 8px 4px;
    text-align: center;
}

.ad-terms .ad-pay input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.ad-term-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.ad-term-price {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.2;
}

.ad-pay.is-on .ad-term-price,
.ad-pay:has(input:checked) .ad-term-price {
    color: #165DFF;
}

.ad-custom {
    margin-top: 12px;
}

.ad-custom[hidden] {
    display: none !important;
}

.ad-custom .ad-label {
    margin-top: 0;
}

.ad-pay {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ad-pay:hover {
    border-color: #165DFF;
}

.ad-pay.is-on,
.ad-pay:has(input:checked) {
    border-color: #165DFF;
    background: #f5f8ff;
    box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.12);
}

.ad-pay input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #165DFF;
    cursor: pointer;
}

.ad-btn.ad-renew {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 32px;
    margin-top: 0;
    padding: 0 12px;
}

.ad-renew-card {
    width: min(560px, 100%);
}

.ad-qty {
    max-width: 160px;
}

.ad-card-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.ad-card-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ad-check {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #165DFF;
    cursor: pointer;
}

.ad-btn.ad-btn-inline {
    width: auto;
    height: 36px;
    margin-top: 0;
    padding: 0 14px;
    font-size: 13px;
}

.ad-card-code {
    font-family: ui-monospace, Consolas, monospace;
    letter-spacing: 0.02em;
}

.ad-copy {
    display: inline-flex;
    align-items: center;
    height: 24px;
    margin-left: 8px;
    padding: 0 8px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #f8fbff;
    color: #165DFF;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ad-copy:hover {
    background: #eff6ff;
}

.ad-btn {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 16px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: #165DFF;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ad-btn:hover {
    background: #0E42D2;
}

.neon-portal .ad-btn {
    border-radius: 6px;
    background: #2563eb;
}

.neon-portal .ad-btn:hover {
    background: #1d4ed8;
}

.ad-btn:disabled,
.ad-btn:disabled:hover {
    background: #93b4ff;
    cursor: not-allowed;
}

.ad-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.ad-stat-card {
    padding: 14px 14px 12px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    min-width: 0;
}

.ad-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.ad-stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.ad-stat-value.ad-stat-up {
    color: #009a29;
}

.ad-stat-unit {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.ad-stat-sub {
    margin-top: 6px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.ad-stat-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #165DFF;
    text-decoration: none;
}

.ad-stat-link:hover {
    color: #0E42D2;
}

.ad-quick {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.ad-quick-head {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.ad-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ad-quick-grid.ad-quick-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ad-quick-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 72px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ad-quick-item:hover {
    border-color: #bedaff;
    background: #f8fbff;
    box-shadow: 0 6px 18px rgba(22, 93, 255, 0.08);
}

.ad-quick-item:focus-visible {
    outline: 2px solid #165DFF;
    outline-offset: 2px;
}

.ad-quick-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.ad-quick-desc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}

@media (max-width: 860px) {
    .ad-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ad-quick-grid,
    .ad-quick-grid.ad-quick-grid-2 {
        grid-template-columns: 1fr;
    }
    .ad-quick-item {
        min-height: 64px;
    }
}

@media (max-width: 480px) {
    .ad-stat-grid {
        grid-template-columns: 1fr;
    }
    .ad-stat-value {
        font-size: 20px;
    }
}

.ad-empty {
    padding: 36px 16px;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.ad-table-wrap {
    overflow: auto;
}

.ad-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ad-table th,
.ad-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    white-space: nowrap;
}

.ad-table th {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
}

.ad-table td {
    color: #334155;
}

.ad-table a {
    color: #165DFF;
    text-decoration: none;
}

.ad-table a:hover {
    text-decoration: underline;
}

.ad-ok { color: #15803d; font-weight: 600; }
.ad-off { color: #b91c1c; font-weight: 600; }
.ad-wait { color: #b45309; font-weight: 600; }

html.buy-pay-loading-open {
    overflow: hidden;
}

.buy-pay-loading {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}

.buy-pay-loading[hidden] {
    display: none !important;
}

.buy-pay-loading-card {
    width: min(100%, 360px);
    padding: 28px 24px 26px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    text-align: center;
}

.buy-pay-loading-spinner,
.buy-qr-pending-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary, #0d6efd);
    border-radius: 50%;
    animation: buy-pay-spin 0.75s linear infinite;
}

.buy-pay-loading-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.buy-pay-loading-hint {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #64748b;
}

@keyframes buy-pay-spin {
    to {
        transform: rotate(360deg);
    }
}

.buy-qr.buy-qr-loading {
    position: relative;
}

.buy-qr-pending {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 220px;
    color: #64748b;
    font-size: 0.875rem;
}

.buy-qr-pending[hidden] {
    display: none !important;
}

.buy-cashier {
    margin-top: 0.35rem;
    padding: 1rem 1rem 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    text-align: center;
}

.buy-cashier h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.buy-due {
    margin: 0.15rem 0 0.45rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f172a;
}

.buy-pay-timer {
    margin: 0 0 0.5rem;
    font-size: 0.92rem;
    color: #64748b;
}

.buy-pay-timer strong {
    color: #b45309;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.buy-pay-expired {
    margin-top: 0.75rem;
}

.buy-pay-active[hidden],
.buy-pay-expired[hidden] {
    display: none !important;
}

.buy-qr {
    width: 220px;
    min-height: 220px;
    margin: 0.85rem auto;
    display: grid;
    place-items: center;
}

.buy-qr svg,
.buy-qr img {
    width: 220px;
    height: 220px;
}

.buy-cashier .btn {
    margin-top: 0.35rem;
}

@media (max-width: 860px) {
    .ad-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ad-side {
        position: sticky;
        top: 0;
        z-index: 12;
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        margin: 0 -4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }
    .ad-side::-webkit-scrollbar {
        display: none;
    }
    .ad-nav {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        height: 34px;
        padding: 0 14px;
        justify-content: center;
        white-space: nowrap;
        font-size: 13px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        scroll-snap-align: start;
    }
    .ad-nav.is-active {
        border-color: #bedaff;
        box-shadow: 0 1px 0 rgba(22, 93, 255, 0.08);
    }
    .ad-nav:hover {
        background: #f3f7ff;
    }
    .ad-card {
        padding: 14px 14px 18px;
    }
    .ad-meta {
        justify-content: flex-start;
        font-size: 12px;
        gap: 6px;
        padding-bottom: 10px;
        margin-bottom: 12px;
    }
    .ad-meta-balance {
        font-size: 12px;
    }
    .ad-pays,
    .ad-pays-3 {
        grid-template-columns: 1fr;
    }
    .ad-terms {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .ad-amounts {
        grid-template-columns: 1fr 1fr;
    }
}
