/* Polymarket esports homepage — layout & tokens */

/* ── Light theme ── */
html[data-theme="light"] body.poly-pm-page {
    --pm-bg: #ffffff;
    --pm-text: #0f172a;
    --pm-text-secondary: #64748b;
    --pm-text-tertiary: #94a3b8;
    --pm-border: #e2e8f0;
    --pm-card-bg: #ffffff;
    --pm-card-text: #0f172a;
    --pm-card-muted: #64748b;
    --pm-card-hover: #f8fafc;
    --pm-card-border: #e2e8f0;
    --pm-bar-track: rgba(15, 23, 42, 0.08);
    --pm-btn-neutral-bg: rgba(15, 23, 42, 0.08);
    --pm-btn-neutral-text: #0f172a;
    --pm-input-bg: #f1f5f9;
    --pm-input-hover: #e2e8f0;
    --pm-hero-bg: #0e0f11;
    --pm-live: #ef4444;
    --pm-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* ── Dark theme (explicit dark + gaben default without data-theme) ── */
html[data-theme="dark"] body.poly-pm-page,
html:not([data-theme="light"]) body.poly-pm-page {
    --pm-bg: #0a0b1b;
    --pm-text: #f4f4f5;
    --pm-text-secondary: #a1a1aa;
    --pm-text-tertiary: #71717a;
    --pm-border: rgba(255, 255, 255, 0.08);
    --pm-card-bg: #212528;
    --pm-card-text: #e4e4e7;
    --pm-card-muted: #a1a1aa;
    --pm-card-hover: #2a2e33;
    --pm-card-border: rgba(255, 255, 255, 0.08);
    --pm-bar-track: rgba(255, 255, 255, 0.08);
    --pm-btn-neutral-bg: rgba(255, 255, 255, 0.08);
    --pm-btn-neutral-text: #e4e4e7;
    --pm-input-bg: rgba(255, 255, 255, 0.06);
    --pm-input-hover: rgba(255, 255, 255, 0.1);
    --pm-hero-bg: #0e0f11;
    --pm-live: #ef4444;
    --pm-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

body.poly-pm-page {
    font-family: "Open Sans", system-ui, -apple-system, sans-serif;
    font-weight: 400;
    background-color: var(--pm-bg) !important;
    color: var(--pm-text);
}

html[data-theme="dark"] body.poly-pm-page .pm-page-title,
html[data-theme="dark"] body.poly-pm-page .pm-section-title,
html:not([data-theme="light"]) body.poly-pm-page .pm-page-title,
html:not([data-theme="light"]) body.poly-pm-page .pm-section-title {
    color: var(--pm-text);
}

html[data-theme="dark"] body.poly-pm-page .pm-section-arrow,
html:not([data-theme="light"]) body.poly-pm-page .pm-section-arrow {
    color: var(--pm-text-secondary);
}

.poly-pm-page .header {
    border-bottom: 1px solid var(--pm-border);
}

.pm-shell {
    width: 100%;
}

.pm-layout {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    .pm-layout {
        padding-top: 32px;
        padding-left: 24px;
        padding-right: 24px;
        gap: 24px;
    }
}

/* Page header */
.pm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pm-page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--pm-text);
}

@media (min-width: 640px) {
    .pm-page-title {
        font-size: 2rem;
    }
}

.pm-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pm-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--pm-text-secondary);
    cursor: pointer;
}

.pm-search-toggle:hover {
    background: var(--pm-input-bg);
}

.pm-search-field {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.25s ease, opacity 0.2s ease;
    position: relative;
}

.pm-search-wrap.is-open .pm-search-toggle {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.pm-search-wrap.is-open .pm-search-field {
    width: min(280px, 70vw);
    opacity: 1;
}

.pm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pm-text-secondary);
    pointer-events: none;
}

.pm-search-input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--pm-input-bg);
    color: var(--pm-text);
    font: inherit;
    font-size: 0.875rem;
}

.pm-search-input:hover {
    background: var(--pm-input-hover);
}

.pm-search-input:focus {
    outline: none;
    background: var(--pm-input-hover);
}

/* Hero carousel */
.pm-hero-carousel {
    position: relative;
    min-height: 320px;
    border-radius: 16px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .pm-hero-carousel {
        min-height: 420px;
    }
}

.pm-hero-track {
    position: relative;
    height: 100%;
    min-height: inherit;
}

.pm-hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--pm-hero-bg);
    color: #fff;
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.pm-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    min-height: 320px;
}

@media (min-width: 1024px) {
    .pm-hero-slide.is-active {
        min-height: 420px;
    }
}

.pm-hero-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pm-hero-media {
    position: relative;
    height: 220px;
    background: var(--pm-hero-bg);
    overflow: hidden;
}

@media (min-width: 640px) {
    .pm-hero-media {
        position: absolute;
        right: 0;
        top: 0;
        width: 55%;
        height: 100%;
    }
}

.pm-hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.pm-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0e0f11 0%, transparent 45%);
}

@media (min-width: 640px) {
    .pm-hero-media::after {
        background: linear-gradient(to right, #0e0f11 10%, rgba(14, 15, 17, 0.6) 50%, transparent 85%);
    }
}

.pm-hero-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    max-width: 600px;
}

@media (min-width: 640px) {
    .pm-hero-body {
        width: 45%;
        max-width: none;
        min-height: 320px;
        padding: 24px;
    }
}

@media (min-width: 1024px) {
    .pm-hero-body {
        min-height: 420px;
        padding: 48px;
    }
}

.pm-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

@media (min-width: 1024px) {
    .pm-hero-meta {
        font-size: 0.875rem;
    }
}

.pm-hero-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--pm-live);
}

