/* Calculator surfaces and hierarchy. Scoped so replay and learning stay independent. */
body:not(.compact-tab)>.appbar{border-bottom:0;background:transparent;min-height:64px}
body:not(.compact-tab)>.appbar #equity-capture,
body:not(.compact-tab)>.appbar #icm-tab{height:44px;min-height:44px;border:0;border-radius:12px;background:#29232c;color:#f2d39c;box-shadow:none}
body:not(.compact-tab)>.appbar #equity-capture{width:44px;padding:10px}
body:not(.compact-tab)>.appbar #icm-tab{padding:10px 16px;font-size:15px}
body:not(.compact-tab)>.appbar .toolbar:empty{display:none}

#equity-screen{max-width:1040px}
#equity-screen .board-strip{display:grid;grid-template-columns:1fr;gap:10px;padding:14px 16px 20px;border:0;border-radius:18px;background:linear-gradient(120deg,#29232c,#201d25);box-shadow:none}
#equity-screen .board-caption{display:block;grid-column:1;grid-row:1;align-self:center;min-height:36px;text-align:left;font-size:12px;font-weight:700;letter-spacing:.14em;color:#c0b2a0}
#equity-screen .board-tools{position:static;grid-column:1;grid-row:1;justify-self:end;align-self:center;display:flex}
#equity-screen #clear-board{display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:8px;border:0;border-radius:10px;background:transparent;color:#d7c5a6}
#equity-screen #clear-board:hover{background:#ffffff0a}
#equity-screen #clear-board svg{width:22px;height:22px}
#equity-screen .board-strip .board-slots{grid-column:1;grid-row:2;display:flex;justify-content:center;width:100%;gap:5px;margin:0}
#equity-screen .board-strip .board-slot{flex:0 1 60px;min-width:0;gap:4px}
#equity-screen .board-strip .board-slot:nth-child(n+4){margin-left:9px}
#equity-screen .board-strip .playing-card{width:100%;max-width:60px;height:auto;aspect-ratio:54/76;padding:4px}
#equity-screen .board-strip .slot-label{font-size:11px;line-height:1.2;color:#b5aca1}
#equity-screen .status-strip{padding:0}
#equity-screen .status-strip:has(#mode:empty){display:none}
#equity-screen .status-strip:not(:has(#mode:empty)){padding:10px 2px 0}

#equity-screen .equity-players-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 10px}
#equity-screen .equity-players-heading h2{margin:0;font-size:16px;font-weight:650;color:#d7cec2}
#equity-screen #add-player{display:flex;align-items:center;gap:4px;min-height:40px;padding:6px 10px;border:0;border-radius:10px;background:#30272e;color:#f2d39c;font-size:14px}
#equity-screen #add-player svg{width:18px;height:18px}
#equity-screen #player-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0}
#equity-screen #player-list .player{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0;min-height:0;padding:14px;border:0;border-radius:18px;background:#211d25;text-align:center}
#equity-screen .equity-player-header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;min-height:40px}
#equity-screen .equity-player-header h2{flex:1;min-width:0;width:auto;margin:0;text-align:left;line-height:1.35}
#equity-screen .player .name-button,#equity-screen #name-a{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;width:auto;min-height:40px;max-width:100%;padding:4px 0;border:0;background:transparent;color:#f5e8d4;font-size:18px;font-weight:700;text-align:left}
#equity-screen .equity-own-nickname{min-width:0;color:inherit}
#equity-screen .equity-name-edit{flex:none;font-size:16px;color:#b4a182}
#equity-screen .player .range-side{position:static;flex:none;align-self:center;width:auto;min-width:0;min-height:36px;padding:6px 10px;border:0;border-radius:9px;background:#362e36;color:#e6c993;font-size:14px;font-weight:600}
#equity-screen .player .remove-player{position:static;flex:none;align-self:center;min-width:32px;min-height:36px;padding:4px;border:0;border-radius:8px;color:#bfb4ba;font-size:24px}
#equity-screen .player .hole-cards{align-self:center;justify-content:center;gap:7px;width:auto;max-width:100%;min-height:84px;margin:0}
#equity-screen .player .playing-card,#equity-screen .dense-grid .player .playing-card{width:58px;height:82px;flex:none}
#equity-screen .player .hole-cards.has-range{width:100%;max-width:220px}
#equity-screen .player .range-preview-text{font-size:18px}
#equity-screen .player .player-stats{display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;margin:0;padding:0;border:0}
#equity-screen .player-stats>div{display:flex;flex-direction:row;align-items:baseline;justify-content:center;gap:5px;min-width:0}
#equity-screen .player-stats span{font-size:13px;line-height:1.4;color:#ada4ad}
#equity-screen .player-stats strong{font-size:15px;font-weight:550;line-height:1.3;color:#c5bdc6}
#equity-screen .player-stats>div:last-child{grid-column:1/-1;grid-row:1;gap:9px}
#equity-screen .player-stats>div:last-child span{font-size:13px;color:#dfc799}
#equity-screen .player-stats>div:last-child strong,#equity-screen .player-stats .equity-value{font-size:32px;font-weight:800;line-height:1.2;letter-spacing:-.03em;color:#f8d58d}
#equity-screen .result-note{margin:0;padding:10px 4px 0;font-size:12px;color:#aca3ae}

