/* Casino Hold'em. Computer: the two pay tables stand on both sides of the felt, the bet dock under it */
#game:has(.ch){background:radial-gradient(ellipse at 50% 0,rgba(232,180,34,.16),transparent 55%),linear-gradient(#1a0a12,#0a0408)}
.ch{--chw:clamp(40px,calc((100vh - 500px) / 4.5),84px);display:flex;flex-direction:column;gap:8px;width:100%;max-width:1060px;margin:0 auto;user-select:none;container-type:inline-size}
.ch-title{flex:none;text-align:center;font-family:var(--display);font-size:24px;letter-spacing:5px;color:#f6d36a;text-shadow:0 0 18px #e8b42299;line-height:1.1;direction:ltr}
.ch-title small{display:block;direction:rtl;font-family:var(--body);font-size:12px;letter-spacing:0;color:#e9cfd4;text-shadow:none;opacity:.8}
.ch-main-area{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr) minmax(0,190px);gap:8px;align-items:stretch}
.ch-pays{align-self:center;display:flex;flex-direction:column;gap:2px;padding:8px;border-radius:14px;background:linear-gradient(#2a0d16,#12050a);border:1px solid #e8b42266;text-align:center}
.ch-pays h4{margin:0;font-family:var(--display);font-size:17px;color:var(--gold)}
.ch-pays small{font-size:11px;opacity:.7;margin-bottom:4px;line-height:1.3}
.ch-pays div{display:flex;justify-content:space-between;gap:6px;padding:2px 8px;border-radius:7px;font-size:13px;text-align:start}
.ch-pays div b{color:#f6d36a;direction:ltr}
.ch-pays div.hit{background:linear-gradient(90deg,#f6d36a,#d9a62e);color:#241400;font-weight:800}.ch-pays div.hit b{color:#241400}
.ch-table{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:8px;min-width:0;border-radius:120px/90px;background:var(--tfp,none),radial-gradient(ellipse at 50% 30%,var(--tf1,#16704a),var(--tf2,#0a3d27) 60%,var(--tf3,#052216));border:6px solid #2b2b33;box-shadow:0 0 0 2px #e8b422aa,inset 0 0 50px #000a}
.ch .ch-help,.ch .ch-jbtn{position:absolute;top:12px;z-index:5;width:34px;height:34px;min-width:0;padding:0;border-radius:50%}
.ch .ch-help{right:22px}.ch .ch-jbtn{left:22px;font-size:16px;background:#000a;border:1px solid #e8b422aa}
.ch-side{display:flex;flex-direction:column;align-items:center;gap:3px}
.ch-who{display:flex;align-items:center;justify-content:center;gap:8px;min-height:22px;font-size:12px;color:#e9dfc4}
.ch-tag{padding:0 10px;border-radius:10px;background:#000a;border:1px solid #e8b42255;font-size:13px;line-height:20px;color:#fff3b0;white-space:nowrap}
.ch-tag:empty{display:none}
.ch-tag.win{background:var(--gold);color:#241400}
.ch-line{display:grid;grid-template-columns:var(--chw) auto var(--chw);align-items:center;gap:18px;direction:ltr}
.ch-face{justify-self:end;width:var(--chw);height:var(--chw);border-radius:50%;overflow:hidden;border:2px solid var(--gold);background:#2a0a12}
.ch-face svg{display:block;width:138%;height:auto;margin:-9% -19% 0}
.ch-shoe{justify-self:start;width:calc(var(--chw)*.8);height:calc(var(--chw)*.56);border-radius:7px;background:linear-gradient(150deg,#8e1426,#3a0610);border:2px solid #e8b422;box-shadow:3px 3px 0 #000a,inset 0 0 0 3px #0005}
.ch-cards{display:flex;justify-content:center;gap:6px;direction:ltr}
.ch-slot{flex:none;width:var(--chw);height:calc(var(--chw)*1.4);border-radius:calc(var(--chw)*.08);position:relative}
.ch-slot:empty{border:1.5px dashed #ffffff30;background:#0000001f}
.ch-slot .pc{--cw:var(--chw);margin:0;display:block;transition:transform .25s,opacity .25s,filter .25s}
.ch-slot.won .pc{transform:translateY(-4px)}
.ch-slot.won .pc-front{box-shadow:0 0 0 3px #f6d36a,0 0 16px #f6d36a}
.ch-slot.dim .pc{filter:brightness(.55) saturate(.6)}
.ch-msg{min-height:24px;font-size:17px;font-weight:700;text-align:center;line-height:1.35}
.ch-msg.win{color:#8dffa4;text-shadow:0 0 12px #2e9d4a}.ch-msg.lose{color:#ffab9e}
.ch-spots{display:grid;grid-template-columns:repeat(3,92px);justify-content:center;gap:14px;direction:rtl}
.ch-spot{display:flex;flex-direction:column;align-items:center;justify-content:center;height:56px;border-radius:28px;border:2px dashed #e8b42266;background:#0004;line-height:1.15}
.ch-spot span{font-size:11px;color:#e9dfc4}
.ch-spot b{font-size:16px;color:var(--gold);direction:ltr}
.ch-spot em{font-style:normal;font-size:10.5px;min-height:12px;white-space:nowrap;opacity:.85;unicode-bidi:plaintext}
.ch-spot.on{border-style:solid;border-color:#e8b422;background:#0008}
.ch-spot.main.on{box-shadow:0 0 12px #e8b42277}
.ch-spot.win{border-color:#7CFC8A;box-shadow:0 0 14px #2fd65c88}.ch-spot.win em{color:#8dffa4;font-weight:800}
.ch-spot.lose{border-color:#a8404a;opacity:.7}.ch-spot.lose em{color:#ffab9e}
.ch-dock{flex:none;display:grid;grid-template-columns:minmax(0,1fr);gap:6px;padding:10px;border-radius:16px;background:linear-gradient(#1d1218,#0b070a);border:1px solid #e8b42266;width:100%;max-width:780px;margin:0 auto}
/* both button rows stand in the same place, so nothing moves when they swap */
.ch-betting,.ch-deciding{grid-area:1/1}
.ch-betting{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr);gap:12px;align-items:stretch}
.ch-deciding{display:grid;grid-template-columns:repeat(2,minmax(0,260px));justify-content:center;align-content:center;gap:16px;visibility:hidden}
.ch[data-ph=flop] .ch-betting{visibility:hidden}.ch[data-ph=flop] .ch-deciding{visibility:visible}
.ch-pick{display:flex;flex-direction:column;gap:5px;min-width:0}
.ch-pick label{font-size:12px;text-align:center;color:#e9dfc4}
.ch .ch-go{font-family:var(--display);font-size:24px;padding:4px 8px;line-height:1.2}
.ch .ch-call,.ch .ch-fold{font-family:var(--display);font-size:24px;height:58px;padding:0 8px;white-space:nowrap}
.ch .ch-call:not(:disabled){background:linear-gradient(#5ee08a,#1d8a47);color:#04210f;border-color:#b6ffca}
.ch-fold{background:linear-gradient(#a8323f,#5a0f18);border-color:#ff9aa2}
.ch-dock button:disabled{opacity:.45}
.ch-lim{text-align:center;font-size:11px;opacity:.65}
/* the journal window */
.ch-jr ul{list-style:none;margin:0;padding:0}.gh-box.ch-jr li{padding:8px 4px;border-bottom:1px solid #ffffff22;margin:0}
.ch-jh{display:flex;justify-content:space-between;gap:8px}.ch-jh b.win{color:#7CFC8A}.ch-jh b.lose{color:#ff8a80}.ch-jh b.n{direction:ltr}
.ch-jc{display:flex;align-items:center;gap:6px;font-size:13px;margin-top:3px}.ch-jc>span{width:44px;opacity:.7}.ch-jc bdi{display:flex;gap:3px;direction:ltr}.ch-jc small{opacity:.8}
.ch-mc{font-style:normal;font-weight:800;font-size:12px;min-width:30px;text-align:center;padding:1px 3px;border-radius:5px;background:#f6f1e4;color:#14141a}.ch-mc.red{color:#c01828}
.ch-jb{font-size:12px;opacity:.65;margin-top:3px}
/* a computer window that is not wide: the pay tables move under the felt, side by side */
@container (max-width:760px){
  body:not(.phone) .ch-main-area{grid-template-columns:1fr 1fr}
  body:not(.phone) .ch-table{grid-column:1/-1;grid-row:1}
  body:not(.phone) .ch-pays{grid-row:2;align-self:stretch}
}
/* a low computer screen */
@media(max-height:820px){
  body:not(.phone) .ch{gap:5px}
  body:not(.phone) .ch-title{font-size:19px}body:not(.phone) .ch-title small{display:none}
  body:not(.phone) .ch-table{gap:3px;padding:5px;border-width:4px}
  body:not(.phone) .ch-who{min-height:18px}body:not(.phone) .ch-tag{line-height:16px;font-size:12px}
  body:not(.phone) .ch-msg{font-size:15px;min-height:20px}
  body:not(.phone) .ch-spot{height:46px}body:not(.phone) .ch-spot b{font-size:14px}body:not(.phone) .ch-spot span{font-size:10px}
  body:not(.phone) .ch-dock{padding:6px 10px;gap:3px}body:not(.phone) .ch-pick{gap:3px}
  body:not(.phone) .ch-lim{display:none}
  body:not(.phone) .ch-pays div{font-size:12px;padding:1px 8px}
}
@media(max-height:730px){body:not(.phone) main:has(.ch) #game{min-height:0;padding-block:8px}body:not(.phone) main:has(.ch) #chat{min-height:0;height:calc(100dvh - 130px)}}
@media(max-height:660px){body:not(.phone) .ch-title{display:none}body:not(.phone) .ch-who>span{display:none}}
/* ---------- phone: one screen, the felt takes what is left, the buttons stay at the bottom ---------- */
body.phone.ingame #game:has(.ch){padding:0}
body.phone .ch{flex:1;min-height:0;max-width:100%;gap:6px;padding-top:6px}
body.phone .ch-title,body.phone .ch-pays,body.phone .ch-lim{display:none}
body.phone .ch-main-area{flex:1;min-height:0;display:flex;flex-direction:column;padding:0 6px}
body.phone .ch-table{flex:1;min-height:0;container-type:size;justify-content:space-evenly;gap:2px;padding:4px;border-width:4px;border-radius:26px}
body.phone .ch-table>*{--chw:min(calc((100cqw - 32px)/5),calc((100cqh - 150px)/4.35),84px)}
body.phone .ch .ch-help,body.phone .ch .ch-jbtn{top:7px}
body.phone .ch .ch-help{right:8px}body.phone .ch .ch-jbtn{left:8px}
body.phone .ch-cards{gap:5px}
body.phone .ch-line{gap:10px}
body.phone .ch-who{min-height:20px}
body.phone .ch-msg{font-size:14px;min-height:20px;padding-inline:6px}
body.phone .ch-spots{grid-template-columns:repeat(3,minmax(0,96px));gap:8px;width:100%;padding:0 6px}
body.phone .ch-spot{height:50px}
body.phone .ch-dock{gap:0;border:0;border-top:2px solid var(--gold2);border-radius:0;padding:6px 8px calc(env(safe-area-inset-bottom) + 6px);max-width:100%}
body.phone .ch-betting{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 10px}
body.phone .ch-pick{gap:4px}
body.phone .ch-pick label{line-height:1.2}
body.phone .ch .ch-go{grid-column:1/-1;height:46px;padding:0;font-size:21px}
body.phone .ch-deciding{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:10px}
body.phone .ch .ch-call,body.phone .ch .ch-fold{height:64px;font-size:22px}
/* a low phone */
@media(max-height:700px){
  body.phone .ch{gap:4px;padding-top:4px}
  body.phone .ch-table>*{--chw:min(calc((100cqw - 32px)/5),calc((100cqh - 112px)/4.3),84px)}
  body.phone .ch-who>span{display:none}
  body.phone .ch-who{min-height:16px}body.phone .ch-tag{font-size:11px;line-height:14px}
  body.phone .ch-msg{font-size:13px;min-height:17px;line-height:1.25}
  body.phone .ch-spot{height:42px}body.phone .ch-spot span,body.phone .ch-spot em{font-size:10px;min-height:0}body.phone .ch-spot b{font-size:13px}
  body.phone .ch-pick label{font-size:11px}
  body.phone .ch .ch-go{height:40px;font-size:19px}
  body.phone .ch-dock{padding-top:4px}
}
