.dcn-live-wrap {
    --dcn-bg: #020617;
    --dcn-panel: #07111f;
    --dcn-panel-2: #0b1628;
    --dcn-line: #1e334d;
    --dcn-muted: #94a3b8;
    --dcn-blue: #38bdf8;
    --dcn-green: #22c55e;
    --dcn-red: #ef4444;
    --dcn-amber: #facc15;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #1e293b;
    border-radius: 18px;
    background: var(--dcn-bg);
    color: #f8fafc;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
}

.dcn-live-wrap *, .dcn-live-wrap *::before, .dcn-live-wrap *::after { box-sizing: border-box; }
.dcn-live-silk svg { display: block !important; width: 100% !important; height: 100% !important; }
.dcn-live-title { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); font-weight: 900; letter-spacing: -.03em; }
.dcn-live-sub { margin-bottom: 18px; color: var(--dcn-muted); }

.dcn-info-tip, .dcn-mini-tip {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border: 1px solid var(--dcn-blue);
    border-radius: 50%;
    color: var(--dcn-blue);
    font-size: 11px;
    line-height: 1;
    cursor: help;
}
/* Make race headers stack cleanly and look professional on mobile */
@media (max-width: 768px) {
    .dcn-live-wrap div[style*="font-size:36px"] {
        font-size: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    
    .dcn-live-wrap div[style*="font-size:36px"] span[style*="font-size:28px"] {
        font-size: 18px !important;
        flex-wrap: wrap !important;
    }
}
.dcn-search-row, .dcn-filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.dcn-search-row input, .dcn-filter-row input, .dcn-filter-row select {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #334155;
    border-radius: 10px;
    background: #020617;
    color: #fff;
}
.dcn-search-row input[type="text"] { width: min(100%, 320px); }
.dcn-filter-row input[type="number"] { width: 130px; }
.dcn-btn { min-height: 42px; padding: 10px 16px; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 800; cursor: pointer; }
.dcn-btn-secondary { border: 1px solid #334155; background: #0f172a; color: #cbd5e1; }

.dcn-top-grid, .dcn-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.dcn-stat, .dcn-dash-card { padding: 14px; border: 1px solid #1e293b; border-radius: 14px; background: #081121; }
.dcn-stat-label, .dcn-dash-title { margin-bottom: 6px; color: var(--dcn-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.dcn-stat-value { color: #fff; font-size: 22px; font-weight: 900; }
.dcn-dash-title { color: var(--dcn-blue); }
.dcn-dash-horse { color: #fff; font-size: 14px; font-weight: 900; }
.dcn-dash-meta { margin-top: 4px; color: var(--dcn-muted); font-size: 11px; }

.dcn-race-pill {
    display: inline-block;
    margin: 3px;
    padding: 8px 14px;
    border: 1px solid #0ea5e9;
    border-radius: 8px;
    background: #0d1b33;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: .2s ease;
}
.dcn-race-pill:hover { background: #0ea5e9; color: #020617; }
.dcn-race-pill.next-off { border-color: var(--dcn-red); background: #7f1d1d; animation: dcnFlash 1.1s infinite; }
.dcn-race-toggle { width: 100%; margin-top: 18px; padding: 14px 18px; border: 1px solid #1e293b; border-radius: 12px; background: #020617; color: #fff; font-size: 15px; font-weight: 800; text-align: left; cursor: pointer; }

.dcn-table { width: 100%; margin-top: 12px; }
.dcn-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr .8fr 1fr;
    gap: 12px;
    padding: 9px 14px;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.dcn-row {
    display: grid;
    grid-template-columns: minmax(250px, 1.15fr) minmax(255px, 1.05fr) minmax(170px, .72fr) minmax(190px, .78fr);
    grid-template-areas:
        "runner market evidence odds"
        "runner market signal odds"
        "runner outlook outlook timing"
        "insight insight insight insight";
    gap: 12px;
    align-items: stretch;
    margin-bottom: 14px !important;
    padding: 14px !important;
    border: 1px solid rgba(56, 189, 248, .22) !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, rgba(15, 23, 42, .88), rgba(2, 6, 23, .94)) !important;
}
.dcn-row > .dcn-horse { grid-area: runner; }
.dcn-row > .dcn-market-panel { grid-area: market; }
.dcn-row > .dcn-evidence-panel { grid-area: evidence; }
.dcn-row > .dcn-signal-panel { grid-area: signal; }
.dcn-row > .dcn-best-odds-panel { grid-area: odds; }
.dcn-row > .dcn-outlook-panel { grid-area: outlook; }
.dcn-row > .dcn-timing-panel { grid-area: timing; }
.dcn-row > [style*="grid-column:1 / -1"] { grid-area: insight; }

.dcn-row > .dcn-horse,
.dcn-market-panel,
.dcn-evidence-panel,
.dcn-signal-panel,
.dcn-best-odds-panel,
.dcn-outlook-panel,
.dcn-timing-panel {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(51, 65, 85, .72);
    border-radius: 12px;
    background: rgba(2, 6, 23, .62);
}

.dcn-panel-label {
    display: block;
    margin-bottom: 8px;
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.dcn-horse a { color: #fff; font-size: 19px; font-weight: 900; line-height: 1.15; text-decoration: none; }
.dcn-horse a:hover { color: var(--dcn-blue); }
.dcn-horse-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; color: var(--dcn-muted); font-size: 12px; }

.dcn-bar-wrap { position: relative; height: 10px; overflow: hidden; border: 1px solid #1e293b; border-radius: 999px; background: #0f172a; }
.dcn-bar { height: 100%; border-radius: 999px; }
.dcn-price-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 7px; color: #9fb0c8; font-size: 12px; line-height: 1.45; }
.dcn-price-line strong { color: #dbeafe; }
.dcn-price-now {
    display: inline-block !important;
    min-width: 72px;
    margin: 0 !important;
    padding: 7px 10px !important;
    border: 1px solid #60a5fa !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, .28) !important;
    color: #fff !important;
    font-size: 20px !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    text-align: center;
}
.dcn-price { color: #f8fafc !important; font-weight: 800; }
.dcn-arrow { margin: 0 2px; font-weight: 900; }
.dcn-arrow.up { color: var(--dcn-green) !important; }
.dcn-arrow.down { color: var(--dcn-red) !important; }
.dcn-arrow.flat { color: #64748b !important; }

.dcn-move { color: #fff; font-size: 30px; font-weight: 950; letter-spacing: -.03em; line-height: 1; }
.dcn-positive-evidence { color: #86efac; font-weight: 800; }
.dcn-pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .03em; }
.dcn-signal-steam { border: 1px solid #22c55e; background: #052e16; color: #86efac; }
.dcn-signal-drift { border: 1px solid #ef4444; background: #450a0a; color: #fecaca; }
.dcn-signal-pattern { border: 1px solid #38bdf8; background: #082f49; color: #bae6fd; }
.dcn-signal-neutral { border: 1px solid #475569; background: #111827; color: #cbd5e1; }

.dcn-best-odds-card { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; text-align: center; }
.dcn-best-price { color: #4ade80; font-size: 30px; font-weight: 950; letter-spacing: -.03em; }
.dcn-decimal-reference { margin-top: 4px; color: #64748b; font-size: 10px; }
.dcn-best-bookmaker-name { margin-top: 6px !important; color: #cbd5e1 !important; font-size: 11px !important; }
.dcn-note { color: #cbd5e1; font-size: 12px; line-height: 1.55; }

.dcn-limited-data {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 8px;
    border: 1px solid #a16207;
    border-radius: 7px;
    background: rgba(113, 63, 18, .3);
    color: #fde68a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
}
.dcn-yard-warning, .dcn-yard-note { margin-top: 7px; padding: 8px 9px; border-left: 3px solid var(--dcn-red); border-radius: 5px; background: rgba(127, 29, 29, .22); color: #fecaca; font-size: 11px; font-weight: 750; line-height: 1.45; }
.dcn-yard-note { border-left-color: var(--dcn-blue); background: rgba(8, 47, 73, .25); color: #bae6fd; }
.dcn-course-form { margin: 10px 0; padding: 10px; border-left: 3px solid var(--dcn-green); border-radius: 6px; background: #071425; color: #dbeafe; font-size: 12px; line-height: 1.5; }
.dcn-course-form strong { color: #86efac; }
.dcn-course-limited { border-left-color: var(--dcn-amber); }
.dcn-course-limited strong { color: #fde68a; }

.dcn-mini-market-profile { margin-top: 10px !important; padding: 10px !important; }
.dcn-going-soon { display: inline-block; padding: 3px 8px; border-radius: 6px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 900; animation: dcnFlash 1s infinite; }
.dcn-action-badge { display: inline-block; margin-left: 8px; padding: 3px 8px; border-radius: 6px; font-size: 10px; font-weight: 900; }
.dcn-action-back { background: #16a34a; color: #fff; }
.dcn-action-watch { background: #facc15; color: #111827; }
.dcn-action-avoid { background: #dc2626; color: #fff; }

.dcn-tip, .dcn-price-tip, .dcn-history-tip { position: relative; cursor: help; border-bottom: 1px dotted rgba(255,255,255,.35); }
.dcn-tip-box, .dcn-price-tip-box, .dcn-history-popup, .dcn-mini-tip-box {
    position: absolute;
    left: 0;
    bottom: 125%;
    z-index: 9999;
    width: 250px;
    padding: 10px 12px;
    border: 1px solid #334155;
    border-radius: 9px;
    background: #020617;
    box-shadow: 0 12px 28px rgba(0,0,0,.48);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(5px);
    transition: .18s ease;
}
.dcn-tip:hover .dcn-tip-box, .dcn-price-tip:hover .dcn-price-tip-box, .dcn-history-tip:hover .dcn-history-popup, .dcn-mini-tip:hover .dcn-mini-tip-box { opacity: 1; visibility: visible; transform: translateY(0); }
.dcn-mini-tip-box { top: 24px; bottom: auto; }

.dcn-alerts, .dcn-price-leaders { margin: 18px 0 22px; }
.dcn-alert-title, .dcn-price-title { margin-bottom: 10px; color: #fff; font-size: 15px; font-weight: 900; }
.dcn-alert { margin-bottom: 8px; padding: 12px 14px; border: 1px solid #ef4444; border-radius: 12px; background: #7f1d1d; color: #fff; }
.dcn-alert-green { border-color: #22c55e; background: #052e16; }
.dcn-alert small { display: block; margin-top: 4px; color: #fecaca; font-size: 11px; }
.dcn-alert-green small { color: #86efac; }
.dcn-price-leaders { padding: 18px; border: 1px solid #1f2937; border-radius: 12px; background: #111827; }
.dcn-price-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 14px; }
.dcn-price-row:last-child { border-bottom: 0; }
.dcn-price-row strong { color: var(--dcn-green); }

.dcn-detail { margin-top: 26px; padding-top: 22px; border-top: 1px solid #1e293b; }
.dcn-detail-title { margin-bottom: 6px; color: #fff; font-size: 24px; font-weight: 900; }
.dcn-detail-sub { margin-bottom: 14px; color: var(--dcn-muted); font-size: 13px; }
.dcn-ladder { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.dcn-ladder-box { padding: 12px; border: 1px solid #1e293b; border-radius: 12px; background: #081121; text-align: center; }
.dcn-ladder-label { margin-bottom: 6px; color: var(--dcn-muted); font-size: 11px; }
.dcn-ladder-value { color: #fff; font-size: 18px; font-weight: 900; }
.dcn-empty { padding: 16px 0; color: var(--dcn-muted); }

.dcn-flash-up { animation: dcnFlashUp .7s ease; }
.dcn-flash-down { animation: dcnFlashDown .7s ease; }
@keyframes dcnFlashUp { 0% { background: #16a34a; } 100% { background: transparent; } }
@keyframes dcnFlashDown { 0% { background: #dc2626; } 100% { background: transparent; } }
@keyframes dcnFlash { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes dcnRedFlash { 0% { box-shadow: 0 0 4px rgba(239,68,68,.2); } 100% { box-shadow: 0 0 16px rgba(239,68,68,.65); } }

@media (max-width: 1180px) {
    .dcn-head { display: none; }
    .dcn-row {
        grid-template-columns: minmax(240px, 1fr) minmax(250px, 1fr) minmax(190px, .8fr);
        grid-template-areas:
            "runner market odds"
            "runner evidence signal"
            "outlook outlook timing"
            "insight insight insight";
    }
}

@media (max-width: 820px) {
    .dcn-live-wrap { padding: 14px; border-radius: 12px; }
    .dcn-top-grid, .dcn-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dcn-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "runner runner"
            "market odds"
            "evidence signal"
            "outlook outlook"
            "timing timing"
            "insight insight";
    }
}

@media (max-width: 560px) {
    .dcn-live-wrap { padding: 10px; }
    .dcn-top-grid, .dcn-dashboard, .dcn-ladder { grid-template-columns: 1fr 1fr; }
    .dcn-row {
        grid-template-columns: 1fr;
        grid-template-areas: "runner" "odds" "market" "evidence" "signal" "outlook" "timing" "insight";
        padding: 10px !important;
    }
    .dcn-row > .dcn-horse, .dcn-market-panel, .dcn-evidence-panel, .dcn-signal-panel, .dcn-best-odds-panel, .dcn-outlook-panel, .dcn-timing-panel { padding: 11px; }
    .dcn-best-price { font-size: 34px; }
    .dcn-tip-box, .dcn-price-tip-box, .dcn-history-popup { position: fixed; left: 12px; right: 12px; bottom: 14px; width: auto; }
}
