/* CAROMY_STEP81_MATCH_UI -- test mode only. Compatible with existing production practice controls. */
html[data-caromy-match="1"] #caromy52ScoreBar #c46-score.c81-legacy-score{display:none!important}
#caromy81Score{display:flex;align-items:center;justify-content:space-between;gap:clamp(4px,1.1vw,16px);width:100%;min-width:0;background:#103f32;color:white;padding:clamp(6px,.8vw,12px);border-radius:12px;box-sizing:border-box;white-space:nowrap;font-family:inherit}
#caromy81Score .c81-side{display:flex;align-items:center;gap:clamp(4px,.9vw,12px);min-width:0;max-width:39%;font-weight:800;border:1.5px solid #ffffff19;padding:clamp(5px,.75vw,10px);border-radius:9px}
#caromy81Score .c81-side strong{font-size:clamp(20px,3vw,34px);line-height:1;font-variant-numeric:tabular-nums}
#caromy81Score .c81-side span{font-size:clamp(11px,1.7vw,19px);overflow:hidden;text-overflow:ellipsis}
#caromy81Score .c81-mid{display:flex;align-items:center;gap:clamp(4px,1vw,14px);font-weight:750;flex-shrink:0;font-size:clamp(11px,1.6vw,19px)}
#caromy81Score #c81-clock{font-size:clamp(15px,2.3vw,26px);color:#c4f7de}
#caromy81Score .c81-active{border-color:#b9f5ca;animation:c81-pulse 1.8s ease-in-out infinite;background:#165b46}
@keyframes c81-pulse{0%,100%{box-shadow:0 0 0 0 rgba(151,255,182,.08)}50%{box-shadow:0 0 15px 2px rgba(151,255,182,.8)}}
html[data-caromy-match="1"] .shoot-tile{flex-direction:column!important;justify-content:center!important;gap:7px!important}
html[data-caromy-match="1"] .shoot-tile .c81-actions{display:flex;flex-direction:column;gap:7px;width:100%}
html[data-caromy-match="1"] .shoot-tile .c81-action{box-sizing:border-box;width:100%;min-height:39px;border:1px solid #b5d7c8;border-radius:10px;font-family:inherit;font-size:clamp(12px,1.4vw,16px);font-weight:700;line-height:1.2;background:white;color:#155d47;cursor:pointer;padding:7px 6px}
html[data-caromy-match="1"] .shoot-tile .c81-leave{color:#a73535;border-color:#ebcecc;background:#fff8f7}
html[data-caromy-match="1"] .shoot-tile .c81-action:disabled{opacity:.5;cursor:not-allowed}
#c81-modal[hidden]{display:none!important}#c81-modal{position:fixed;inset:0;z-index:100050;background:#0009;display:grid;place-items:center;padding:16px}
#c81-modal .c81-dialog{background:white;border:1px solid #d3e7da;border-radius:18px;padding:24px;width:min(100%,370px);color:#164a3b;box-shadow:0 20px 70px #0004}
#c81-modal h2{font-size:21px;margin:0 0 12px}#c81-modal p{margin-bottom:24px}
#c81-modal .c81-dialog>div{display:flex;gap:10px}#c81-modal button{flex:1;border:1px solid #bcd5c8;border-radius:10px;background:#f5faf7;padding:13px;cursor:pointer;font-weight:800;color:#16503e}
#c81-modal #c81-exit{background:#a83535;color:white;border-color:#a83535}
#caromy46 #c46-ended:not([hidden]){position:fixed!important;inset:auto 14px 14px;z-index:99999!important;width:min(94vw,400px)!important;max-width:400px;margin:auto!important;padding:17px!important;background:white!important;box-shadow:0 10px 60px #0004}
#caromy46 #c46-ended:not([hidden]) .c81-result-image{width:100%;max-height:240px;object-fit:contain;border-radius:10px;background:#eff8f4;margin-bottom:9px}
#caromy46 #c46-ended:not([hidden]) #c46-final{font-size:18px;line-height:1.5}
@media(max-width:540px){#caromy81Score{gap:3px;padding:4px}#caromy81Score .c81-side{padding:4px}#caromy81Score .c81-mid{flex-direction:row;gap:3px}#caromy81Score .c81-side strong{font-size:21px}}

#caromy81Score #c81-clock.c81-urgent{color:#ffd18a}

/* CAROMY_SCORE_URGENT_FIX_V2 */
#caromy81Score #c81-clock.c81-urgent{
 color:#ffd18a!important;
}


/* CAROMY_TURN_HIGHLIGHT_RESTORE_V1 */

/* Both players: neutral when not shooting */
#c81-human-side,
#c81-ai-side {
    transition: background-color .2s, box-shadow .2s, border-color .2s;
    border: 2px solid transparent;
    border-radius: 12px;
}

/* Active player's entire score area */
#c81-human-side.c81-active,
#c81-ai-side.c81-active {
    background: rgba(255, 203, 45, .24) !important;
    border-color: #ffca28 !important;
    box-shadow: inset 0 0 0 1px #ffca28,
                0 0 14px rgba(255, 202, 40, .38) !important;
}

/* Active player's name and score */
#c81-human-side.c81-active #c81-human-name,
#c81-human-side.c81-active #c81-human-score,
#c81-ai-side.c81-active #c81-ai-name,
#c81-ai-side.c81-active #c81-ai-score {
    color: #ffe16b !important;
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(255, 202, 40, .45);
}

/* Finished match: remove active glow */
.c81-side:not(.c81-active) {
    box-shadow: none;
}
