/* Hi-Lo. Computer and phone: the felt with the card and the guess buttons, the bet dock under it */
#game:has(.hl){background:radial-gradient(ellipse at 50% 0,rgba(232,180,34,.15),transparent 55%),linear-gradient(#0a141c,#04080c)}
.hl{--hlw:clamp(70px,calc((100dvh - 470px) / 2),150px);display:flex;flex-direction:column;gap:8px;width:100%;max-width:820px;margin:0 auto;user-select:none}
.hl-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px}
.hl-title{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}
.hl-title small{display:block;direction:rtl;font-family:var(--body);font-size:12px;letter-spacing:0;color:#cfe0ea;text-shadow:none;opacity:.8}
.hl .hl-help,.hl .hl-jbtn{flex:none;width:34px;height:34px;min-width:0;padding:0;border-radius:50%}
.hl .hl-jbtn{font-size:16px;background:#000a;border:1px solid #e8b422aa}
.hl-table{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 14px 14px;border-radius:44px;background: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}
.hl-trail{display:flex;gap:6px;width:100%;min-height:48px;overflow-x:auto;scrollbar-width:none;justify-content:safe center}
.hl-trail span{flex:none;display:flex;flex-direction:column;align-items:center;gap:2px}
.hl-trail u{text-decoration:none;font-size:11px;line-height:1;color:#fff3b0}
.hl-trail span.skip{opacity:.5}.hl-trail span.bad .hl-mc{box-shadow:0 0 0 2px #ff5252}
.hl-mc{display:inline-block;font-style:normal;font-weight:800;font-size:14px;min-width:34px;text-align:center;padding:5px 3px;border-radius:6px;background:#f6f1e4;color:#14141a}.hl-mc.red{color:#c01828}
.hl-card{width:var(--hlw);height:calc(var(--hlw)*1.4);perspective:700px}
.hl-card .pc{--cw:var(--hlw);margin:0;display:block}
.hl-empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center;border:2px dashed #ffffff44;border-radius:calc(var(--hlw)*.08);font-family:var(--display);font-size:calc(var(--hlw)*.5);color:#ffffff55}
.hl-msg{min-height:24px;font-size:17px;font-weight:700;text-align:center}
.hl-msg.win{color:#8dffa4;text-shadow:0 0 12px #2e9d4a}.hl-msg.lose{color:#ffab9e}
.hl-guess{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;max-width:520px}
.hl .hl-g{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:70px;padding:6px;border-radius:18px;border:2px solid #ffffff55;color:#fff;line-height:1.2}
.hl .hl-g.hi{background:linear-gradient(#2c8a56,#11442a)}.hl .hl-g.lo{background:linear-gradient(#2a6f9c,#0f3350)}
.hl-g b{font-family:var(--display);font-weight:400;font-size:19px;white-space:nowrap}
.hl-g span{font-size:12px;opacity:.85}.hl-g em{font-style:normal;font-weight:800;font-size:17px;color:#fff3b0;direction:ltr;min-height:20px}
.hl-acts{display:grid;grid-template-columns:minmax(0,1fr);width:100%;max-width:520px}
.hl-acts button{height:46px;font-size:17px;white-space:nowrap}
.hl .hl-cash:not(:disabled){background:linear-gradient(#f6d36a,#c8961c);color:#241400}
.hl button:disabled,.hl input:disabled{opacity:.45}
.hl-dock{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(0,.9fr);grid-template-areas:"label go" "bet go" "lim lim";gap:5px 10px;padding:10px;border-radius:16px;background:linear-gradient(#1d1218,#0b070a);border:1px solid #e8b42266}
.hl-dock label{grid-area:label;font-size:12px;text-align:center;color:#e9dfc4}
.hl-betbox{grid-area:bet;align-self:center}
.hl .hl-go{grid-area:go;font-family:var(--display);font-size:22px;padding:4px;line-height:1.2}
.hl-lim{grid-area:lim;text-align:center;font-size:11px;opacity:.65}
.hl-jr ul{list-style:none;margin:0;padding:0}.gh-box.hl-jr li{padding:8px 4px;border-bottom:1px solid #ffffff22;margin:0}
.hl-jh{display:flex;justify-content:space-between;gap:8px}.hl-jh b.win{color:#7CFC8A}.hl-jh b.lose{color:#ff8a80}.hl-jh b.n{direction:ltr}
.hl-jc{display:flex;flex-wrap:wrap;gap:3px;direction:ltr;margin-top:4px}.hl-jb{font-size:12px;opacity:.65;margin-top:3px}
@media(max-height:820px){body:not(.phone) .hl{--hlw:clamp(56px,calc((100dvh - 440px) / 2),120px);gap:5px}body:not(.phone) .hl-title small{display:none}body:not(.phone) .hl-table{gap:4px;padding:6px 12px 8px;border-width:4px}body:not(.phone) .hl-trail{min-height:40px}body:not(.phone) .hl .hl-g{min-height:58px}body:not(.phone) .hl-acts button{height:38px}body:not(.phone) .hl-dock{padding:6px 10px}body:not(.phone) .hl-lim{display:none}}
@media(max-height:730px){body:not(.phone) main:has(.hl) #game{min-height:0;padding-block:8px}body:not(.phone) main:has(.hl) #chat{min-height:0;height:calc(100dvh - 130px)}}
@media(max-height:660px){body:not(.phone) .hl{--hlw:52px}body:not(.phone) .hl-title{font-size:18px}body:not(.phone) .hl .hl-g{min-height:50px}body:not(.phone) .hl-g b{font-size:16px}body:not(.phone) .hl-g span{display:none}}
/* ---------- phone: one screen, the felt takes what is left, the bet dock stays at the bottom ---------- */
body.phone.ingame #game:has(.hl){padding:0}
body.phone .hl{flex:1;min-height:0;max-width:100%;gap:6px;padding-top:6px}
body.phone .hl-top{padding:0 8px}
body.phone .hl-title{font-size:19px}body.phone .hl-title small{font-size:11px}
body.phone .hl-table{flex:1;min-height:0;container-type:size;margin:0 6px;gap:6px;padding:8px;border-width:4px;border-radius:26px;justify-content:space-evenly}
body.phone .hl-table>*{--hlw:min(36cqw,calc((100cqh - 230px)/1.4),140px)}
body.phone .hl-guess,body.phone .hl-acts{gap:8px}
body.phone .hl-g b{font-size:16px}
body.phone .hl-dock{grid-template-columns:minmax(0,1fr);grid-template-areas:"label" "bet" "go";gap:5px;border:0;border-top:2px solid var(--gold2);border-radius:0;padding:6px 8px calc(env(safe-area-inset-bottom) + 6px)}
body.phone .hl .hl-go{height:46px}
body.phone .hl-lim{display:none}
body.phone .hl[data-ph=playing] .hl-dock{display:none}
@media(max-height:700px){
  body.phone .hl{gap:4px;padding-top:4px}
  body.phone .hl-title small{display:none}
  body.phone .hl-table{gap:3px;padding:5px}
  body.phone .hl-table>*{--hlw:min(30cqw,calc((100cqh - 190px)/1.4),110px)}
  body.phone .hl-trail{min-height:34px}body.phone .hl-trail u{display:none}body.phone .hl-mc{font-size:12px;min-width:28px;padding:3px 2px}
  body.phone .hl-msg{font-size:13px;min-height:18px}
  body.phone .hl .hl-g{min-height:52px;padding:3px}body.phone .hl-g span{font-size:11px}body.phone .hl-g em{font-size:14px;min-height:17px}
  body.phone .hl-acts button{height:38px;font-size:15px}
  body.phone .hl-dock label{display:none}
  body.phone .hl .hl-go{height:38px;font-size:18px}
}
/* the two tables */
.hl-tabs{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;max-width:520px;margin:0 auto}
.hl .hl-tabs button{position:relative;display:flex;align-items:baseline;justify-content:center;gap:8px;min-width:0;padding:5px 8px;border-radius:14px;border:1px solid #ffffff33;background:#0008;color:#fff;line-height:1.25}
.hl-tabs b{font-family:var(--display);font-weight:400;font-size:17px;white-space:nowrap}.hl-tabs small{font-size:11px;opacity:.75;white-space:nowrap}
.hl .hl-tabs button.on{border-color:#7CFC8A;background:linear-gradient(#1d7a4f,#0b3b26);box-shadow:0 0 12px #2e9d4a77}
.hl .hl-tabs button.on[data-tb=open]{border-color:#ffd86a;background:linear-gradient(#a3142f,#47060f);box-shadow:0 0 12px #e8b42288}
.hl-tabs button.waits i{position:absolute;top:5px;left:8px;width:9px;height:9px;border-radius:50%;background:#ffd54f;box-shadow:0 0 8px #ffd54f}
.hl[data-table=open] .hl-table,body[data-felt] .hl[data-table=open] .hl-table{background:radial-gradient(ellipse at 50% 30%,#8e1630,#4a0715 60%,#1d0208);border-color:#6b4a0c;box-shadow:0 0 0 2px #ffd86a,0 0 26px #e8b42255,inset 0 0 50px #000a}
body.phone .hl-tabs{max-width:none;width:calc(100% - 12px);gap:6px}
body.phone .hl .hl-tabs button{flex-direction:column;align-items:center;gap:0;padding:3px 4px}
body.phone .hl-tabs b{font-size:15px}
@media(max-height:700px){body.phone .hl-tabs small{display:none}body.phone .hl .hl-tabs button{padding:5px 4px}}
@media(max-height:820px){body:not(.phone) .hl .hl-tabs button{padding:2px 8px}body:not(.phone) .hl{--hlw:clamp(52px,calc((100dvh - 478px) / 2),120px)}}
/* lobby */
.hm-hilo{--c1:#0f5b6e;--c2:#041a22}
.ml .t-hilo{background:linear-gradient(160deg,#137a91,#041a22)}
.ml .ml-grid{grid-template-rows:repeat(5,minmax(0,1fr)) minmax(30px,.4fr)}
.ml .ml-grid .ml-tile.ml-poker,body.phone .ml .ml-grid .ml-tile.ml-poker{grid-column:1/-1;flex-direction:row;justify-content:center;gap:10px}
