/* Shared result presentation layer: does not own game state or animations. */
body .ug-results-shell {
  --ug-result-color: #e3c476;
  --ug-result-outline: rgba(227,196,118,.34);
  overflow-wrap: anywhere;
}
body :is(.ug-results-shell,.ug-results-actions)[data-ug-result-kind="ranking"] {
  --ug-result-color:#92d7c6; --ug-result-outline:rgba(146,215,198,.35);
}
body :is(.ug-results-shell,.ug-results-actions)[data-ug-result-kind="board"] {
  --ug-result-color:#e6c58d; --ug-result-outline:rgba(230,197,141,.35);
}
body :is(.ug-results-shell,.ug-results-actions)[data-ug-result-kind="round"] {
  --ug-result-color:#9ab7ed; --ug-result-outline:rgba(154,183,237,.35);
}
body .ug-results-shell :is(h2,h3,strong) {overflow-wrap:anywhere;}
body :is(.ug-results-shell,.ug-results-actions) :is(button,a):focus-visible,
body .ug-result-action:focus-visible {outline:3px solid var(--ug-result-color,#e3c476);outline-offset:3px;}
body .ug-results-actions {gap:10px;flex-wrap:wrap;align-items:center;}
body .ug-results-toolbar {display:flex;margin-top:14px;}
body .ug-results-actions[hidden], body .ug-results-toolbar[hidden],
body .ug-result-action[hidden] {display:none!important;}
body .ug-result-action {
  box-sizing:border-box;min-height:44px;min-width:92px;
  padding:10px 16px;border:1px solid var(--ug-result-outline,rgba(227,196,118,.35));
  border-radius:11px;font:700 14px/1.35 system-ui,Pretendard,sans-serif;
  letter-spacing:0;text-decoration:none;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;
  white-space:normal;
}
body .ug-result-home,body .ug-result-edit {
  background:transparent;color:inherit;
}
body .ug-results-shell[data-ug-result-kind] {scroll-margin-top:80px;}
body .ug-result-finished {border-color:var(--ug-result-outline);}
body .ug-results-toolbar .ug-result-replay {
  background:var(--ug-result-color);color:#192321;border-color:transparent;
}
@media(max-width:480px){
  body .ug-result-action {min-width:0;flex:1 1 auto;max-width:100%;padding:10px 12px;}
  body .ug-results-actions {gap:8px;}
}
@media(prefers-reduced-motion:reduce){
  body .ug-result-action {transition:none!important;animation:none!important;}
}

/* Horse racing uses the same result toolbar without changing the existing replay listener. */
body #raceResults .ug-results-toolbar {display:flex;align-items:stretch;}
body #raceResults .ug-results-toolbar .ug-result-replay {width:auto;flex:1 1 52%;}
body #raceResults .ug-results-toolbar .ug-result-home {flex:1 1 35%;}
