/* ===== Variables & Theme Defaults (Mirrored from games.css) ===== */
:root {
    --ept-text-muted: #6b7280;
    --ept-text: #111827;
    --ept-bg: #ffffff;
    --ept-bg-alt: #f3f4f6;
    --ept-border: #e5e7eb;
}

:root[data-theme="dark"],
html.theme-dark,
body.theme-dark {
    --ept-text-muted: #9ca3af;
    --ept-text: #f9fafb;
    --ept-bg: #1f2937;
    --ept-bg-alt: #374151;
    --ept-border: #4b5563;
}

/* Minimal tournament UI spacing helpers */
#ept-structure hr{ margin:14px 0; }
#ept-structure .ept-structure{ padding-bottom:8px; }
#ept-structure #ept-setup{ margin-top:10px; }
#ept-structure #ept-assign{ margin-top:14px; }
#ept-structure details > summary{ list-style: none; }
#ept-structure details > summary::-webkit-details-marker{ display:none; }

/* ============================================
   SCORE ENTRY PAGE: HEADER (TITLE / VENUE / DATE)
   ============================================ */
.ept-score-entry-page .ept-score-entry-header{ margin: 0 0 12px 0; }
.ept-score-entry-page .ept-score-entry-header .ep-align-centerline{ text-align:center; }
.ept-score-entry-page .ept-score-entry-datetime{
    text-align: center;
    color: var(--ept-text-muted);
    font-size: 0.95rem;
    margin-top: 4px;
}
.ept-score-entry-page .ept-score-entry-title{
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ept-text);
}

/* Score Entry shapes (gross vs par) — subtle on screen; bold B&W handled in print CSS */
.ept-score-shape{ position: relative; }
.ept-shape-circle{ border-radius:999px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.6); }
.ept-shape-circle.double{ box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 4px rgba(0,0,0,.6); }
.ept-shape-square{ box-shadow: inset 0 0 0 2px rgba(0,0,0,.6); }
.ept-shape-square.double{ box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 4px rgba(0,0,0,.6); }
.ept-shape-square.triple{ box-shadow: inset 0 0 0 2px rgba(0,0,0,.6), inset 0 0 0 4px rgba(0,0,0,.6), inset 0 0 0 6px rgba(0,0,0,.6); }

/* ============================================
   SCORE ENTRY TABLE STYLES
   ============================================ */

/* Scramble Name Fix */
.ept-scramble-name {
    white-space: nowrap !important;
}
.ept-scramble-players {
    white-space: nowrap !important;
}

/* Score Entry Wrapper */
.ept-se-wrap {
    width: calc(100% + 32px);
    margin-left: -16px;
    margin-right: -16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 85vh;
    min-height: 500px;
    border: 1px solid var(--ept-border);
    border-radius: 0;
    background: var(--ept-bg-alt);
    position: relative;
}

@media (max-width: 768px) {
    .ept-se-wrap {
        min-height: 40vh; /* Allow smaller height on mobile */
    }

    /* Tighten player/team column on mobile */
    .ept-tr-table th.ept-tr-header-col,
    .ept-tr-table td.ept-tr-player-col {
        width: 90px;
        min-width: 70px;
        max-width: 100px;
        padding: 3px 4px;
        font-size: 11px;
    }

    /* Reduce table min-width so scores are visible */
    .ept-se-table,
    .ept-tr-table {
        min-width: 480px;
    }

    /* Compact score cells on mobile */
    .ept-tr-table th,
    .ept-tr-table td {
        padding: 4px 0;
        font-size: 11px;
    }

    .ept-tr-score-cell {
        width: 30px;
        min-width: 28px;
    }

    .ept-tr-subtotal,
    .ept-tr-total {
        width: 34px;
        min-width: 30px;
    }

    /* Compact score indicators on mobile */
    .ept-tr-table .eps-score-display {
        font-size: 11px;
    }

    .ept-tr-table .eps-score-display-wrapper {
        width: 22px;
        height: 22px;
        line-height: 22px;
    }
}

/* Score Entry Table */
.ept-se-table,
.ept-tr-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--ept-bg);
    color: var(--ept-text);
}

/* Sticky Headers - Highest Z-Index */
.ept-se-table thead,
.ept-tr-table thead {
    /* Sticky moved to th for better browser support */
    z-index: 50;
    background: var(--ept-bg);
}