.pm-hero-live::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pm-live);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pm-pulse 1.5s ease-out infinite;
}

.pm-hero-vol,
.pm-hero-game {
    color: rgba(255, 255, 255, 0.6);
}

.pm-hero-title {
    margin: 8px 0 0;
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .pm-hero-title {
        font-size: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .pm-hero-title {
        font-size: 2.5rem;
    }
}

.pm-hero-teams {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pm-hero-team-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.pm-hero-team-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (max-width: 639px) {
    .pm-hero-team-logo {
        width: 28px;
        height: 28px;
    }
}

.pm-hero-team-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-hero-team-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.pm-hero-team-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1024px) {
    .pm-hero-team-name {
        font-size: 1rem;
    }
}

.pm-hero-team-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pm-hero-score {
    width: 40px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.pm-hero-odds {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
}

.pm-hero-pct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
    .pm-hero-pct {
        min-width: 56px;
        height: 28px;
        font-size: 0.75rem;
    }
}

.pm-hero-bar,
.pm-outcome-bar {
    height: 3px;
    width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.pm-hero-bar-fill,
.pm-outcome-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--bar-color, #9d9595);
    transition: width 0.3s ease;
}

.pm-hero-controls {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

@media (min-width: 640px) {
    .pm-hero-controls {
        left: 45%;
    }
}

@media (min-width: 1024px) {
    .pm-hero-controls {
        left: 50%;
    }
}

.pm-hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.pm-hero-dot.is-active {
    background: #fff;
}

/* Game pills — full-width landscape cards */
.pm-game-pills {
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 8px 0 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pm-game-pill {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: block;
    aspect-ratio: 2.35 / 1;
    min-height: 118px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.pm-game-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.22);
}

.pm-game-pill.is-active {
    outline: 2px solid var(--pm-text);
    outline-offset: 2px;
}

.pm-game-pill-img {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.pm-game-pill-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78) 0%,
        rgba(0, 0, 0, 0.28) 42%,
        rgba(0, 0, 0, 0.08) 70%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.pm-game-pill-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

.pm-game-pill:hover .pm-game-pill-img img {
    transform: scale(1.06);
}

.pm-game-pill-label {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 2;
    display: block;
    padding: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    line-height: 1.2;
}

.pm-game-pill-chevron {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    width: 16px;
    height: 16px;
    opacity: 0.92;
    background: center / contain no-repeat
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

@media (max-width: 720px) {
    .pm-game-pills {
        flex-wrap: wrap;
        gap: 8px;
    }
    .pm-game-pill {
        flex: 1 1 calc(50% - 4px);
        aspect-ratio: 2.1 / 1;
        min-height: 96px;
    }
}

@media (max-width: 420px) {
    .pm-game-pill {
        flex: 1 1 100%;
        aspect-ratio: 2.4 / 1;
        min-height: 88px;
    }
}

.pm-filter-active {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 0;
}

.pm-filter-clear {
    color: var(--pm-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.pm-filter-clear:hover {
    color: var(--pm-text);
}

.pm-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pm-text);
}

/* Sections */
.pm-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pm-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-section-head-link {
    text-decoration: none;
    color: inherit;
}

.pm-section-head-link:hover .pm-section-title {
    color: var(--pm-text-secondary);
}

.pm-section-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pm-text);
    transition: color 0.15s ease;
}

.pm-section-arrow {
    color: var(--pm-text-secondary);
}

/* Card grid */
.pm-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .pm-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.pm-scroll-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pm-scroll-row::-webkit-scrollbar {
    display: none;
}

.pm-scroll-row .pm-card {
    flex: 0 0 min(100%, 340px);
    max-width: 340px;
}

/* Cards */
.pm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 180px;
    border: 1px solid var(--pm-card-border);
    border-radius: 12px;
    background: var(--pm-card-bg);
    color: var(--pm-card-text);
    box-shadow: var(--pm-shadow);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.pm-card:hover {
    transform: translateY(-1px);
    background: var(--pm-card-hover);
}

/* Polymarket-style: whole match card is clickable; interactive controls sit above */
.pm-card-stretch-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
/* No z-index on body/footer — a z-index:0 stacking context would trap
   .pm-card-wl / bet buttons below the stretch link. */
.pm-match-card .pm-card-body,
.pm-match-card .pm-card-footer {
    position: relative;
}
.pm-match-card .pm-bet-btn,
.pm-match-card .pm-pct-btn,
.pm-match-card .pm-card-wl,
.pm-match-card a.pm-game-link,
.pm-match-card a.pm-card-title {
    position: relative;
    z-index: 2;
}
.pm-match-card {
    cursor: pointer;
}

/* Inner wrapper — Polymarket: flex h-full flex-col gap-4 px-4 pb-3 pt-1 */
.pm-card-body {
    display: flex;
    height: 100%;
    flex: 1;
    flex-direction: column;
    gap: 16px;
    padding: 4px 16px 12px;
}

.pm-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 16px;
}

.pm-card-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

/* Isolate card from GABEN global dark/link styles */
body.poly-pm-page .pm-card,
body.poly-pm-page .pm-card .pm-card-body,
body.poly-pm-page .pm-card .pm-card-content {
    color: var(--pm-card-text);
}

body.poly-pm-page .pm-card a.pm-game-link {
    color: var(--pm-card-muted);
    text-decoration: none;
}

body.poly-pm-page .pm-card a.pm-game-link:hover {
    color: var(--pm-card-text);
}

body.poly-pm-page .pm-card a.pm-card-title,
body.poly-pm-page .pm-card a.pm-prop-title-wrap,
body.poly-pm-page .pm-card .pm-card-title,
body.poly-pm-page .pm-card h3.pm-card-title {
    color: var(--pm-card-text);
    text-decoration: none;
}

