body.pool-page{--pool-accent:#157d70;--pool-ink:#142c37}
body.pool-page .game-page-wrap{max-width:1500px}
.pool-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 18px}
.pool-heading h1{font-size:28px;letter-spacing:-1px;margin:2px 0;color:var(--pool-ink)}
.pool-eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;color:#157d70;text-transform:uppercase}
.pool-heading p{margin:5px 0;color:#5c6c75;font-size:13px}
.pool-page .pool-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px;align-items:start}
.pool-main{min-width:0}
.pool-score{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;padding:16px 20px;background:#fff;border:1px solid #dce5e8;border-radius:16px 16px 0 0;align-items:center}
.pool-player:last-child{text-align:right}.pool-player .player-strip{flex-wrap:wrap}.pool-player:last-child .player-strip{justify-content:flex-end}
.pool-score .player-strip .nm{font-size:14px}.pool-score .group-balls{display:flex;flex-wrap:wrap;gap:5px;min-height:22px;margin-top:7px}
.pool-player:last-child .group-balls{justify-content:flex-end}.pool-score #turnFlag{font-size:12px;color:#496574;white-space:nowrap}.pool-score #turnFlag.me{color:#137363}
.pool-score .gb{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;border:1px solid #536069;font:700 10px Arial;color:#17232d;background:#fff;box-shadow:inset -2px -3px 4px #0003}
.pool-score .gb.done{opacity:.2}.pool-score .group-label{font-size:11px;color:#60727b}
.pool-stage{background:#14212b;border:1px solid #273847;border-top:0;overflow:hidden;position:relative}
.pool-page #table{display:block;width:100%;max-width:100%;height:auto;touch-action:none;outline-offset:-5px;border:0;border-radius:0}
.pool-page #table:focus-visible{outline:3px solid #60dec6}
.pool-status{display:flex;gap:12px;align-items:center;padding:14px 20px;background:#20333f;color:#dfefee;border-radius:0 0 16px 16px;font-size:13px;min-height:56px}
.pool-status::before{content:'';width:7px;height:7px;background:#64ccb9;border-radius:50%;flex-shrink:0}
.pool-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 130px;gap:20px;align-items:center;margin-top:14px;padding:18px 20px;background:#fff;border:1px solid #dce5e8;border-radius:16px}
.pool-control-label{display:flex;justify-content:space-between;gap:8px;font-size:12px;font-weight:700;color:#344d59}.pool-control-label output{font-variant-numeric:tabular-nums;color:#157d70}
.pool-page input[type=range]{accent-color:#157d70;min-height:30px;margin:4px 0}
.pool-nudge{display:flex;gap:6px;align-items:center}.pool-nudge .yg-btn{min-height:32px;padding:3px 12px;font-size:17px}.pool-nudge small{font-size:11px;color:#637580;margin-left:4px}
.pool-page #shootButton{background:#157d70;color:#fff;border:0;font-size:16px;font-weight:700;min-height:54px;border-radius:12px;width:100%}
.pool-page #shootButton:disabled{background:#dce5e8;color:#60747d;box-shadow:none}
.pool-page #powerWrap{height:5px;border-radius:5px;background:#edf1f2;overflow:hidden}.pool-page #powerBar{height:100%;width:85%;background:linear-gradient(90deg,#2aa58d,#d6b460)}
.pool-side{display:grid;gap:16px;min-width:0}.pool-page .pool-side .yg-panel{margin:0;border:1px solid #dce5e8;box-shadow:none;border-radius:16px;overflow:hidden}
.pool-side .yg-panel-title{color:#29444e;background:#f8fafb;padding:14px 16px;font-size:13px}.pool-side .yg-panel-body{padding:14px}
.pool-page .pool-chat .chat-log{height:220px!important;max-height:none;background:#f8fafb;border:0;border-radius:8px;padding:10px}
.pool-page .chat-row{margin-top:10px;display:flex;gap:6px}.pool-page #chatIn{width:0;flex:1;min-width:0;font-size:13px}.pool-page #chatSend{padding:6px 10px}
.pool-spin-row{display:flex;align-items:center;gap:14px}.pool-page #spinPad{flex-shrink:0;width:86px;height:86px;touch-action:none}.pool-page #spinLabel{font-size:12px;line-height:1.5;color:#536b75;min-height:36px}
.pool-spin-settings{display:grid;gap:8px}.pool-spin-settings label{font-size:12px;color:#536b75}.pool-spin-settings select{font-size:13px;width:100%;padding:8px;border:1px solid #cbd7dc;border-radius:8px;background:white}
.pool-help{font-size:12px;line-height:1.7;color:#526872}.pool-help p{margin:8px 0}.pool-help summary{font-weight:700;cursor:pointer;color:#29444e}.pool-help kbd{background:#eff4f4;border:1px solid #d7e1e4;border-radius:4px;padding:1px 5px;font:11px inherit}.pool-help .yg-btn{margin-top:8px}
@media(max-width:1050px){.pool-page .pool-layout{grid-template-columns:1fr}.pool-side{grid-template-columns:1fr 1fr}.pool-chat{grid-row:span 2}.pool-heading{margin-bottom:12px}.pool-controls{gap:14px}}
@media(max-width:600px){.pool-heading h1{font-size:23px}.pool-heading p{font-size:12px;max-width:230px}.pool-score{padding:12px 10px;gap:6px}.pool-score .yg-avatar,.pool-score [class^=rt-]{display:none}.pool-score .player-strip .nm{font-size:12px;max-width:100px;overflow:hidden;text-overflow:ellipsis}.pool-score #turnFlag{font-size:10px}.pool-score .gb{width:15px;height:15px;font-size:9px}.pool-score .group-balls{gap:3px}.pool-controls{grid-template-columns:1fr 1fr;gap:14px;padding:14px}.pool-controls #shootButton{grid-column:1/-1;min-height:48px}.pool-side{grid-template-columns:1fr}.pool-status{font-size:12px;padding:12px;min-height:55px}.pool-nudge small{display:none}.pool-heading .yg-btn{font-size:12px;padding:8px}.pool-help{font-size:13px}}
/* Fit the table to available height without changing its aspect ratio or hit areas. */
@media(min-width:1060px) and (min-height:600px){
  body.pool-page .pool-heading{margin:0 0 8px}
  body.pool-page .pool-heading h1{font-size:21px}
  body.pool-page .pool-heading .pool-eyebrow,body.pool-page .pool-heading p{display:none}
  body.pool-page .pool-score{padding:8px 14px}
  body.pool-page #table{width:auto;max-width:100%;max-height:calc(100dvh - 460px);margin:auto}
  body.pool-page .pool-controls{padding:10px 14px;margin-top:8px;gap:12px}
  body.pool-page .pool-status{padding:8px 14px;min-height:38px}
  body.pool-page.game-focus #table{max-height:calc(100dvh - 330px)}
}
body.pool-page .pool-controls{position:sticky;bottom:8px;z-index:5;box-shadow:0 4px 18px #142c3720}
@media(max-width:600px){.pool-heading .pool-eyebrow,.pool-heading p{display:none}}
@media(max-width:600px){body.pool-page .pool-controls{bottom:0;gap:6px;padding:8px 12px}body.pool-page .pool-controls #shootButton{grid-column:auto;grid-row:1/3;grid-column:2;width:100%;min-height:48px}body.pool-page .pool-controls{grid-template-columns:minmax(0,1fr) 90px}body.pool-page .pool-nudge{display:none}}

.pool-practice-body{font-size:13px;line-height:1.6;color:#344d59}
.pool-practice-body p{margin:0 0 12px}
.practice-actions,.practice-links{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.practice-links a{padding:6px 0;margin-right:10px;font-weight:600;color:#126a60}
.pool-practice-body .practice-note{font-size:12px;color:#60727b;margin-bottom:0}
.pool-page .pool-side [hidden],.pool-page button[hidden]{display:none!important}

/* Charcoal surround complements the walnut cabinet and green tournament cloth. */
body.pool-page .pool-stage{background:#171c1a;border-color:#303b32}
body.pool-page .pool-status{background:#1b3026;color:#e3eee5}
