/* Chicken. Computer and phone: the road on top, the walk and cash buttons, the bet dock under them */
#game:has(.ck){background:radial-gradient(ellipse at 50% 0,rgba(232,180,34,.15),transparent 55%),linear-gradient(#12121c,#05050a)}
.ck{--lw:104px;display:flex;flex-direction:column;gap:8px;width:100%;max-width:880px;min-width:0;margin:0 auto;user-select:none}
.ck-top{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px}
.ck-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}
.ck-title small{display:block;direction:rtl;font-family:var(--body);font-size:12px;letter-spacing:0;color:#e4dccb;text-shadow:none;opacity:.8}
.ck .ck-help,.ck .ck-jbtn{flex:none;width:34px;height:34px;min-width:0;padding:0;border-radius:50%}
.ck .ck-jbtn{font-size:16px;background:#000a;border:1px solid #e8b422aa}
.ck-view{position:relative;height:clamp(170px,calc(100dvh - 450px),330px);overflow:hidden;border-radius:20px;border:4px solid #2b2b33;box-shadow:0 0 0 2px #e8b422aa;background:#25262d}
.ck-road{position:relative;display:flex;width:max-content;height:100%}
.ck-lane{position:relative;flex:none;width:var(--lw);height:100%;overflow:hidden;background:#2a2b33;border-right:3px dashed #ffffff55}
.ck-lane.ck-side{background:repeating-linear-gradient(0deg,#8d8678 0 22px,#7c7568 22px 24px);border-right:5px solid #e8b422}
.ck-lane.next{background:#383a48}.ck-lane.done{background:#23362c}.ck-lane.hit{background:#4a2025}
.ck-hole{position:absolute;left:50%;top:62%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:calc(var(--lw) - 22px);aspect-ratio:1;border-radius:50%;font-size:15px;color:#e8e2d2;background:radial-gradient(circle,#43444f,#1b1c22 70%);border:3px solid #14151a;box-shadow:inset 0 0 0 2px #ffffff22}
.ck-lane.next .ck-hole{color:#fff3b0;box-shadow:0 0 14px #e8b422,inset 0 0 0 2px #e8b422}
.ck-lane.done .ck-hole{color:#241400;background:radial-gradient(circle,#ffe58a,#c8961c 75%)}
.ck-bar{position:absolute;top:14%;left:10%;right:10%;height:12px;border-radius:4px;background:repeating-linear-gradient(115deg,#e53935 0 9px,#fff 9px 18px);box-shadow:0 3px 5px #000a}
.ck-car{position:absolute;z-index:2;left:50%;top:0;width:calc(var(--lw)*.46);transform:translate(-50%,-110%);animation:ck-drive var(--d) linear var(--w) infinite}
.ck-car svg{display:block;width:100%;height:auto;filter:drop-shadow(0 4px 4px #000a)}
/* traffic drives down the whole lane, then there is a short gap before the next car */
@keyframes ck-drive{0%{top:0;transform:translate(-50%,-105%)}70%,100%{top:100%;transform:translate(-50%,5%)}}
.ck-car.strike{animation:ck-strike .75s cubic-bezier(.5,0,.8,.6) forwards}
@keyframes ck-strike{0%{top:0;transform:translate(-50%,-110%)}70%{top:62%;transform:translate(-50%,-50%)}100%{top:130%;transform:translate(-50%,0)}}
.ck-hen{position:absolute;z-index:1;top:62%;left:calc(var(--at)*var(--lw) + var(--lw)/2);width:calc(var(--lw)*.66);transform:translate(-50%,-62%);transition:left .28s ease}
.ck-hen svg{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 4px #000a)}
.ck-hen.jump svg{animation:ck-hop .3s ease}
.ck-hen.flat{transform:translate(-50%,-50%)}
@keyframes ck-hop{50%{transform:translateY(-22px) rotate(-8deg)}}
@media(prefers-reduced-motion:reduce){.ck-car:not(.strike){display:none}}
.ck-msg{min-height:24px;font-size:17px;font-weight:700;text-align:center}
.ck-msg.win{color:#8dffa4;text-shadow:0 0 12px #2e9d4a}.ck-msg.lose{color:#ffab9e}
.ck-acts{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px;width:100%;max-width:520px;margin:0 auto}
.ck-acts button{height:52px;font-size:20px;white-space:nowrap}
.ck .ck-go{font-family:var(--display);border-radius:16px;border:2px solid #ffffff55;color:#fff;background:linear-gradient(#2c8a56,#11442a)}
.ck .ck-cash:not(:disabled){background:linear-gradient(#f6d36a,#c8961c);color:#241400}
.ck button:disabled,.ck input:disabled{opacity:.45}
.ck-dock{display:grid;grid-template-columns:minmax(0,2.4fr) minmax(0,.9fr);grid-template-areas:"levels levels" "label start" "bet start" "lim lim";gap:5px 10px;padding:10px;border-radius:16px;background:linear-gradient(#1d1218,#0b070a);border:1px solid #e8b42266}
.ck-levels{grid-area:levels;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.ck-levels button{display:flex;flex-direction:column;align-items:center;padding:3px 2px;line-height:1.2;min-width:0}.ck-levels small{font-size:11px;opacity:.75}.ck-levels button.on{border-color:var(--gold);color:var(--gold);box-shadow:inset 0 0 10px #e8b42255}
.ck-dock label{grid-area:label;font-size:12px;text-align:center;color:#e9dfc4}
.ck-betbox{grid-area:bet;align-self:center}
.ck .ck-start{grid-area:start;font-family:var(--display);font-size:22px;padding:4px;line-height:1.2}
.ck-lim{grid-area:lim;text-align:center;font-size:11px;opacity:.65}
.ck-jr ul{list-style:none;margin:0;padding:0}.gh-box.ck-jr li{padding:8px 4px;border-bottom:1px solid #ffffff22;margin:0}
.ck-jh{display:flex;justify-content:space-between;gap:8px}.ck-jh b.win{color:#7CFC8A}.ck-jh b.lose{color:#ff8a80}.ck-jh b.n{direction:ltr}.ck-jb{font-size:12px;opacity:.65;margin-top:3px}
@media(max-height:820px){body:not(.phone) .ck{--lw:88px;gap:5px}body:not(.phone) .ck-title small{display:none}body:not(.phone) .ck-view{height:clamp(130px,calc(100dvh - 430px),260px)}body:not(.phone) .ck-acts button{height:40px;font-size:17px}body:not(.phone) .ck-dock{padding:6px 10px}body:not(.phone) .ck-levels small{display:none}body:not(.phone) .ck-lim{display:none}}
@media(max-height:730px){body:not(.phone) main:has(.ck) #game{min-height:0;padding-block:8px}body:not(.phone) main:has(.ck) #chat{min-height:0;height:calc(100dvh - 130px)}}
/* ---------- phone: one screen, the road takes what is left, the bet dock stays at the bottom ---------- */
body.phone.ingame #game:has(.ck){padding:0}
body.phone .ck{--lw:82px;flex:1;min-height:0;max-width:100%;gap:6px;padding-top:6px}
body.phone .ck-top{padding:0 8px}
body.phone .ck-title{font-size:19px}body.phone .ck-title small{font-size:11px}
body.phone .ck-view{flex:1;height:auto;min-height:130px;margin:0 6px}
body.phone .ck-acts{gap:8px;padding:0 8px}
body.phone .ck-dock{grid-template-columns:minmax(0,1fr);grid-template-areas:"levels" "label" "bet" "start";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 .ck .ck-start{height:46px}
body.phone .ck-lim{display:none}
/* while the chicken is on the road there is nothing to set, and before that nothing to walk */
body.phone .ck[data-ph=playing] .ck-dock{display:none}
body.phone .ck[data-ph=playing] .ck-acts{padding-bottom:calc(env(safe-area-inset-bottom) + 10px)}
body.phone .ck:not([data-ph=playing]) .ck-acts{display:none}
@media(max-height:700px){
  body.phone .ck{--lw:68px;gap:4px;padding-top:4px}
  body.phone .ck-title small{display:none}
  body.phone .ck-view{min-height:100px}
  body.phone .ck-msg{font-size:13px;min-height:18px}
  body.phone .ck-hole{font-size:12px}
  body.phone .ck-dock label,body.phone .ck-levels small{display:none}
  body.phone .ck-levels button{padding:5px 2px}
  body.phone .ck .ck-start{height:38px;font-size:18px}
}
/* lobby */
.hm-chicken{--c1:#7a5a12;--c2:#1c1302}
.ml .t-chicken{background:linear-gradient(160deg,#9a7317,#1c1302)}
/* twelve games on the phone: six rows of two, poker is a tile like the others */
.ml .ml-grid{grid-template-rows:repeat(6,minmax(0,1fr))}
.ml .ml-grid .ml-tile.ml-poker,body.phone .ml .ml-grid .ml-tile.ml-poker{grid-column:auto;flex-direction:column;gap:1px;padding:2px 6px}
@media(max-height:700px){body.phone .ml .ml-grid .ml-tile>*:not(b){display:none}}