.ept-se-table thead th,
.ept-tr-table thead th {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ept-bg); /* Ensure background is opaque */
    border-bottom: 1px solid var(--ept-border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Sticky First Column */
.ept-se-table th.left,
.ept-se-table td.left,
.ept-tr-table th.ept-tr-header-col,
.ept-tr-table td.ept-tr-player-col {
    position: sticky;
    left: 0;
    z-index: 10;
    background: var(--ept-bg-alt);
    border-right: 1px solid var(--ept-border);
    width: 140px;
    min-width: 100px;
    max-width: 160px;
    padding: 4px 6px;
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ept-se-table thead th.left,
.ept-tr-table thead th.ept-tr-header-col {
    z-index: 60;
    background: var(--ept-bg);
}

/* Table Cells */
.ept-se-table th,
.ept-se-table td,
.ept-tr-table th,
.ept-tr-table td {
    border-right: 1px solid var(--ept-border);
    border-bottom: 1px solid var(--ept-border);
    padding: 8px 0;
    font-size: 13px;
    text-align: center;
    color: var(--ept-text);
    box-sizing: border-box;
}

/* Reduced padding for hole cells to allow larger inputs */
.ept-se-table td.col-hole {
    padding: 2px 1px;
}

/* Force vertical alignment and remove padding for results holes to fix centering */
.ept-tr-table .col-hole {
    padding: 0;
    vertical-align: middle;
}

.ept-se-table th {
    font-weight: 700;
    color: var(--ept-text);
    height: 40px;
    background-color: var(--ept-bg);
}

/* Column Widths */
.ept-se-table th.col-player,
.ept-se-table td.col-player {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    padding: 8px 4px 8px 16px;
    font-weight: 600;
    white-space: nowrap;
    text-align: left;
}

.ept-se-table th.col-hole,
.ept-se-table td.col-hole {
    width: 45px;
    min-width: 45px;
    max-width: 45px;
}

.ept-se-table th.col-total,
.ept-se-table td.col-total {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    font-weight: 700;
}

.ept-se-table td.col-total {
    vertical-align: middle;
}

.ept-se-table tr:nth-child(even) td {
    background-color: var(--ept-bg);
}

.ept-se-table tr:nth-child(even) td.left {
    background-color: var(--ept-bg-alt);
}

/* Input Fields */
.ept-se-table input {
    width: 100%;
    height: 100%;
    min-height: 42px;
    text-align: center;
    border: 1px solid transparent;
    background: rgba(127, 127, 127, 0.1);
    font-weight: 700;
    color: var(--ept-text);
    font-size: 16px;
    padding: 0;
    border-radius: 4px;
}

.ept-se-table input::placeholder {
    color: var(--ept-text-muted);
    opacity: 0.6;
}

.ept-se-table input:hover {
    background: rgba(127, 127, 127, 0.15);
    border-color: var(--ept-border);
}

.ept-se-table input:focus {
    border-color: #3b82f6;
    background: var(--ept-bg);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
    color: var(--ept-text);
}

/* Group Headers */
.ept-grp-hdr {
    background: var(--ept-bg-alt) !important;
    color: var(--ept-text) !important;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    position: relative;
    z-index: 5;
}

.ept-grp-hdr td {
    text-align: left;
    padding-left: 16px;
    background: var(--ept-bg-alt) !important;
    border-bottom: 1px solid var(--ept-border);
}



/* ============================================
   KEYPAD & TOOLBAR STYLES
   ============================================ */

.ept-se-toolbar {
    padding: 10px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    position: sticky;
    top: 0;
    z-index: 60; /* Above table headers */
}
.ept-toggle-keypad {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
    color: #475569;
}

/* Keypad Mode Active Styles */
.ept-keypad-mode .ept-se-table input {
    cursor: pointer;
    caret-color: transparent; /* Hide cursor in keypad mode */
}
.ept-se-table input.ept-keypad-active {
    background-color: #dbeafe !important;
    border-color: #3b82f6 !important;
    outline: 2px solid #3b82f6;
    color: #1e40af !important;
    font-weight: 700;
}

/* Keypad Mode Wrap Spacing */
.ept-keypad-mode.ept-se-wrap {
    padding-bottom: 320px; /* Space for keypad */
}

/* Mobile Keypad Panel - Floating Style */
.ept-mobile-keypad {
    position: fixed;
    bottom: 20px;
    bottom: max(20px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 95vw;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    /* [FIX] Prevent flattening on small screens/keyboard open */
    min-height: 320px !important;
    height: auto !important;
}
.ept-keypad-row {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-shrink: 0 !important; /* [FIX] Prevent row squashing */
}
.ept-key {
    flex: 1;
    height: 48px;
    min-height: 48px !important; /* [FIX] Prevent button squashing */
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    touch-action: manipulation;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 0 rgba(0,0,0,0.05);
    transition: all 0.1s;
}
.ept-key:active {
    background: #f1f5f9;
    box-shadow: none;
    transform: translateY(2px);
}
.ept-key-action {
    background: #eff6ff;
    color: #2563eb;
    border-color: #dbeafe;
}
.ept-key-secondary {
    background: #f8fafc;
    color: #64748b;
    font-size: 15px;
    height: 40px; /* shorter row */
    font-weight: 500;
    box-shadow: none;
    border-color: transparent;
}

/* Dark Mode Overrides for Keypad */
.theme-dark .ept-mobile-keypad { background: #1f2937; border-color: #374151; }
.theme-dark .ept-key { background: #374151; border-color: #4b5563; color: #f3f4f6; }
.theme-dark .ept-key:active { background: #4b5563; }
.theme-dark .ept-key-action { background: #1e40af; border-color: #1d4ed8; color: #dbeafe; }
.theme-dark .ept-key-secondary { background: #374151; border-color: #4b5563; color: #9ca3af; }
.theme-dark .ept-se-toolbar { background: #1f2937; border-color: #374151; color: #e5e7eb; }
.theme-dark .ept-toggle-keypad { color: #cbd5e1; }
.theme-dark .ept-se-table input.ept-keypad-active { background-color: #1e3a8a !important; border-color: #60a5fa !important; color: #bfdbfe !important; }

.theme-dark .ept-se-wrap {
    background: #1f2937;
    border-color: #374151;
}

.theme-dark .ept-se-table {
    background: #1f2937;
    border-color: #374151;
    color: #d1d5db;
}

.theme-dark .ept-se-table thead {
    background: #111827;
}

.theme-dark .ept-se-table thead th {
    border-bottom-color: #4b5563;
    background: #111827;
    color: #e5e7eb;
}

.theme-dark .ept-se-table th.left,
.theme-dark .ept-se-table td.left {
    background: #1f2937;
    border-right-color: #4b5563;
}

.theme-dark .ept-se-table thead th.left {
    background: #111827;
}

.theme-dark .ept-se-table th {
    color: #e5e7eb;
    border-right-color: #374151;
    border-bottom-color: #374151;
    background-color: #111827;
}

.theme-dark .ept-se-table td {
    border-right-color: #374151;
    border-bottom-color: #374151;
    color: #d1d5db;
}

.theme-dark .ept-se-table tr:nth-child(even) td {
    background-color: #2d3748;
}

.theme-dark .ept-se-table tr:nth-child(even) td.left {
    background-color: #2d3748;
}

.theme-dark .ept-se-table input {
    color: #f3f4f6;
    background: rgba(255,255,255,0.05);
}

.theme-dark .ept-se-table input:hover {
    background: rgba(255,255,255,0.1);
}

.theme-dark .ept-se-table input:focus {
    background: #374151;
    border-color: #60a5fa;
    color: #fff;
}

.theme-dark .ept-grp-hdr {
    background: #1e3a8a !important;
    color: #5c7fe3 !important;
}

.theme-dark .ept-grp-hdr td {
    background: #1e3a8a !important;
    border-bottom-color: #1e40af;
}

.theme-dark .eps-score-display {
    color: #e5e7eb;
}

/* ============================================
   TOURNAMENT RESULTS (server-rendered)
   ============================================ */

.ept-tr-wrap{
    padding: 10px 0;
    background: #f9fafb;
}
@media (min-width: 769px) {
    .ept-tr-wrap{ padding: 10px; }
}

.ept-tr-header{
    margin-bottom: 18px;
}

.ept-tr-title{
    margin: 0 0 10px;
    font-size: 1.4rem;
    text-align: center;
}

.ept-tr-sub{
    display:block;
    font-size: 0.95rem;
    font-weight: 400;
    color: #6b7280;
    margin-top: 4px;
}

.ept-tr-scores{
    display:flex;
    gap: 16px;
    justify-content:center;
    flex-wrap: wrap;
}

.ept-tr-score{
    padding: 10px 16px;
    background: #dbeafe; /* Blue 100 (was #eff6ff) */
    color: #1e40af;      /* Blue 800 (was #5c7fe3) */
    border-radius: 8px;
    border: 1px solid #93c5fd; /* Blue 300 (was #1e40af) */
    display:flex;
    align-items:baseline;
    gap: 8px;
}

.ept-tr-club{ font-weight: 700; }
.ept-tr-points{ font-size: 1.5rem; font-weight: 900; color: #1e3a8a; }
.ept-tr-score--a .ept-tr-points { color: #f8fafc; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.ept-tr-score--b .ept-tr-points { color: #f8fafc; text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.ept-tr-points-label{ font-weight: 600; }

.ept-tr-empty{
    padding: 20px;
    text-align:center;
    color: #6b7280;
}

.ept-tr-section{
    margin-top: 14px;
}

.ept-tr-section-toggle,
.ept-tr-detail-toggle{
    width: 100%;
    text-align:left;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.ept-tr-section-body{
    margin-top: 10px;
}

.ept-tr-card{
    border: 1px solid var(--ept-border);
    background: var(--ept-bg);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.ept-tr-card-head{
    display:flex;
    justify-content:space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: baseline;
}

.ept-tr-card-title{ font-weight: 700; color: var(--ept-text); }

.ept-tr-card-meta{
    display:flex;
    gap: 10px;
    align-items: center;
}

.ept-tr-status{
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--ept-border);
    background: var(--ept-bg-alt);
    color: var(--ept-text-muted);
}

.ept-tr-status--complete{
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.ept-tr-status--in_progress{
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.ept-tr-points-mini{ font-weight: 800; color: var(--ept-text); }

.ept-tr-result-line{
    margin: 8px 0;
    color: var(--ept-text-muted);
}

.ept-tr-toggle-icon{
    display:inline-block;
    width: 14px;
}

.ept-tr-detail{
    margin-top: 10px;
    overflow: auto;
    /* Break out of card padding for edge-to-edge table */
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
}

.ept-tr-table{
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
}

.ept-tr-table th,
.ept-tr-table td{
    border-right: 1px solid var(--ept-border);
    border-bottom: 1px solid var(--ept-border);
    padding: 8px 0;
    font-size: 12px;
    text-align: center;
    color: var(--ept-text-muted);
}

/* ---- Mobile: tighten results tables ---- */
@media (max-width: 768px) {
    .ept-tr-table {
        min-width: 480px;
    }
    .ept-tr-card {
        padding: 6px;
    }
    .ept-tr-card-header,
    .ept-tr-card-head {
        font-size: 12px;
        padding: 6px 8px;
        white-space: normal;
        word-break: break-word;
    }
    .ept-tr-detail {
        margin-left: -6px;
        margin-right: -6px;
        width: calc(100% + 12px);
    }
    .ept-tr-table th.left,
    .ept-tr-table td.left {
        width: 90px;
        min-width: 70px;
        max-width: 100px;
        padding: 3px 4px;
        font-size: 11px;
    }
    .ept-tr-table th,
    .ept-tr-table td {
        padding: 4px 0;
        font-size: 11px;
    }
    .ept-tr-total {
        width: 34px;
        min-width: 30px;
        max-width: 40px;
    }
}

.ept-tr-table th{
    font-weight: 800;
    background: var(--ept-bg);
    color: var(--ept-text);
}

/* Sticky Header Row */
.ept-tr-table thead th {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--ept-bg);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ept-tr-table th.left,
.ept-tr-table td.left{
    text-align: left;
    padding: 8px 8px;
    font-weight: 700;
    background: var(--ept-bg-alt);
    position: sticky;
    left: 0;
    z-index: 20;
    color: var(--ept-text);
}

/* Intersection of Sticky Header and Sticky Left Column */
.ept-tr-table thead th.left {
    z-index: 50; /* Above Header(40) and LeftCol(20) */
    background: var(--ept-bg-alt);
}

/* Row Striping */
.ept-tr-table tr:nth-child(even) td {
    background-color: var(--ept-bg-alt);
}
.ept-tr-table tr:nth-child(even) td.left {
    background-color: var(--ept-bg-alt);
}

.ept-tr-total {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    padding: 0;
    vertical-align: middle;
    text-align: center;
    font-weight: 800;
    box-sizing: border-box;
}

/* Fix invisible scores in Light Mode */
.ept-tr-table .eps-score-display {
    color: var(--ept-text) !important;
    font-weight: 700;
    display: inline-block;
}

/* =========================================
   STRONG DARK MODE OVERRIDES
   ========================================= */

/* Score fix for Dark Mode */
.theme-dark .ept-tr-table .eps-score-display {
    color: var(--ept-text) !important;
}

/* Sticky Header Dark Mode - Scoped to Scramble Only */
.theme-dark .ept-scramble-table thead th,
#ep-create.theme-dark .ept-scramble-table thead th {
    background: #1f2937 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    color: #e5e7eb !important;
}
/* Note: Match Play tables (.ept-tr-table without .ept-scramble-table) 
   will revert to default styling to preserve legacy appearance. */

.theme-dark .ept-scramble-table th.left,
.theme-dark .ept-scramble-table td.left,
#ep-create.theme-dark .ept-scramble-table th.left,
#ep-create.theme-dark .ept-scramble-table td.left {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-right-color: #374151 !important;
}
.theme-dark .ept-scramble-table thead th.left,
#ep-create.theme-dark .ept-scramble-table thead th.left {
    background: #111827 !important; 
}
.theme-dark .ept-scramble-table th,
#ep-create.theme-dark .ept-scramble-table th {
    background: #1f2937;
    color: #e5e7eb;
}
.theme-dark .ept-scramble-wrap {
    background: #1f2937;
    color: #d1d5db;
}

/* SCRAMBLE LEADERBOARD DARK MODE FIXES */
#ep-create.theme-dark .ept-scramble-header,
.theme-dark .ept-scramble-header {
    background: #111827 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #374151;
}

#ep-create.theme-dark .ept-scramble-team-name,
.theme-dark .ept-scramble-team-name {
    color: #ffffff !important;
}

#ep-create.theme-dark .ept-scramble-players,
.theme-dark .ept-scramble-players {
    color: #d1d5db !important;
}

.theme-dark .ept-tr-points-mini {
    color: #f3f4f6;
}

.theme-dark .ept-tr-result-line {
    color: #d1d5db;
}

/* Dark Mode Headers */
.theme-dark .ept-tr-section-toggle,
.theme-dark .ept-tr-detail-toggle {
    background-color: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.theme-dark .ept-tr-section-toggle:hover,
.theme-dark .ept-tr-detail-toggle:hover {
    background-color: #374151;
    border-color: #4b5563;
}

.theme-dark .ept-scramble-table th {
    background: #111827;
    color: #e5e7eb;
    border-right-color: #374151;
    border-bottom-color: #374151;
}

.theme-dark .ept-scramble-table td {
    color: #d1d5db;
    border-right-color: #374151;
    border-bottom-color: #374151;
}

.theme-dark .ept-scramble-table th.left,
.theme-dark .ept-scramble-table td.left {
    background: #1f2937;
}

.theme-dark .ept-scramble-table tr:nth-child(even) td {
    background-color: #2d3748;
}
.theme-dark .ept-scramble-table tr:nth-child(even) td.left {
    background-color: #2d3748;
}


/* Fix uniform width for hole columns in results */
.ept-tr-table .col-hole {
    width: 45px;
    min-width: 45px;
    max-width: 45px;
    padding: 4px 1px;
    box-sizing: border-box;
    white-space: nowrap;
}

/* ============================================
   CLUB THEMES (Tournament Results)
   ============================================ */

/* Team B (Lighter Slate Blue) - Light Mode */
.ept-tr-score--b {
    background: #e2e8f0; /* Slate 200 (was #f1f5f9) */
    color: #334155;      /* Slate 700 */
    border-color: #cbd5e1; /* Slate 300 (was #64748b) */
}

/* Status Badges - Winner Colors */
.ept-tr-status--win-a {
    background: #dbeafe; /* Blue 100 */
    border-color: #93c5fd;
    color: #1e40af;
}
.ept-tr-status--win-b {
    background: #e2e8f0; /* Slate 200 */
    border-color: #cbd5e1;
    color: #334155;
}

/* Player Name Cells (Sticky) - Club Coloring */
.ept-tr-table td.left.ept-player-club-a {
    background: #dbeafe !important;
    color: #1e40af;
}
.ept-tr-table td.left.ept-player-club-b {
    background: #e2e8f0 !important;
    color: #334155;
}

/* Force Light Mode when not theme-dark (Fix for mixed mode issues) */
html:not(.theme-dark) .ept-tr-table th.left,
html:not(.theme-dark) .ept-tr-table td.left {
    background-color: #f9fafb !important;
    color: #374151 !important;
}
html:not(.theme-dark) .ept-tr-table td.left.ept-player-club-a {
    background: #dbeafe !important;
    color: #1e40af !important;
}
html:not(.theme-dark) .ept-tr-table td.left.ept-player-club-b {
    background: #e2e8f0 !important;
    color: #334155 !important;
}

/* Start Hole Border */
.eps-start-hole {
    border-left: 3px solid #111827 !important;
    border-right: 1px solid #e5e7eb;
    background-color: #f3f4f6;
}
.theme-dark .eps-start-hole {
    border-left-color: #e5e7eb !important;
    border-right-color: #374151;
    background-color: #374151;
}

/* Dark Mode Overrides for Club Themes */
/* Team B - Dark Mode */
.theme-dark .ept-tr-score--b {
    background: #374151; /* Gray 700 */
    color: #e2e8f0;      /* Slate 200 */
    border-color: #6b7280; /* Gray 500 */
}
.theme-dark .ept-tr-score--b .ept-tr-points {
    color: #f8fafc;
}

/* Status Badges */
.theme-dark .ept-tr-status--win-a {
    background: #1e3a8a;
    border-color: #5c7fe3;
    color: #5c7fe3;
}
.theme-dark .ept-tr-status--win-b {
    background: #374151;
    border-color: #9ca3af;
    color: #e5e7eb;
}

/* Player Name Cells */
.theme-dark .ept-tr-table td.left.ept-player-club-a,
#ep-create.theme-dark .ept-tr-table td.left.ept-player-club-a {
    background: #1e3a8a !important;
    color: #bfdbfe !important;
}
.theme-dark .ept-tr-table td.left.ept-player-club-b,
#ep-create.theme-dark .ept-tr-table td.left.ept-player-club-b {
    background: #334155 !important; /* Slate 700 - Distinct from Gray */
    color: #e2e8f0 !important;
}

/* ============================================
   SCRAMBLE LEADERBOARD (Themed)
   ============================================ */

.ept-scramble-header {
    background: var(--ept-bg-alt);
    padding: 12px 16px; /* Slightly more padding */
    border-bottom: none; /* Merged with table */
    margin-bottom: 0;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border: 1px solid var(--ept-border);
    border-bottom: 0;
}
.ept-scramble-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ept-text);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.ept-scramble-wrap {
    overflow-x: auto;
    background: var(--ept-bg);
    border: 1px solid var(--ept-border);
    border-top: none; /* merge with header */
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.ept-scramble-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--ept-bg);
    color: var(--ept-text);
}

.ept-scramble-table thead tr {
    background: var(--ept-bg-alt);
    border-bottom: 1px solid var(--ept-border);
}

.ept-scramble-table th {
    padding: 10px 16px;
    color: var(--ept-text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.ept-scramble-table th.col-pos { text-align: center; width: 40px; }
.ept-scramble-table th.col-team { text-align: left; }
.ept-scramble-table td.col-team { text-align: left !important; }
.ept-scramble-table th.col-stat { text-align: center; width: 45px; }

.ept-scramble-table tbody tr {
    border-bottom: 1px solid var(--ept-border);
    background: var(--ept-bg);
}
.ept-scramble-table tbody tr:last-child {
    border-bottom: none;
}

/* Row Striping */
.ept-scramble-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}
:root[data-theme="dark"] .ept-scramble-table tbody tr:nth-child(even),
html.theme-dark .ept-scramble-table tbody tr:nth-child(even),
body.theme-dark .ept-scramble-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.ept-scramble-table td {
    padding: 14px 16px;
    color: var(--ept-text);
    vertical-align: middle;
}
.ept-scramble-table td.col-pos { text-align: center; font-weight: bold; color: var(--ept-text-muted); }
.ept-scramble-table td.col-stat { text-align: center; }
.ept-scramble-table td.muted { color: var(--ept-text-muted); }
.ept-scramble-table td.bold { font-weight: 700; }

.ept-scramble-team-name {
    font-weight: 700;
    color: var(--ept-text);
    font-size: 14px;
}
.ept-scramble-players {
    font-size: 13px;
    color: var(--ept-text-muted);
    margin-top: 3px;
    /* Ensure chips wrap nicely */
    white-space: normal !important;
    line-height: 1.6;
}

.ept-player-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px 2px 2px;
    margin: 2px 4px 2px 0;
    border-radius: 999px;
    background-color: #e5e7eb;
    color: #1f2937;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #d1d5db;
    white-space: nowrap;
    vertical-align: middle;
}

.ept-chip-avatar {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    background: #9ca3af;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

.ept-chip-name {
    line-height: 1;
    padding-top: 1px;
    font-size: 1.15em;
    font-weight: 500;
}

/* Dark Mode Chips */
.theme-dark .ept-player-chip,
#ep-create.theme-dark .ept-player-chip {
    background-color: #374151 !important;
    color: #ffffff !important; /* High Contrast White */
    border-color: #4b5563 !important;
}

.theme-dark .ept-chip-avatar,
#ep-create.theme-dark .ept-chip-avatar {
    background-color: #111827 !important;
    color: #e5e7eb !important;
}

/* Explicit overrides for dark mode header to ensure contrast */
:root[data-theme="dark"] #ep-create .ept-scramble-header,
html.theme-dark #ep-create .ept-scramble-header,
body.theme-dark #ep-create .ept-scramble-header,
:root[data-theme="dark"] .ept-scramble-header,
html.theme-dark .ept-scramble-header,
body.theme-dark .ept-scramble-header,
:root[data-theme="dark"] #ep-create .ept-tr-section-header,
html.theme-dark #ep-create .ept-tr-section-header,
body.theme-dark #ep-create .ept-tr-section-header,
:root[data-theme="dark"] .ept-tr-section-header,
html.theme-dark .ept-tr-section-header,
body.theme-dark .ept-tr-section-header {
    background-color: #111827 !important;
    background: #111827 !important;
    border: 1px solid #374151 !important;
    border-bottom: none !important;
    color: #ffffff !important;
}
:root[data-theme="dark"] #ep-create .ept-scramble-header h4,
html.theme-dark #ep-create .ept-scramble-header h4,
body.theme-dark #ep-create .ept-scramble-header h4,
:root[data-theme="dark"] .ept-scramble-header h4,
html.theme-dark .ept-scramble-header h4,
body.theme-dark .ept-scramble-header h4 {
    color: #ffffff !important;
    text-shadow: none !important;
}

/* Dark Mode Table Header Match */
:root[data-theme="dark"] #ep-create .ept-scramble-table thead tr,
html.theme-dark #ep-create .ept-scramble-table thead tr,
body.theme-dark #ep-create .ept-scramble-table thead tr,
:root[data-theme="dark"] .ept-scramble-table thead tr,
html.theme-dark .ept-scramble-table thead tr,
body.theme-dark .ept-scramble-table thead tr {
    background-color: #111827 !important;
    background: #111827 !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    color: #ffffff !important;
}
:root[data-theme="dark"] #ep-create .ept-scramble-table th,
html.theme-dark #ep-create .ept-scramble-table th,
body.theme-dark #ep-create .ept-scramble-table th,
:root[data-theme="dark"] .ept-scramble-table th,
html.theme-dark .ept-scramble-table th,
body.theme-dark .ept-scramble-table th {
    background-color: #111827 !important;
    color: #ffffff !important;
    opacity: 1 !important;
    border-bottom-color: #374151 !important;
}

:root[data-theme="dark"] #ep-create .ept-scramble-table tbody tr,
html.theme-dark #ep-create .ept-scramble-table tbody tr,
body.theme-dark #ep-create .ept-scramble-table tbody tr,
:root[data-theme="dark"] .ept-scramble-table tbody tr,
html.theme-dark .ept-scramble-table tbody tr,
body.theme-dark .ept-scramble-table tbody tr {
    background-color: #1f2937 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

:root[data-theme="dark"] #ep-create .ept-scramble-team-name,
html.theme-dark #ep-create .ept-scramble-team-name,
body.theme-dark #ep-create .ept-scramble-team-name,
:root[data-theme="dark"] .ept-scramble-team-name,
html.theme-dark .ept-scramble-team-name,
body.theme-dark .ept-scramble-team-name {
    color: #ffffff !important;
}

:root[data-theme="dark"] #ep-create .ept-scramble-players,
html.theme-dark #ep-create .ept-scramble-players,
body.theme-dark #ep-create .ept-scramble-players,
:root[data-theme="dark"] .ept-scramble-players,
html.theme-dark .ept-scramble-players,
body.theme-dark .ept-scramble-players {
    color: #d1d5db !important; /* Lighter gray for readability */
}

:root[data-theme="dark"] #ep-create .ept-scramble-table td.bold,
html.theme-dark #ep-create .ept-scramble-table td.bold,
body.theme-dark #ep-create .ept-scramble-table td.bold,
:root[data-theme="dark"] .ept-scramble-table td.bold,
html.theme-dark .ept-scramble-table td.bold,
body.theme-dark .ept-scramble-table td.bold {
    color: #ffffff !important;
}

:root[data-theme="dark"] #ep-create .ept-scramble-wrap,
html.theme-dark #ep-create .ept-scramble-wrap,
body.theme-dark #ep-create .ept-scramble-wrap,
:root[data-theme="dark"] .ept-scramble-wrap,
html.theme-dark .ept-scramble-wrap,
body.theme-dark .ept-scramble-wrap {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

/* =========================================
   SCORE ENTRY & RESULTS DARK MODE OVERRIDES
   ========================================= */

/* Results Container (White Box Fix) */
.theme-dark .ept-tr-wrap,
#ep-create.theme-dark .ept-tr-wrap {
    background-color: #1f2937 !important;
    color: #f9fafb !important;
}

.theme-dark .ept-tr-title,
#ep-create.theme-dark .ept-tr-title {
    color: #f9fafb !important;
}

.theme-dark .ept-tr-sub,
#ep-create.theme-dark .ept-tr-sub {
    color: #9ca3af !important;
}

/* Wrapper */
:root[data-theme="dark"] #ep-create .ept-se-wrap,
html.theme-dark #ep-create .ept-se-wrap,
body.theme-dark #ep-create .ept-se-wrap,
:root[data-theme="dark"] .ept-se-wrap,
html.theme-dark .ept-se-wrap,
body.theme-dark .ept-se-wrap {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

/* Table Header */
:root[data-theme="dark"] #ep-create .ept-se-table thead,
html.theme-dark #ep-create .ept-se-table thead,
body.theme-dark #ep-create .ept-se-table thead,
:root[data-theme="dark"] #ep-create .ept-tr-table thead,
html.theme-dark #ep-create .ept-tr-table thead,
body.theme-dark #ep-create .ept-tr-table thead,
:root[data-theme="dark"] .ept-se-table thead,
html.theme-dark .ept-se-table thead,
body.theme-dark .ept-se-table thead,
:root[data-theme="dark"] .ept-tr-table thead,
html.theme-dark .ept-tr-table thead,
body.theme-dark .ept-tr-table thead {
    background: #111827 !important;
}
:root[data-theme="dark"] #ep-create .ept-se-table th,
html.theme-dark #ep-create .ept-se-table th,
body.theme-dark #ep-create .ept-se-table th,
:root[data-theme="dark"] #ep-create .ept-tr-table th,
html.theme-dark #ep-create .ept-tr-table th,
body.theme-dark #ep-create .ept-tr-table th,
:root[data-theme="dark"] .ept-se-table th,
html.theme-dark .ept-se-table th,
body.theme-dark .ept-se-table th,
:root[data-theme="dark"] .ept-tr-table th,
html.theme-dark .ept-tr-table th,
body.theme-dark .ept-tr-table th {
    background-color: #111827 !important;
    color: #ffffff !important;
    border-bottom-color: #374151 !important;
    border-right-color: #374151 !important;
}

/* Sticky Left Column */
:root[data-theme="dark"] #ep-create .ept-se-table th.left,
html.theme-dark #ep-create .ept-se-table th.left,
body.theme-dark #ep-create .ept-se-table th.left,
:root[data-theme="dark"] #ep-create .ept-se-table td.left,
html.theme-dark #ep-create .ept-se-table td.left,
body.theme-dark #ep-create .ept-se-table td.left,
:root[data-theme="dark"] #ep-create .ept-tr-table th.ept-tr-header-col,
html.theme-dark #ep-create .ept-tr-table th.ept-tr-header-col,
body.theme-dark #ep-create .ept-tr-table th.ept-tr-header-col,
:root[data-theme="dark"] #ep-create .ept-tr-table td.ept-tr-player-col,
html.theme-dark #ep-create .ept-tr-table td.ept-tr-player-col,
body.theme-dark #ep-create .ept-tr-table td.ept-tr-player-col,
:root[data-theme="dark"] .ept-se-table th.left,
html.theme-dark .ept-se-table th.left,
body.theme-dark .ept-se-table th.left,
:root[data-theme="dark"] .ept-se-table td.left,
html.theme-dark .ept-se-table td.left,
body.theme-dark .ept-se-table td.left,
:root[data-theme="dark"] .ept-tr-table th.ept-tr-header-col,
html.theme-dark .ept-tr-table th.ept-tr-header-col,
body.theme-dark .ept-tr-table th.ept-tr-header-col,
:root[data-theme="dark"] .ept-tr-table td.ept-tr-player-col,
html.theme-dark .ept-tr-table td.ept-tr-player-col,
body.theme-dark .ept-tr-table td.ept-tr-player-col {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border-right-color: #374151 !important;
}

/* Intersection */
:root[data-theme="dark"] #ep-create .ept-se-table thead th.left,
html.theme-dark #ep-create .ept-se-table thead th.left,
body.theme-dark #ep-create .ept-se-table thead th.left,
:root[data-theme="dark"] #ep-create .ept-tr-table thead th.ept-tr-header-col,
html.theme-dark #ep-create .ept-tr-table thead th.ept-tr-header-col,
body.theme-dark #ep-create .ept-tr-table thead th.ept-tr-header-col,
:root[data-theme="dark"] .ept-se-table thead th.left,
html.theme-dark .ept-se-table thead th.left,
body.theme-dark .ept-se-table thead th.left,
:root[data-theme="dark"] .ept-tr-table thead th.ept-tr-header-col,
html.theme-dark .ept-tr-table thead th.ept-tr-header-col,
body.theme-dark .ept-tr-table thead th.ept-tr-header-col {
    background-color: #111827 !important;
    z-index: 60;
}

/* Cells */
:root[data-theme="dark"] #ep-create .ept-se-table td,
html.theme-dark #ep-create .ept-se-table td,
body.theme-dark #ep-create .ept-se-table td,
:root[data-theme="dark"] #ep-create .ept-tr-table td,
html.theme-dark #ep-create .ept-tr-table td,
body.theme-dark #ep-create .ept-tr-table td,
:root[data-theme="dark"] .ept-se-table td,
html.theme-dark .ept-se-table td,
body.theme-dark .ept-se-table td,
:root[data-theme="dark"] .ept-tr-table td,
html.theme-dark .ept-tr-table td,
body.theme-dark .ept-tr-table td {
    border-right-color: #374151 !important;
    border-bottom-color: #374151 !important;
    color: #d1d5db !important;
    background-color: #1f2937 !important;
}

/* Row Striping */
:root[data-theme="dark"] #ep-create .ept-se-table tr:nth-child(even) td,
html.theme-dark #ep-create .ept-se-table tr:nth-child(even) td,
body.theme-dark #ep-create .ept-se-table tr:nth-child(even) td,
:root[data-theme="dark"] #ep-create .ept-tr-table tr:nth-child(even) td,
html.theme-dark #ep-create .ept-tr-table tr:nth-child(even) td,
body.theme-dark #ep-create .ept-tr-table tr:nth-child(even) td,
:root[data-theme="dark"] .ept-se-table tr:nth-child(even) td,
html.theme-dark .ept-se-table tr:nth-child(even) td,
body.theme-dark .ept-se-table tr:nth-child(even) td,
:root[data-theme="dark"] .ept-tr-table tr:nth-child(even) td,
html.theme-dark .ept-tr-table tr:nth-child(even) td,
body.theme-dark .ept-tr-table tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.03) !important; /* Visible stripe */
}
:root[data-theme="dark"] #ep-create .ept-se-table tr:nth-child(even) td.left,
html.theme-dark #ep-create .ept-se-table tr:nth-child(even) td.left,
body.theme-dark #ep-create .ept-se-table tr:nth-child(even) td.left,
:root[data-theme="dark"] #ep-create .ept-tr-table tr:nth-child(even) td.ept-tr-player-col,
html.theme-dark #ep-create .ept-tr-table tr:nth-child(even) td.ept-tr-player-col,
body.theme-dark #ep-create .ept-tr-table tr:nth-child(even) td.ept-tr-player-col,
:root[data-theme="dark"] .ept-se-table tr:nth-child(even) td.left,
html.theme-dark .ept-se-table tr:nth-child(even) td.left,
body.theme-dark .ept-se-table tr:nth-child(even) td.left,
:root[data-theme="dark"] .ept-tr-table tr:nth-child(even) td.ept-tr-player-col,
html.theme-dark .ept-tr-table tr:nth-child(even) td.ept-tr-player-col,
body.theme-dark .ept-tr-table tr:nth-child(even) td.ept-tr-player-col {
    background-color: #263042 !important; /* Subtle stripe for names */
}

/* Inputs */
:root[data-theme="dark"] #ep-create .ept-se-table input,
html.theme-dark #ep-create .ept-se-table input,
body.theme-dark #ep-create .ept-se-table input,
:root[data-theme="dark"] .ept-se-table input,
html.theme-dark .ept-se-table input,
body.theme-dark .ept-se-table input {
    background: #374151 !important;
    color: #ffffff !important;
    border: 1px solid #4b5563 !important;
    border-radius: 4px;
}
:root[data-theme="dark"] #ep-create .ept-se-table input:hover,
html.theme-dark #ep-create .ept-se-table input:hover,
body.theme-dark #ep-create .ept-se-table input:hover,
:root[data-theme="dark"] .ept-se-table input:hover,
html.theme-dark .ept-se-table input:hover,
body.theme-dark .ept-se-table input:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: #4b5563 !important;
}
:root[data-theme="dark"] #ep-create .ept-se-table input:focus,
html.theme-dark #ep-create .ept-se-table input:focus,
body.theme-dark #ep-create .ept-se-table input:focus,
:root[data-theme="dark"] .ept-se-table input:focus,
html.theme-dark .ept-se-table input:focus,
body.theme-dark .ept-se-table input:focus {
    background: #111827 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
}

/* Group Headers */
:root[data-theme="dark"] #ep-create .ept-grp-hdr,
html.theme-dark #ep-create .ept-grp-hdr,
body.theme-dark #ep-create .ept-grp-hdr,
:root[data-theme="dark"] #ep-create .ept-grp-hdr td,
html.theme-dark #ep-create .ept-grp-hdr td,
body.theme-dark #ep-create .ept-grp-hdr td,
:root[data-theme="dark"] .ept-grp-hdr,
html.theme-dark .ept-grp-hdr,
body.theme-dark .ept-grp-hdr,
:root[data-theme="dark"] .ept-grp-hdr td,
html.theme-dark .ept-grp-hdr td,
body.theme-dark .ept-grp-hdr td {
    background: #374151 !important;
    color: #ffffff !important;
    border-bottom-color: #4b5563 !important;
}

/* ============================================
   INDIVIDUAL RESULTS MIRROR & LIGHTBOX STYLES
   ============================================ */

/* Hide Toolbar in Mirror & Lightbox */
.ept-ind-results-mirror .epcg-nav,
.ept-lightbox .epcg-nav {
    display: none !important;
}

/* Restore Headers (Card Title) in Mirror & Lightbox */
.ept-ind-results-mirror .epcg-card-head,
.ept-lightbox .epcg-card-head {
    display: flex !important;
    border-bottom: 1px solid var(--ept-border);
    padding: 10px 15px;
    font-weight: 700;
    font-size: 1.1em;
    background: var(--ept-bg-alt);
}

/* Padding & Layout adjustments */
.ept-ind-results-mirror .epcg-cards,
.ept-lightbox .epcg-cards {
    padding: 20px !important;
    gap: 15px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.ept-ind-results-mirror .epcg-card,
.ept-lightbox .epcg-card {
    border: 1px solid var(--ept-border) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    margin-bottom: 0 !important; /* Grid handles gap */
}

/* Lightbox specific: Ensure Leaderboard is visible */
#ept-lightbox-leaderboard-target .ept-scramble-container {
    width: 100%;
}

/* Ensure Lightbox Scramble Tables fit */
#ept-lightbox-leaderboard-target .ept-scramble-col {
    flex: 1 1 45%;
    min-width: 400px;
}

/* Ticker overrides for Lightbox (allow full height/width) */
.ept-lightbox .ept-scramble-wrap {
    height: auto !important;
    max-height: 60vh;
}
.ept-scramble-players {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
    white-space: normal !important; /* Allow wrapping */
}

.ept-player-chip {
    margin: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

/* Compact Columns & No Horizontal Scroll */
.ept-scramble-table {
    width: 100%;
    min-width: 0 !important; /* Override the 800px min-width from .ept-tr-table */
    table-layout: fixed; /* Force column widths to respect definition */
    border-collapse: collapse;
}

/* Container margins/padding */
.ept-scramble-container {
    padding: 0 20px;
    box-sizing: border-box;
}

.ept-scramble-table th,
.ept-scramble-table td {
    padding: 6px 2px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    border-bottom: none !important; /* Force remove row borders */
}

/* Explicit rule for rows */
.ept-scramble-table tbody tr {
    border-bottom: none !important;
}

.col-pos {
    width: 30px;
    text-align: center;
    font-size: 0.85em;
    color: var(--ept-text-muted);
}

.col-stat {
    width: 40px;
    text-align: center;
    font-size: 0.9em;
}

/* Stats Typography */
.ept-stat-net {
    font-weight: 800 !important;
    font-size: 1.3em !important;
    color: #111 !important;
}
.ept-stat-gross {
    font-weight: 600 !important; /* Semi-bold, lighter than Net */
    font-size: 1.25em !important; /* Slightly smaller than Net, bigger than others */
    color: #333 !important;
}
.ept-stat-thru,
.ept-stat-hcp {
    font-size: 1.1em !important; /* Increased size */
    font-weight: 500 !important;
}

/* Dark mode adjustments */
:root[data-theme="dark"] .ept-stat-net,
html.theme-dark .ept-stat-net,
body.theme-dark .ept-stat-net {
    color: #fff !important;
}
:root[data-theme="dark"] .ept-stat-gross,
html.theme-dark .ept-stat-gross,
body.theme-dark .ept-stat-gross {
    color: #e5e7eb !important;
}

.col-team {
    /* Takes remaining space */
    padding-left: 8px !important;
    min-width: 120px;
}

/* Allow scramble table to fit in narrower containers (e.g. 3-col layout) */
.ept-scramble-table {
    min-width: 0 !important; /* Override 800px constraint */
    width: 100%;
}

/* Ticker Container */
.ept-scramble-wrap {
    height: 450px; /* Fixed height for ticker */
    overflow-y: hidden; /* Hide scrollbar for seamless look */
    position: relative;
    border: none; /* Removed border to satisfy "Horizontal lines" request */
    background: var(--ept-bg);
}

.ept-scramble-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--ept-bg-alt);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.ept-scramble-table th {
    background: var(--ept-bg-alt); /* Ensure opaque background for sticky */
    font-size: 0.85em;
    text-transform: uppercase;
}

/* ============================================
   INDIVIDUAL RESULTS LIGHTBOX
   ============================================ */
.ept-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.ept-lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.ept-lightbox-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
}
.ept-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--ept-bg);
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ept-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--ept-border);
    background: var(--ept-bg-alt);
}
.ept-lightbox-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}
.ept-lightbox-close {
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--ept-text-muted);
    padding: 0;
}
.ept-lightbox-close:hover {
    color: var(--ept-text);
}
.ept-lightbox-body {
    padding: 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure Core Games cards look good inside */
.ept-lightbox-body .epcg-card {
    border: 1px solid var(--ept-border);
    box-shadow: none;
    margin-bottom: 20px;
}
.ept-lightbox-body .epcg-cards-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

/* Dark Mode Overrides */
:root[data-theme="dark"] .ept-lightbox-overlay {
    background: rgba(0,0,0,0.85);
}

/* ===== Individual Results Mirror (Clean View) ===== */
.ept-ind-results-mirror .epcg-toolbar {
    display: none !important;
}
.ept-ind-results-mirror .epcg-card-head {
    display: none !important;
}

/* ===== Full Screen Lightbox ===== */
.ept-lightbox-fullscreen {
    /* Force 16:9 Aspect Ratio within Viewport Limits */
    width: 95vw !important;
    height: auto !important;
    aspect-ratio: 16 / 9 !important;
    max-height: 95vh !important;
    max-width: 177.78vh !important; /* (16/9 * 100vh) to ensure fit on wide screens */
    
    border-radius: 8px;
    background: var(--ept-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.5); /* Strong shadow for pop-out effect */
}

.ept-lightbox-fullscreen .ept-lightbox-body {
    flex: 1;
    overflow-y: auto; /* Allow scroll if absolutely necessary, but try to fit */
    padding: 16px; /* Reduced from 40px */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Optimize Leaderboard in Lightbox */
.ept-lightbox-fullscreen #ept-lightbox-leaderboard-target {
    flex: 0 0 auto; /* Allow it to take natural size up to a point */
    max-height: 48vh; /* Limit leaderboard height (Reduced from 55vh) */
    overflow: hidden; /* Ticker handles internal scroll */
    border-bottom: 1px solid var(--ept-border);
    padding-bottom: 10px;
}

/* Member-Guest TV: fixed top section, no border, prevent flash */
.ept-lightbox-fullscreen #ept-lightbox-leaderboard-target:has(#ept-mg-tv-left) {
    max-height: 50vh;
    flex: 0 0 50vh;
    border-bottom: none;
    padding-bottom: 0;
}
/* Remove HR / border-top in lightbox */
.ept-lightbox-fullscreen hr {
    display: none;
}
.ept-lightbox-fullscreen .epcg-results-root {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}
.ept-lightbox-fullscreen #ept-lightbox-leaderboard-target.ept-mg-loading {
    opacity: 0;
}
.ept-lightbox-fullscreen #ept-lightbox-leaderboard-target.ept-mg-ready {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Skins / Individual Contests table in lightbox — compact columns */
.ept-lightbox-fullscreen .ept-ind-results-mirror table,
.ept-lightbox-fullscreen .epcg-results-root table {
    width: auto;
    min-width: 320px;
    max-width: 600px;
    margin: 0 auto;
}
.ept-lightbox-fullscreen .ept-ind-results-mirror table th,
.ept-lightbox-fullscreen .ept-ind-results-mirror table td,
.ept-lightbox-fullscreen .epcg-results-root table th,
.ept-lightbox-fullscreen .epcg-results-root table td {
    padding: 4px 12px;
    white-space: nowrap;
}
.ept-lightbox-fullscreen .ept-ind-results-mirror table th:first-child,
.ept-lightbox-fullscreen .ept-ind-results-mirror table td:first-child,
.ept-lightbox-fullscreen .epcg-results-root table th:first-child,
.ept-lightbox-fullscreen .epcg-results-root table td:first-child {
    width: auto;
    min-width: 120px;
    max-width: 200px;
}