#equity-screen .equity-tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 8px}
#equity-screen .equity-tools-grid>button{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;min-width:0;min-height:76px;margin:0;padding:15px;border:0;border-radius:14px;background:#282229;box-shadow:none;color:#eed9b3;font-size:16px;font-weight:650;line-height:1.4;text-align:left;word-break:keep-all;overflow-wrap:anywhere}
#equity-screen .equity-tools-grid>button:nth-child(n+3){background:#211e27;color:#d3cbd8}
#equity-screen .equity-tools-grid>button>svg{width:23px;height:23px;color:#cfb17e}
#equity-screen .equity-tools-grid>button>span:last-child{margin:0;font-size:21px;color:#a69a89}
#equity-screen button:focus-visible{outline:2px solid #f4d295;outline-offset:3px}

/* A compact hand keypad; keep board selection independent. */
#hole-dialog{width:min(480px,calc(100vw - 24px));padding:20px;max-height:calc(100dvh - 24px);overflow:auto}
#hole-dialog .hole-picker-heading{display:grid;grid-template-columns:minmax(0,1fr) auto 40px;gap:8px;margin:0 0 16px;align-items:center}
#hole-dialog .hole-picker-heading h2{min-width:0;font-size:19px;line-height:1.35;overflow-wrap:anywhere}
#hole-dialog .hole-input-modes{display:flex;gap:4px;align-items:center}
#hole-dialog .hole-input-modes button{display:grid;place-items:center;min-height:40px;padding:6px 10px;border:0;border-radius:10px;background:#332b39;color:#dfc695;font-size:13px;font-weight:650}
#hole-dialog #hole-manual{width:40px;padding:9px}
#hole-dialog #close-hole{display:grid;place-items:center;width:40px;height:40px;padding:9px;border:0;background:transparent;color:#c9becd;box-shadow:none}
#hole-dialog .hole-picker-heading svg{width:22px;height:22px}
#hole-dialog #hole-draft{gap:10px;min-height:0;margin:8px auto 20px;padding:5px 0}
#hole-dialog #hole-draft .playing-card{width:58px;height:82px}
#hole-dialog #hole-draft .active-card{outline-width:2px;outline-offset:3px;transform:none}
#hole-dialog .card-keypad{max-width:none;width:100%;margin:0;padding:0;border:0;background:transparent;box-shadow:none;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(0,1.12fr);grid-template-rows:repeat(4,54px);gap:7px}
#hole-dialog .card-keypad button{min-height:44px;padding:0;border:0;border-radius:10px;background:#352d3d;box-shadow:none;font-size:27px;font-weight:650}
#hole-dialog .card-keypad .key-selected{background:#ecc878;color:#24190a;box-shadow:inset 0 0 0 1px #ffebbf}
#hole-dialog .card-keypad .suit-key{margin-left:7px;border:0;border-radius:50%;background:#28222f}
#hole-dialog .card-keypad .suit-key:disabled{opacity:.4}
#hole-dialog #hole-clear{grid-column:2/5;grid-row:4;display:grid;place-items:center;background:#292330;color:#c5b5a5}
#hole-dialog #hole-clear svg{width:24px;height:24px}
#hole-dialog .hole-actions{display:block;margin:16px 0 0}
#hole-dialog #apply-hole{display:block;width:100%;min-height:48px;padding:10px 16px;border:0;border-radius:12px;font-size:17px}
@media(max-width:380px){
 #hole-dialog{padding:16px}
 #hole-dialog .hole-picker-heading{gap:5px}
 #hole-dialog .hole-picker-heading h2{font-size:17px}
 #hole-dialog .hole-input-modes button{padding-inline:8px}
 #hole-dialog .card-keypad{grid-template-rows:repeat(4,48px);gap:6px}
 #hole-dialog .card-keypad .suit-key{margin-left:5px}
}
@media(max-height:600px){
 #hole-dialog{padding:12px 16px}
 #hole-dialog .hole-picker-heading{margin-bottom:8px}
 #hole-dialog #hole-draft{margin:4px auto 10px}
 #hole-dialog #hole-draft .playing-card{width:42px;height:60px}
 #hole-dialog .card-keypad{grid-template-rows:repeat(4,44px);gap:5px}
 #hole-dialog .hole-actions{margin-top:10px}
}

@media(max-width:599px){
 #equity-screen .board-strip{padding:8px 12px 14px;gap:6px}
 #equity-screen .board-strip .board-slot{flex-basis:54px}
 #equity-screen .board-strip .board-slot:nth-child(n+4){margin-left:7px}
 #equity-screen #player-list{grid-template-columns:1fr;gap:10px}
 #equity-screen #player-list .player{padding:12px 16px;gap:8px}
 #equity-screen .player .hole-cards{min-height:76px}
 #equity-screen .player .playing-card,#equity-screen .dense-grid .player .playing-card{width:54px;height:76px}
 #equity-screen .player .player-stats{grid-template-columns:1fr 1fr 1.5fr;align-items:center;gap:6px}
 #equity-screen .player-stats>div{flex-direction:column;gap:2px}
 #equity-screen .player-stats>div:last-child{grid-column:3;grid-row:1;gap:2px}
 #equity-screen .player-stats strong{font-size:17px}
 #equity-screen .player-stats>div:last-child strong,#equity-screen .player-stats .equity-value{font-size:30px}
 #equity-screen .equity-tools-grid>button{grid-template-columns:minmax(0,1fr) auto;gap:8px;min-height:88px;padding:12px;font-size:15px}
 #equity-screen .equity-tools-grid>button>svg{grid-column:1;grid-row:1;width:21px;height:21px}
 #equity-screen .equity-tools-grid>button>span:nth-child(2){grid-column:1;grid-row:2}
 #equity-screen .equity-tools-grid>button>span:last-child{grid-column:2;grid-row:1/3}
}
