/* ── Theme tokens (dark only; colors from the original palette) ────────────── */
:root {
    --px-brand: #28CC95;
    --px-brand-strong: #0AC285;
    --px-brand-ink: #00412B;
    --px-yes: #28CC95;
    --px-yes-soft: rgba(40, 204, 149, .12);
    --px-yes-line: rgba(40, 204, 149, .45);
    --px-no: #FF4D6A;
    --px-no-soft: rgba(255, 77, 106, .12);
    --px-no-line: rgba(255, 77, 106, .45);
    --px-bg: #0A0C0F;
    --px-surface: #14181F;
    --px-surface-2: rgba(255, 255, 255, .04);
    --px-text: rgba(255, 255, 255, .9);
    --px-muted: rgba(255, 255, 255, .55);
    --px-faint: rgba(255, 255, 255, .35);
    --px-border: rgba(255, 255, 255, .08);
    --px-border-strong: rgba(255, 255, 255, .16);
    --px-shadow: none;
    color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */
html, body { background: var(--px-bg); color: var(--px-text); }
body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.text-muted, .px-muted { color: var(--px-muted) !important; }
.px-container { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.px-num { font-variant-numeric: tabular-nums; }
.px-title {
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.05;
}
.dropdown-menu, .modal-content { background: var(--px-surface); color: var(--px-text); border-color: var(--px-border-strong); }
.dropdown-item { color: var(--px-text); }
.dropdown-item:hover { background: var(--px-surface-2); color: var(--px-text); }
.dropdown-divider { border-color: var(--px-border); }
.form-control, .form-select {
    background: var(--px-surface); color: var(--px-text); border-color: var(--px-border-strong);
}
.form-control:focus, .form-select:focus {
    background: var(--px-surface); color: var(--px-text);
    border-color: var(--px-brand); box-shadow: 0 0 0 3px var(--px-yes-soft);
}
.form-control::placeholder { color: var(--px-faint); }
.btn-close { filter: invert(1); }

/* ── Header ───────────────────────────────────────────────────────────── */
.px-header {
    position: sticky; top: 0; z-index: 1020;
    background: var(--px-bg);
    border-bottom: 1px solid var(--px-border);
}
.px-logo {
    font-family: "Barlow Condensed", Inter, sans-serif;
    font-size: 30px; font-weight: 700; letter-spacing: -.02em;
    color: var(--px-brand); text-decoration: none;
}
.px-logo:hover { color: var(--px-brand-strong); }
.px-catnav {
    display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
    padding-top: 4px; padding-bottom: 10px; white-space: nowrap;
}
.px-catnav::-webkit-scrollbar { display: none; }
.px-catnav a { color: var(--px-muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.px-catnav a:hover, .px-catnav a.active { color: var(--px-text); }

.px-btn-brand, .px-btn-outline {
    border-radius: 100px; font-weight: 600; font-size: 14px; padding: 7px 16px;
}
.px-btn-brand { background: var(--px-brand); color: #00261A; border: 1px solid var(--px-brand); }
.px-btn-brand:hover, .px-btn-brand:focus { background: var(--px-brand-strong); border-color: var(--px-brand-strong); color: #00261A; }
.px-btn-brand:disabled { background: var(--px-brand); color: #00261A; opacity: .5; }
.px-btn-outline { background: transparent; color: var(--px-brand); border: 1px solid var(--px-border-strong); }
.px-btn-outline:hover { border-color: var(--px-brand); color: var(--px-brand); }
.px-icon-btn { color: var(--px-muted); border: 0; font-size: 18px; padding: 4px 8px; }
.px-icon-btn:hover { color: var(--px-text); }
.px-avatar {
    width: 36px; height: 36px; border-radius: 50%; padding: 0;
    background: var(--px-yes-soft); color: var(--px-brand-strong); font-weight: 700; font-size: 13px;
    border: 1px solid var(--px-yes-line);
}
.px-avatar { color: var(--px-brand); }
.px-balance { text-align: right; line-height: 1.15; margin-right: 4px; }
.px-balance-label { font-size: 11px; color: var(--px-muted); }
.px-balance-value { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Yes / No pills ───────────────────────────────────────────────────── */
.px-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-width: 104px; padding: 6px 12px; border-radius: 100px;
    font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums;
    border: 1px solid; background: transparent; transition: background .12s, color .12s;
    text-decoration: none; white-space: nowrap;
}
.px-pill-yes { color: var(--px-yes); border-color: var(--px-yes-line); }
.px-pill-no { color: var(--px-no); border-color: var(--px-no-line); }
.px-pill-yes:hover, .px-pill-yes.active { background: var(--px-yes); border-color: var(--px-yes); color: #fff; }
.px-pill-no:hover, .px-pill-no.active { background: var(--px-no); border-color: var(--px-no); color: #fff; }
.px-pill:disabled, .px-pill.disabled { opacity: .4; pointer-events: none; }
.px-up { color: var(--px-yes); }
.px-down { color: var(--px-no); }

/* ── Market page ──────────────────────────────────────────────────────── */
.px-event-icon {
    width: 64px; height: 64px; border-radius: 12px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--px-surface-2); border: 1px solid var(--px-border);
    font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 30px; color: var(--px-brand);
}
.px-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--px-muted); }
.px-event-title { font-size: clamp(26px, 4vw, 36px); margin: 4px 0 0; }

.px-chart-wrap { position: relative; }
.px-chart { height: 320px; }
.px-chart-legend {
    display: flex; flex-wrap: wrap; gap: 6px 18px; min-height: 24px; margin-bottom: 8px;
    font-size: 14px; font-variant-numeric: tabular-nums;
}
.px-chart-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.px-chart-legend strong { margin-left: 4px; }
.px-big-chance { font-size: 32px; font-weight: 700; line-height: 1; }
.px-chart-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--px-border); font-size: 13px; color: var(--px-muted);
}
.px-range button {
    border: 0; background: none; color: var(--px-faint); font-weight: 600; font-size: 13px; padding: 2px 8px; border-radius: 6px;
}
.px-range button.active, .px-range button:hover { color: var(--px-text); }
.px-range button.active { background: var(--px-surface-2); }

.px-options-head {
    display: grid; grid-template-columns: 1fr 90px 240px; gap: 12px; align-items: center;
    font-size: 13px; color: var(--px-muted); padding: 10px 0; border-bottom: 1px solid var(--px-border);
}
.px-option {
    display: grid; grid-template-columns: 1fr 90px 240px; gap: 12px; align-items: center;
    padding: 14px 8px; margin: 0 -8px; border-bottom: 1px solid var(--px-border); cursor: pointer; border-radius: 8px;
}
.px-option:hover { background: var(--px-surface-2); }
.px-option.selected { background: var(--px-surface-2); }
.px-option-title { font-weight: 600; }
.px-option-sub { font-size: 12px; color: var(--px-muted); }
.px-option-chance { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.px-option-chance small { font-size: 12px; font-weight: 600; margin-left: 4px; }
.px-option-actions { display: flex; gap: 8px; justify-content: flex-end; }
.px-option-actions .px-pill { min-width: 112px; }
.px-settled-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.px-settled-badge.yes { background: var(--px-yes-soft); color: var(--px-yes); }
.px-settled-badge.no { background: var(--px-no-soft); color: var(--px-no); }

.px-card {
    background: var(--px-surface); border: 1px solid var(--px-border); border-radius: 16px; box-shadow: var(--px-shadow);
}
.px-section-title { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.px-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--px-border); margin-bottom: 12px; }
.px-tabs button {
    background: none; border: 0; padding: 8px 0; font-weight: 600; color: var(--px-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.px-tabs button.active { color: var(--px-text); border-bottom-color: var(--px-text); }

/* Order book */
.px-book { font-size: 13px; font-variant-numeric: tabular-nums; }
.px-book-head, .px-book-row {
    display: grid; grid-template-columns: 1fr 90px 90px 110px; align-items: center; padding: 5px 8px;
}
.px-book-head { color: var(--px-muted); font-size: 12px; border-bottom: 1px solid var(--px-border); }
.px-book-row { position: relative; cursor: pointer; }
.px-book-row:hover { background: var(--px-surface-2); }
.px-book-row .bar { position: absolute; left: 0; top: 2px; bottom: 2px; border-radius: 0 4px 4px 0; opacity: .9; }
.px-book-row.ask .bar { background: var(--px-no-soft); }
.px-book-row.bid .bar { background: var(--px-yes-soft); }
.px-book-row.ask .price { color: var(--px-no); font-weight: 600; }
.px-book-row.bid .price { color: var(--px-yes); font-weight: 600; }
.px-book-row > span { position: relative; text-align: right; }
.px-book-row > span:first-child, .px-book-head > span:first-child { text-align: left; }
.px-book-head > span { text-align: right; }
.px-book-label { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.px-book-label.ask { background: var(--px-no-soft); color: var(--px-no); }
.px-book-label.bid { background: var(--px-yes-soft); color: var(--px-yes); }
.px-book-spread {
    display: flex; justify-content: space-between; padding: 6px 8px; color: var(--px-muted);
    border-top: 1px solid var(--px-border); border-bottom: 1px solid var(--px-border); font-size: 12px;
}
.px-book-empty { padding: 22px 8px; text-align: center; color: var(--px-muted); }

/* Trade panel */
.px-trade { position: sticky; top: 112px; padding: 20px; }
.px-trade-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.px-trade-title { font-weight: 700; font-size: 16px; line-height: 1.2; }
.px-seg { display: flex; gap: 8px; }
.px-seg > button { flex: 1; }
.px-side-btn {
    flex: 1; border-radius: 10px; padding: 10px; font-weight: 700; font-size: 15px; border: 1px solid var(--px-border-strong);
    background: var(--px-surface-2); color: var(--px-text); font-variant-numeric: tabular-nums;
}
.px-side-btn.yes.active { background: var(--px-yes); border-color: var(--px-yes); color: #fff; }
.px-side-btn.no.active { background: var(--px-no); border-color: var(--px-no); color: #fff; }
.px-field-label { font-size: 13px; font-weight: 600; color: var(--px-muted); margin-bottom: 6px; display: flex; justify-content: space-between; }
.px-stepper { display: flex; align-items: center; border: 1px solid var(--px-border-strong); border-radius: 10px; overflow: hidden; }
.px-stepper input {
    border: 0; background: transparent; color: var(--px-text); text-align: center; font-weight: 700; font-size: 16px;
    width: 100%; padding: 9px 0; font-variant-numeric: tabular-nums; outline: none;
}
.px-stepper button { border: 0; background: transparent; color: var(--px-muted); width: 44px; height: 42px; font-size: 18px; }
.px-stepper button:hover { color: var(--px-text); background: var(--px-surface-2); }
.px-summary { font-size: 14px; font-variant-numeric: tabular-nums; }
.px-summary > div { display: flex; justify-content: space-between; padding: 4px 0; }
.px-summary .px-win { font-size: 16px; font-weight: 700; }
.px-submit { width: 100%; padding: 12px; font-size: 16px; border-radius: 12px; }
.px-submit.yes { background: var(--px-yes); border-color: var(--px-yes); color: #fff; }
.px-submit.no { background: var(--px-no); border-color: var(--px-no); color: #fff; }
.px-submit.yes:hover { filter: brightness(.95); color: #fff; }
.px-submit.no:hover { filter: brightness(.95); color: #fff; }
.px-type-select { background: none; border: 0; color: var(--px-text); font-weight: 600; font-size: 14px; padding: 0 18px 0 0; }

.px-table { width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.px-table th { font-size: 12px; font-weight: 600; color: var(--px-muted); padding: 8px 6px; border-bottom: 1px solid var(--px-border); }
.px-table td { padding: 10px 6px; border-bottom: 1px solid var(--px-border); vertical-align: middle; }
.px-side-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 100px; }
.px-side-tag.yes { background: var(--px-yes-soft); color: var(--px-yes); }
.px-side-tag.no { background: var(--px-no-soft); color: var(--px-no); }
.px-rules { white-space: pre-line; color: var(--px-muted); line-height: 1.6; }
.px-timeline { list-style: none; padding: 0; margin: 0; }
.px-timeline li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.px-timeline .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--px-border-strong); margin-top: 6px; flex: none; }
.px-timeline li.done .dot { background: var(--px-brand); }
.px-toast { background: var(--px-surface); color: var(--px-text); border: 1px solid var(--px-border-strong); }
.px-toast.error { border-color: var(--px-no-line); }
.px-toast.success { border-color: var(--px-yes-line); }

/* ── Event lists (home, category) ─────────────────────────────────────── */
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }
.px-event-img { object-fit: cover; padding: 0; }
.px-section-heading { font-size: 26px; margin: 0 0 14px; }
.px-section-heading a { color: var(--px-text); }
.px-page-title { font-size: 32px; }
.px-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.px-grid-wide { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.px-event-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: border-color .12s; min-height: 210px; }
.px-event-card:hover { border-color: var(--px-border-strong); }
.px-card-head { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.px-card-head:hover .px-card-title { text-decoration: underline; }
.px-card-title { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.px-card-chance { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.px-card-spark { width: 55%; height: 44px; }
.px-spark { width: 100%; height: 100%; display: block; overflow: visible; }
.px-change { font-size: 12px; font-weight: 600; margin-left: 2px; }
.px-card-pills { display: flex; gap: 8px; }
.px-card-pills .px-pill { flex: 1; min-width: 0; }
.px-card-options { display: flex; flex-direction: column; gap: 8px; }
.px-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.px-card-row .px-pill { min-width: 0; padding: 3px 10px; font-size: 13px; }
.px-card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--px-muted); margin-top: auto; }

/* Featured carousel */
.px-featured { position: relative; padding: 24px; }
.px-featured-nav { position: absolute; top: 18px; right: 20px; display: flex; align-items: center; gap: 10px; z-index: 2; }
.px-round-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--px-border-strong);
    background: var(--px-surface); color: var(--px-text); display: inline-flex; align-items: center; justify-content: center;
}
.px-round-btn:hover { border-color: var(--px-text); }
.px-featured-title { font-size: clamp(24px, 3vw, 34px); margin: 2px 0 0; }
.px-featured [data-legend] { padding-right: 120px; }
.px-featured-chart { height: 300px; }
.px-featured-chance { font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.px-featured-row {
    display: grid; grid-template-columns: 1fr 52px auto; align-items: center; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid var(--px-border); font-size: 14px;
}
.px-featured-row .px-pill { min-width: 78px; padding: 4px 10px; font-size: 13px; }
.px-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }

/* Movers sidebar */
.px-sticky-side { position: sticky; top: 112px; }
.px-movers { padding: 6px 0; }
.px-movers-head { font-weight: 700; padding: 10px 16px 8px; }
.px-mover { display: block; padding: 10px 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--px-border); }
.px-mover:hover { background: var(--px-surface-2); color: inherit; }
.px-mover-spark { width: 90px; height: 32px; flex: none; }

/* Category sidebar */
.px-sidenav { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 2px; }
.px-sidenav-link {
    display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px;
    color: var(--px-muted); text-decoration: none; font-weight: 600; font-size: 14px;
}
.px-sidenav-link span { color: var(--px-faint); font-weight: 500; font-size: 12px; font-variant-numeric: tabular-nums; }
.px-sidenav-link:hover { color: var(--px-text); background: var(--px-surface-2); }
.px-sidenav-link.active { color: var(--px-brand); }
.px-sidenav-sub { padding-left: 22px; font-weight: 500; }
.px-sidenav-toggle { border: 0; background: none; color: var(--px-faint); padding: 4px 8px; border-radius: 6px; }
.px-sidenav-toggle:hover { color: var(--px-text); }
.px-sidenav-toggle i { display: inline-block; transition: transform .15s; }
.px-sidenav-toggle.collapsed i { transform: rotate(-90deg); }
.px-sort { border-radius: 100px; font-weight: 600; padding-left: 14px; min-width: 150px; }

@media (max-width: 991.98px) {
    .px-sticky-side { position: static; }
    .px-sidenav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
    .px-sidenav-group { display: contents; }
    .px-sidenav-group > .d-flex { flex: none; }
    .px-sidenav-link { flex: none; border: 1px solid var(--px-border-strong); border-radius: 100px; padding: 5px 12px; white-space: nowrap; }
    .px-sidenav-toggle, .px-sidenav .collapse:not(.show) { display: none; }
    .px-sidenav .collapse.show { display: contents; }
    .px-sidenav-sub { padding-left: 12px; }
    .px-featured-chart { height: 220px; }
    .px-featured [data-legend] { padding-right: 0; }
    .px-featured { padding: 16px; padding-top: 56px; }
}

/* ── Auth & simple pages ──────────────────────────────────────────────── */
.px-auth { max-width: 420px; margin: 32px auto; padding: 28px; }

@media (max-width: 991.98px) {
    .px-trade { position: static; }
}
@media (max-width: 640px) {
    .px-options-head { grid-template-columns: 1fr 64px; }
    .px-options-head > :last-child { display: none; }
    .px-option { grid-template-columns: 1fr 64px; }
    .px-option-actions { grid-column: 1 / -1; justify-content: stretch; }
    .px-option-actions .px-pill { flex: 1; min-width: 0; }
    .px-chart { height: 240px; }
    .px-book-head, .px-book-row { grid-template-columns: 1fr 64px 70px 80px; }
}

/* ── Card edge color (category accent glowing from the top-left corner) ── */
:root { --px-card-top: #0E1115; --px-card-bottom: #14181F; }
.px-accent {
    --px-accent: var(--px-brand);
    background:
        radial-gradient(150px 150px at 0 0, color-mix(in srgb, var(--px-accent) 20%, transparent), transparent 72%),
        linear-gradient(180deg, var(--px-card-top), var(--px-card-bottom));
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--px-accent) 22%, transparent), var(--px-shadow);
}
.px-accent:hover { border-color: color-mix(in srgb, var(--px-accent) 45%, transparent); }
.px-accent .px-event-icon:not(img),
.px-market .px-event-icon:not(img) {
    color: var(--px-accent, var(--px-brand));
    background: color-mix(in srgb, var(--px-accent, var(--px-brand)) 12%, transparent);
    border-color: color-mix(in srgb, var(--px-accent, var(--px-brand)) 30%, transparent);
}

/* ── Featured carousel: slides overlap so the card never changes height ── */
.px-featured { padding: 0; overflow: hidden; background: var(--px-surface); }
.px-slides { display: grid; }
.px-slide { grid-area: 1 / 1; padding: 24px; visibility: hidden; border-radius: inherit; box-shadow: none; }
.px-slide.active { visibility: visible; }
.px-featured .px-slide:hover { border-color: transparent; }

/* ── Phones and small tablets ─────────────────────────────────────────── */
.px-table-wrap { overflow-x: auto; }
.toast-container { max-width: 100%; }
.px-toast { max-width: calc(100vw - 32px); }

@media (max-width: 991.98px) {
    /* Market page: trade panel becomes a bottom sheet */
    .px-trade {
        position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1050;
        max-height: 88vh; overflow-y: auto; margin: 0;
        border-radius: 20px 20px 0 0; border-bottom: 0;
        padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
        transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
    }
    .px-trade.open { transform: none; visibility: visible; }
    .px-sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--px-border-strong); margin: 0 auto 12px; }
    .px-sheet-backdrop {
        position: fixed; inset: 0; z-index: 1049; background: rgba(0, 0, 0, .55);
        opacity: 0; pointer-events: none; transition: opacity .2s;
    }
    .px-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
    body.px-sheet-open { overflow: hidden; }
    .px-mobile-bar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--px-bg); border-top: 1px solid var(--px-border);
    }
    .px-bar-btn { flex: 1; border: 0; border-radius: 12px; padding: 12px; font-weight: 700; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
    .px-bar-btn.yes { background: var(--px-yes); }
    .px-bar-btn.no { background: var(--px-no); }
    .px-bar-btn:disabled { opacity: .4; }
    .px-market { padding-bottom: 96px; }
    .toast-container { bottom: 96px !important; }
}

@media (max-width: 767.98px) {
    /* Home rows scroll sideways instead of stacking into one long column */
    .px-rail {
        display: grid; grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        margin: 0 -16px; padding: 2px 16px 6px; scroll-padding: 0 16px;
    }
    .px-rail::-webkit-scrollbar { display: none; }
    .px-rail > * { scroll-snap-align: start; }

    .px-slide { padding: 16px; padding-top: 60px; }
    .px-featured-nav { top: 14px; right: 16px; }
    .px-featured [data-legend] { padding-right: 0; }
    .px-featured-chart { height: 190px; }
    .px-featured-chance { font-size: 36px; }
    .px-featured-extra { display: none; }
    .px-section-heading { font-size: 22px; }
    .px-page-title { font-size: 26px; }
}

@media (max-width: 575.98px) {
    body { font-size: 14px; }
    .px-container { padding-left: 16px; padding-right: 16px; }
    main.px-container { padding-top: 16px !important; }
    .px-logo { font-size: 26px; }
    .px-balance-label { display: none; }
    .px-balance-value { font-size: 14px; }
    .px-btn-brand, .px-btn-outline { padding: 6px 12px; font-size: 13px; }

    .px-featured-row { grid-template-columns: minmax(0, 1fr) 40px auto; gap: 8px; }
    .px-featured-row .px-pill { min-width: 62px; padding: 6px 8px; font-size: 12px; }
    .px-featured-row .d-flex { gap: 6px !important; }

    .px-event-card { min-height: 0; }
    .px-card-row .px-pill { padding: 5px 10px; }

    /* Market page */
    .px-event-title { font-size: 24px; }
    .px-market .px-event-icon { width: 48px !important; height: 48px !important; font-size: 24px !important; }
    .px-options-head, .px-option { grid-template-columns: minmax(0, 1fr) auto; }
    .px-option-chance { font-size: 20px; }
    .px-option-actions .px-pill { padding: 9px 8px; }
    .px-chart { height: 220px; }
    .px-hide-sm { display: none; }
    .px-table td, .px-table th { padding: 8px 4px; }
    .px-book-head, .px-book-row { grid-template-columns: 52px 1fr 1fr 1fr; }
    .px-sort { min-width: 0; font-size: 16px; }   /* 16px stops iOS zooming on focus */
    .px-auth { margin: 8px auto; padding: 20px; }
}

/* Uploaded logo, email verification */
.px-logo-img { height: 32px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.px-verify-banner { background: rgba(229, 189, 69, .12); border-bottom: 1px solid rgba(229, 189, 69, .3); color: #E5BD45; font-size: 14px; }
.px-verify-banner strong { color: var(--px-text); }
.px-otp { font: 700 32px/1 "Courier New", monospace; letter-spacing: 14px; text-align: center; padding: 14px 0 14px 14px; }

/* Sports live strip */
.px-live { margin: 0 0 20px; }
.px-live-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.px-live-title { font-size: 16px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.px-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--px-no); display: inline-block; animation: px-pulse 1.6s ease-in-out infinite; }
@keyframes px-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .px-live-dot { animation: none; } }
.px-live-row-wrap { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
.px-live-row-wrap::-webkit-scrollbar { display: none; }
.px-live-card {
    scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px;
    background: linear-gradient(180deg, var(--px-card-top), var(--px-card-bottom)); border: 1px solid var(--px-border);
    color: var(--px-text); text-decoration: none; font-size: 13px; transition: border-color .12s;
}
.px-live-card:hover { border-color: var(--px-border-strong); color: var(--px-text); }
.px-live-card.is-live { border-color: color-mix(in srgb, var(--px-no) 35%, transparent); background: radial-gradient(120px 80px at 0 0, color-mix(in srgb, var(--px-no) 14%, transparent), transparent 70%), linear-gradient(180deg, var(--px-card-top), var(--px-card-bottom)); }
.px-live-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--px-muted); font-weight: 600; margin-bottom: 2px; }
.px-live-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--px-no); font-weight: 700; letter-spacing: .04em; }
.px-live-badge .px-live-dot { width: 6px; height: 6px; }
.px-live-team { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; }
.px-live-team.won { color: var(--px-yes); }
.px-live-score { font-variant-numeric: tabular-nums; font-size: 15px; }
.px-live-chance { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--px-muted); }
.px-live-card.is-live .px-live-chance { color: var(--px-text); }
@media (max-width: 575.98px) { .px-live-row-wrap { grid-auto-columns: 78%; margin: 0 -16px; padding: 0 16px 2px; scroll-padding: 0 16px; } }