/* Optimize Results Grid in Lightbox */
.ept-lightbox-fullscreen .epcg-cards-results {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Allow 4 columns to fit */
    gap: 16px;
}

/* Hide toolbar in Lightbox to save space */
.ept-lightbox-fullscreen .epcg-toolbar {
    display: none !important;
}

.ept-lightbox-fullscreen .epcg-card {
    margin-bottom: 0 !important;
}

/* Dark Mode Lightbox overrides */
:root[data-theme="dark"] .ept-lightbox-fullscreen {
    background: #111;
}

/* ============================================
   TV / EXPANDED VIEW — LAYOUTS
   ============================================ */

.ept-tv-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    height: 100%;
    width: 100%;
    overflow: hidden;
    padding: 0 20px;
    box-sizing: border-box;
}

.ept-tv-col-left,
.ept-tv-col-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.ept-tv-col-center {
    flex: 0 0 280px;
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    padding-top: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ept-tv-ticker-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-y: hidden;
    position: relative;
}

.ept-tv-header {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--ept-border);
    padding-bottom: 6px;
}

.ept-tv-venue-card {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    background: var(--bg-elev, #fff);
    border: 1px solid var(--ept-border);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.ept-tv-points-card {
    width: 100%;
}

.ept-tv-qr-bottom {
    margin-top: auto; /* Push to bottom */
    padding: 15px;
    background: #111;
    border-radius: 8px;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
}

/* Dark Mode TV Overrides */
:root[data-theme="dark"] .ept-tv-venue-card {
    background: #1f2937;
    border-color: #374151;
}
.ept-match-tv-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: 0 20px 20px 20px;
    box-sizing: border-box;
    background: var(--ept-bg);
}

/* Ensure columns don't shrink below usability */
.ept-tv-col-left,
.ept-tv-col-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ept-tv-col-left {
    padding-right: 10px;
}

.ept-tv-col-center {
    width: 340px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow: hidden;
}

/* Ticker Wrapper */
.ept-tv-ticker-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    overflow-y: hidden;
    /* Mask fade at bottom */
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

/* Force tables to behave in narrow columns */
.ept-tv-ticker-wrap table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
}

