/* Arena result editor — one visual contract for tournament score entry. */
#results-modal-backdrop.pr-result-arena{--re-surface:#fff;--re-soft:#f1f5f8;--re-ink:#142b3b;--re-muted:#496272;--re-edge:#c4d2da;--re-accent:#006c61;--re-primary:#08796c;--re-danger:#a44039;--re-danger-bg:#fff2ef;box-sizing:border-box;padding:12px!important;background:rgba(8,19,31,.64)!important;backdrop-filter:blur(5px)!important}
[data-theme=dark] #results-modal-backdrop.pr-result-arena{--re-surface:#102334;--re-soft:#142d3c;--re-ink:#eef8fa;--re-muted:#a9c0ce;--re-edge:#355162;--re-accent:#65e6cf;--re-primary:#08796c;--re-danger:#f1a49c;--re-danger-bg:#302b37}
#results-modal-backdrop.pr-result-arena .modal{display:flex!important;flex-direction:column!important;width:min(100%,540px)!important;max-width:540px!important;max-height:calc(100vh - 24px)!important;max-height:calc(100dvh - 24px)!important;min-height:0!important;margin:0!important;border:1px solid var(--re-edge)!important;border-radius:18px!important;background:var(--re-surface)!important;color:var(--re-ink)!important;box-shadow:0 24px 80px #0005!important;overflow:hidden!important;animation:prResultEnter .2s ease-out!important}
#results-modal-backdrop.pr-result-arena .modal-header{flex:none;padding:17px 20px!important;background:var(--re-surface)!important;border-bottom:1px solid var(--re-edge)!important;gap:8px}
#results-modal-backdrop.pr-result-arena .modal-header h3{display:block!important;color:var(--re-ink)!important;font-size:22px!important;line-height:1.2}
#results-modal-backdrop .pr-re-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;text-transform:uppercase;color:var(--re-accent);margin-bottom:4px}
#results-modal-backdrop .pr-re-subtitle{font-size:12px;color:var(--re-muted);margin:5px 0 0}
#results-modal-backdrop.pr-result-arena .modal-close{width:40px!important;height:40px!important;border:1px solid var(--re-edge)!important;border-radius:10px!important;background:var(--re-soft)!important;color:var(--re-ink)!important;font-size:25px!important;flex:none}
#results-modal-backdrop.pr-result-arena .modal-body{padding:18px 20px!important;flex:1 1 auto;min-height:0;overflow-y:auto!important;overscroll-behavior:contain;display:flex;flex-direction:column;gap:14px}
#results-modal-backdrop .pr-re-section-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--re-muted);margin:0 0 8px;text-align:left}
#results-modal-backdrop .pr-re-score-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;align-items:stretch;min-width:0}
#results-modal-backdrop .pr-re-player{background:var(--re-soft);border:1px solid var(--re-edge);border-radius:12px;padding:10px;min-width:0;display:flex;flex-direction:column;gap:8px;justify-content:space-between}
#results-modal-backdrop .pr-re-player-number{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--re-muted);font-weight:700}
#results-modal-backdrop.pr-result-arena .modal-player-header{display:flex!important;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
#results-modal-backdrop.pr-result-arena .modal-player-header label{font-size:16px!important;line-height:1.25!important;overflow-wrap:anywhere;white-space:normal!important;text-align:left;color:var(--re-ink)!important;margin:0!important}
#results-modal-backdrop.pr-result-arena .number-stepper{display:grid!important;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:3px;min-width:0;width:100%;max-width:180px;margin:0 auto}
#results-modal-backdrop.pr-result-arena .number-stepper-btns{display:contents!important}
#results-modal-backdrop.pr-result-arena .number-stepper-input{grid-column:2;grid-row:1;min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;padding:2px!important;border:1px solid var(--re-edge)!important;border-radius:8px!important;background:var(--re-surface)!important;color:var(--re-ink)!important;font-variant-numeric:tabular-nums}
#results-modal-backdrop.pr-result-arena .modal-score-input{font-size:36px!important;height:56px!important;font-weight:800!important}
#results-modal-backdrop.pr-result-arena .number-stepper-btn{display:grid!important;place-items:center;min-width:0!important;width:100%!important;height:44px!important;border-radius:8px!important;background:var(--re-surface)!important;color:var(--re-accent)!important;border:1px solid var(--re-edge)!important;font-size:0!important;box-sizing:border-box;padding:0!important}
#results-modal-backdrop.pr-result-arena .number-stepper-btn:before{font-size:23px;font-weight:600;line-height:1}
#results-modal-backdrop.pr-result-arena .number-stepper-up{grid-column:3;grid-row:1}
#results-modal-backdrop.pr-result-arena .number-stepper-up:before{content:"+"}
#results-modal-backdrop.pr-result-arena .number-stepper-down{grid-column:1;grid-row:1}
#results-modal-backdrop.pr-result-arena .number-stepper-down:before{content:"−"}
#results-modal-backdrop.pr-result-arena .number-stepper-btn:hover{background:var(--re-accent)!important;color:var(--re-surface)!important;border-color:var(--re-accent)!important}
#results-modal-backdrop.pr-result-arena :is(button,input,a):focus-visible{outline:2px solid var(--re-accent)!important;outline-offset:2px}
#results-modal-backdrop .pr-re-detail{border:1px solid var(--re-edge);border-radius:12px;padding:11px 12px;background:var(--re-surface);min-width:0}
#results-modal-backdrop .pr-re-detail label{display:flex!important;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;margin:0!important;font-size:14px!important}
#results-modal-backdrop .pr-re-detail-copy{display:flex;flex-direction:column;gap:3px}
#results-modal-backdrop .pr-re-detail-copy small{font-size:12px;font-weight:400;color:var(--re-muted)}
#results-modal-backdrop #detailedScoring{appearance:none!important;width:42px!important;height:25px!important;min-width:42px!important;position:relative;border:1px solid var(--re-edge);border-radius:20px;background:var(--re-soft);margin:0!important;cursor:pointer;order:2}
#results-modal-backdrop #detailedScoring:before{content:"";position:absolute;width:17px;height:17px;left:3px;top:3px;background:var(--re-muted);border-radius:50%;transition:transform .15s}
#results-modal-backdrop #detailedScoring:checked{background:var(--re-primary);border-color:var(--re-primary)}
#results-modal-backdrop #detailedScoring:checked:before{transform:translateX(17px);background:white}
#results-modal-backdrop.pr-result-arena #scoringTable{width:100%!important;max-width:none!important;margin:10px 0 0!important;background:var(--re-surface)!important;border:0!important;border-top:1px solid var(--re-edge)!important;border-radius:0!important}
#results-modal-backdrop.pr-result-arena #scoringTable .table-header{display:grid!important;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr);gap:8px;padding:9px 0!important;background:transparent!important;border:0!important;color:var(--re-muted)!important;font-size:11px!important}
#results-modal-backdrop.pr-result-arena #tableBody{counter-reset:game;gap:6px!important;padding:0!important}
#results-modal-backdrop.pr-result-arena #tableBody .table-row{counter-increment:game;display:grid!important;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr);gap:8px!important;align-items:center;min-width:0}
#results-modal-backdrop.pr-result-arena #tableBody .table-row:before{content:"Г" counter(game);font-size:12px;font-weight:700;color:var(--re-muted)}
#results-modal-backdrop.pr-result-arena #tableBody .table-row input{height:44px!important;font-size:20px!important;flex:none!important}
#results-modal-backdrop .pr-re-technical{border:1px solid var(--re-edge);border-radius:12px;padding:11px 12px;background:var(--re-surface)}
#results-modal-backdrop.pr-result-arena .withdrawal-action-row{max-width:none!important;align-items:flex-start!important}
#results-modal-backdrop.pr-result-arena .withdrawal-dropdown-wrap{max-width:none!important}
#results-modal-backdrop.pr-result-arena .withdrawal-toggle-btn{min-height:44px!important;font-size:14px!important;color:var(--re-ink)!important}
#results-modal-backdrop.pr-result-arena .withdrawal-btn-text{white-space:normal!important;overflow-wrap:anywhere}
#results-modal-backdrop.pr-result-arena .withdrawal-dropdown-menu{position:static!important;width:100%!important;min-width:0!important;max-width:none!important;margin-top:5px!important;background:var(--re-surface)!important;border-color:var(--re-edge)!important;box-shadow:none!important}
#results-modal-backdrop.pr-result-arena .withdrawal-dropdown-menu .dropdown-item{white-space:normal!important;overflow-wrap:anywhere;min-height:38px;font-size:13px!important;color:var(--re-ink)!important}
#results-modal-backdrop.pr-result-arena .withdraw-all-matches-box{max-width:none!important}
#results-modal-backdrop.pr-result-arena .modal-footer{flex:none;display:grid!important;grid-template-columns:auto auto minmax(0,1fr);padding:12px 20px!important;gap:8px!important;background:var(--re-surface)!important;border-color:var(--re-edge)!important}
#results-modal-backdrop.pr-result-arena .modal-footer button{margin:0!important;min-height:46px;padding:9px 13px!important;border-radius:9px!important;font-size:14px!important;white-space:nowrap}
#results-modal-backdrop.pr-result-arena #resetResults{background:transparent!important;color:var(--re-danger)!important;border:1px solid var(--re-edge)!important;box-shadow:none!important}
#results-modal-backdrop.pr-result-arena #resetResults:hover{background:var(--re-danger-bg)!important;border-color:var(--re-danger)!important}
#results-modal-backdrop.pr-result-arena #submitResults{background:var(--re-primary)!important;color:white!important;border:1px solid transparent!important;box-shadow:0 3px 9px #08796c30!important}
#results-modal-backdrop.pr-result-arena #ScoreErrorMsg{border:1px solid var(--re-danger);background:var(--re-danger-bg);color:var(--re-danger)!important;border-radius:8px;padding:10px;text-align:left!important;margin:0!important}
@keyframes prResultEnter{from{opacity:.3;transform:translateY(6px) scale(.985)}to{opacity:1;transform:none}}
@media(max-width:520px){
 #results-modal-backdrop.pr-result-arena{padding:8px!important}
 #results-modal-backdrop.pr-result-arena .modal{max-height:calc(100dvh - 16px)!important;border-radius:14px!important}
 #results-modal-backdrop.pr-result-arena .modal-header{padding:13px 12px!important}
 #results-modal-backdrop.pr-result-arena .modal-header h3{font-size:20px!important}
 #results-modal-backdrop.pr-result-arena .modal-body{padding:12px!important;gap:10px}
 #results-modal-backdrop.pr-result-arena .modal-footer{padding:10px 12px!important;gap:6px!important}
 #results-modal-backdrop .pr-re-score-grid{gap:7px}
 #results-modal-backdrop .pr-re-player{padding:8px 6px}
 #results-modal-backdrop.pr-result-arena .number-stepper{grid-template-columns:32px minmax(0,1fr) 32px;gap:2px}
 #results-modal-backdrop.pr-result-arena .modal-score-input{font-size:32px!important}
 #results-modal-backdrop .pr-re-detail,#results-modal-backdrop .pr-re-technical{padding:10px 8px}
 #results-modal-backdrop.pr-result-arena #scoringTable .table-header,#results-modal-backdrop.pr-result-arena #tableBody .table-row{grid-template-columns:24px minmax(0,1fr) minmax(0,1fr);gap:4px!important}
 #results-modal-backdrop.pr-result-arena .modal-footer button{padding:8px 10px!important}
}
@media(max-height:480px){#results-modal-backdrop.pr-result-arena .modal-header{padding:8px 12px!important}#results-modal-backdrop .pr-re-subtitle{display:none}#results-modal-backdrop.pr-result-arena .modal-body{padding:10px 12px!important}#results-modal-backdrop.pr-result-arena .modal-footer{padding:8px 12px!important}}
@media(prefers-reduced-motion:reduce){#results-modal-backdrop.pr-result-arena .modal{animation:none!important}#results-modal-backdrop #detailedScoring:before{transition:none!important}}

#results-modal-backdrop.pr-result-arena #withdrawalDropdown:not(.show){display:none!important}
#results-modal-backdrop.pr-result-arena #withdrawalDropdown.show{display:block!important;visibility:visible!important;opacity:1!important;transform:none!important;max-height:none!important;overflow:visible!important}
#results-modal-backdrop.pr-result-arena #withdrawalDropdownBtn.is-active{color:var(--re-danger)!important;background:var(--re-danger-bg)!important;border-color:var(--re-danger)!important}

/* Use the explicit caret, not a second Bootstrap-generated triangle. */
#results-modal-backdrop.pr-result-arena #withdrawalDropdownBtn::after{display:none!important;content:none!important}

/* UX review: one-tap common results, uncluttered detailed entry. */
#results-modal-backdrop.pr-result-arena .pr-re-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;width:100%}
#results-modal-backdrop.pr-result-arena .pr-re-presets button{min-width:0;min-height:44px;padding:4px 0;border:1px solid var(--re-edge);background:var(--re-surface);color:var(--re-ink);border-radius:7px;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;cursor:pointer}
#results-modal-backdrop.pr-result-arena .pr-re-presets button[aria-pressed=true]{background:var(--re-primary);border-color:var(--re-primary);color:#fff}
#results-modal-backdrop.pr-result-arena .pr-re-presets button:disabled{opacity:.45;cursor:default}
#results-modal-backdrop.pr-result-arena.pr-re-no-presets .pr-re-presets{display:none!important}
#results-modal-backdrop.pr-result-arena #scoringTable .table-header span{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.2}
#results-modal-backdrop.pr-result-arena .number-stepper:has(input[readonly]) .number-stepper-btn{visibility:hidden;pointer-events:none}
@media(max-width:520px){#results-modal-backdrop.pr-result-arena #tableBody .number-stepper{grid-template-columns:minmax(0,1fr);max-width:none}#results-modal-backdrop.pr-result-arena #tableBody .number-stepper-input{grid-column:1;grid-row:1}#results-modal-backdrop.pr-result-arena #tableBody .number-stepper-btns{display:none!important}#results-modal-backdrop.pr-result-arena #tableBody .table-row input{height:48px!important;font-size:23px!important}#results-modal-backdrop.pr-result-arena .pr-re-presets button{font-size:12px}}
