/* 4 Princes — Solitaire (4p-solitaire-v1). The frame, the dialogs and the end screen come from crown-peaks.css (the same
   look as Crown Peaks); this file adds the Klondike table: four foundations, the waste fan and the stock in the top row, seven
   piles below. Phone first: on a 375 px wide screen in portrait each card is about 45 px wide, the rank and suit sit in the
   top strip (readable when the cards overlap) and long piles press together to fit the table. */
body.sol .felt{touch-action:none}
body.sol .card{transition:left .26s cubic-bezier(.25,.8,.3,1),top .26s cubic-bezier(.25,.8,.3,1),width .2s,height .2s,transform .2s;font-size:var(--fs,16px)}
body.sol .card .face,body.sol .card .back{border-radius:.3em}
body.sol .card .rk{left:.12em;top:.04em;font-size:1em;line-height:1;letter-spacing:-.06em}
body.sol .card .st{left:auto;right:.1em;top:.1em;width:.78em;height:.78em}
body.sol .card .big{right:auto;left:50%;bottom:.2em;width:1.55em;height:1.55em;transform:translateX(-50%)}
body.sol .card.court .face::after{inset:1.15em .14em .14em}
body.sol .card .cr{display:none}
body.sol .card[role=button]{cursor:pointer}
body.sol .card.gone{pointer-events:none}
body.sol .card.drag{transition:none;cursor:grabbing;filter:drop-shadow(0 10px 14px rgba(0,0,0,.45))}
body.sol .card.drag .face{box-shadow:0 0 0 2px rgba(243,213,142,.9),0 8px 18px rgba(0,0,0,.45)}
body.sol .card.down .back svg{width:52%;height:30%}

/* the empty places */
.sol .slot{position:absolute;border-radius:8px;border:2px dashed rgba(226,176,74,.26);pointer-events:none;display:flex;align-items:center;justify-content:center;
  color:rgba(226,176,74,.3);font-weight:900;font-size:18px}
.sol .slot .sm{width:46%;height:46%;fill:rgba(226,176,74,.3)}
.sol .wslot{border-color:rgba(226,176,74,.12)}
.sol .sol-stock{border-radius:10px}
.sol .sol-stock .card{position:absolute}
.sol .sol-stock .n{right:-6px;top:-8px;min-width:24px;height:24px;line-height:24px;font-size:13px;padding:0 6px}
.sol .sol-stock .smark{position:absolute;inset:4px;border-radius:8px;border:2px dashed rgba(226,176,74,.45);display:flex;align-items:center;justify-content:center;color:var(--gold-soft)}
.sol .sol-stock .smark svg{width:52%;height:52%}
.sol .sol-stock .smark.closed{border-color:rgba(169,178,197,.3);color:rgba(169,178,197,.55)}
.sol .sol-stock.closed{cursor:default}
.sol .sol-stock.shake{animation:shake .32s}

/* drag preview: where the card would land lights up (like Blastile's landing preview) */
.sol-land{position:absolute;border-radius:8px;pointer-events:none;border:2px solid rgba(243,213,142,.95);background:rgba(243,213,142,.16);
  box-shadow:0 0 0 2px rgba(226,176,74,.35),0 0 18px 3px rgba(243,213,142,.55);animation:solLand .9s ease-in-out infinite alternate}
.sol-land.f{border-radius:10px}
@keyframes solLand{from{box-shadow:0 0 0 2px rgba(226,176,74,.3),0 0 10px 2px rgba(243,213,142,.4)}to{box-shadow:0 0 0 3px rgba(226,176,74,.5),0 0 22px 5px rgba(243,213,142,.7)}}

/* the score row and the buttons */
body.sol .streak b{color:var(--text)}
.sol-btns{display:flex;gap:8px;margin-left:auto}
.sol-btns .btn{min-height:42px;padding:8px 16px;font-size:15px}
/* 4p-solitaire-fix-v1: .btn sets display, which beat the hidden attribute — Auto finish showed from the first card on */
body.sol [hidden]{display:none!important}
#autoBtn{animation:solAuto 1.6s ease-in-out infinite}
@keyframes solAuto{50%{box-shadow:0 0 0 3px rgba(243,213,142,.45),0 8px 22px rgba(226,176,74,.5)}}
.felt.sol-glow{animation:solGlow 1.4s ease-out}
@keyframes solGlow{30%{box-shadow:inset 0 0 60px rgba(255,214,120,.55),0 0 40px rgba(255,214,120,.5)}}
.bfx-cascade{z-index:899}

/* the end screen: SO CLOSE says how many cards reached the foundations; a minus line for foundation returns */
.cpe-home{color:#CBD3E2;font-size:15px;font-weight:700;margin:-4px 0 8px}
.cpe-lines li.neg b{color:#F4A3A3}

/* how to play: the 7 of hearts goes onto the 8 of spades */
.sol-ht1{left:142px;top:28px;animation:solHt1 2.6s ease-in-out infinite}
@keyframes solHt1{0%,25%{transform:none}55%,85%{transform:translate(-98px,18px)}100%{transform:translate(-98px,18px);opacity:0}}

@media (prefers-reduced-motion:reduce){
  body.sol .card,body.sol .card .in{transition-duration:.01s}
  #autoBtn,.sol-land,.sol-ht1{animation:none}
}
html.fp-fit body.sol .hint{display:none}
@media (max-height:700px) and (max-width:700px){body.sol .score{font-size:34px}}