/* Compact text for TV */
.ept-tv-ticker-wrap .ept-tr-card-title {
    font-size: 1.1em;
    white-space: normal; /* allow wrapping */
}
.ept-tv-ticker-wrap .ept-team-stack .ept-team-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center Column Branding */
.ept-tv-venue-card {
    text-align: center;
    background: var(--ept-bg-alt);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--ept-border);
}

/* Points Card in Center */
.ept-tv-points-card .ept-tr-score {
    margin-bottom: 10px;
    padding: 15px;
}
.ept-tv-points-card .ept-tr-points {
    font-size: 2.5em; /* Bigger for TV */
}

/* QR Code High Contrast Box */
.ept-tv-qr-bottom {
    background: #111 !important;
    color: #fff !important;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
}

/* Dark Mode Tweaks for TV View */
:root[data-theme="dark"] .ept-match-tv-layout {
    background: #111;
}
:root[data-theme="dark"] .ept-tv-venue-card {
    background: #1f2937;
    border-color: #374151;
}

/* =========================================
   TV VIEW FIXES (Robust Footer & Cards)
   ========================================= */

/* Ensure the TV Layout is isolated */
.ept-match-tv-layout {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Footer Container */
.ept-tv-global-footer {
    display: flex;
    flex-direction: row;
    align-items: flex-end; /* Align to bottom */
    gap: 30px;
    padding: 10px 20px 20px 20px;
    min-height: 80px;
    background: transparent;
    justify-content: center; /* Center the group */
}

/* Team Points Wrapper (Left Side of Footer) */
.ept-tv-points-card {
    display: flex;
    flex-direction: row; /* Horizontal stack */
    gap: 15px;
    align-items: center;
}

/* Individual Points Cards in Footer */
.ept-tv-points-card .ept-tr-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 15px;
    background: var(--ept-bg-alt, #f3f4f6);
    border: 1px solid var(--ept-border, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    width: auto !important; /* Prevent stretching */
    flex: 0 0 auto; /* Prevent growing/shrinking */
    margin: 0;
}

/* Points Text Size */
.ept-tv-points-card .ept-tr-points {
    font-size: 1.8em;
    font-weight: 800;
    line-height: 1;
}
.ept-tv-points-card .ept-tr-club {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Dark Mode Overrides for Points Cards */
:root[data-theme="dark"] .ept-tv-points-card .ept-tr-score {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

/* Dark Mode Team A Specifics (Site Blue) */
:root[data-theme="dark"] .ept-tv-points-card .ept-tr-score--a {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}
:root[data-theme="dark"] .ept-tv-points-card .ept-tr-score--a .ept-tr-club,
:root[data-theme="dark"] .ept-tv-points-card .ept-tr-score--a .ept-tr-points,
:root[data-theme="dark"] .ept-tv-points-card .ept-tr-score--a .ept-tr-points-label {
    color: #ffffff !important;
}

/* Team Header Stack (Double Line) */
.ept-team-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ept-team-line {
    font-size: 0.9em;
    line-height: 1.2;
    white-space: normal; /* allow wrapping if names are long */
}
/* Ensure the card header allows the title to grow */
.ept-tr-card-head {
    align-items: center !important;
}

/* Dark Mode Team A Card Color */
:root[data-theme="dark"] .ept-tr-score--a {
    background-color: #3b82f6 !important; /* site-blue */
    color: #ffffff !important;
}
:root[data-theme="dark"] .ept-tr-score--a .ept-tr-club,
:root[data-theme="dark"] .ept-tr-score--a .ept-tr-points,
:root[data-theme="dark"] .ept-tr-score--a .ept-tr-points-label {
    color: #ffffff !important;
}

/* Compact Venue Card */
.ept-tv-venue-card {
    padding: 15px !important;
    text-align: center;
}
.ept-tv-venue-card .ept-info-meta {
    margin: 10px 0;
}

/* QR Code at bottom of Left Col */
.ept-tv-qr-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ept-bg-alt);
    padding: 10px;
    border-radius: 8px;
}
.ept-tv-qr-bottom img {
    border-radius: 4px;
}

/* Team Points Card (Center Col) */
.ept-tv-points-card .ept-tr-score {
    padding: 15px;
    text-align: center;
}
.ept-tv-points-card .ept-tr-points {
    font-size: 2rem; /* Larger points */
}

/* Dark Mode Overrides for TV Layout */
.theme-dark .ept-tv-qr-bottom {
    background: #1f2937;
    border-top-color: #374151;
}
.ept-lightbox-header-bar {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 70px;
    padding: 0 30px;
    background: var(--ept-bg-alt);
    border-bottom: 1px solid var(--ept-border);
    box-sizing: border-box;
    flex-shrink: 0;
}
.ept-lh-center {
    flex: 1;
    display: flex;
    justify-content: center;
}
.ept-lh-title {
    margin: 0;
    font-size: 2.2rem; /* Matches H1/H2 default scaling */
    font-weight: 800;
    color: var(--ept-text);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}
.ept-lightbox-header-bar .ept-lightbox-close {
    position: static !important;
    width: 44px;
    height: 44px;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    color: var(--ept-text);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.ept-lightbox-header-bar .ept-lightbox-close:hover {
    background: rgba(255, 59, 48, 0.1); /* Subtle red tint */
    color: #ff3b30;
}

/* ============================================
   SCRAMBLE CENTER COLUMN (Toolbar, Card, QR)
   ============================================ */
.ept-scramble-center-col {
    display: none; /* Hidden by default */
}

/* Show only in Full Screen Lightbox */
.ept-lightbox-fullscreen .ept-scramble-center-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 340px; /* Fixed width */
    margin: 0 20px;
    align-self: center; /* Vertically center relative to scrolling tables */
    padding-bottom: 140px; /* Shift content up visually */
    gap: 20px; /* Space between Toolbar, Card, QR */
    z-index: 10;
}

/* Info Card Styling */
.ept-scramble-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 30px 20px;
    background: var(--ept-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* Prominent shadow */
    text-align: center;
    border: 1px solid var(--ept-border);
}

/* QR Code Display */
.ept-qr-code-display {
    text-align: center;
    background: #fff;
    padding: 12px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 220px; /* Allow width for text */
}
.ept-qr-code-display img {
    display: block;
    width: 90px; /* Constrain image size */
    height: auto;
    margin: 0 auto 8px auto;
}
.ept-qr-caption {
    display: block;
    font-size: 11px;
    color: #333;
    font-weight: 700;
    line-height: 1.3;
}
.ept-qr-subcaption {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: #555;
    font-weight: 400;
    line-height: 1.3;
}

/* Toolbar in Center Column */
#ept-lightbox-toolbar-target {
    width: 100%;
}

/* Ensure Toolbar is Visible here, but hidden elsewhere in lightbox */
.ept-lightbox-fullscreen .epcg-toolbar {
    display: none !important;
}
.ept-lightbox-fullscreen .ept-scramble-center-col .epcg-toolbar {
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    background: transparent;
    padding: 0;
    gap: 8px;
    margin: 0;
}
.ept-lightbox-fullscreen .ept-scramble-center-col .epcg-toolbar-btn {
    flex: 1 1 auto;
    padding: 8px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
    background: var(--ept-bg-alt);
    border: 1px solid var(--ept-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ept-lightbox-fullscreen .ept-scramble-center-col .epcg-toolbar-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.ept-info-logo {
    display: block;
    max-width: 100%;
    max-height: 120px; /* Slightly smaller */
    width: auto;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ept-info-meta {
    margin-bottom: 25px;
    width: 100%;
}

.ept-info-venue {
    margin: 0 0 6px 0;
    font-size: 1.6rem; 
    font-weight: 800;
    line-height: 1.2;
    color: var(--ept-text);
}

.ept-info-date {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--ept-text-muted);
}

.ept-info-branding .ept-brand-logo {
    display: block;
    height: 44px;
    width: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Brand Logo Theme Switching */
html:not(.theme-dark) .ept-brand-dark { display: none; }
html.theme-dark .ept-brand-light { display: none; }
body:not(.theme-dark) .ept-brand-dark { display: none; }
body.theme-dark .ept-brand-light { display: none; }

/* Adjust Container Layout in Lightbox */
.ept-lightbox-fullscreen .ept-scramble-container {
    flex-wrap: nowrap !important; /* Force side-by-side */
    justify-content: space-between;
    width: 100%;
    align-items: stretch; /* Let tables stretch, Center Col aligns via align-self */
}

/* Ensure columns don't shrink too much */
.ept-lightbox-fullscreen .ept-scramble-col {
    flex: 1 1 auto;
    min-width: 0; /* Allow shrinking if needed */
}

/* ============================================
   DARK MODE OVERRIDES - TEAM A SCORE CARD
   ============================================ */
:root[data-theme="dark"] .ept-tr-score--a,
html.theme-dark .ept-tr-score--a,
body.theme-dark .ept-tr-score--a {
    background-color: var(--eps-site-blue, #3b82f6) !important;
    border-color: var(--eps-site-blue, #3b82f6) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .ept-tr-score--a .ept-tr-club,
html.theme-dark .ept-tr-score--a .ept-tr-club,
body.theme-dark .ept-tr-score--a .ept-tr-club,
:root[data-theme="dark"] .ept-tr-score--a .ept-tr-points,
html.theme-dark .ept-tr-score--a .ept-tr-points,
body.theme-dark .ept-tr-score--a .ept-tr-points,
:root[data-theme="dark"] .ept-tr-score--a .ept-tr-points-label,
html.theme-dark .ept-tr-score--a .ept-tr-points-label {
    color: #ffffff !important;
}

/* Flight Standings: team cell truncation & label spacing */
.ept-team-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 0; /* forces ellipsis in table-layout:fixed */
}
.ept-team-label {
    font-weight: 700;
    margin-right: 4px;
}
.ept-team-players {
    font-weight: 400;
}

/* HBH Status row baseline */
.ept-tr-status-row {
    font-weight: 600;
}
.ept-tr-status-row td {
    color: inherit !important;
}

/* Stroke indicators for HBH / Horse Race score cells */
.ept-tr-table td.ept-stroke-hole {
    background-color: rgba(200, 210, 220, 0.35) !important;
    box-shadow: inset 0 0 6px rgba(59, 130, 246, 0.25) !important;
}
.ept-tr-table td.ept-stroke-double {
    background-color: rgba(200, 210, 220, 0.45) !important;
    box-shadow: inset 0 0 8px rgba(59, 130, 246, 0.35) !important;
}
.ept-tr-table td.ept-stroke-triple {
    background-color: rgba(200, 210, 220, 0.55) !important;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.45) !important;
}
:root[data-theme="dark"] .ept-tr-table td.ept-stroke-hole,
html.theme-dark .ept-tr-table td.ept-stroke-hole,
body.theme-dark .ept-tr-table td.ept-stroke-hole {
    background-color: rgba(180, 200, 220, 0.18) !important;
    box-shadow: inset 0 0 6px rgba(96, 165, 250, 0.3) !important;
}
:root[data-theme="dark"] .ept-tr-table td.ept-stroke-double,
html.theme-dark .ept-tr-table td.ept-stroke-double,
body.theme-dark .ept-tr-table td.ept-stroke-double {
    background-color: rgba(180, 200, 220, 0.28) !important;
    box-shadow: inset 0 0 8px rgba(96, 165, 250, 0.4) !important;
}
:root[data-theme="dark"] .ept-tr-table td.ept-stroke-triple,
html.theme-dark .ept-tr-table td.ept-stroke-triple,
body.theme-dark .ept-tr-table td.ept-stroke-triple {
    background-color: rgba(180, 200, 220, 0.38) !important;
    box-shadow: inset 0 0 10px rgba(96, 165, 250, 0.5) !important;
}