/* The card table (Doug, 13 Nov 2026). Big, high-contrast cards on green felt, like gin; phone first. Logic: cards/table.js */
#vCt,#vCards{--gcw:clamp(46px,calc((100vw - 52px) / 7),86px);--gred:#B3121B;--gblk:#111}
body.ctbig #vCt{--gcw:clamp(58px,calc((100vw - 44px) / 5),104px)}

/* the Card games screen: one big tile per game */
.cdgrid{display:grid;grid-template-columns:1fr;gap:12px;max-width:760px;margin:0 auto}
@media (min-width:700px){.cdgrid{grid-template-columns:1fr 1fr}}
.cdtile{position:relative;display:flex;align-items:center;gap:14px;min-height:88px;padding:10px 16px 10px 10px;border-radius:18px;border:0;text-align:left;cursor:pointer;
  background:linear-gradient(160deg,var(--gc),#16100b);color:#F5EAD3;box-shadow:inset 0 0 0 2px rgba(230,182,82,.45),0 6px 14px rgba(26,15,8,.3);font:inherit}
.cdtile:active{transform:scale(.98)}
.cdart{flex:none;width:68px;height:68px;border-radius:16px;background:radial-gradient(ellipse at 50% 40%,#2f6b45,#163a25);box-shadow:inset 0 0 0 2px rgba(230,182,82,.35);display:flex}
.cdart svg{width:100%;height:100%}
.cdtx{display:flex;flex-direction:column;gap:2px;min-width:0}
.cdtx b{font-family:var(--display);font-size:22px;color:#F7D57A}
.cdtx small{font-size:15px;color:#F5EAD3;opacity:.9}
.cdtx .cdsv{color:#F7D57A;font-weight:700}
.cdred{position:absolute;top:8px;right:10px;min-width:28px;height:28px;border-radius:999px;background:#C62828;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;padding:0 7px}

/* the menu's folding buttons: playing cards, as on gin */
.fold-ct>.card.fold{background:transparent;box-shadow:none;overflow:visible}
.fold-ct button.foldbtn{background:linear-gradient(170deg,#fffdf7,#f1e6cc);color:#1d1d1d;border:2px solid #d8c69e;box-shadow:0 4px 10px rgba(26,15,8,.28);position:relative}
.fold-ct .fcard{width:40px;height:54px;border-radius:7px;background:#fff;border:2px solid #cdb98d;display:flex;align-items:center;justify-content:center;color:#1d1d1d}
.fold-ct .fcard b{font-size:30px;line-height:1}
.fold-ct .fcard.red{color:#c0392b}
.fold-ct .fold.open>.foldbtn{border-radius:16px 16px 0 0}
.fold-ct .foldbody{background:linear-gradient(160deg,#33200f,#24150b);border-radius:0 0 16px 16px;margin:0 4px;box-shadow:inset 0 0 0 1px rgba(230,182,82,.14)}
#ctLessons li{display:flex;align-items:center;gap:12px}
#ctLessons li .what span{display:block;font-size:15px;opacity:.9}

/* the table */
#ctPlay{position:relative;max-width:1000px;margin:0 auto}
.cttable{background:radial-gradient(ellipse at 50% 40%,#2f6b45,#1d4a2f 70%,#163a25);border-radius:18px;padding:10px;box-shadow:inset 0 0 0 3px #6b4a2b,0 10px 26px rgba(26,15,8,.35);color:#F5EAD3}
.ctring{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);grid-template-areas:". top ." "left mid right";gap:8px;align-items:center;margin-bottom:6px}
.ctseat{background:rgba(0,0,0,.28);border-radius:12px;padding:6px 6px;text-align:center;font-size:13px;line-height:1.25;min-width:0}
.ctseat b{display:block;font-size:15px;color:#F7D57A;overflow-wrap:anywhere}
.ctseat small{display:block;font-size:12px;color:#bfe3c9}
.ctseat span{display:block}
.ctseat.turn{box-shadow:0 0 0 3px #E6B652;background:rgba(230,182,82,.18)}
.ctseat.cts1{grid-area:left}.ctseat.cts2{grid-area:top}.ctseat.cts3{grid-area:right}
.ctseat.cts0{margin:8px auto 6px;max-width:320px}
.cttrick{grid-area:mid;position:relative;min-height:calc(var(--gcw) * 2.4);display:flex;align-items:center;justify-content:center}
.cttrick .gc.sm{--w:clamp(40px,11vw,60px)}
.ctp{position:absolute;transition:transform .2s}
.ctp.p0{bottom:0;left:50%;transform:translateX(-50%)}
.ctp.p2{top:0;left:50%;transform:translateX(-50%)}
.ctp.p1{left:0;top:50%;transform:translateY(-50%)}
.ctp.p3{right:0;top:50%;transform:translateY(-50%)}
.ctp.old{opacity:.55}
.ctmid{font-size:13px;opacity:.75;text-align:center}
.ctscore{text-align:center;margin:4px 0;font-size:15px;color:#F5EAD3}
.cthand{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 4px;margin:6px 0 2px}
.cthand .gc{--w:var(--gcw)}
.gc.dim{opacity:.45;filter:saturate(.4)}
.gc.hint,.sc.hint{box-shadow:0 0 0 4px #7fe0b0,0 6px 14px rgba(0,0,0,.45)!important}
.ctgot,.ctlast{text-align:center;color:#F5EAD3!important;margin:6px 0 0}
#vCt .ginacts{margin:10px 0 2px}
#vCt .ginacts button{min-height:52px;font-size:18px}
.ctbid{text-align:center;margin:6px 0}.ctbid .sub{color:#F5EAD3!important}
.ctbids{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;max-width:460px;margin:6px auto}
.ctbids button{min-height:48px;padding:0;font-size:18px}
.ctbids button.sug{box-shadow:0 0 0 3px #7fe0b0}
.ctrail{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.ctrail button{flex:1;min-width:96px;min-height:48px}
.ctsheet{margin-top:12px}
.ctrulespop{margin-top:12px}
#ctChatSlot{margin-top:12px}

/* Solitaire: 7 piles across a phone. --sw is one pile's width; the cards overlap by their visible strip */
.ct-solitaire,.ct-double{--sw:min(calc((100vw - 72px) / 7),76px);max-width:600px;margin:0 auto}
.sotop,.sotab{display:grid;grid-template-columns:repeat(7,var(--sw));gap:4px;justify-content:center}
.sotop{margin-bottom:10px;align-items:start}
.sopile{position:relative;display:block;padding:0;border:0;background:none;min-height:0;min-width:0;cursor:pointer;box-shadow:none;width:var(--sw)}
.sopile small{position:absolute;bottom:2px;right:4px;font-size:12px;font-weight:700;color:#F7D57A;text-shadow:0 1px 2px #000}
.sopile.waste{display:flex;width:auto}
.sofan{display:block;width:var(--sw);margin-left:calc(var(--sw) * -.62)}.sofan:first-child{margin-left:0}
.ct-solitaire .sopile.waste{grid-column:span 2}
.ct-solitaire .sogap{display:none}
.sc{position:relative;display:block;width:var(--sw);height:calc(var(--sw) * 1.4);border-radius:7px;background:#FFFDF6;border:1.5px solid #2A1A0F;color:#111;box-shadow:0 2px 4px rgba(0,0,0,.35);overflow:hidden;font-family:var(--body)}
.sc.red{color:#B3121B}
.sc b{position:absolute;top:2px;left:4px;font-size:calc(var(--sw) * .36);font-weight:800;line-height:1;letter-spacing:-.04em}
.sc i{position:absolute;top:3px;right:3px;width:calc(var(--sw) * .28);height:calc(var(--sw) * .28)}
.sc em{position:absolute;bottom:5%;left:50%;transform:translateX(-50%);width:55%;height:42%}
.sc .gsv{width:100%;height:100%}
.sc.back{background:repeating-linear-gradient(45deg,#3A2212 0 5px,#2B1A0E 5px 10px);border-color:#E6B652}
.sc.empty{background:transparent;border:2px dashed rgba(245,234,211,.4);box-shadow:none;color:rgba(245,234,211,.6);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:20px}
.sc.empty .gsv{width:50%;height:50%}
button.sc.slot{cursor:pointer;padding:0;min-height:0}
.sc.sel{box-shadow:0 0 0 4px #E6B652,0 6px 14px rgba(0,0,0,.45)}
.socol{position:relative;display:flex;flex-direction:column;min-height:calc(var(--sw) * 1.4)}
.soc{display:block;padding:0;border:0;background:none;min-height:0;min-width:0;box-shadow:none;cursor:pointer;width:var(--sw)}
.soc+.soc{margin-top:calc(var(--sw) * -1.4 + var(--vis))}
.soc.down+.soc,.soc.down:first-child{--vis:calc(var(--sw) * .26)}
.soc.up+.soc.up{--vis:calc(var(--sw) * .5)}
.soc.down+.soc.up{--vis:calc(var(--sw) * .26)}
.dbop{background:rgba(0,0,0,.28);border-radius:12px;padding:6px 10px;margin-bottom:8px;font-size:15px}
.dbop b{color:#F7D57A;margin-right:8px}.dbop.turn{box-shadow:0 0 0 3px #E6B652}
.dbfound{display:grid;grid-template-columns:repeat(8,calc((var(--sw) * 7 + 24px - 21px) / 8));gap:3px;margin-bottom:6px;justify-content:center}
.dbtheirs{display:grid;grid-template-columns:repeat(7,calc((var(--sw) * 7 + 24px - 18px) / 7));gap:3px;margin:0 0 6px;justify-content:center;opacity:.92}
.dbtheirs .sopile{transform:scale(.9);transform-origin:top center}
.dbfound .sopile,.dbfound .sc{width:calc((var(--sw) * 7 + 3px) / 8);height:calc((var(--sw) * 7 + 3px) / 8 * 1.4)}
.dbfound .sc b{font-size:calc(var(--sw) * .3)}

/* Canasta */
.capiles{gap:18px}
.cap{display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;padding:4px;min-height:0;box-shadow:none;color:#F5EAD3;cursor:pointer;border-radius:12px}
.cap small{font-size:13px;font-weight:700}
.cap .gc.back{--w:clamp(40px,11vw,60px)}
.cap.hint{box-shadow:0 0 0 4px #7fe0b0}
.cap:disabled{opacity:.8}
.cameld{background:rgba(0,0,0,.22);border-radius:12px;padding:6px 8px;margin:6px 0}
.cameld.mine{box-shadow:inset 0 0 0 2px rgba(230,182,82,.5)}
.calab{margin:0 0 4px;font-weight:700;color:#F7D57A;font-size:14px}
.carow{display:flex;flex-wrap:wrap;gap:6px}
.camd{display:flex;flex-direction:column;align-items:center;min-width:46px;min-height:58px;padding:4px 6px;border-radius:8px;background:#FFFDF6;color:#111;border:2px solid #2A1A0F;font-weight:700;line-height:1.1;box-shadow:0 2px 4px rgba(0,0,0,.3)}
.camd b{font-size:20px}.camd span{font-size:13px}.camd i{font-style:normal;color:#8a5c05;margin-left:2px}
.camd em{font-style:normal;font-size:11px;background:#2f6b45;color:#fff;border-radius:999px;padding:0 5px;margin-top:2px}
.camd.can{border-color:#2f6b45;box-shadow:0 0 0 2px #2f6b45}.camd.can.nat{border-color:#B3121B;box-shadow:0 0 0 2px #B3121B}.camd.can.nat em{background:#B3121B}
.camd:disabled{opacity:1;cursor:default}
.ct-canasta .cthand{gap:4px 2px}
.ct-canasta .cthand .gc{--w:calc(var(--gcw) * .9)}

/* Home: the card games row under Pick a game (14 Nov 2026) */
.cdrowh{margin:10px 0 4px;font-family:var(--display);font-weight:700;font-size:15px;color:#4a3220}
.cdicon{background:radial-gradient(ellipse at 50% 40%,var(--gc),#16100b)!important;display:flex}
.cdicon svg{width:100%;height:100%}
@media (max-width:699px){.pickgame .gngrid.cdrow{grid-template-columns:repeat(6,minmax(0,1fr))}.pickgame.more .gngrid.cdrow{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:700px){.pickgame .gngrid.cdrow{grid-template-columns:repeat(6,minmax(0,1fr))}}
.ctagree{padding:12px 4px}.ctagree h3{margin:0 0 6px}.ctagree .seg{flex-wrap:wrap}
/* Double Solitaire, Pile of 13 (Hailey, 19 Nov 2026): bigger cards; the pile, a space, the stock and the turned cards;
   4 piles to build on; the 8 shared piles across the width */
.ct-double.db13{--sw:min(calc((100vw - 64px) / 5),84px)}
.db13 .sotop{grid-template-columns:repeat(5,var(--sw))}
.db13 .sotab{grid-template-columns:repeat(4,var(--sw))}
.db13 .dbfound{grid-template-columns:repeat(8,1fr);max-width:calc(var(--sw) * 5 + 16px);margin-left:auto;margin-right:auto}
.db13 .dbfound .sopile,.db13 .dbfound .sc{width:100%;height:auto;aspect-ratio:1/1.4}
.db13 .dbtheirs{grid-template-columns:repeat(4,calc(var(--sw) * .8))}
.db13 .pile13{position:relative}
.db13 .p13n{position:absolute;right:-4px;bottom:-6px;background:#E6B652;color:#1f1915;border-radius:999px;font:800 13px/1 system-ui,sans-serif;padding:3px 6px;box-shadow:0 1px 3px rgba(0,0,0,.4)}
/* the suit word under a card never spills past the card's edge (25 Nov 2026 review: "diamonds" on Canasta's pile) */
.cttable .gc .gw{white-space:nowrap;overflow:hidden;max-width:92%;text-overflow:clip}
.cap .gc .gw{display:none}
/* Double Solitaire turn 3: the waste fans its last 3 over two columns (Hailey, 27 Nov) */
.sopile.waste.fan3{grid-column:span 2}