/* Market past its close time */
.px-ended-note {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
    background: rgba(229, 189, 69, .10); border: 1px solid rgba(229, 189, 69, .3); color: #E5BD45; font-size: 14px;
}
.px-ended-note strong { color: var(--px-text); }

/* ── Deposit: payment method picker ─────────────────────────────────────── */
.px-deposit { max-width: 560px; margin: 32px auto; padding: 28px; }
.px-pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.px-pay-option { position: relative; display: block; margin: 0; cursor: pointer; }
.px-deposit .form-text { color: var(--px-muted); }
.px-pay-grid { padding-top: 6px; row-gap: 18px; }
.px-pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.px-pay-tile {
    display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 14px; border-radius: 12px;
    background: var(--px-surface-2); border: 1px solid var(--px-border-strong); transition: border-color .15s, background .15s;
}
.px-pay-option:hover .px-pay-tile { border-color: rgba(255, 255, 255, .3); }
.px-pay-option input:checked + .px-pay-tile { border-color: var(--px-brand); background: rgba(40, 204, 149, .08); box-shadow: 0 0 0 1px var(--px-brand) inset; }
.px-pay-option input:focus-visible + .px-pay-tile { outline: 2px solid var(--px-brand); outline-offset: 2px; }
.px-pay-option.is-off { cursor: not-allowed; }
.px-pay-option.is-off .px-pay-tile { opacity: .45; border-style: dashed; }
.px-pay-option.is-off:hover .px-pay-tile { border-color: var(--px-border-strong); }
.px-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.px-pay-icon {
    display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255, 255, 255, .07); color: var(--px-text); font-size: 20px;
}
[data-method="crypto"] .px-pay-icon { background: rgba(247, 147, 26, .15); color: #F7931A; }
[data-method="paypal"] .px-pay-icon { background: rgba(0, 156, 222, .15); color: #3BB0E8; }
[data-method="card"] .px-pay-icon { background: rgba(40, 204, 149, .14); color: var(--px-brand); }
.px-pay-name { font-weight: 600; line-height: 1.25; }
.px-pay-desc { font-size: 12.5px; color: var(--px-muted); line-height: 1.35; }
.px-pay-badge { position: absolute; top: -9px; right: 10px; font-size: 10.5px; line-height: 1.2; border: 1px solid var(--px-surface); font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.px-pay-badge.rec { background: var(--px-brand); color: #00261A; }
.px-pay-badge.soon { background: #2A2F37; color: rgba(255, 255, 255, .7); }
.px-amount-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.px-amount-chips button {
    flex: 1 1 0; min-width: 64px; padding: 7px 0; border-radius: 999px; border: 1px solid var(--px-border-strong);
    background: transparent; color: var(--px-text); font-weight: 600; font-size: 14px;
}
.px-amount-chips button:hover, .px-amount-chips button.active { border-color: var(--px-brand); color: var(--px-brand); }
.px-amount-input { position: relative; }
.px-amount-input span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--px-muted); font-size: 20px; font-weight: 600; }
.px-amount-input input { padding-left: 32px; font-size: 22px; font-weight: 700; height: 54px; }
.px-pay-admin-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--px-border); }
@media (max-width: 575.98px) {
    .px-deposit { margin: 8px auto; padding: 20px 16px; }
    .px-pay-tile { padding: 12px; }
}
@media (max-width: 359.98px) { .px-pay-grid { grid-template-columns: 1fr; } }

/* ── Deposit: coins, fee, history, payment page ───────────────────────── */
.px-fee-line { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--px-surface-2); font-size: 14px; color: var(--px-muted); }
.px-fee-line strong { color: var(--px-text); }
.px-deposit-history { margin-top: -16px; padding-top: 20px; padding-bottom: 12px; }
.px-dep-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0;
    border-top: 1px solid var(--px-border); color: var(--px-text); text-decoration: none;
}
.px-dep-row:hover { color: var(--px-text); background: var(--px-surface-2); }
.px-dep-status { flex: none; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.px-dep-status.waiting { background: rgba(255, 255, 255, .08); color: var(--px-muted); }
.px-dep-status.review { background: rgba(229, 189, 69, .14); color: #E5BD45; }
.px-dep-status.approved { background: rgba(40, 204, 149, .14); color: var(--px-brand); }
.px-dep-status.rejected { background: rgba(255, 93, 93, .14); color: #FF7A7A; }
.px-dep-status.cancelled { background: rgba(255, 255, 255, .05); color: var(--px-faint, rgba(255, 255, 255, .4)); }

/* ── Crypto deposit flow: steps, coin page, payment page ─────────────── */
.px-steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; counter-reset: none; }
.px-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--px-faint); padding-top: 10px; border-top: 3px solid var(--px-border-strong); }
.px-steps li.done { color: var(--px-muted); border-top-color: rgba(40, 204, 149, .55); }
.px-steps li.current { color: var(--px-text); border-top-color: var(--px-brand); }
.px-step-dot {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
    font-size: 12px; background: var(--px-surface-2); border: 1px solid var(--px-border-strong);
}
.px-steps li.done .px-step-dot { background: rgba(40, 204, 149, .15); border-color: transparent; color: var(--px-brand); }
.px-steps li.current .px-step-dot { background: var(--px-brand); border-color: var(--px-brand); color: #00261A; }

.px-coin-logo { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: transparent; }
.px-coin-logo.on-light { background: #fff; padding: 5px; }
.px-coin-logo.is-text {
    display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1);
    color: var(--px-text); font-size: 11px; font-weight: 800; letter-spacing: .02em;
}
.px-coin-logo.sm { width: 26px; height: 26px; font-size: 9px; }
.px-coin-logo.sm.on-light { padding: 4px; }
.px-coin-logo.xs { width: 18px; height: 18px; font-size: 7px; }
.px-coin-logo.xs.on-light { padding: 2px; }
.px-coin-logo.lg { width: 48px; height: 48px; }
.px-coin-logo.lg.on-light { padding: 7px; }

.px-coin-total { flex: none; }
.px-coin-total a { color: var(--px-brand); text-decoration: none; }
.px-coin-search { position: relative; }
.px-coin-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--px-muted); }
.px-coin-search input { padding-left: 38px; height: 44px; border-radius: 12px; }
.px-coin-rows { display: flex; flex-direction: column; gap: 8px; }
.px-coin-row { border: 1px solid var(--px-border-strong); border-radius: 14px; background: var(--px-surface-2); transition: border-color .15s, background .15s; }
.px-coin-row:hover { border-color: rgba(255, 255, 255, .28); }
.px-coin-row.open { border-color: var(--px-brand); background: rgba(40, 204, 149, .05); }
.px-coin-head {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left;
    background: none; border: 0; color: var(--px-text); border-radius: 14px;
}
.px-coin-head:focus-visible { outline: 2px solid var(--px-brand); outline-offset: 2px; }
.px-coin-name { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.px-coin-name .px-muted { font-size: 13px; }
.px-coin-est { text-align: right; font-size: 14px; line-height: 1.3; white-space: nowrap; }
.px-coin-chev { color: var(--px-muted); transition: transform .15s; }
.px-coin-row.open .px-coin-chev { transform: rotate(180deg); color: var(--px-brand); }
.px-net-list { padding: 0 10px 10px; }
.px-net-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--px-muted); padding: 2px 6px 8px; border-top: 1px solid var(--px-border); padding-top: 10px; }
.px-net { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 6px; border-radius: 10px; border: 1px solid var(--px-border); cursor: pointer; font-weight: 500; background: rgba(0, 0, 0, .18); }
.px-net:last-child { margin-bottom: 0; }
.px-net:hover { border-color: var(--px-border-strong); }
.px-net input { position: absolute; opacity: 0; pointer-events: none; }
.px-net:focus-within { outline: 2px solid var(--px-brand); outline-offset: 1px; }
.px-net-check { color: var(--px-brand); opacity: 0; transition: opacity .1s; }
.px-net.selected { border-color: var(--px-brand); background: rgba(40, 204, 149, .1); }
.px-net.selected .px-net-check { opacity: 1; }
.px-coin-footer {
    position: sticky; bottom: 0; margin: 16px -28px -28px; padding: 14px 28px 20px; border-radius: 0 0 16px 16px;
    background: linear-gradient(to bottom, rgba(20, 24, 31, .85), var(--px-surface) 30%); backdrop-filter: blur(6px);
}

