/* GOC card table kit (t8707u): Euchre, Spades, Hearts, Pinochle. Felt, wood rail, robot seats, fanned hand,
   deal / play / trick-collect motion. Original art only. Phone-first; reduce-motion and four-colour suits supported. */
.ct .gk-bg{background-image:url(../../img/table/room-wide.webp);background-position:center top}
.ct .gk-bg::after{background:radial-gradient(130% 90% at 50% 40%,rgba(10,14,40,.15),rgba(4,6,18,.85) 78%)}
/* ---------- title ---------- */
.ct-hero{position:relative;width:min(86vw,360px);height:min(36vw,150px);max-height:22vh;margin:0 auto}
.ct-hero img{position:absolute;bottom:0;height:100%;width:auto;filter:drop-shadow(0 10px 18px rgba(0,0,0,.7))}
.ct-hero .h1{left:0;animation:gkBob 3.4s ease-in-out infinite}
.ct-hero .h2{right:0;animation:gkBob 3.4s ease-in-out -1.7s infinite}
.ct-hero .fan{position:absolute;left:50%;bottom:4%;width:34%;height:70%;transform:translateX(-50%)}
.ct-hero .fan .pc{position:absolute;left:50%;bottom:0;width:56%;height:auto;transform-origin:50% 110%;filter:drop-shadow(0 4px 8px rgba(0,0,0,.6))}
.ct .gk-panel .lbl{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.lvw{font-size:18px;color:var(--gold2);text-transform:none;letter-spacing:0}
.lvrow{display:flex;align-items:center;gap:8px}
.lvrow .gk-btn.icon{min-width:48px;min-height:48px;padding:0;font-size:22px}
.lvr{flex:1;min-width:0}
.lvn{width:64px;min-width:48px;min-height:48px;border-radius:12px;border:1.5px solid var(--line);background:#1a0d30;color:var(--ink);font:700 18px/1 inherit;font-family:inherit;text-align:center;-moz-appearance:textfield}
.lvn::-webkit-inner-spin-button,.lvn::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.ptr{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ptr button{display:flex;flex-direction:column;align-items:center;gap:3px;min-height:78px;padding:6px 2px;border-radius:14px;border:1.5px solid var(--line);background:#24123d;font-weight:700;font-size:18px;cursor:pointer;color:var(--ink)}
.ptr button img{width:46px;height:46px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,229,138,.55);background:#2a1545}
.ptr button[aria-pressed="true"]{background:linear-gradient(180deg,#ffe58a,#f5c542);color:#2a1a00;border-color:#fff1b5}
.ptr button[aria-pressed="true"] img{border-color:#2a1a00}
.opps-line{margin:8px 2px 0;font-size:18px;color:#e9dcc0;text-align:center}
.opps-line b{color:var(--gold2)}
.invite{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;padding:8px 10px 8px 12px;border-radius:14px;border:1.5px dashed rgba(255,229,138,.35);background:rgba(10,6,24,.5);font-size:18px;color:#cdbfa3;cursor:default;pointer-events:none;user-select:none}
.invite b{color:var(--ink)}
.soon{flex:none;padding:4px 10px;border-radius:999px;background:rgba(143,211,255,.14);border:1px solid rgba(143,211,255,.5);color:#bfe6ff;font-size:18px;font-weight:700;white-space:nowrap}
.rec{margin:10px 0 0;text-align:center;font-size:18px;color:#bfe9cf;font-weight:700;min-height:20px}
.ct-acts{display:flex;gap:8px;margin-top:14px}
.ct-acts .gk-btn{flex:1 1 0}
.opt-row{display:flex;gap:6px}
.opt-row .gk-seg{flex:1}
@media (min-width:1000px) and (min-height:640px){
  .ct .gk-title .gk-panel.wide{display:grid;grid-template-columns:1fr 1fr;column-gap:18px;width:min(760px,100%)}
}
@media (orientation:landscape) and (max-height:560px){
  .ct .gk-title .gk-panel.wide{display:grid;grid-template-columns:1fr 1fr;column-gap:14px;flex:0 1 640px;padding:10px 12px}
  .ct .gk-panel .lbl{margin:4px 0!important}
  .ptr button{min-height:60px}.ptr button img{width:32px;height:32px}
  .ct-hero{height:110px}
}
/* ---------- game screen ---------- */
.ct #sGame{gap:6px}
.sb{flex:none;display:flex;gap:6px;justify-content:center;align-items:center}
.sb .tm{flex:1 1 140px;max-width:280px;min-width:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:0 8px;padding:3px 8px;border-radius:10px;background:rgba(10,6,24,.78);border:1.5px solid rgba(255,229,138,.25)}
.sb .tm.us{border-color:rgba(143,227,173,.6)}
.sb .tm .nm{font-size:18px;color:#cdbfa3;font-weight:700;white-space:normal;overflow:visible;text-overflow:unset;line-height:1.15;width:100%}
.sb .tm .sc{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:18px;font-weight:700;color:#fff4dc;font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"zero" 0;line-height:1.15}
.sb .tm .bags{display:inline;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:18px;color:#cdbfa3;font-weight:700;line-height:1.15;margin-top:0}
.sb .tm .bags::before{content:"· ";color:#8a7d66}
.sb .tm .sc small{font-size:18px;color:#cdbfa3;margin-left:6px;font-weight:700}
.sb .tm.lead .sc::after{content:" \2605";color:#ffe58a;font-size:18px}
.sb .tgt{flex:none;display:flex;flex-direction:row;align-items:baseline;justify-content:center;gap:4px;padding:3px 8px;border-radius:10px;background:rgba(10,6,24,.6);font-size:18px;color:#cdbfa3;font-weight:700;text-align:center;line-height:1.15}
.sb .tgt b{font-size:18px;color:var(--ink)}
.felt{position:relative;flex:1;min-height:250px;border-radius:30px;border:10px solid transparent;
  background:radial-gradient(120% 90% at 50% 45%,#23845b 0,#12603f 52%,#0a4129 100%) padding-box,url(../../img/table/wood.webp) center/320px border-box;
  box-shadow:0 16px 40px rgba(0,0,0,.65),inset 0 0 0 2px rgba(255,229,138,.18),inset 0 0 60px rgba(0,0,0,.45);overflow:hidden;isolation:isolate}
.felt::before{content:"";position:absolute;inset:0;z-index:-1;background:url(../../img/table/felt-grain.webp) center/220px;opacity:.28;mix-blend-mode:overlay;pointer-events:none}
.felt::after{content:"";position:absolute;inset:10px;z-index:-1;border-radius:20px;border:1.5px solid rgba(255,229,138,.22);pointer-events:none}
.felt .logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:38%;max-width:200px;opacity:.12;pointer-events:none;z-index:-1}
/* seats */
.seat{position:absolute;z-index:4;display:flex;flex-direction:column;align-items:center;gap:2px;width:96px;pointer-events:none}
.seat.s1{left:4px;top:34%}
.seat.s2{left:50%;top:6px;transform:translateX(-50%)}
.seat.s3{right:4px;top:34%}
.seat .avw{position:relative;width:56px;height:56px}
.seat .av{width:56px;height:56px;border-radius:50%;object-fit:cover;border:3px solid #c9a24a;background:#2a1545;box-shadow:0 5px 12px rgba(0,0,0,.6);transition:border-color .2s,box-shadow .25s,transform .25s}
.seat.turn .av{border-color:#ffe58a;box-shadow:0 0 0 4px rgba(255,229,138,.35),0 0 22px rgba(255,214,96,.85)}
.seat.won .av{animation:seatWin .7s ease-out}
@keyframes seatWin{30%{transform:scale(1.14)}100%{transform:none}}
.seat .dots{position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);display:none;gap:3px;padding:2px 6px;border-radius:999px;background:rgba(10,6,24,.85)}
.seat.think .dots{display:flex}
.seat .dots i{width:5px;height:5px;border-radius:50%;background:#ffe58a;opacity:.8}
.seat .dots i:nth-child(2){animation-delay:.15s}.seat .dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{50%{opacity:.25;transform:translateY(-2px)}}
.seat .nm{font-size:18px;font-weight:700;color:#fff4dc;text-shadow:0 1px 3px #000;white-space:nowrap}
.seat .chip{min-height:22px;padding:1px 8px;border-radius:999px;background:rgba(6,4,16,.78);border:1px solid rgba(255,229,138,.4);font-size:18px;font-weight:700;color:var(--gold2);white-space:nowrap;font-variant-numeric:tabular-nums}
.seat .chip:empty{display:none}
.seat .chip.nil{border-color:#8fd3ff;color:#bfe6ff}
.seat .chip.bump{animation:bump .5s ease-out}
@keyframes bump{40%{transform:scale(1.25)}}
.seat .tag{position:absolute;top:-6px;right:-14px;padding:1px 6px;border-radius:8px;background:linear-gradient(180deg,#ffe58a,#f5c542);color:#2a1a00;font-size:18px;font-weight:700;box-shadow:0 2px 4px rgba(0,0,0,.5)}
.seat .tag:empty{display:none}
.seat.out{opacity:.45}
.seat .mini{position:relative;height:22px;width:74px;margin-top:1px}
.seat .mini i{position:absolute;bottom:0;left:50%;width:15px;height:21px;margin-left:-7.5px;border-radius:2.5px;background:var(--back) center/cover;box-shadow:0 1px 2px rgba(0,0,0,.6);transform-origin:50% 130%}
.seat.partner .nm::after{content:" \00b7 partner";color:#9fe7b8;font-weight:700}
/* trick area */
.trick{position:absolute;inset:0;z-index:3;pointer-events:none}
.slot{position:absolute;width:var(--tw);height:calc(var(--tw) * 1.4);transform:translate(-50%,-50%)}
.slot.p0{left:50%;top:69%}.slot.p1{left:31%;top:50%}.slot.p2{left:50%;top:31%}.slot.p3{left:69%;top:50%}
.slot .card,.flyc .face{width:100%;height:100%;display:block}
.slot .card{filter:drop-shadow(0 6px 10px rgba(0,0,0,.55))}
.slot.win .card{filter:drop-shadow(0 0 12px rgba(255,214,96,.95)) drop-shadow(0 6px 10px rgba(0,0,0,.55))}
.felt{--tw:clamp(56px,16vw,92px)}
/* center info */
.trumpb{position:absolute;left:12px;top:10px;z-index:5;display:flex;align-items:center;gap:6px;padding:4px 10px 4px 6px;border-radius:999px;background:rgba(6,4,16,.8);border:1.5px solid rgba(255,229,138,.5);font-weight:700;font-size:18px;color:#fff4dc}
.trumpb .sy{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#fff6dc}
.trumpb:empty{display:none}
.infob{position:absolute;right:12px;top:10px;z-index:5;padding:4px 10px;border-radius:999px;background:rgba(6,4,16,.8);border:1.5px solid rgba(255,229,138,.3);font-weight:700;font-size:18px;color:#e9dcc0;max-width:40%;text-align:center}
.infob:empty{display:none}
.deckc{position:absolute;left:50%;top:50%;width:var(--tw);height:calc(var(--tw) * 1.4);transform:translate(-50%,-50%);z-index:2}
.deckc i{position:absolute;inset:0;border-radius:7px;background:var(--back) center/cover;box-shadow:0 2px 5px rgba(0,0,0,.5)}
.upc{position:absolute;left:50%;top:50%;width:var(--tw);height:calc(var(--tw) * 1.4);transform:translate(-50%,-50%) rotate(6deg);z-index:3;filter:drop-shadow(0 0 14px rgba(255,214,96,.7))}
.upc .card{width:100%;height:100%}
.upc.gone{transition:opacity .4s,transform .4s;opacity:0;transform:translate(-50%,-50%) scale(.6)}
.msg{position:absolute;left:8px;right:8px;bottom:8px;z-index:6;margin:0;min-height:22px;text-align:center;font-size:18px;font-weight:700;color:#fff4dc;text-shadow:0 2px 4px rgba(0,0,0,.9);pointer-events:none}
/* action panel */
.act{position:absolute;left:3%;right:3%;bottom:8px;margin:0 auto;z-index:8;max-width:460px;max-height:calc(100% - 12px);overflow:auto;padding:10px;border-radius:18px;background:rgba(14,8,30,.92);border:1.5px solid rgba(255,229,138,.45);box-shadow:0 12px 30px rgba(0,0,0,.6);animation:gkPop .24s cubic-bezier(.2,1.4,.4,1)}
.felt:has(.act:not(:empty)) .msg{visibility:hidden}
@media (max-height:720px){.act .note{display:none}}
.act:empty{display:none}
.act h3{margin:0 0 8px;text-align:center;font-size:18px;color:var(--gold2)}
.act .row{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.act .row+.row{margin-top:8px}
.act .row .gk-btn{flex:1 1 90px;min-height:48px}
.act .note{margin:6px 0 0;text-align:center;font-size:18px;color:#cdbfa3}
.bidgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:6px}
.bidgrid button{min-height:48px;min-width:48px;box-sizing:border-box;border-radius:12px;border:1.5px solid var(--line);background:#24123d;color:var(--ink);font-weight:700;font-size:18px;cursor:pointer;padding:0}
.bidgrid button.nil{grid-column:span 2;background:#14385a;border-color:#8fd3ff;font-size:18px}
.bidgrid button.sug{border-color:#ffe58a;box-shadow:0 0 0 2px rgba(255,229,138,.35)}
.bidgrid button:focus-visible,.suitb:focus-visible{outline:3px solid #8fd3ff;outline-offset:2px}
.suits{display:flex;gap:8px;justify-content:center}
.suitb{flex:1 1 0;max-width:86px;min-height:56px;border-radius:14px;border:1.5px solid var(--line);background:#fff6dc;cursor:pointer;display:flex;align-items:center;justify-content:center}
.suitb[disabled]{opacity:.3;pointer-events:none}
.chk{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px;font-weight:700;font-size:18px;color:#e9dcc0}
.chk .gk-sw{transform:scale(.9)}
.stepper{display:flex;align-items:center;justify-content:center;gap:10px}
.stepper b{min-width:84px;text-align:center;font-size:26px;color:var(--gold2);font-variant-numeric:tabular-nums}
/* your seat + hand */
.me{position:relative;flex:none;display:flex;flex-direction:column;gap:2px}
.mebar{display:flex;align-items:center;justify-content:center;gap:8px;min-height:30px}
.mebar .nm{font-weight:700;font-size:18px;color:var(--gold2)}
.mebar .chip{min-height:24px;padding:1px 10px;border-radius:999px;background:rgba(6,4,16,.78);border:1px solid rgba(255,229,138,.4);font-size:18px;font-weight:700;color:var(--gold2)}
.mebar .chip:empty{display:none}
.mebar.turn .nm{color:#fff;text-shadow:0 0 10px rgba(255,214,96,.9)}
.mebar .tag{padding:1px 8px;border-radius:8px;background:linear-gradient(180deg,#ffe58a,#f5c542);color:#2a1a00;font-size:18px;font-weight:700}
.mebar .tag:empty{display:none}
.hand{position:relative;height:calc(var(--hcw,72px) * 1.4 + 20px);margin:0 2px 4px}
.hand .hc{position:absolute;bottom:0;width:var(--hcw,72px);height:calc(var(--hcw,72px) * 1.4);padding:0;border:0;background:none;cursor:pointer;transition:transform .22s cubic-bezier(.3,1.4,.5,1),left .3s,filter .2s;transform-origin:50% 140%;border-radius:8px}
.hand .hc .card{width:100%;height:100%;display:block;filter:drop-shadow(0 3px 5px rgba(0,0,0,.55))}
.hand.myturn .hc.ok{filter:none}
.hand.myturn .hc.no{filter:brightness(.5) saturate(.6)}
.hand.myturn .hc.ok:hover{transform:translateY(-12px) rotate(var(--rot,0deg))!important}
/* t9122u: selected pass/bury cards — lift, scale, bright gold. Overridden further in pinochle.css for even more punch. */
.hand .hc.sel{transform:translateY(-22px) scale(1.15) rotate(var(--rot,0deg))!important;z-index:40!important;transform-origin:50% 100%}
.hand .hc.sel .card{filter:drop-shadow(0 0 14px rgba(255,214,96,1));box-shadow:0 0 0 3px #ffd45a,0 0 18px 4px rgba(255,214,96,.9),0 10px 16px rgba(0,0,0,.45)}
.hand .hc.arm{transform:translateY(-16px) rotate(var(--rot,0deg))!important}
.hand .hc.arm .card{filter:drop-shadow(0 0 10px rgba(143,211,255,.95))}
.hand .hc.mark::after{content:"";position:absolute;left:50%;top:-8px;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:#ffe58a;box-shadow:0 0 8px #ffe58a}
.hand .hc:focus-visible{outline:3px solid #8fd3ff;outline-offset:2px}
.hand .hc.dealt{animation:dealIn .42s cubic-bezier(.2,1.2,.4,1) backwards}
@keyframes dealIn{from{transform:translateY(40px) rotateY(90deg);opacity:0}}
/* card art */
.card{display:block}
img.card{border-radius:7%/5%;background:#fff;box-shadow:inset 0 0 0 1px #bfae8a}
.flyc{position:fixed;left:0;top:0;z-index:40;pointer-events:none;will-change:transform;perspective:600px}
.flyc .in{position:relative;width:100%;height:100%;transform-style:preserve-3d}
.flyc .face,.flyc .bk{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.flyc .bk{border-radius:7px;background:var(--back) center/cover;box-shadow:0 3px 8px rgba(0,0,0,.6)}
.flyc .face{transform:rotateY(180deg)}
.flyc.up .face{transform:none}
.flyc.up .bk{display:none}
/* sheets */
.hs{width:100%;border-collapse:collapse;font-size:18px;margin:6px 0}
.hs th,.hs td{padding:6px 6px;border-bottom:1px solid rgba(255,229,138,.15);text-align:right;font-variant-numeric:tabular-nums}
.hs th:first-child,.hs td:first-child{text-align:left}
.hs th{color:#cdbfa3;font-size:18px}
.hs tr.tot td{font-weight:700;color:var(--gold2);font-size:18px;border-bottom:0}
.hs .neg{color:#ff9b9b}.hs .pos{color:#9fe7b8}
.big-res{margin:4px 0 8px;text-align:center;font-size:20px;font-weight:700;color:#fff4dc}
.big-res.good{color:#9fe7b8}.big-res.bad{color:#ffb0b0}
.trophy{display:block;width:96px;height:96px;margin:0 auto 4px;border-radius:50%;object-fit:cover;border:4px solid #ffe58a;box-shadow:0 0 0 6px rgba(255,229,138,.2),0 0 30px rgba(255,214,96,.6)}
@keyframes shine{50%{box-shadow:0 0 0 10px rgba(255,229,138,.12),0 0 44px rgba(255,214,96,.85)}}
.meldl{display:flex;flex-direction:column;gap:8px;margin:6px 0}
.meldl .mr{padding:8px;border-radius:14px;background:rgba(0,0,0,.3);border:1px solid rgba(255,229,138,.2)}
.meldl .mr .hd{display:flex;align-items:center;gap:8px;font-weight:700;color:#fff4dc}
.meldl .mr .hd img{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid #c9a24a}
.meldl .mr .hd b{margin-left:auto;color:var(--gold2);font-size:18px}
.meldl .mr .its{font-size:18px;color:#cdbfa3;margin:3px 0 4px}
.meldl .mr .cs{display:flex;flex-wrap:wrap;gap:2px}
.meldl .mr .cs .card{width:34px;height:auto}
.statg{display:grid;grid-template-columns:1fr auto;gap:4px 12px;font-size:18px;margin:8px 0}
.statg b{color:var(--gold2);text-align:right;font-variant-numeric:tabular-nums}
.bubble{position:absolute;z-index:9;left:50%;top:calc(100% + 4px);transform:translateX(-50%);min-width:96px;max-width:170px;padding:7px 10px;border-radius:14px;background:#fff6dc;color:#2a1545;font-weight:700;font-size:18px;line-height:1.25;text-align:center;box-shadow:0 6px 16px rgba(0,0,0,.5);animation:bIn .22s cubic-bezier(.2,1.5,.4,1);pointer-events:none}
.bubble::before{content:"";position:absolute;left:50%;top:-7px;margin-left:-7px;border:7px solid transparent;border-top:0;border-bottom-color:#fff6dc}
.seat.s1 .bubble{left:0;transform:none}.seat.s1 .bubble::before{left:24px}
.seat.s3 .bubble{left:auto;right:0;transform:none}.seat.s3 .bubble::before{left:auto;right:17px}
@keyframes bIn{from{opacity:0;transform:translateX(-50%) scale(.6)}}
.seat.s1 .bubble,.seat.s3 .bubble{animation:none}
.pass-fx{position:fixed;z-index:42;pointer-events:none}
/* landscape phones (tfK1b): the hand is held over the bottom rail of the felt, so the felt gets the full height.
   --cov = how much of the felt the hand covers; everything on the felt is placed in the part above it. */
@media (orientation:landscape) and (max-height:560px){
  .ct #sGame{--cov:calc(var(--hcw,72px) * 0.9 + 26px);gap:4px}
  .sb{position:absolute;left:calc(var(--sal) + 70px);right:calc(var(--sar) + 222px);top:calc(var(--sat) + 4px);z-index:5}
  .sb .tm{padding:2px 8px}.sb .tm .sc{font-size:18px}.sb .tm .nm{font-size:18px}
  .ct #sGame .gk-bar h2{visibility:hidden}
  .felt{min-height:0;border-width:7px;--tw:clamp(44px,calc((100dvh - 150px) * .24),70px)}
  .me{z-index:7;margin-top:calc(-1 * var(--cov));pointer-events:none}
  .me .hand,.me .hand .hc{pointer-events:auto}
  .mebar{min-height:24px;justify-content:flex-start;padding-left:calc(var(--sal) + 18px)}
  .seat{width:88px}.seat .avw,.seat .av{width:46px;height:46px}.seat .mini{display:none}
  .seat.s1,.seat.s3{top:calc((100% - var(--cov)) * .5 - 34px)}
  .seat.s2{top:4px;flex-direction:row;gap:6px;width:auto}.seat.s2 .avw,.seat.s2 .av{width:38px;height:38px}
  .seat.s2 .nm{order:2}.seat.s2 .chip{order:3}
  .slot.p2{top:calc(46px + var(--tw) * .7)}.slot.p0{top:calc(46px + var(--tw) * 1.95)}
  .slot.p1,.slot.p3{top:calc(46px + var(--tw) * 1.33)}.slot.p1{left:37%}.slot.p3{left:63%}
  .msg{bottom:calc(var(--cov) + 4px);left:12px;right:auto;max-width:27%;text-align:left;font-size:18px;line-height:1.25}
  .act{bottom:calc(var(--cov) - 8px);padding:6px 10px;max-width:680px;max-height:calc(100% - var(--cov) + 2px);overflow:auto}
  .bidgrid{grid-template-columns:repeat(8,1fr);gap:5px}.bidgrid button{min-height:48px}
  .act .note{margin-top:4px;font-size:18px}
  .felt:has(.act:not(:empty)) .msg{visibility:hidden}
  .ct .gk-title{gap:10px}.ct .gk-title .gk-brand{flex:0 1 34%;min-width:0}
  .ct .gk-title .gk-panel.wide{flex:1 1 0;min-width:0;max-width:660px}
  .ct .gk-title .gk-panel.wide .pcol{min-width:0}
  .ct .ct-hero{width:100%}
  .act h3{margin-bottom:4px;font-size:18px}.act .row .gk-btn{min-height:48px}
  .trumpb{top:6px;left:8px}.infob{top:6px;right:8px}
  .deckc,.upc{top:calc((100% - var(--cov)) * .5)}
}
/* desktop (tfK1b): bigger cards, seats and trick */
@media (min-width:900px) and (min-height:640px){
  .ct #sGame{width:min(1240px,100%);margin:0 auto}
  .felt{--tw:clamp(96px,calc((100dvh - 330px) * .2),136px)}
  .seat{width:150px}.seat .avw,.seat .av{width:88px;height:88px}.seat .nm{font-size:18px}.seat .chip{font-size:18px;min-height:26px}
  .seat .mini{width:120px;height:36px}.seat .mini i{width:26px;height:36px;margin-left:-13px}
  .seat.s1{left:22px;top:36%}.seat.s3{right:22px;top:36%}
  .seat.s2{top:8px;flex-direction:row;gap:10px;width:auto}.seat.s2 .avw,.seat.s2 .av{width:76px;height:76px}
  .slot.p1{left:34%}.slot.p3{left:66%}.slot.p0{top:76%}.slot.p2{top:36%}.slot.p1,.slot.p3{top:56%}
  .seat.s1,.seat.s3{top:calc(56% - 80px)}
  .msg{font-size:19px}.trumpb{font-size:18px}.infob{font-size:18px}
  .act{max-width:520px}.act h3{font-size:18px}
  .mebar .nm{font-size:18px}
}
/* four-colour suits (sensory/readability setting) */
body.four .suit-d{fill:#1f5fd0}
body.calm .seat .dots i,body.calm .ct-hero img,body.calm .trophy{animation:none}
/* tfK1c (owner t8707u polish): landscape phones — side seats sit higher so the status line and their speech bubbles no longer cover them */
@media (orientation:landscape) and (max-height:560px){
  .seat.s1,.seat.s3{top:max(50px,calc((100% - var(--cov)) * .5 - 62px))}
  .seat.s1 .bubble{left:calc(100% - 6px);top:6px;transform:none}.seat.s3 .bubble{right:calc(100% - 6px);left:auto;top:6px;transform:none}
  .seat.s1 .bubble::before,.seat.s3 .bubble::before{display:none}
  .msg{max-width:25%}
}
/* tfK1c: laptops and desktops — score strip moves up into the title row, so the felt, the trick and your hand get bigger cards */
@media (min-width:900px) and (min-height:640px){
  .ct #sGame{position:relative}
  .ct #sGame .gk-bar h2{text-align:left;padding-left:6px}
  .ct #sGame .sb{position:absolute;top:3px;left:50%;transform:translateX(-50%);width:min(640px,calc(100% - 560px));z-index:5}
  .sb .tm{padding:3px 10px}.sb .tm .nm{font-size:18px}.sb .tm .sc{font-size:18px}.sb .tgt{font-size:18px}.sb .tgt b{font-size:18px}
  .felt{--tw:clamp(100px,calc((100dvh - 300px) * .24),150px)}
  .slot.p2{top:39%}.slot.p1,.slot.p3{top:57%}.slot.p0{top:75%}
  .seat.s1,.seat.s3{top:calc(57% - 84px)}
}
@media (min-width:1600px) and (min-height:900px){.ct #sGame{width:min(1520px,100%)}}
/* tfTG1: on your turn, legal cards lift and get a gold edge; illegal ones stay dimmed (tap one for the why tip) */
#hand.playing .hc.ok:not(.arm){transform:translateY(-10px) rotate(var(--rot,0deg))!important;box-shadow:0 0 0 2px rgba(255,229,138,.9),0 8px 14px rgba(0,0,0,.45)}
@media (max-width:520px){.sb{gap:4px;flex-wrap:wrap;align-items:stretch}.sb .tm{padding:2px 6px;flex:1 1 calc(50% - 52px);max-width:none}.sb .tm .nm{white-space:normal;overflow:visible;text-overflow:unset;line-height:1.15}.sb .tgt{padding:2px 6px;flex:0 0 auto;align-self:center}}
@media (orientation:landscape) and (max-height:420px){.act .note{display:none}}

/* tfTG1: title footer keeps Deal (and the score target) on screen. Top card apps never hide Play below a clipped panel. */
.ct .ct-titlefoot{flex:none;width:min(440px,100%);margin:0 auto;padding:8px 12px 10px;display:flex;flex-direction:column;gap:6px;background:linear-gradient(180deg,rgba(18,10,36,0),rgba(18,10,36,.88) 18%,rgba(18,10,36,.92));z-index:4}
.ct .ct-titlefoot .lbl{margin:0}
.ct .ct-titlefoot .ct-acts{margin-top:2px}
.ct .ct-titlefoot .rec{margin:0;min-height:18px}
@media (min-width:720px){
  .ct .ct-titlefoot{width:min(760px,100%);padding-left:14px;padding-right:14px}
}
@media (max-width:520px){
  .ct-hero{height:min(30vw,112px);max-height:16vh}
  .ct .gk-title{gap:8px;padding:4px 0 8px}
  .ct .gk-panel.wide{padding:12px}
  .invite{margin-top:8px;padding:6px 10px}
  .ptr button{min-height:72px}
}

/* tfTG1: Music and SFX sliders meet the 48px tap rule */
.gk-set.vol{gap:10px}
.gk-set.vol label{flex:none;min-width:56px;font-size:18px}
.gk-vol,.tg-vol-sfx,.tg-vol-music{min-height:48px}

/* tfTG1: short landscape — keep the title footer to one row so names and sliders are not crushed */
@media (orientation:landscape) and (max-height:520px){
  .ct .ct-titlefoot{flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;padding:4px 10px 6px;width:min(100%,920px)}
  .ct .ct-titlefoot .lbl{margin:0;white-space:nowrap}
  .ct .ct-titlefoot .gk-seg{flex:1 1 200px;margin:0}
  .ct .ct-titlefoot .ct-acts{flex:1 1 160px;margin:0}
  .ct .ct-titlefoot .rec{flex:1 1 100%;margin:0;min-height:0}
  .ct .ct-hero{height:88px;max-height:28vh}
  .ct .gk-title{padding-bottom:6px}
  .lvr{min-width:64px}
  .ptr button{min-height:64px;padding:4px 2px;font-size:18px}
}
@media (max-width:520px){
  .opps-line{line-height:1.25}
  .ct #sTitle .gk-title{scroll-padding-bottom:8px;padding-bottom:10px}
}

/* tfTG1f: title must fit without clipping names or the partner line */
.ct .gk-host{font-size:18px}
.ct .gk-panel .lbl,.ct .ct-titlefoot .lbl{font-size:18px;letter-spacing:.04em;text-transform:uppercase}
.ct .gk-btn{min-height:48px;min-width:48px;font-size:18px}
.ct .gk-btn.icon{width:48px;height:48px;min-width:48px;min-height:48px}
.ct .gk-seg button{min-height:48px;font-size:18px}
.ct .gk-notices{font-size:18px;line-height:1.3}
.ct .opps-line{overflow:visible;white-space:normal;line-height:1.3}
.ptr button{overflow:visible}

/* Portrait phone: title over the hero, compact panel, Deal stays in the footer. */
@media (max-width:520px) and (orientation:portrait){
  .ct #sTitle .gk-brand{position:relative;width:min(86vw,360px);flex:none}
  .ct #sTitle .ct-hero{height:96px;max-height:96px;width:100%}
  .ct #sTitle .gk-logo{position:absolute;left:0;right:0;bottom:2px;z-index:2;font-size:34px;pointer-events:none}
  .ct #sTitle .gk-host{margin:6px 0 0;padding:0 8px}
  .ct #sTitle .gk-title{gap:6px;padding:2px 0 6px;justify-content:flex-start}
  .ct #sTitle .gk-title>:first-child,.ct #sTitle .gk-title>:last-child{margin-top:0;margin-bottom:0}
  .ct .gk-panel.wide{padding:8px 10px;width:100%}
  .ptr{gap:6px}
  .ptr button{min-height:68px;padding:4px 2px}
  .ptr button img{width:36px;height:36px}
  .opps-line{margin:6px 2px 0}
  .invite{margin-top:8px;padding:6px 8px;gap:8px}
  .invite-more{display:none}
  .pcol.b{margin-top:8px}
  #lvPt{margin-top:6px!important}
  .lvrow{gap:6px}
  .ct .ct-titlefoot{padding:4px 10px 6px;gap:4px}
  .ct .ct-titlefoot .rec{min-height:0}
}

/* Short landscape: side-by-side brand + panel, footer in one row, no crushed names. */
@media (orientation:landscape) and (max-height:520px){
  .ct #sTitle{min-height:0}
  .ct #sTitle .gk-title{
    flex-direction:row;flex-wrap:nowrap;align-items:stretch;align-content:stretch;
    justify-content:flex-start;gap:10px;padding:4px 0;overflow:auto;
  }
  .ct #sTitle .gk-title>*{margin-top:0!important;margin-bottom:0!important}
  .ct #sTitle .gk-brand{position:relative;flex:0 0 190px;min-width:160px;max-width:200px;display:flex;flex-direction:column;align-items:center;justify-content:center}
  .ct #sTitle .ct-hero{width:100%;height:96px;max-height:96px}
  .ct #sTitle .gk-logo{position:absolute;left:0;right:0;bottom:8px;z-index:2;font-size:32px;pointer-events:none}
  .ct #sTitle .gk-host{display:none}
  .ct #sTitle .gk-panel.wide{
    flex:1 1 0;min-width:0;max-width:none;width:auto;
    display:grid;grid-template-columns:minmax(230px,1.1fr) minmax(220px,1fr);
    column-gap:12px;align-items:center;padding:8px 10px;overflow:visible;
  }
  .ct #sTitle .pcol.a{min-width:0}
  .ct #sTitle .pcol.b{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:4px}
  #lvPt{margin-top:4px!important}
  .ptr button{min-height:64px;padding:4px 4px;overflow:visible}
  .ptr button img{width:28px;height:28px}
  .opps-line{margin:4px 0 0}
  .invite{margin-top:6px;padding:4px 8px}
  .invite-more{display:none}
  .ct .ct-titlefoot{flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;padding:4px 8px 4px;width:min(100%,960px)}
  .ct .ct-titlefoot .lbl{margin:0;white-space:nowrap}
  .ct .ct-titlefoot .gk-seg{flex:1 1 200px;margin:0}
  .ct .ct-titlefoot .ct-acts{flex:0 1 180px;margin:0}
  .ct .ct-titlefoot .rec{flex:1 1 auto;margin:0;min-height:0;text-align:left}
}

/* tfTG1g: fit title on 375x667 / 667x375 / 1280x800 without clipped names or overlapping title */
.invite{overflow:visible}
.invite-more{display:block;margin-top:2px}
.ct #sTitle .gk-title>:first-child,
.ct #sTitle .gk-title>:last-child{margin-top:0;margin-bottom:0}
.ct #sTitle .gk-title{justify-content:flex-start}
.ct .gk-panel.wide .invite{grid-column:1/-1}

/* Portrait phone: title sits on the hero, tagline hides so it cannot collide, sliders stay on screen. */
@media (max-width:520px) and (orientation:portrait){
  .ct #sTitle .gk-brand{position:relative;width:min(86vw,360px);flex:none}
  .ct #sTitle .ct-hero{height:72px;max-height:72px;width:100%}
  .ct #sTitle .gk-logo{position:absolute;left:0;right:0;top:auto;bottom:2px;z-index:2;font-size:32px;pointer-events:none;line-height:1}
  .ct #sTitle .gk-host{display:none}
  .ct #sTitle .gk-title{gap:4px;padding:0 0 2px;justify-content:flex-start}
  .ct #sTitle .gk-title>:first-child,.ct #sTitle .gk-title>:last-child{margin:0}
  .ct .gk-panel.wide{padding:6px 10px;width:100%;display:flex;flex-direction:column;overflow:visible}
  .ptr{gap:6px}
  .ptr button{min-height:60px;padding:2px 2px}
  .ptr button img{width:30px;height:30px}
  .opps-line{margin:4px 2px 0}
  .pcol.a{order:1}
  .invite{order:2;margin-top:6px;padding:4px 8px;gap:8px}
  .pcol.b{order:3;margin-top:6px}
  .invite-more{display:none}
  #lvPt{margin-top:4px!important}
  .lvrow{gap:6px}
  .pcol.b .lvw{display:none}
  /* Play-to sits on one row with 300/500 so the invite line still fits */
  .ct .ct-titlefoot{padding:2px 10px 4px;gap:4px;flex-direction:row;flex-wrap:wrap;align-items:center}
  .ct .ct-titlefoot .lbl{margin:0;white-space:nowrap}
  .ct .ct-titlefoot .gk-seg{flex:1 1 200px;margin:0}
  .ct .ct-titlefoot .ct-acts{flex:1 1 100%;margin:0}
  .ct .ct-titlefoot .rec{display:none}
}

/* Short landscape: names, partner line, sliders and invite all stay above the Deal row. */
@media (orientation:landscape) and (max-height:520px){
  .ct #sTitle{min-height:0}
  .ct #sTitle .gk-title{
    flex-direction:row;flex-wrap:nowrap;align-items:stretch;
    justify-content:flex-start;gap:8px;padding:2px 0;overflow:auto;
  }
  .ct #sTitle .gk-title>*{margin:0!important}
  .ct #sTitle .gk-brand{position:relative;flex:0 0 168px;min-width:148px;max-width:180px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
  .ct #sTitle .ct-hero{width:100%;height:78px;max-height:78px}
  .ct #sTitle .gk-logo{position:absolute;left:0;right:0;bottom:0;z-index:2;font-size:30px;pointer-events:none}
  .ct #sTitle .gk-host{display:none}
  .ct #sTitle .gk-panel.wide{
    flex:1 1 0;min-width:0;max-width:none;width:auto;
    display:grid;grid-template-columns:minmax(220px,1.15fr) minmax(240px,1fr);
    grid-template-rows:auto auto;column-gap:10px;row-gap:4px;
    align-items:start;padding:6px 8px;overflow:visible;
  }
  .ct #sTitle .pcol.a,.ct #sTitle .pcol.b{min-width:0}
  .ct #sTitle .pcol.b{display:flex;flex-direction:column;justify-content:center;gap:2px}
  #lvPt{margin-top:2px!important}
  .ptr button{min-height:58px;padding:2px 3px;overflow:visible}
  .ptr button img{width:26px;height:26px}
  .opps-line{margin:2px 0 0}
  .invite{margin-top:0;padding:3px 8px;align-self:center}
  .invite-more,.soon{display:none} /* live invite UI is painted by tg-qg-room into .invite.live */
  .invite b{white-space:nowrap}
  .pcol.b .lbl{display:block;margin:0 0 2px}
  .pcol.b .lvw{display:none}
  .lvn{width:52px;min-width:48px}
  .ct .ct-titlefoot{flex-direction:row;flex-wrap:nowrap;align-items:center;gap:8px;padding:2px 8px;width:min(100%,960px)}
  .ct .ct-titlefoot .lbl{margin:0;white-space:nowrap}
  .ct .ct-titlefoot .gk-seg{flex:1 1 180px;margin:0}
  .ct .ct-titlefoot .ct-acts{flex:0 1 160px;margin:0}
  .ct .ct-titlefoot .rec{display:none}
}

/* Desktop: keep invite text fully visible, no footer overlap. */
@media (min-width:900px) and (min-height:600px){
  .ct #sTitle .gk-title{justify-content:flex-start;padding-bottom:8px}
  .ct #sTitle .gk-title>*{margin-top:0!important;margin-bottom:0!important}
  .ct .gk-brand{margin-top:4px}
  .ct .gk-panel.wide{margin-top:8px}
  .invite-more{display:block}
}

/* tfTG1h: settings sheet fits 375x667 without scrolling; 3D canvas in the felt */
.ct .gk-sheet{z-index:70;padding:calc(var(--sat) + 10px) 10px calc(var(--sab) + 10px)}
.ct #shSet .gk-card{display:flex;flex-direction:column;max-height:100%;overflow:hidden;padding:10px 12px 10px}
.ct #shSet .gk-card h2{margin:0 0 4px;font-size:20px}
.ct .gk-set{min-height:48px;font-size:18px;gap:8px}
.ct .gk-set small{display:block;font-size:18px;line-height:1.2;color:#cdbfa3}
.ct .gk-set.vol{flex-wrap:nowrap}
.ct .gk-vol,.ct .tg-vol-sfx,.ct .tg-vol-music{min-height:48px;height:48px;flex:1 1 auto;min-width:64px}
.ct .gk-seg button{min-height:48px;min-width:48px;font-size:18px}
.ct #shSet .row{margin-top:8px;flex:none}
.ct #shSet .row .gk-btn{min-height:48px;font-size:18px}
@media (max-height:720px){
  /* Keep the helper copy in aria-labels; hide the second line so Card faces and Done stay on screen. */
  .ct #shSet .gk-set small{display:none}
  .ct #shSet .gk-card{padding:8px 10px}
  .ct #shSet .row{margin-top:6px}
  .ct #shSet .gk-card h2{margin:0 0 2px;font-size:20px}
}

/* 3D canvas host (look is refined in the tfTG1k block below). */
#tg3d{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;border-radius:inherit;display:block}

.ct .gk-sw{width:76px;height:48px;min-width:48px;min-height:48px}
.ct .gk-sw::after{width:36px;height:36px;top:5px;left:5px}
.ct .gk-sw[aria-checked="true"]::after{transform:translateX(30px)}



/* tfTG1k: full-bleed 3D play area, reserved HUD strip, readable nameplates, opaque dimmed cards */
.ct #sGame{min-height:0}
.ct .me{flex-shrink:0;z-index:2}
@media (max-width:520px) and (max-height:740px){
  .felt{min-height:0}
}

/* Reserved HUD strip — Trump / info live here, not on the felt over the partner seat. */
.hudstrip{flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:0 2px 2px}
.hudstrip:empty{display:none}
.hudstrip .trumpb,.hudstrip .infob{position:static;left:auto;right:auto;top:auto;max-width:none;z-index:1;margin:0}
.hudstrip .trumpb:empty,.hudstrip .infob:empty{display:none}

/* Nameplates: solid plaques so names never sit as loose type on the rail. */
.seat .nm{background:rgba(8,6,16,.9);border:1px solid rgba(255,229,138,.5);border-radius:8px;padding:2px 8px;line-height:1.2;text-shadow:none;max-width:160px;overflow:hidden;text-overflow:ellipsis}

/* 3D: no framed felt box; scene is full-bleed in the play area (phones and desktop). */
#felt.view3d{border:0;border-radius:0;box-shadow:none;background:#12141c;margin-left:calc(-1 * (var(--sal) + 10px));margin-right:calc(-1 * (var(--sar) + 10px));overflow:visible}
#felt.view3d::before,#felt.view3d::after,#felt.view3d>.logo{display:none}
#felt.view3d #tg3d{border-radius:0;inset:0}
@media (min-width:900px) and (min-height:640px){
  .ct #sGame:has(#felt.view3d){width:100%;margin:0}
}

/* 3D seat layout: compact nameplates by each avatar, not on the rail and not piled in the center. */
#felt.view3d .mini{display:none} /* HTML fans fight the 3D placeholders; 2D toggle keeps them. */
#felt.view3d .seat{width:auto;max-width:130px}
#felt.view3d .seat .nm{max-width:130px;overflow:visible;text-overflow:unset;white-space:nowrap}
#felt.view3d .seat.partner .nm{white-space:normal;text-align:center;line-height:1.15}
#felt.view3d .seat.partner .nm::after{content:"partner";display:block;color:#9fe7b8;font-weight:700;font-size:18px}
#felt.view3d .seat.s1,#felt.view3d .seat.s3{flex-direction:column;align-items:center;gap:4px;top:46%}
#felt.view3d .seat.s1{left:8px}
#felt.view3d .seat.s3{right:8px}
/* Short portrait felt: names sit beside the avatars (inward), not under them on the message / near rail. */
@media (max-width:520px) and (orientation:portrait){
  /* Lower-corner seats sit on the rail, clear of the table cards. */
  #felt.view3d .seat.s1,#felt.view3d .seat.s3{top:auto;bottom:40px;align-items:center;gap:3px;max-width:110px;flex-direction:column}
  #felt.view3d .seat.s1{left:0}
  #felt.view3d .seat.s3{right:0}
  #felt.view3d .seat.s1 .avw,#felt.view3d .seat.s1 .av,
  #felt.view3d .seat.s3 .avw,#felt.view3d .seat.s3 .av{width:52px;height:52px}
  #felt.view3d .seat.s1 .nm,#felt.view3d .seat.s3 .nm{white-space:normal;width:auto;max-width:86px;text-align:center;padding:2px 6px;line-height:1.15}
  #felt.view3d .seat.s1 .bubble{left:100%;top:0;transform:none}
  #felt.view3d .seat.s3 .bubble{right:100%;left:auto;top:0;transform:none}
  #felt.view3d .msg{bottom:6px}
}
#felt.view3d .seat.s2{top:6px;flex-direction:row;align-items:center;gap:6px;width:auto;max-width:none;transform:translateX(-50%)}
#felt.view3d .seat.s2 .nm{text-align:left;white-space:normal}
#felt.view3d .msg{left:12px;right:12px;bottom:8px;padding:4px 10px;border-radius:10px;background:rgba(8,6,16,.55)}
@media (min-width:900px) and (min-height:640px){
  #felt.view3d .seat.s1,#felt.view3d .seat.s3{top:46%}
  #felt.view3d .seat.s2{flex-direction:column;top:8px}
  #felt.view3d .seat.s2 .nm{text-align:center}
}

/* Hand: opaque faces; unplayable cards are dimmed but not transparent. */
.hand .hc{background:#efe4cc;overflow:hidden;opacity:1}
.hand .hc .card{background:#efe4cc;opacity:1}
.hand.myturn .hc.ok,.hand.myturn .hc.no{filter:none;opacity:1}
.hand.myturn .hc.no .card{filter:brightness(.74) saturate(.8);opacity:1}
.hand.myturn .hc.no::after{content:"";position:absolute;inset:0;background:rgba(28,18,12,.32);border-radius:inherit;pointer-events:none}
.hand.two .hc{transform:none!important}
.hand.two .hc.sel{transform:translateY(-22px) scale(1.15)!important;z-index:40!important}
.hand.two .hc.got{transform:translateY(-22px) scale(1.15)!important;z-index:40!important}
.hand .hc.got{transform:translateY(-22px) scale(1.15) rotate(var(--rot,0deg))!important;z-index:40!important;transform-origin:50% 100%}
.hand .hc.got .card{filter:drop-shadow(0 0 14px rgba(255,214,96,1));box-shadow:0 0 0 3px #ffd45a,0 0 18px 4px rgba(255,214,96,.9),0 10px 16px rgba(0,0,0,.45)}

/* Avatar 5%: painted poker scene fills the game screen; no circular badges. */
#tgScene{position:absolute;inset:0;z-index:0;pointer-events:none;display:block}
.ct #sGame.view3d{position:relative}
.ct #sGame.view3d > :not(#felt):not(#tgScene){position:relative;z-index:3}
.ct #sGame.view3d #felt{position:absolute;inset:0;z-index:1;margin:0;flex:none;min-height:0;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
.ct #sGame.view3d .me{margin-top:auto;z-index:3;background:linear-gradient(180deg,rgba(8,6,16,0),rgba(8,6,16,.82) 28%,rgba(8,6,16,.9))}
.ct #sGame.view3d .sb,.ct #sGame.view3d .hudstrip,.ct #sGame.view3d .gk-bar{background:rgba(8,6,16,.72)}
#felt.view3d .seat .avw{display:none} /* no portrait badges */
#felt.view3d .seat{position:absolute;width:auto;max-width:130px;z-index:4;align-items:center}
#felt.view3d .seat .nm{text-align:center;white-space:normal;max-width:120px}
#felt.view3d .seat.placeholder .nm{border-style:dashed;opacity:.92}

@media (min-width:900px) and (min-height:640px){
  .ct #sGame.view3d .sb{position:static;transform:none;width:auto;max-width:none;left:auto;top:auto;margin:0 auto}
}

/* tfTG1r: 3D trick cards (thickness, contact shadow, pulled-in felt) + board size */
#felt.view3d .trick{z-index:5;pointer-events:none;perspective:820px}
#felt.view3d .slot{transform-style:preserve-3d;z-index:5}
#felt.view3d .slot .card{
  overflow:visible;
  border-radius:7px;
  background:#f3eee4;
  filter:none;
  box-shadow:
    5px 12px 18px rgba(0,0,0,.48),
    2px 4px 0 rgba(40,24,10,.35),
    inset 0 0 0 1px rgba(40,24,10,.22);
}
#felt.view3d .slot::before{
  content:"";
  position:absolute;
  top:4px;bottom:3px;left:100%;width:5px;
  margin-left:-1px;
  background:linear-gradient(90deg,#d8cbb6 0%,#8a7354 55%,#5a4630 100%);
  border-radius:0 3px 3px 0;
  z-index:0;
  pointer-events:none;
}
#felt.view3d .slot::after{
  content:"";
  position:absolute;
  left:10%;right:4%;top:96%;height:12px;
  background:radial-gradient(ellipse at center, rgba(0,0,0,.42), rgba(0,0,0,0) 70%);
  z-index:0;
  pointer-events:none;
}
#felt.view3d .slot.win .card{box-shadow:0 0 0 2px rgba(255,214,96,.95),5px 12px 18px rgba(0,0,0,.48),2px 4px 0 rgba(40,24,10,.35)}
body.board-large #felt.view3d, #sGame.board-large #felt.view3d{--tw:clamp(84px,24vw,110px)}
body.board-normal #felt.view3d{--tw:clamp(72px,20vw,92px)}
#felt.view3d .deckc,#felt.view3d .upc{display:none}
#felt.view3d .seat .nm{font-size:18px;line-height:1.15;padding:3px 8px;border-radius:10px;background:rgba(8,6,16,.78);border:1.5px solid rgba(255,229,138,.4)}
#felt.view3d .seat.placeholder .nm{border-style:dashed}

/* tfTG1r: 3D HUD/actions — bid panel above the hand; trump chip overlays the felt (does not steal height). */
.ct #sGame.view3d .hudstrip{position:absolute;left:6px;right:6px;top:0;z-index:4;min-height:0;padding:0;background:transparent;pointer-events:none}
.ct #sGame.view3d .hudstrip .trumpb,.ct #sGame.view3d .hudstrip .infob{pointer-events:none;background:rgba(8,6,16,.78);white-space:nowrap;line-height:1.15;max-width:48%;padding:3px 8px}
.ct #sGame.view3d .act{
  position:fixed;left:12px;right:12px;
  bottom:calc(var(--sab, 0px) + 4.6em + 18px);
  z-index:60;max-width:min(460px,calc(100vw - 24px));margin:0 auto;
  max-height:min(62dvh,calc(100dvh - 8em));
}
.ct #sGame.view3d .mebar{min-height:26px}

/* Live-friend invites (Spades/Hearts). 18px text, 48px taps. Euchre/Pinochle can keep .invite as a note. */
.invite.live{pointer-events:auto;cursor:auto;user-select:text;border-style:solid;display:block}
.invite.live .tgq-h{margin:0 0 4px;font-size:18px;font-weight:700;color:#fff4dc}
.invite.live .tgq-s{margin:0 0 8px;font-size:18px;color:#cdbfa3;line-height:1.3}
.invite.live .tgq-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.invite.live #tgqCodeIn{border-radius:12px;border:1.5px solid rgba(255,229,138,.45);background:rgba(8,6,16,.8);color:#fff4dc;padding:8px 10px;letter-spacing:.08em}
.invite.live #tgqMsg{margin:8px 0 0;font-size:18px;color:#ffe58a}
.invite.live #tgqMsg.err{color:#ffb0b0}
.invite.live .tgq-seats{color:#fff4dc}


/* tfTG1s: each nameplate + chip has its own clear space; never clip at 375 / 667x375 / 1280.
   JS places the boxes; neutralize earlier rail / edge rules that fought that. */
#felt.view3d .seat,
#felt.view3d .seat.s1,
#felt.view3d .seat.s2,
#felt.view3d .seat.s3{
  flex-direction:column !important;
  align-items:center !important;
  gap:4px !important;
  width:max-content !important;
  max-width:min(168px, 48vw) !important;
  bottom:auto !important;
  overflow:visible !important;
  pointer-events:none;
}
@media (max-width:520px) and (orientation:portrait){
  #felt.view3d .seat.s1,
  #felt.view3d .seat.s3{top:auto;bottom:auto !important;left:auto;right:auto;max-width:min(168px, 48vw) !important}
}
#felt.view3d .seat .nm{
  white-space:nowrap !important;
  max-width:none !important;
  overflow:visible !important;
  text-overflow:clip !important;
  text-align:center;
}
#felt.view3d .seat.partner .nm{white-space:normal !important;max-width:120px !important}
#felt.view3d .seat .chip{position:relative;align-self:center;margin:0;flex-shrink:0}
#felt.view3d .seat .tag{position:static;right:auto;top:auto;margin:0}
#sGame.view3d #trumpb,
#sGame.view3d #infob,
.ct #sGame.view3d .hudstrip .trumpb,
.ct #sGame.view3d .hudstrip .infob{z-index:8;pointer-events:none;max-width:46%}


/* tfTG1s square table: one player per side, plates clear of the center trick, hand at the near rail. */
#felt.view3d.square .seat,
#sGame.view3d.square .seat{
  flex-direction:column !important;
  align-items:center !important;
  gap:4px !important;
  width:max-content !important;
  max-width:min(168px, 48vw) !important;
  bottom:auto !important;
  overflow:visible !important;
}
#felt.view3d.square .seat .nm{white-space:nowrap !important;max-width:none !important;overflow:visible !important}
#felt.view3d.square .seat.partner .nm{white-space:normal !important;max-width:120px !important}
#felt.view3d.square .trick{z-index:6}
.ct #sGame.view3d.square .me{background:linear-gradient(180deg,rgba(8,6,16,0),rgba(8,6,16,.75) 32%,rgba(8,6,16,.9))}

#felt.view3d .slot:not(:has(.card))::before,
#felt.view3d .slot:not(:has(.card))::after{display:none}
.ct #sGame.view3d .hudstrip{top:0;bottom:auto;height:0;overflow:visible;z-index:8}
.ct #sGame.view3d.square .hudstrip{height:0}


/* tfTG1u tonight 2D: real avatars as 2D renders, not circular portrait badges. Nothing clipped at 375. */
#felt:not(.view3d) .seat .av,
.mebar .av{
  width:56px;height:56px;border-radius:12px;object-fit:contain;background:rgba(8,6,16,.55);
  border:2px solid rgba(201,162,74,.85);
}
.mebar .av{width:40px;height:40px;flex:0 0 auto}
.mebar .av[hidden],.mebar .av:not([src]){display:none}
@media (max-width:520px){
  #felt:not(.view3d) .seat{max-width:110px}
  #felt:not(.view3d) .seat .nm{white-space:normal;text-align:center;max-width:100%;overflow:visible;text-overflow:clip}
  #felt:not(.view3d) .seat.s1{left:2px}
  #felt:not(.view3d) .seat.s3{right:2px;left:auto}
}

/* 2D: message sits in the open felt on wide screens; on a 375-wide phone it docks
   above the table so it does not cover Pinky or the side nameplates. */
#felt:not(.view3d) .msg{
  left:18%;right:18%;bottom:auto;top:42%;
  padding:3px 8px;border-radius:10px;
  background:rgba(8,6,16,.55);
  z-index:8;
}
@media (min-width:900px){
  #felt:not(.view3d) .msg{left:22%;right:22%;top:40%}
}
#tgDock:empty{display:none}
#sGame:has(#felt:not(.view3d)) #tgDock{
  flex:none;display:flex;flex-direction:column;gap:4px;padding:0 4px 4px;z-index:12;
}
#sGame:has(#felt:not(.view3d)) #tgDock .msg,
#sGame:has(#felt:not(.view3d)) #tgDock .act{
  position:relative;left:auto;right:auto;top:auto;bottom:auto;
  max-width:none;max-height:none;margin:0;width:100%;
  padding:6px 8px;
}
#sGame:has(#felt:not(.view3d)) #tgDock:has(.act:not(:empty)) .msg{display:none}
#sGame:has(#felt .act:not(:empty)) #tgDock .msg{display:none}

#sGame:has(#felt:not(.view3d)) #tgDock .act{
  display:flex;flex-direction:row;align-items:center;gap:8px;
  max-height:none;padding:6px 8px;
}
#sGame:has(#felt:not(.view3d)) #tgDock .act .note{display:none}
#sGame:has(#felt:not(.view3d)) #tgDock .act h3{display:none}
#sGame:has(#felt:not(.view3d)) #tgDock .act{justify-content:center;min-height:48px}
#sGame:has(#felt:not(.view3d)) #tgDock .act .row{margin:0;flex:0 0 auto}
@media (max-width:520px) and (orientation:portrait){
  #felt:not(.view3d) .seat .mini{display:none}
  #felt:not(.view3d) .seat{gap:0}
  #felt:not(.view3d) .seat .nm{
    max-width:100%;overflow:visible;text-overflow:unset;white-space:normal;
    margin-top:1px;padding:1px 6px;border-radius:8px;background:rgba(8,6,16,.9);
    line-height:1.15;z-index:2;
  }
  #felt:not(.view3d) .seat.s1,
  #felt:not(.view3d) .seat.s3{top:22%;left:2px}
  #felt:not(.view3d) .seat.s3{left:auto;right:2px}
  #felt:not(.view3d) .seat.s2{top:4px}
  /* Compact one-button act (Hearts pass) is a top bar. The Spades bid grid keeps a readable overlay. */
  #felt:not(.view3d) .act:not(:has(.bidgrid)){
    top:4px;bottom:auto;left:6px;right:6px;max-width:none;max-height:56px;
    padding:4px 8px;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;
  }
  #felt:not(.view3d) .act:not(:has(.bidgrid)) h3{display:none}
  #felt:not(.view3d) .act:not(:has(.bidgrid)) .note{display:none}
  #felt:not(.view3d) .act:not(:has(.bidgrid)) .row{margin:0}
  #felt:not(.view3d) .act:has(.bidgrid){
    top:auto;bottom:8px;left:6px;right:6px;max-width:none;max-height:55%;
    overflow:auto;padding:8px;
  }
  #felt:not(.view3d):has(.act:not(:empty):not(:has(.bidgrid))) .seat.s2{top:58px}
  #felt:not(.view3d):has(.act:not(:empty):not(:has(.bidgrid))) .seat.s1,
  #felt:not(.view3d):has(.act:not(:empty):not(:has(.bidgrid))) .seat.s3{top:46%}
}
