/* GSPO 4-person LIVE rank overlay: desktop + mobile; core score/storage not modified. */
.gspo-app .gspo-4p-live-bar{background:#fff;border:2px solid #d2e0d6;border-radius:13px;padding:7px 8px;box-shadow:0 2px 12px rgba(23,67,45,.08);margin:5px 0;box-sizing:border-box;color:#1b3b2b}
.gspo-app .gspo-4p-live-bar[hidden]{display:none!important}
.gspo-app .gspo-4p-heading{display:flex;justify-content:space-between;align-items:center;gap:7px;margin:0 0 5px;min-height:22px}
.gspo-app .gspo-4p-title{font-size:13px;color:#173d2a;white-space:nowrap;line-height:1.2}
.gspo-app .gspo-4p-sub{font-size:10px;color:#496451;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;text-align:center}
.gspo-app .gspo-4p-detail-trigger{border:1px solid #c7d9cd;background:#f1f7f3;color:#1c5b3d;border-radius:8px;padding:3px 8px;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer}
.gspo-app .gspo-4p-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.gspo-app .gspo-4p-player{min-width:0;background:#f7faf7;border:1px solid #dfe9df;border-radius:9px;padding:5px 4px;text-align:center;line-height:1.13}
.gspo-app .gspo-4p-name{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;font-size:12px}
.gspo-app .gspo-4p-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.gspo-app .gspo-4p-rank{flex-shrink:0;font-size:10px;font-weight:900;color:#165c40;background:#dfefe4;padding:2px 4px;border-radius:99px;white-space:nowrap}
.gspo-app .gspo-4p-total{font-size:20px;font-weight:950;letter-spacing:-1px;color:#132e23;margin-top:4px}
.gspo-app .gspo-4p-diff{font-size:10px;color:#52675b;font-weight:700;margin-top:1px}
.gspo-app .gspo-4p-current{font-size:10px;color:#8b5c21;font-weight:700;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gspo-app .gspo-4p-current.is-confirmed{color:#24714b}
/* During input, the original CSS forces the old rank display to 38px and hides all 4 players.
   Only suppress that STRIP after the enhanced board is safely initialized. */
body.gspo-playing .gspo-app.gspo-4p-rank-ready #gspo-live-board{display:none!important}
body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-live-bar:not([hidden]){display:block!important;position:relative!important;flex:0 0 108px!important;min-height:108px!important;height:108px!important;max-height:108px!important;overflow:hidden!important;margin:0!important;padding:5px 7px!important;border-radius:10px!important;box-shadow:none!important}
body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-heading{margin-bottom:2px!important;min-height:19px!important}
body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-player{padding:3px 2px!important}
body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-total{font-size:16px!important;margin-top:2px!important}
body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-current{margin-top:2px!important}
@media(max-width:520px){
  .gspo-app .gspo-4p-heading{gap:3px}.gspo-app .gspo-4p-title{font-size:11px}.gspo-app .gspo-4p-sub{font-size:9px}
  .gspo-app .gspo-4p-grid{gap:3px}.gspo-app .gspo-4p-name{display:block;font-size:11px}
  .gspo-app .gspo-4p-rank{display:inline-block;font-size:9px;padding:1px 3px;margin-top:1px}
  .gspo-app .gspo-4p-total{font-size:17px}.gspo-app .gspo-4p-diff{font-size:9px}.gspo-app .gspo-4p-current{font-size:9px}
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-live-bar:not([hidden]){flex-basis:102px!important;height:102px!important;min-height:102px!important;max-height:102px!important}
}
@media(max-height:760px){
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-live-bar:not([hidden]){flex-basis:90px!important;height:90px!important;min-height:90px!important;max-height:90px!important;padding:2px 5px!important}
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-title{font-size:10px!important}
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-player{padding:2px!important}
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-total{font-size:15px!important}
  body.gspo-playing .gspo-app.gspo-4p-rank-ready .gspo-4p-current{font-size:8px!important}
}
#gspo-4p-modal[hidden]{display:none!important}
#gspo-4p-modal{position:fixed;inset:0;z-index:1000000;background:rgba(0,0,0,.54);display:flex;justify-content:center;align-items:center;padding:18px;box-sizing:border-box;font-family:system-ui,'Malgun Gothic',sans-serif}
#gspo-4p-modal .gspo-4p-dialog{width:min(100%,590px);max-height:90dvh;overflow:auto;box-sizing:border-box;border-radius:20px;background:#fff;padding:20px;color:#173e2c;box-shadow:0 16px 40px rgba(0,0,0,.2)}
#gspo-4p-modal h2{margin:0 0 9px;font-size:25px;color:#173e2c}
#gspo-4p-modal .gspo-4p-close{float:right;border:0;border-radius:8px;background:#174e37;color:#fff;font-size:16px;padding:8px 12px;cursor:pointer}
#gspo-4p-modal .gspo-4p-explainer{color:#516b5c;font-size:14px;line-height:1.5;margin:0 0 15px}
#gspo-4p-modal .gspo-4p-modal-summary{font-size:14px;font-weight:700;color:#1c6242;background:#e9f4ed;border-radius:9px;padding:8px}
#gspo-4p-modal .gspo-4p-detail-row{display:grid;grid-template-columns:72px 1fr 85px;gap:8px;align-items:center;border-bottom:1px solid #e6ebe7;padding:13px 2px}
#gspo-4p-modal .gspo-4p-detail-row>strong{color:#256547;font-size:16px}
#gspo-4p-modal .gspo-4p-detail-row b{display:block;font-size:16px}
#gspo-4p-modal .gspo-4p-detail-row small{display:block;color:#5e7365;font-size:12px}
#gspo-4p-modal .gspo-4p-detail-score{text-align:right}