.px-pay-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.px-pay-top > .min-w-0 { flex: 1 1 170px; }
.px-net-badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--px-surface-2); border: 1px solid var(--px-border); font-size: 13px; color: var(--px-muted); }
.px-pay-box { padding: 20px; border-radius: 16px; border: 1px solid var(--px-border-strong); background: var(--px-surface-2); text-align: center; margin-bottom: 14px; }
.px-pay-amount-value { font-size: 28px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.px-qr-wrap { position: relative; width: 216px; height: 216px; margin: 18px auto; padding: 8px; border-radius: 14px; background: #fff; }
.px-qr img, .px-qr canvas { display: block; width: 200px !important; height: 200px !important; }
.px-qr-logo { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; border: 4px solid #fff; background: #fff; object-fit: cover; }
.px-qr-logo.on-light { padding: 5px; }
.px-pay-addr { text-align: left; }
.px-addr-line { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .28); border: 1px solid var(--px-border); }
.px-addr-line span { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.px-copy-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--px-border-strong); background: rgba(255, 255, 255, .05); color: var(--px-text); transition: all .15s;
}
.px-copy-btn:hover { border-color: var(--px-brand); color: var(--px-brand); }
.px-copy-btn.copied { border-color: var(--px-brand); background: var(--px-brand); color: #00261A; }
.px-pay-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--px-border); }
.px-pay-details dt { font-size: 12px; font-weight: 600; color: var(--px-muted); }
.px-pay-details dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.px-pay-details-wide { grid-column: 1 / -1; }
.min-w-0 { min-width: 0; }
@media (max-width: 575.98px) {
    .px-coin-footer { margin: 16px -16px -20px; padding: 12px 16px 16px; }
    .px-coin-est { font-size: 13px; }
    .px-pay-box { padding: 16px 14px; }
    .px-pay-amount-value { font-size: 24px; }
    .px-steps li { font-size: 12px; }
}