body.poly-pm-page .pm-card a.pm-card-title:hover,
body.poly-pm-page .pm-card a.pm-prop-title-wrap:hover .pm-card-title {
    color: var(--pm-card-text);
    text-decoration: underline;
}

body.poly-pm-page .pm-card .pm-outcome-name,
body.poly-pm-page .pm-card .pm-card-vol {
    color: var(--pm-card-muted);
}

body.poly-pm-page .pm-card .pm-outcome-odds {
    color: var(--pm-card-muted);
}

.pm-game-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--pm-card-muted);
}

.pm-game-link:hover {
    color: var(--pm-card-text);
}

.pm-game-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pm-card-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pm-card-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-card-title:hover {
    text-decoration: underline;
}

.pm-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pm-live-dot-wrap {
    position: relative;
    width: 10px;
    height: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pm-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pm-live);
    position: relative;
    z-index: 1;
}

.pm-live-pulse {
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: var(--pm-live);
    opacity: 0.6;
    animation: pm-pulse 1.5s ease-out infinite;
}

@keyframes pm-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2); opacity: 0; }
}

.pm-live-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pm-live);
    line-height: 1;
}

.pm-card-outcomes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pm-outcome-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-outcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pm-outcome-team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pm-team-logo-sm {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.pm-team-logo-fallback {
    display: block;
    background: var(--pm-bar-track);
}

.pm-outcome-name {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-outcome-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pm-outcome-odds {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pm-card-muted);
    font-variant-numeric: tabular-nums;
}
[data-live-pct].is-flash-up,
[data-live-odds].is-flash-up { color: #22c55e !important; transition: color .15s ease; }
[data-live-pct].is-flash-down,
[data-live-odds].is-flash-down { color: #ef4444 !important; transition: color .15s ease; }

/* Bet/pct buttons: bright green up, red down (dark buttons need bg flash) */
.pm-pct-btn.is-flash-up,
.pm-bet-btn.is-flash-up,
.pm-row-trade-btn.is-flash-up {
    background: #13c45c !important;
    color: #04140a !important;
    box-shadow: 0 0 0 1px rgba(19, 196, 92, 0.55);
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.pm-pct-btn.is-flash-up [data-live-pct],
.pm-bet-btn.is-flash-up [data-live-pct],
.pm-row-trade-btn.is-flash-up [data-live-pct] {
    color: #04140a !important;
}
.pm-pct-btn.is-flash-down,
.pm-bet-btn.is-flash-down,
.pm-row-trade-btn.is-flash-down {
    background: #ef4444 !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.5);
    transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.pm-pct-btn.is-flash-down [data-live-pct],
.pm-bet-btn.is-flash-down [data-live-pct],
.pm-row-trade-btn.is-flash-down [data-live-pct] {
    color: #fff !important;
}

.pm-pct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 32px;
    padding: 0 12px;
    border: none;
    border-radius: 4px;
    background: color-mix(in srgb, var(--bar-color, #64748b) 12%, transparent);
    color: var(--bar-color, #64748b);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.15s ease;
    flex: none;
    min-height: 0;
    box-shadow: none;
}

.pm-pct-btn:hover {
    background: color-mix(in srgb, var(--bar-color, #64748b) 18%, transparent);
}

body.poly-pm-page .pm-card .pm-pct-btn,
body.poly-pm-page .pm-card .pm-bet-btn {
    color: var(--bar-color, #64748b);
}

.pm-pct-btn-neutral {
    --bar-color: var(--pm-btn-neutral-text);
    background: var(--pm-btn-neutral-bg);
    color: var(--pm-btn-neutral-text);
}

.pm-pct-btn-neutral:hover {
    background: color-mix(in srgb, var(--pm-btn-neutral-text) 14%, transparent);
}

.pm-outcome-bar {
    background: var(--pm-bar-track);
}

.pm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px 12px;
}

.pm-card-vol {
    margin: 0;
    font-size: 0.75rem;
    color: var(--pm-card-muted);
}

.pm-vol-upper {
    text-transform: uppercase;
}

.pm-card-wl {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--pm-card-muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.pm-card-wl svg {
    width: 16px;
    height: 16px;
    display: block;
}
.pm-card-wl:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.pm-card-wl.is-on,
.pm-card-wl[aria-pressed="true"] {
    color: #13c45c;
}
.pm-card-wl.is-on svg,
.pm-card-wl[aria-pressed="true"] svg {
    fill: currentColor;
    stroke: currentColor;
}
html[data-theme="light"] .pm-card-wl:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
}

/* Prop cards */
.pm-prop-head {
    gap: 10px;
}

.pm-prop-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: var(--pm-card-text);
}

.pm-prop-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Empty / error */
.pm-empty,
.pm-error {
    padding: 24px;
    text-align: center;
    border: 1px dashed var(--pm-border);
    border-radius: 12px;
    color: var(--pm-text-secondary);
    font-size: 0.9375rem;
}

.pm-error {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.06);
}

.pm-card.is-hidden {
    display: none !important;
}

.poly-attribution {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 24px 24px;
    font-size: 0.75rem;
    color: var(--pm-text-secondary);
    text-align: center;
}

/* Modal (bet) */
.poly-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poly-modal[hidden] {
    display: none !important;
}

.poly-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.poly-modal-content {
    position: relative;
    background: var(--pm-card-bg, #fff);
    border: 1px solid var(--pm-border);
    border-radius: 14px;
    padding: 24px;
    width: min(420px, 92vw);
    color: var(--pm-text, #fff);
}

.poly-modal-content .poly-modal-title,
.poly-modal-content .poly-modal-pick,
.poly-modal-content .poly-modal-odds,
.poly-modal-content .poly-modal-payout,
.poly-modal-content strong {
    color: var(--pm-text, #fff);
}

.poly-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--pm-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.poly-modal-title {
    margin: 0 0 12px;
}

.poly-modal-event {
    font-size: 0.9rem;
    color: var(--pm-text-secondary);
    margin-bottom: 12px;
}

.poly-modal-label {
    display: block;
    margin: 14px 0 6px;
    font-size: 0.85rem;
    color: var(--pm-text-secondary);
}

.poly-stake-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--pm-border);
    background: var(--pm-input-bg);
    color: var(--pm-text, #fff);
    font-size: 1rem;
    box-sizing: border-box;
}

.poly-modal-quick {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.poly-modal-error {
    color: #ef4444;
    font-size: 0.85rem;
}

.poly-place-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}

body.poly-modal-open {
    overflow: hidden;
}

/* Legacy poly-page styles for event detail pages */
.poly-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}

.poly-back-link {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--link);
    text-decoration: none;
    font-size: 0.9rem;
}

.poly-section {
    margin-bottom: 36px;
}

.poly-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.poly-section-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.poly-empty,
.poly-error {
    color: var(--text-muted);
    padding: 20px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 10px;
}

.poly-error {
    color: #ff6b6b;
    border-color: var(--error-border);
    background: var(--error-bg);
}

.poly-sync-info,
.poly-attribution {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

.poly-bets-table-wrap {
    overflow-x: auto;
}

.poly-bets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.poly-bets-table th,
.poly-bets-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    color: var(--text-primary);
}

.poly-bets-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.poly-bet-event-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.poly-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.poly-status-open { background: rgba(74, 158, 255, 0.2); color: #4a9eff; }
.poly-status-won { background: rgba(76, 175, 80, 0.2); color: #4caf50; }
.poly-status-lost { background: rgba(244, 67, 54, 0.2); color: #f44336; }
.poly-status-refund { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.poly-status-closed { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.poly-status-liquidated { background: rgba(244, 67, 54, 0.25); color: #ef4444; }
.poly-status.cab-nav-club.is-gold,
.poly-status-cashback.cab-nav-club.is-gold {
    background: rgba(234, 179, 8, .22) !important;
    color: #facc15 !important;
    border: 1px solid rgba(250, 204, 21, .45);
}

.poly-pnl.is-up { color: #16a34a; font-weight: 600; }
.poly-pnl.is-down { color: #dc2626; font-weight: 600; }
html[data-theme="dark"] .poly-pnl.is-up,
html:not([data-theme="light"]) .poly-pnl.is-up { color: #4ade80; }
html[data-theme="dark"] .poly-pnl.is-down,
html:not([data-theme="light"]) .poly-pnl.is-down { color: #f87171; }

.poly-opened {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    color: var(--pm-text-tertiary, #94a3b8);
}
.poly-funding {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
}

.poly-bets-hub { margin-top: 4px; }
.poly-bets-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.poly-bets-tab {
    border: 1px solid var(--pm-border, rgba(255,255,255,0.1));
    background: transparent;
    color: var(--pm-text-secondary, #94a3b8);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}
.poly-bets-tab.is-active {
    background: var(--pm-input-bg, rgba(255,255,255,0.06));
    color: var(--pm-text, #e2e8f0);
    border-color: transparent;
}
.poly-bets-subhead {
    margin: 16px 0 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--pm-text-secondary, #94a3b8);
}
.poly-perp-events-table { font-size: 0.8125rem; }
.poly-fee-cell {
    white-space: nowrap;
    line-height: 1.25;
}
.poly-fee-cell .poly-fee-kind {
    display: block;
    font-size: 0.7rem;
    color: var(--pm-text-tertiary, #64748b);
    font-weight: 500;
}
.poly-fee-cell .poly-fee-amt {
    display: block;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.poly-fee-cell .poly-fee-amt.is-down {
    color: #dc2626;
}
html[data-theme="dark"] .poly-fee-cell .poly-fee-amt.is-down,
html:not([data-theme="light"]) .poly-fee-cell .poly-fee-amt.is-down {
    color: #f87171;
}

.poly-trade-btn {
    flex: 1;
    min-height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 10px;
    color: #fff;
    font-weight: 700;
    transition: filter 0.15s, transform 0.1s;
}

.poly-trade-a { background: #d9d217; color: #1a1a1a; }
.poly-trade-b { background: #1cbc10; }

@media (max-width: 768px) {
    .poly-event-hero-board {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .poly-hero-period {
        order: -1;
    }
}

/* Event detail page */
.poly-event-page .poly-page-title {
    display: none;
}

.poly-event-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 18px;
}

.poly-event-hero-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.poly-event-hero-title {
    margin: 0 0 16px;
    font-size: 1.6rem;
    color: var(--text-primary);
}

.poly-event-hero-board {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.poly-hero-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.poly-hero-team:last-child {
    order: 3;
}

.poly-hero-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
}

.poly-hero-team-name {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
}

.poly-hero-score {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.poly-hero-period {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--bg-hover);
    text-align: center;
}

.poly-event-hero-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.poly-chart-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 18px;
}

.poly-chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.poly-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.poly-chart-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}

.poly-chart-legend-a i { background: #d9d217; }
.poly-chart-legend-b i { background: #1cbc10; }

.poly-chart-legend-multi {
    gap: 10px 16px;
}

.poly-chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.poly-chart-legend-item i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 2px;
    background: var(--legend-color, #888);
}

.poly-chart-wrap-tall {
    height: 280px;
}

.poly-prop-chart-panel-multi .poly-chart-toolbar {
    align-items: flex-start;
}

@media (max-width: 768px) {
    .poly-chart-legend-multi {
        max-height: 72px;
        overflow-y: auto;
    }
}

.poly-chart-ranges {
    display: flex;
    gap: 4px;
}

.poly-chart-range {
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.poly-chart-range.active {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--accent-soft);
}

.poly-chart-wrap {
    height: 220px;
    position: relative;
}

.poly-event-page--prop .poly-event-hero {
    display: none;
}

.poly-prop-event-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.poly-prop-event-icon {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.poly-prop-event-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.poly-prop-event-title {
    margin: 0 0 10px;
    font-size: 1.65rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.poly-prop-event-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.poly-prop-markets-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 24px;
}

.poly-prop-market-row {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 14px 0;
    margin-top: 8px;
    border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    background: var(--bg-surface, transparent);
}

.poly-prop-market-row + .poly-prop-market-row {
    margin-top: 0;
    border-top: none;
}

.poly-prop-market-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -10px;
    right: -10px;
    border-radius: 6px;
    pointer-events: none;
    transition: background 0.2s ease;
    z-index: 0;
}

.poly-prop-market-row:hover .poly-prop-market-bg,
.poly-prop-market-row:active .poly-prop-market-bg,
.poly-prop-market-row:focus-within .poly-prop-market-bg {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .poly-prop-market-row:hover .poly-prop-market-bg,
html[data-theme="light"] .poly-prop-market-row:active .poly-prop-market-bg,
html[data-theme="light"] .poly-prop-market-row:focus-within .poly-prop-market-bg {
    background: rgba(0, 0, 0, 0.04);
}

.poly-prop-market-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.poly-prop-market-lead {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    justify-self: start;
}

.poly-prop-market-icon-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.poly-prop-market-icon {
    display: block;
    width: 36px;
    height: 36px;
    min-width: 36px;
    object-fit: cover;
}

.poly-prop-market-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.poly-prop-market-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.poly-prop-market-name {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.poly-prop-market-vol {
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-muted, #737373);
    white-space: nowrap;
}

.poly-prop-market-pct {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-primary);
    white-space: nowrap;
    text-align: center;
    justify-self: center;
}

.poly-prop-market-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    justify-self: end;
}

.poly-prop-buy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 34px;
    min-height: 34px;
    padding: 0 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.poly-prop-buy-yes {
    background: rgba(34, 197, 94, 0.18);
    color: #22c55e;
}

.poly-prop-buy-no {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.poly-prop-buy-label {
    white-space: nowrap;
}

.poly-prop-buy-full {
    display: none;
}

@media (min-width: 480px) {
    .poly-prop-market-icon-wrap,
    .poly-prop-market-icon,
    .poly-prop-market-icon-fallback {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .poly-prop-market-name {
        font-size: 1rem;
    }

    .poly-prop-buy-btn {
        height: 38px;
        min-height: 38px;
        padding: 0 12px;
        font-size: 0.8rem;
    }

    .poly-prop-buy-short {
        display: none;
    }

    .poly-prop-buy-full {
        display: inline;
    }
}

@media (min-width: 900px) {
    .poly-prop-market-pct {
        font-size: 1.75rem;
    }

    .poly-prop-buy-btn {
        height: 44px;
        min-height: 44px;
        padding: 0 16px;
        font-size: 0.9rem;
    }
}

.poly-event-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.poly-event-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
}

.poly-event-tab.active {
    background: var(--accent-soft);
    color: var(--text-primary);
}

.poly-event-tab-panel {
    margin-bottom: 24px;
}

.poly-market-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.poly-market-vol {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.poly-comments-section .poly-section-header {
    flex-wrap: wrap;
    gap: 8px 16px;
}

.poly-comments-source {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
}

.poly-comments-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.poly-comment {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.poly-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.poly-comment-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    box-sizing: border-box;
    background: var(--accent-soft, rgba(99, 102, 241, 0.2));
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    padding: 0;
}

.cab-club-av-wrap.cab-avatar-club {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 36px;
    height: 42px;
    overflow: visible;
    background: transparent;
    border-radius: 0;
}
.cab-club-av-wrap.cab-avatar-club .cab-avatar-club-inner {
    position: absolute;
    inset: 9% 12% 9% 12%;
    display: grid;
    place-items: center;
    overflow: hidden;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    -webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--bg-elevated, #1c2128);
}
.cab-club-av-wrap.cab-avatar-club .cab-avatar-club-inner .poly-comment-avatar,
.cab-club-av-wrap.cab-avatar-club .cab-avatar-club-inner .pp-comment-avatar {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: block;
    object-fit: cover;
}
.cab-club-av-wrap.cab-avatar-club .cab-avatar-club-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}

.poly-comment-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.poly-comment-head {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
}

.poly-comment-author {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poly-comment-time {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.poly-comment-text {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary, #cbd5e1);
    word-break: break-word;
}

.poly-comments-more {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 10px 16px;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

/* ── Demo balance bar ── */
.pm-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pm-demo-bar {
    display: none;
    align-items: baseline;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--pm-input-bg);
    font-size: 0.85rem;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .pm-demo-bar {
        display: flex;
    }
}

.pm-demo-label {
    color: var(--pm-text-tertiary);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pm-demo-balance {
    color: var(--pm-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pm-demo-user {
    color: var(--pm-text-secondary);
    font-size: 0.78rem;
}

.pm-refresh-bets {
    border: none;
    background: var(--pm-input-bg);
    color: var(--pm-text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.pm-refresh-bets:hover {
    background: var(--pm-input-hover);
    color: var(--pm-text);
}

.pm-my-bets-section .poly-bets-table th,
.pm-my-bets-section .poly-bets-table td {
    color: var(--pm-text);
    border-color: var(--pm-border);
}

.pm-my-bets-section .poly-bets-table th {
    color: var(--pm-text-secondary);
}

/* ── Game page layout (Polymarket CS2 style) ── */
.pm-layout-game {
    max-width: 1400px;
}

.pm-game-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

@media (min-width: 1024px) {
    .pm-game-layout {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }
}

.pm-sidebar {
    display: none;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 72px;
}

@media (min-width: 1024px) {
    .pm-sidebar {
        display: flex;
    }
}

.pm-sidebar-game {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--pm-text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.pm-sidebar-game:hover {
    background: var(--pm-input-bg);
    color: var(--pm-text);
}

.pm-sidebar-game.is-active {
    background: var(--pm-input-bg);
    color: var(--pm-text);
    font-weight: 600;
}

.pm-sidebar-game-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pm-sidebar-game-label {
    flex: 1;
    min-width: 0;
}

.pm-sidebar-game-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--pm-text-tertiary);
}

.pm-game-pills-mobile {
    display: block;
}

@media (min-width: 1024px) {
    .pm-game-pills-mobile {
        display: none;
    }
}

.pm-game-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-game-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--pm-border);
    padding-bottom: 0;
}

.pm-game-tab {
    display: inline-block;
    padding: 0 0 12px;
    margin-bottom: -1px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--pm-text-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.pm-game-tab:hover {
    color: var(--pm-text-tertiary);
}

.pm-game-tab.is-active {
    color: var(--pm-text);
    border-bottom-color: var(--pm-text);
}

.pm-tab-panel[hidden] {
    display: none !important;
}

.pm-match-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pm-match-row {
    position: relative;
    padding: 16px 0;
    border-bottom: 1px solid var(--pm-border);
}

.pm-match-row.is-hidden {
    display: none;
}

.pm-match-row-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pm-match-row-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 32px;
    margin-bottom: 12px;
    pointer-events: none;
}

.pm-match-row-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    flex-wrap: wrap;
}

.pm-match-row-crumbs {
    display: none;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .pm-match-row-crumbs {
        display: flex;
    }
}

.pm-crumb {
    color: var(--pm-text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.pm-crumb:hover {
    color: var(--pm-text-tertiary);
}

.pm-crumb-static {
    color: var(--pm-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-crumb-sep {
    color: var(--pm-text-tertiary);
}

.pm-match-row-vol {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.pm-row-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    white-space: nowrap;
}

.pm-match-row-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.pm-match-row-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.pm-row-team {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pm-row-team-main {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 24px 24px 24px auto;
    align-items: center;
    gap: 8px;
}

@media (min-width: 640px) {
    .pm-row-team-main {
        grid-template-columns: 28px minmax(0, 1fr) 28px 28px 28px;
    }
}

.pm-row-logo-wrap {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.pm-row-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.pm-row-logo-fallback {
    display: block;
    background: var(--pm-bar-track);
    border-radius: 4px;
}

.pm-row-team-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pm-text);
    text-decoration: none;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: auto;
}

.pm-row-team-name:hover {
    text-decoration: underline;
}

.pm-row-record,
.pm-row-score,
.pm-row-map {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
    .pm-row-record,
    .pm-row-score,
    .pm-row-map {
        display: none;
    }
}

.pm-row-bar {
    height: 3px;
    border-radius: 999px;
    background: var(--pm-bar-track);
    overflow: hidden;
}

.pm-row-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--bar-color, #9d9595);
    transition: width 0.3s ease;
}

.pm-row-mobile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

@media (min-width: 640px) {
    .pm-row-mobile-btn {
        display: none;
    }
}

.pm-row-mobile-odds {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
    font-variant-numeric: tabular-nums;
}

.pm-row-trade-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 60px;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: color-mix(in srgb, var(--team-color, #9d9595) 18%, transparent);
    color: var(--team-color, #9d9595);
    font-weight: 700;
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.15s;
}

.pm-row-trade-btn:hover {
    opacity: 0.85;
}

.pm-match-row-actions {
    display: none;
    gap: 8px;
    pointer-events: auto;
}

@media (min-width: 640px) {
    .pm-match-row-body {
        flex-direction: row;
        align-items: stretch;
    }

    .pm-match-row-actions {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        width: 200px;
        flex-shrink: 0;
    }
}

.pm-row-trade-btn-lg {
    flex: 1;
    min-height: 44px;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    padding: 0 12px;
    font-size: 0.85rem;
}

.pm-row-trade-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.85;
    font-weight: 600;
}

.pm-row-trade-price {
    font-weight: 700;
    flex-shrink: 0;
}

.pm-match-row .pm-live-badge {
    pointer-events: none;
}

/* ── Event detail page (Polymarket match view) ── */
.pm-event-layout {
    max-width: 1400px;
}

.pm-event-game-layout {
    align-items: start;
}

.pm-event-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-event-top {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pm-event-nav {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.pm-event-top-left {
    flex: 1;
    min-width: 0;
}

.pm-event-back {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    text-decoration: none;
}

.pm-event-back:hover {
    color: var(--pm-text);
}

.pm-game-layout.is-sidebar-hidden .pm-sidebar,
.pm-event-game-layout.is-sidebar-hidden .pm-sidebar {
    display: none !important;
}

.pm-game-layout.is-sidebar-hidden,
.pm-event-game-layout.is-sidebar-hidden {
    grid-template-columns: 1fr;
}

.pm-event-page .pp-comments {
    margin-top: 8px;
}

.wl-esports-block {
    margin: 0 0 18px;
}
.wl-esports-title {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pm-text, #fff);
}
.wl-esports-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.wl-esports-row a {
    color: inherit;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}
.wl-esports-row b {
    display: block;
    font-size: 0.95rem;
}
.wl-esports-row small {
    color: #9aa3af;
    font-size: 0.8rem;
}
.wl-esports-remove {
    border: 0;
    background: transparent;
    color: #9aa3af;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 8px;
}
.wl-esports-remove:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.pm-event-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pm-event-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pm-event-crumbs {
    font-size: 0.82rem;
    font-weight: 600;
}

.pm-event-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pm-event-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--pm-text);
    line-height: 1.2;
}

@media (min-width: 640px) {
    .pm-event-title {
        font-size: 1.75rem;
    }
}

.pm-event-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
    font-variant-numeric: tabular-nums;
}

.pm-event-map-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pm-event-map-pill {
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--pm-border);
    border-radius: 8px;
    background: transparent;
    color: var(--pm-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pm-event-map-pill:hover {
    background: var(--pm-input-bg);
    color: var(--pm-text);
}

.pm-event-map-pill.is-active {
    background: var(--pm-text);
    border-color: var(--pm-text);
    color: var(--pm-bg);
}

.pm-event-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.pm-event-team-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 28px 28px 28px;
    align-items: center;
    gap: 8px;
}

.pm-event-team-logo-wrap {
    width: 32px;
    height: 32px;
}

.pm-event-team-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.pm-event-team-logo-fallback {
    display: block;
    background: var(--pm-bar-track);
    border-radius: 4px;
}

.pm-event-team-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--pm-text);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-event-team-record,
.pm-event-team-stat,
.pm-event-team-score {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
    opacity: 0.65;
    font-variant-numeric: tabular-nums;
}

.pm-event-team-bar {
    height: 3px;
    border-radius: 999px;
    background: var(--pm-bar-track);
    overflow: hidden;
    margin-top: 4px;
}

.pm-event-team-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--bar-color, #9d9595);
    transition: width 0.3s ease;
}

.pm-event-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
}

.pm-event-period {
    color: var(--pm-live);
}

.pm-event-vol {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.pm-event-view-tabs {
    display: flex;
    gap: 16px;
    border-bottom: 1px solid var(--pm-border);
}

.pm-event-view-tab {
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: -1px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    border-bottom: 2px solid transparent;
}

.pm-event-view-tab.is-active {
    color: var(--pm-text);
    border-bottom-color: var(--pm-text);
}

/* Chart on event page — keep structure, apply PM tokens */
.pm-event-main .poly-chart-panel {
    background: var(--pm-card-bg);
    border: 1px solid var(--pm-card-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
}

.pm-event-main .poly-chart-legend,
.pm-event-main .poly-chart-legend-item {
    color: var(--pm-text);
}

.pm-event-main .poly-chart-range {
    border-color: var(--pm-border);
    background: var(--pm-input-bg);
    color: var(--pm-text-secondary);
}

.pm-event-main .poly-chart-range.active {
    background: var(--pm-text);
    color: var(--pm-bg);
    border-color: var(--pm-text);
}

.pm-event-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-margin-top: 80px;
}

.pm-event-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pm-text);
}

.pm-event-markets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-event-market {
    border: 1px solid var(--pm-border);
    border-radius: 12px;
    background: var(--pm-card-bg);
    overflow: hidden;
}

.pm-event-market-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

@media (min-width: 490px) {
    .pm-event-market-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.pm-event-market-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pm-event-market-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pm-text);
    white-space: nowrap;
}

.pm-event-market-vol {
    margin: 0;
    font-size: 0.75rem;
    color: var(--pm-text-secondary);
    white-space: nowrap;
}

.pm-event-market-btns {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 258px;
}

@media (min-width: 490px) {
    .pm-event-market-btns {
        flex-shrink: 0;
        justify-content: flex-end;
    }
}

.pm-event-trade-btn {
    flex: 1;
    min-width: 0;
    max-width: 125px;
    height: 39px;
    min-height: 39px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: var(--btn-color, #5A5A5A);
    color: #fff;
    font-family: inherit;
    line-height: 21px;
    cursor: pointer;
    box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
    transition: opacity 0.15s, transform 0.1s;
}

.pm-event-trade-btn.is-faded {
    opacity: 0.65;
}

.pm-event-trade-btn:hover {
    opacity: 0.92;
}

.pm-event-trade-btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.pm-event-trade-abbr {
    opacity: 0.7;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15px;
    line-height: 21px;
}

.pm-event-trade-cents {
    flex-shrink: 0;
    margin-left: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 21px;
}

/* Comments block on event page */
.pm-event-page .poly-comments-section {
    margin-top: 8px;
}

.pm-event-page .poly-comments-section .poly-section-header h2,
.pm-event-page .poly-section-title {
    color: var(--pm-text);
}

.pm-event-page .poly-comment-text {
    color: var(--pm-text-secondary);
}

.pm-event-page .poly-comment-author {
    color: var(--pm-text);
}

.pm-event-page .poly-comment-time {
    color: var(--pm-text-tertiary);
}

/* ── Sticky trade plaque (Polymarket-style) ── */
.pm-event-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.pm-event-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1100px) {
    .pm-event-body {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
    }
}

.pm-trade-plaque {
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
    position: relative;
    z-index: 5;
}

@media (min-width: 1100px) {
    .pm-trade-plaque {
        position: sticky;
        top: 72px;
        margin-inline: 0;
        justify-self: end;
    }
}

.pm-tp-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    border-radius: 12px;
    background: var(--pm-card-bg);
    border: 1px solid var(--pm-card-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .pm-tp-inner {
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.pm-tp-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pm-tp-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.pm-tp-icon-img {
    width: auto;
    height: 40px;
    max-width: 40px;
    object-fit: contain;
}

.pm-tp-icon-fallback {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--pm-input-bg);
}

.pm-tp-head-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.pm-tp-match {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-tp-pick {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-tp-nav {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pm-border);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

.pm-tp-sides {
    display: flex;
    gap: 12px;
}

.pm-tp-side {
    position: relative;
    background: transparent;
    border: 0;
    padding: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--pm-text-secondary);
    cursor: pointer;
    font-family: inherit;
}

.pm-tp-side:hover {
    color: var(--pm-text-tertiary);
}

.pm-tp-side.is-active {
    color: var(--pm-text);
}

.pm-tp-side.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    background: var(--pm-text);
}

.pm-tp-market-wrap {
    position: relative;
}

.pm-tp-market-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    max-width: 90px;
    background: transparent;
    border: 0;
    padding: 0 0 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--pm-text);
    cursor: pointer;
    font-family: inherit;
    text-transform: capitalize;
}

.pm-tp-market-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-tp-market-btn svg {
    flex-shrink: 0;
    color: var(--pm-text-tertiary);
    transition: transform 0.2s;
}

.pm-tp-market-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.pm-tp-market-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 120px;
    padding: 6px;
    border-radius: 10px;
    background: var(--pm-card-bg);
    border: 1px solid var(--pm-card-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    z-index: 20;
}

.pm-tp-market-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--pm-text);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.pm-tp-market-item:hover {
    background: var(--pm-input-bg);
}

.pm-tp-market-item.is-active {
    background: var(--pm-input-hover);
}

.pm-tp-outcomes {
    display: flex;
    gap: 12px;
    width: 100%;
}

.pm-tp-outcome {
    flex: 1 1 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--pm-card-border);
    background: transparent;
    color: var(--pm-text);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.pm-tp-outcome:hover {
    background: var(--pm-input-bg);
}

.pm-tp-outcome.is-selected {
    background: #414141;
    border-color: #414141;
    color: #fff;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .pm-tp-outcome.is-selected {
    background: #414141;
    color: #fff;
}

.pm-tp-outcome-abbr {
    font-size: 0.94rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.85;
    line-height: 1.2;
}

.pm-tp-outcome.is-selected .pm-tp-outcome-abbr {
    opacity: 0.7;
}

.pm-tp-outcome-cents {
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pm-tp-amount-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.pm-tp-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pm-tp-amount-label {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--pm-text);
}

.pm-tp-amount-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.pm-tp-amount-input {
    width: 100%;
    max-width: 180px;
    border: 0;
    background: transparent;
    outline: none;
    text-align: right;
    font-size: 2.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--pm-text);
    font-family: inherit;
    padding: 0;
    height: 48px;
}

.pm-tp-amount-input::placeholder {
    color: var(--pm-text-tertiary);
}

.pm-tp-quick {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
}
.pm-tp-quick[hidden] {
    display: none !important;
}

.pm-tp-quick-btn,
.pm-tp-pct-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--pm-card-border);
    background: var(--pm-btn-neutral-bg);
    color: var(--pm-text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.12s, background 0.15s;
}

.pm-tp-quick-btn:hover,
.pm-tp-pct-btn:hover {
    background: var(--pm-input-hover);
    color: var(--pm-text);
}

.pm-tp-quick-btn:active,
.pm-tp-pct-btn:active {
    transform: scale(0.97);
}

.pm-tp-you-shares {
    margin: 4px 0 0;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
}

.pm-tp-you-shares strong {
    color: var(--pm-text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.pm-trade-plaque[data-side="sell"] .pm-tp-amount-input {
    font-size: 2rem;
}

.pm-tp-locked {
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.pm-tp-locked-title {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f59e0b;
}

.pm-tp-locked-text {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--pm-text-secondary);
}

.pm-tp-locked-text strong {
    color: var(--pm-text);
}

.pm-trade-plaque.is-trading-locked .pm-tp-limit-block,
.pm-trade-plaque.is-trading-locked .pm-tp-amount-block,
.pm-trade-plaque.is-trading-locked .pm-tp-win,
.pm-trade-plaque.is-trading-locked .pm-tp-trade {
    display: none !important;
}

.pm-tp-limit-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-tp-limit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pm-tp-limit-label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--pm-text);
}

.pm-tp-limit-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-tp-limit-step {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--pm-card-border);
    background: var(--pm-btn-neutral-bg);
    color: var(--pm-text);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    line-height: 1;
}

.pm-tp-limit-step:hover {
    background: var(--pm-input-hover);
}

.pm-tp-limit-input {
    width: 64px;
    border: 0;
    background: transparent;
    outline: none;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--pm-text);
    font-family: inherit;
    padding: 0;
}

.pm-tp-win {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--pm-border);
}

.pm-tp-win-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pm-tp-win-label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--pm-text);
}

.pm-tp-win-cash {
    color: #22c55e;
    flex-shrink: 0;
}

.pm-tp-win-avg {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--pm-text-secondary);
}

.pm-tp-win-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--pm-text-tertiary);
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    color: var(--pm-text-tertiary);
    line-height: 1;
    cursor: help;
}

.pm-tp-win-value {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: #22c55e;
    line-height: 1.1;
    white-space: nowrap;
}

.pm-tp-error {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
    color: #f59e0b;
    text-align: center;
}

.pm-tp-trade {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.2);
    transition: background 0.15s, transform 0.12s, filter 0.15s;
}

.pm-tp-trade:hover {
    background: #1d4ed8;
}

.pm-tp-trade:active {
    transform: translateY(1px);
}

.pm-tp-trade:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pm-tp-trade.is-sell {
    background: #dc2626;
}

.pm-tp-trade.is-sell:hover {
    background: #b91c1c;
}

@media (max-width: 1099px) {
    .pm-trade-plaque {
        order: -1;
        max-width: none;
    }
}
