/* ======================= LOOK & FEEL (25 Oct 2026): see js/fx.js ======================= */

/* Digu: the caller's cards fanned out in the middle */
.diguFan{position:fixed; inset:0; z-index:44; pointer-events:none}
.diguFan .fanc{position:absolute; transform-origin:50% 100%}
.diguFan .fanc .card{--w:inherit; box-shadow:0 10px 18px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.35)}

/* a soft glow follows a thrown card, and a ripple where it lands */
.fly.trail .card{box-shadow:0 6px 12px rgba(0,0,0,.38), 0 0 16px 5px rgba(255,236,190,.28)}
.fly.trail::before{content:""; position:absolute; inset:-14%; border-radius:30%; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse, rgba(255,238,200,.32), rgba(255,238,200,0) 70%); filter:blur(6px)}
.puff{position:fixed; z-index:30; pointer-events:none; border-radius:50%; filter:blur(1.5px);
  background:radial-gradient(ellipse at center, rgba(245,238,222,.55), rgba(235,226,205,.22) 45%, rgba(235,226,205,0) 72%)}

/* points counting up */
.counting{color:#ffe7a8 !important; text-shadow:0 0 8px rgba(255,210,90,.55)}

/* level up */
#lvlBanner{position:fixed; inset:0; z-index:66; display:grid; place-items:center; background:rgba(0,0,0,.5); cursor:pointer; animation:lvfade .3s ease-out}
#lvlBanner[hidden]{display:none}
.lvbox{display:grid; justify-items:center; gap:6px; text-align:center; width:min(400px,86vw); padding:16px 22px 14px; box-sizing:border-box; color:#f3ead6; border-radius:18px;
  background:linear-gradient(180deg, rgba(28,17,8,.97), rgba(14,9,4,.97)); border:2px solid rgba(240,192,138,.75); box-shadow:0 0 40px rgba(255,200,90,.25), 0 16px 40px rgba(0,0,0,.6);
  animation:lvpop .55s cubic-bezier(.2,1.4,.4,1)}
.lvmedal{width:92px; height:92px; border-radius:50%; display:grid; place-content:center; line-height:1; margin-top:-46px;
  background:radial-gradient(circle at 38% 32%, #fff3c4, #f0c08a 40%, #b07a48 75%, #6b4220); border:3px solid #4a2a10; box-shadow:0 0 0 3px #d39a5e, 0 0 26px rgba(255,200,90,.6), 0 8px 16px rgba(0,0,0,.5)}
.lvmedal small{font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:#4a2a10}
.lvmedal b{font-family:var(--f-display); font-weight:400; font-size:40px; color:#3a1f0a}
.lvbox h2{margin:0; font-family:var(--f-display); font-weight:400; font-size:28px; color:var(--saffron)}
.lvbox p{margin:0; font-size:14px; line-height:1.4; text-wrap:pretty}
.lvtap{color:#c9b89c; font-size:11px; letter-spacing:.1em; text-transform:uppercase}
.lvbox{position:relative; overflow:visible}
.lvbox::after{content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; overflow:hidden;
  background:linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,240,200,.18) 50%, rgba(255,255,255,0) 60%) -150% 0/200% 100% no-repeat; animation:lvsheen 2.4s ease-in-out .5s 2}
/* winning a prize: the level-up banner with the prize dropping in under a slow golden light */
#prizeBanner{position:fixed; inset:0; z-index:67; display:grid; place-items:center; background:rgba(0,0,0,.55); cursor:pointer; animation:lvfade .3s ease-out}
#prizeBanner[hidden]{display:none}
.przbox{padding-top:0; gap:4px}
.przstage{position:relative; width:150px; height:104px; margin-top:-34px; display:grid; place-items:center}
.przlight{position:absolute; left:50%; top:50%; width:230px; height:230px; margin:-115px 0 0 -115px; border-radius:50%; pointer-events:none;
  background:repeating-conic-gradient(from 0deg, rgba(255,214,120,.22) 0 9deg, rgba(255,214,120,0) 9deg 22.5deg);
  -webkit-mask:radial-gradient(circle, #000 18%, transparent 68%); mask:radial-gradient(circle, #000 18%, transparent 68%);
  animation:przspin 14s linear infinite, lvfade .8s ease-out}
.przpic{position:relative; display:grid; place-items:center; width:100px; height:100px; filter:drop-shadow(0 8px 14px rgba(0,0,0,.55));
  animation:przdrop .75s cubic-bezier(.2,1.5,.45,1) .1s both}
.przpic .emo-i, .przpic img{width:92px; height:92px; font-size:76px; line-height:92px}
.przpic .tthumb, .przpic .dthumb{width:132px; height:88px; border-radius:10px; border:2px solid rgba(240,192,138,.85); background-size:cover; background-position:center}
.przpic .av{width:92px; height:92px; font-size:34px}
.przrow{display:flex; align-items:center; gap:10px; text-align:left; max-width:100%}
.przrow b{display:block; font-size:16px; color:#fff1cf}
.przrow small{display:block; font-size:13px; color:#e8c98a}
.przbox h2 + .przrow:last-of-type{text-align:center}
.przi .emo-i{width:28px; height:28px; font-size:24px; line-height:28px}
@keyframes przdrop{from{transform:translateY(-40px) scale(.3) rotate(-12deg); opacity:0}60%{opacity:1}to{transform:none; opacity:1}}
@keyframes przspin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion: reduce){ .przlight, .przpic{animation:none} }
@keyframes lvpop{from{transform:scale(.6); opacity:0}to{transform:none; opacity:1}}
@keyframes lvfade{from{opacity:0}to{opacity:1}}
@keyframes lvsheen{to{background-position:250% 0}}

/* living tables: a layer between the table picture and the cards, only during a game.
   (2 Nov 2026, players: "the phone heats fast") the layers move in small steps about twice a second instead of every frame:
   they blend with the whole table, so each frame meant redrawing the full screen for the whole game. The drift is so slow
   that the steps don't show. */
#tableFx{position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; display:none}
body.in-game #tableFx{display:block}
body.ghoul-night #tableFx{display:none}
#tableFx i{position:absolute; display:block}
/* water: light from above the water moving slowly over the cloth */
#tableFx.tfx-water .tf1,#tableFx.tfx-water .tf2,#tableFx.tfx-moon .tf2{inset:-25%; mix-blend-mode:soft-light; opacity:.55;
  background:radial-gradient(ellipse 22% 14% at 30% 40%, rgba(170,240,255,.55), rgba(170,240,255,0) 70%), radial-gradient(ellipse 18% 12% at 70% 62%, rgba(170,240,255,.45), rgba(170,240,255,0) 70%),
    radial-gradient(ellipse 26% 10% at 55% 25%, rgba(200,250,255,.4), rgba(200,250,255,0) 70%), radial-gradient(ellipse 16% 12% at 20% 75%, rgba(170,240,255,.4), rgba(170,240,255,0) 70%);
  animation:tfdrift 26s steps(52) infinite alternate}
#tableFx.tfx-water .tf2{animation-duration:34s; animation-direction:alternate-reverse; opacity:.4; transform:rotate(180deg)}
#tableFx.tfx-water .tf3{inset:0; background:radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0) 55%, rgba(0,10,20,.18) 100%); animation:tfbreathe 9s steps(9) infinite}
@keyframes tfdrift{from{transform:translate(-4%,-3%) rotate(0)}to{transform:translate(4%,3%) rotate(4deg)}}
@keyframes tfbreathe{0%,100%{opacity:.6}50%{opacity:1}}
/* moonlit dhoni: the moon's glow breathes and its path on the water glitters */
#tableFx.tfx-moon .tf1{left:76%; top:12%; width:22%; aspect-ratio:1; border-radius:50%; mix-blend-mode:screen;
  background:radial-gradient(circle, rgba(255,226,160,.35), rgba(255,226,160,0) 65%); animation:tfmoon 6s steps(12) infinite alternate}
#tableFx.tfx-moon .tf3{left:72%; top:64%; width:30%; height:24%; mix-blend-mode:screen; opacity:.5;
  background:repeating-linear-gradient(180deg, rgba(255,226,160,0) 0 6px, rgba(255,226,160,.35) 6px 7px, rgba(255,226,160,0) 7px 13px);
  -webkit-mask:radial-gradient(ellipse 30% 50% at 50% 30%, #000, transparent); mask:radial-gradient(ellipse 30% 50% at 50% 30%, #000, transparent);
  animation:tfglit 3.5s steps(7) infinite alternate}
@keyframes tfmoon{from{opacity:.6; transform:scale(.95)}to{opacity:1; transform:scale(1.05)}}
@keyframes tfglit{from{transform:translateX(-3%) scaleY(1); opacity:.35}to{transform:translateX(3%) scaleY(1.08); opacity:.6}}
/* palms and hibiscus: soft shade of leaves passing slowly, as if in a breeze */
#tableFx.tfx-leaf .tf1,#tableFx.tfx-leaf .tf2{inset:-20%; opacity:.5;
  background:radial-gradient(ellipse 14% 6% at 20% 30%, rgba(0,0,0,.35), rgba(0,0,0,0) 70%), radial-gradient(ellipse 12% 5% at 80% 70%, rgba(0,0,0,.3), rgba(0,0,0,0) 70%),
    radial-gradient(ellipse 30% 20% at 60% 35%, rgba(255,236,190,.12), rgba(255,236,190,0) 70%);
  animation:tfsway 7s steps(14) infinite alternate}
#tableFx.tfx-leaf .tf2{animation-duration:9.5s; animation-delay:-3s; transform:scaleX(-1)}
@keyframes tfsway{from{transform:translate(-1.5%,0) rotate(-1deg)}to{transform:translate(1.5%,.8%) rotate(1deg)}}
/* candle-lit tables: warm light flickering faintly at the edges */
#tableFx.tfx-candle .tf1{inset:0; mix-blend-mode:soft-light; background:radial-gradient(ellipse at 50% 50%, rgba(255,170,80,0) 45%, rgba(255,150,60,.35) 100%); animation:tfflick 4s steps(1) infinite}
@keyframes tfflick{0%{opacity:.8}17%{opacity:.95}23%{opacity:.75}41%{opacity:1}52%{opacity:.85}68%{opacity:.95}79%{opacity:.78}88%{opacity:1}}

/* the home screen: a layer over the picture, sized like it (homeFxSize) */
#hubOv{overflow:hidden}
#hubOv>.hubx{position:relative; z-index:1}
#homeFx{position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden}
#homeFx .hfimg{position:absolute}
#homeFx i{position:absolute; display:block}
.hflamp{width:14%; aspect-ratio:1; transform:translate(-50%,-50%); border-radius:50%; mix-blend-mode:screen;
  background:radial-gradient(circle, rgba(255,214,140,.55) 0%, rgba(255,170,70,.25) 30%, rgba(255,150,50,0) 65%); animation:hflick 3.1s steps(1) infinite}
.hflamp.b{animation-duration:3.7s; animation-delay:-1.3s}
@keyframes hflick{0%{opacity:.75}13%{opacity:.95}21%{opacity:.7}34%{opacity:1}46%{opacity:.82}59%{opacity:.97}71%{opacity:.74}84%{opacity:.92}}
.hfwater{left:0; right:0; top:53%; height:30%; mix-blend-mode:soft-light; opacity:.7;
  background:repeating-linear-gradient(176deg, rgba(255,255,255,0) 0 14px, rgba(220,250,255,.35) 15px 16px, rgba(255,255,255,0) 17px 31px),
    repeating-linear-gradient(184deg, rgba(255,255,255,0) 0 22px, rgba(220,250,255,.25) 23px 24px, rgba(255,255,255,0) 25px 46px);
  -webkit-mask:linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask:linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  animation:hfwave 12s linear infinite}
@keyframes hfwave{from{background-position:0 0, 0 0}to{background-position:-160px 12px, 140px -10px}}
.hfrefl{left:55%; width:26%; top:56%; height:20%; mix-blend-mode:screen; opacity:.45;
  background:repeating-linear-gradient(180deg, rgba(255,210,130,0) 0 5px, rgba(255,210,130,.5) 5px 6px, rgba(255,210,130,0) 6px 11px);
  -webkit-mask:linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent); mask:linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  animation:hfglit 2.8s ease-in-out infinite alternate}
@keyframes hfglit{from{transform:translateX(-1.5%) scaleY(1); opacity:.3}to{transform:translateX(1.5%) scaleY(1.06); opacity:.55}}
.hfstar{width:var(--s,2px); height:var(--s,2px); border-radius:50%; background:#fff; box-shadow:0 0 4px 1px rgba(255,255,255,.7); opacity:.3; animation:hftwink 6s ease-in-out var(--d) infinite}
@keyframes hftwink{0%,100%{opacity:.25}45%{opacity:.25}55%{opacity:1}65%{opacity:.4}}

/* game tiles on the home screen: the card leans up and a soft light passes when you hover or press */
.hubx .gtile{transition:transform .25s ease, filter .25s ease}
.hubx .gtile .gback{transition:transform .35s cubic-bezier(.2,1.4,.4,1)}
.hubx .gtile.ready:hover .gback,.hubx .gtile.ready:focus-visible .gback{transform:translateY(-6px) rotate(-5deg) scale(1.08)}
.hubx .gtile.ready:hover{filter:brightness(1.08)}
.hubx .gtile.ready:active{transform:scale(.97)}
.hubx .gtile.ready:active .gback{transform:translateY(-3px) rotate(4deg) scale(1.04)}
.hubx .gtile{overflow:hidden}
.hubx .gtile.ready::after{content:""; position:absolute; inset:0; pointer-events:none; opacity:0;
  background:linear-gradient(105deg, rgba(255,255,255,0) 35%, rgba(255,236,200,.16) 50%, rgba(255,255,255,0) 65%) -120% 0/250% 100% no-repeat}
.hubx .gtile.ready:hover::after{opacity:1; animation:gtsheen 1s ease-out}
@keyframes gtsheen{to{background-position:220% 0}}

@media (prefers-reduced-motion:reduce){
  #tableFx,#homeFx{display:none !important}
  .hubx .gtile .gback,.hubx .gtile{transition:none}
}

/* (25 Oct, user: "don't use those type of buttons anywhere in the game") the gold/teal picture buttons are gone everywhere:
   every button now looks like the menus' simple lacquer buttons (caramel for the main one, dark with a red edge for the rest) */
html body :is(.gbtn:not(.alt):not(.buy),.btn:not(.alt):not(.ghost),.hbtn.main):not(.xback){
  border-image:none !important; filter:none !important; border:1.5px solid #2a1a0e !important; border-radius:999px !important;
  color:#2a180a !important; text-shadow:0 1px 0 rgba(255,235,205,.45) !important; background:linear-gradient(180deg,#ecc48f 0%,#d39a5e 50%,#a8743f 100%) !important;
  box-shadow:inset 0 1px 0 rgba(255,235,205,.55), inset 0 -2px 0 rgba(50,30,12,.45), 0 0 0 2px rgba(18,10,8,.85), 0 4px 10px rgba(0,0,0,.5) !important}
html body :is(.gbtn.alt,.btn.alt,.hbtn:not(.main),.ghost):not(.xback):not(.cskip){
  border-image:none !important; filter:none !important; border:1.5px solid var(--lq-red,#a3191f) !important; border-radius:999px !important; color:var(--lq-cream,#f3ead6) !important;
  background:linear-gradient(180deg,#2a1d18,#120c0a) !important; box-shadow:inset 0 1px 0 rgba(245,215,170,.12), 0 3px 8px rgba(0,0,0,.5) !important}
.tabox .rbtns .btn,.tabox .rbtns .ghost{padding:8px 18px !important; min-height:0 !important; font-weight:800}

/* (27 Oct, user: "it doesn't feel like I am clicking it … make it more natural") every button presses in like a real one:
   it sinks a pixel, shrinks a little and darkens while held, and springs back when let go */
html body :is(.btn,.gbtn,.ghost,.hbtn,.mini-btn,.hubnav button,.backlink,.xback,.mrow,.opt,.hstore,.hplay,.starr,.mechip,.hmission,.hstory,.htab,.chip-btn){
  transition:transform .18s cubic-bezier(.2,1.6,.4,1), filter .18s ease}
html body :is(.btn,.gbtn,.ghost,.hbtn,.mini-btn,.hubnav button,.backlink,.mrow,.opt,.hstore,.hplay,.starr,.mechip,.hmission,.hstory,.htab):not(:disabled):active{
  transform:translateY(1px) scale(.965) !important; filter:brightness(.9) !important; transition-duration:.06s}
html body .xback:not(:disabled):active{transform:scale(.88) rotate(-8deg) !important; filter:brightness(.9) !important; transition-duration:.06s}

/* (27 Oct) the speaker menu's two volume sliders */
.sndmenu .srng{display:grid; gap:2px; padding:4px 0 2px; font-size:12px; font-weight:800; color:#e9dcc4}
.sndmenu .srng input{width:100%; accent-color:#d39a5e}

/* ---------- (27 Oct 2026, user: "use 3D effects in the game to make it more realistic") ----------
   The table is seen from a seat: the pile and stock lie on the cloth, tipped away from you; your hand is held a little
   towards you; cards cast deeper, softer shadows and catch the light at the edge. */
body.in-game .piles{transform:perspective(720px) rotateX(16deg); transform-origin:50% 100%}
body.in-game #hand{transform:perspective(1100px) rotateX(7deg); transform-origin:50% 100%}
body.in-game #hand .card{box-shadow:var(--edge), 0 9px 16px rgba(0,0,0,.42), 0 2px 3px rgba(0,0,0,.28)}
body.in-game .pile .card,body.in-game .stock .card{box-shadow:var(--edge), 0 12px 18px rgba(0,0,0,.45), 0 3px 4px rgba(0,0,0,.3)}
.card:not(.back)::after{background:linear-gradient(135deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 24%, rgba(255,255,255,0) 72%, rgba(90,70,40,.1) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85), inset 1px 0 0 rgba(255,255,255,.5), inset 0 -2px 2px rgba(0,0,0,.07)}
/* the home cards turn a little towards you when lifted */
html body .gcard.hot,html body .gcard.ready:hover{transform:perspective(600px) translateY(-18px) rotateX(8deg) rotate(0deg) scale(1.06) !important}
@media (prefers-reduced-motion:reduce){ body.in-game .piles,body.in-game #hand{transform:none} }

/* the counting board after a Digu round (27 Oct, from the user's Gin Rummy video): the table's felt, ruled rows */
/* (27 Oct, user: cards were seen moving behind it) the board covers the whole screen with its own cloth, like the video */
.cboard{position:fixed; inset:0; z-index:62; display:grid; place-items:center; cursor:pointer; animation:lvfade .3s ease-out;
  background:radial-gradient(ellipse at 50% 40%, #174240, #0a1d1c 75%, #050d0d)}
.cboard.out{opacity:0; transition:opacity .3s}
.cbbox{--cbw:min(38px, 9.2vh); position:relative; width:min(820px,96vw); max-height:96vh; box-sizing:border-box; padding:6px 12px 16px; border-radius:16px; color:#f3ead6;
  background:radial-gradient(ellipse at 50% 30%, #1d4a48, #0d2726 80%); border:2px solid rgba(240,192,138,.6); box-shadow:0 16px 40px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.35)}
.cbhead,.cbrow{display:grid; grid-template-columns:72px minmax(0,1.5fr) minmax(0,1fr) 56px; gap:10px; align-items:center}
.cbhead{padding:2px 0 4px; border-bottom:1px solid rgba(240,192,138,.35)}
.cbhead b{font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:#e8c98a; text-align:center}
.cbhead b:last-child{text-align:right}
.cbrow{padding:5px 0; border-bottom:1px solid rgba(240,192,138,.18)}
.cbrow:last-of-type{border-bottom:0}
.cbrow.us .cbwho small{color:#ffe7a8}
.cbwho{display:flex; flex-direction:column; align-items:center; gap:1px; text-align:center}
.cbwho .av{width:28px; height:28px; font-size:12px}
.cbwho small{font-size:10px; font-weight:700; line-height:1.1; max-width:72px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.cbwho .badge{font-style:normal}
.cbgroups,.cbdead{display:flex; flex-wrap:nowrap; justify-content:center; align-items:center; min-width:0; min-height:calc(var(--cbw)*1.4)}
.cbgroups{gap:8px}
.cbdead{padding:2px 6px; border-radius:10px; background:rgba(0,0,0,.2)}
.cbset{display:flex}
.cboard .card{--w:var(--cbw); flex:none}
.cbset .card+.card{margin-left:calc(var(--cbw)*-.45)}
.cbdead .card+.card{margin-left:calc(var(--cbw)*-.6)}
.cbdead .card{filter:saturate(.8) brightness(.93)}
.cbpts{display:grid; gap:2px; justify-items:end; font-weight:800; font-size:15px; opacity:.25; transition:opacity .3s}
.cbrow.counted .cbpts{opacity:1}
.cbplus{color:#9be39b}
.cbminus{color:#ff9a8a}
.cboard .ctap{position:absolute; left:50%; bottom:2px; transform:translateX(-50%); font-size:9px; color:#c9b89c; letter-spacing:.1em; text-transform:uppercase; white-space:nowrap}
.cboard .ctap.on{font-size:11px; font-weight:800; color:#ffe7a8}

/* the number of cards left, on the stock (27 Oct, from the user's Gin Rummy video) */
#stock .stockn{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:3; min-width:1.9em; padding:2px 6px; box-sizing:border-box; border-radius:9px; pointer-events:none;
  font:800 calc(var(--pw,64px)*.27)/1.1 var(--f-display,inherit); text-align:center; color:#fff6e2; background:rgba(16,10,6,.72); border:1.5px solid rgba(240,192,138,.75); box-shadow:0 2px 6px rgba(0,0,0,.45)}
#stock .stockn[hidden]{display:none}
#readyBtn .nextin{font-size:.8em; opacity:.8; font-variant-numeric:tabular-nums}

/* (27 Oct, user: "the hand fan is not smooth like Gin Rummy") the hand moves calmly, without bounces: a touched card
   rises a little and grows to the same size it keeps while dragged (no jump between the two), the other cards slide
   aside softly, and a card let go eases into its place */
html body .hand .card:not(.dragging){transition:left .42s cubic-bezier(.22,.8,.3,1), top .36s cubic-bezier(.22,.8,.3,1), rotate .42s cubic-bezier(.22,.8,.3,1), translate .3s cubic-bezier(.22,.8,.3,1), scale .3s cubic-bezier(.22,.8,.3,1), box-shadow .25s ease !important}
html body .hand .card.touch{translate:0 -16%; scale:1.16; rotate:0deg; transition:left .3s ease, top .2s ease, rotate .2s ease, translate .2s cubic-bezier(.22,.8,.3,1), scale .2s cubic-bezier(.22,.8,.3,1) !important}
html body .hand .card.dragging{scale:1.16; translate:0 -16%; transform-origin:50% 50% !important; box-shadow:0 0 0 1px rgba(0,0,0,.2), 0 20px 30px rgba(0,0,0,.5) !important}
body.counting .fly{z-index:64}
body.shuffling #stock .card,body.shuffling #stock .stockn{visibility:hidden}

/* ---------- (28 Oct 2026, user: "polish the game tables and cards") kept natural: nothing new on the table, only light and depth ----------
   a warm lamp over the middle of the table; each card of your fan shades the one beside it; a third card under the pile;
   the deck and the pile sit in a soft pool of shadow on the cloth */
body.in-game .app::before{content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse 52% 46% at 50% 44%, rgba(255,226,170,.075), rgba(255,226,170,0) 72%)}
body.in-game #hand .card:not(.dragging){box-shadow:var(--edge), -3px 0 6px rgba(0,0,0,.16), 0 9px 16px rgba(0,0,0,.42), 0 2px 3px rgba(0,0,0,.28)}
.pile .under2{transform:rotate(9deg) translate(5px,3px); filter:brightness(.72)}
body.in-game .piles{position:relative}
body.in-game .piles::before{content:""; position:absolute; left:4%; right:4%; top:18%; bottom:-6%; z-index:-1; pointer-events:none; border-radius:50%;
  background:radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,0))}

/* (28 Oct 2026) the Sort button's menu, just above it */
.sortmenu{position:fixed; z-index:70; display:grid; gap:4px; min-width:190px; padding:6px; border-radius:14px;
  background:linear-gradient(180deg,#2a1a10,#160d07); border:1.5px solid #b9804c; box-shadow:0 12px 28px rgba(0,0,0,.6); animation:smenu .18s ease-out}
.sortmenu[hidden]{display:none}
.sortmenu button{display:grid; justify-items:start; gap:1px; padding:8px 12px; border-radius:10px; border:0; background:transparent; color:#f3ead6; text-align:left}
.sortmenu button b{font-size:14px; font-weight:800}
.sortmenu button small{font-size:11px; color:#c9b89c}
.sortmenu button.on{background:rgba(211,154,94,.22); box-shadow:inset 0 0 0 1.5px rgba(240,192,138,.6)}
.sortmenu button.on b::after{content:" ✓"; color:#ffd77a}
@keyframes smenu{from{opacity:0; transform:translateY(6px)}to{opacity:1; transform:none}}

/* (28 Oct 2026, user: "move the card count on top of the deck, now I can't see the design") the count sits just above the
   deck instead of over its middle */
#stock .stockn{top:auto; bottom:100%; transform:translate(-50%,-5px); font-size:calc(var(--pw,64px)*.2)}
/* the random table's players: their photos while the table fills */
.qseat .qav.qpic{width:40px; height:40px; border-radius:50%; flex:none}


/* (29 Oct 2026, user) Bondi: the other players' cards are hidden; how many they still hold shows as a small badge -
   a card back with the number, in the table's gold, hidden while dealing like the old count */
.bseat .cleft{display:inline-flex; align-items:center; gap:5px; padding:2px 9px 2px 4px; border-radius:999px; background:rgba(10,6,5,.55);
  border:1px solid rgba(211,154,94,.55); box-shadow:inset 0 1px 0 rgba(255,235,200,.12), 0 2px 6px rgba(0,0,0,.35); font-variant-numeric:tabular-nums}
.bseat .cleft .mini{width:14px; height:20px; border-radius:2px; box-shadow:0 1px 2px rgba(0,0,0,.5)}
.bseat .cleft b{font-size:15px; font-weight:800; color:var(--saffron); line-height:1}
.bseat .cleft small{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
body.dealing .bseat .cleft{visibility:hidden}
.bseat .brow{display:flex; align-items:center; gap:7px}   /* the badge and the points side by side: the seat stays low, the middle has room */

/* (31 Oct 2026, brief #4) the results screen breathes a little: two soft warm lights drift slowly behind the panel, like lamp
   light on water. Transform and opacity only, behind everything, still with reduced motion. */
html body #roundOv{overflow:hidden}
html body #roundOv::before,html body #roundOv::after{content:""; position:absolute; z-index:0; pointer-events:none; width:70vmax; height:70vmax; border-radius:50%;
  background:radial-gradient(circle, rgba(211,154,94,.16), rgba(211,154,94,0) 62%); will-change:transform,opacity}
html body #roundOv::before{left:-25vmax; top:-30vmax; animation:rodrift1 26s ease-in-out infinite alternate}
html body #roundOv::after{right:-30vmax; bottom:-35vmax; background:radial-gradient(circle, rgba(22,133,140,.18), rgba(22,133,140,0) 62%); animation:rodrift2 32s ease-in-out infinite alternate}
html body #roundOv>.panel{position:relative; z-index:1}
@keyframes rodrift1{from{transform:translate(0,0) scale(1); opacity:.7} to{transform:translate(22vmax,14vmax) scale(1.15); opacity:1}}
@keyframes rodrift2{from{transform:translate(0,0) scale(1.1); opacity:1} to{transform:translate(-18vmax,-12vmax) scale(.95); opacity:.7}}
@media (prefers-reduced-motion:reduce){ html body #roundOv::before,html body #roundOv::after{animation:none} }
/* (3 Nov 2026) the counting board covers the whole screen: the table under it is not drawn meanwhile (smoother on phones) */
body.counting .app,body.counting #tableFx{visibility:hidden}

/* ---------- (7 Nov 2026) the user's new pictures: each one lands once; only packs and the daily gift keep a slow bob ---------- */
.dcall .cword{padding:0; text-shadow:none}
.dcall .cword .wordpic{width:min(62vw,340px); max-height:38vh}
.reveal-text .wordpic{width:min(40vw,300px); max-height:26vh}
.smash-text .wordpic{width:min(56vw,420px); max-height:36vh}
.lvword{line-height:0}
.lvword .wordpic{width:min(62vw,270px); max-height:24vh; animation:artpop .55s cubic-bezier(.2,.9,.3,1.25) .1s both}

.endtop{display:flex; align-items:center; justify-content:center; gap:8px; margin:0 auto 4px; min-width:0}
.endword{display:block; width:auto; height:clamp(58px,17vh,120px); max-width:100%; object-fit:contain; filter:drop-shadow(0 6px 12px rgba(0,0,0,.55))}
.endcup{display:block; width:auto; height:clamp(54px,16vh,110px); flex:none; filter:drop-shadow(0 6px 12px rgba(0,0,0,.5)); animation:cupdrop .7s cubic-bezier(.2,1.5,.4,1) both}
.endtop.won .endword{animation:artpop .6s cubic-bezier(.2,.9,.3,1.25) .15s both}
.endtop.lost .endword{animation:wordfall .7s ease-out both}

.rktier{display:inline-flex; align-items:center; gap:3px}
.rktier img{height:17px; width:auto; margin:-2px 0}
.rkbig{align-items:center} .rkbig .rktier img{display:none}
.rkbadge{display:block; height:46px; width:auto; filter:drop-shadow(0 3px 6px rgba(0,0,0,.5)); animation:artpop .5s cubic-bezier(.2,.9,.3,1.25) both}

html body .gpanel .arow .ai.pic{border:0 !important; background:none !important; box-shadow:none !important; filter:none !important}
.arow .ai.pic img{display:block; width:100%; height:100%; object-fit:contain}
html body .gpanel .arow:not(.got) .ai.pic img{filter:grayscale(1) brightness(.75); opacity:.8}

.packpic{display:block; width:auto; height:64px; max-width:100%; object-fit:contain; margin:2px auto 0; filter:drop-shadow(0 4px 7px rgba(0,0,0,.5)); animation:packbob 3.4s ease-in-out infinite alternate}
.shoppack:nth-child(2n) .packpic{animation-delay:-1.4s}
.playpacks .packpic{height:42px}
/* (7 Nov, user) one design per pack: the big picture alone, never the small icon beside it. A pack holding both treasures shows each with its own picture */
.packpic+.shopgot .akr,.packpic+.shopgot .mvh{display:none}
.shopgot>span>.akr,.shopgot>span>.mvh{font-size:38px}
.playpacks .shopgot>span>.akr,.playpacks .shopgot>span>.mvh{font-size:27px}
.shopentry .packpic{height:68px; flex:none} .shopempty .packpic{height:86px}

.pearlrow h3{display:flex; align-items:center; gap:10px}
.pearlart{display:block; height:76px; width:auto; flex:none; filter:drop-shadow(0 4px 7px rgba(0,0,0,.5)); animation:artpop .5s cubic-bezier(.2,.9,.3,1.25) both}

.tpanel h3.tradehead{display:flex; align-items:center; gap:10px}
.tradehead img{display:block; height:56px; width:auto; flex:none; animation:artpop .5s cubic-bezier(.2,.9,.3,1.25) both}

.achtoast .ai:has(.toastpic){background:none}
.toastpic{display:block; width:46px; height:46px; object-fit:contain; animation:packbob 1.3s ease-in-out infinite alternate}

@keyframes artpop{from{transform:scale(.45); opacity:0} 65%{transform:scale(1.08); opacity:1} to{transform:none; opacity:1}}
@keyframes cupdrop{from{transform:translateY(-34px) scale(.7); opacity:0} to{transform:none; opacity:1}}
@keyframes wordfall{from{transform:translateY(-16px); opacity:0} to{transform:none; opacity:1}}
@keyframes packbob{from{transform:translateY(1px)} to{transform:translateY(-3px)}}
@media (max-height:430px){
  .packpic{height:46px} .playpacks .packpic{height:34px}
  .pearlart{height:60px} .tradehead img{height:44px}
  .rkbadge{height:36px}
}
@media (prefers-reduced-motion:reduce){ .lvword .wordpic,.endword,.endcup,.rkbadge,.packpic,.pearlart,.tradehead img,.toastpic{animation:none !important} }

/* (7 Nov) the dealer chip sat under the BOT badge: it now sits at the top corner of the picture */
.dchip{bottom:auto !important; top:-7px; z-index:3}
@media (max-height:430px){ #bLead{margin-top:12px} }
/* (8 Nov 2026, user: cards were dealt from under the deck) while dealing, your hand's cards travel above the deck */
body.dealing .me{z-index:45}

/* (8 Nov 2026) 2 vs 2 counting: each card shows whose hand it came from (gold = first partner, teal = second) */
.ocard{position:relative; display:inline-flex; flex:none}
.cbset .ocard+.ocard{margin-left:calc(var(--cbw)*-.45)}
.cbdead .ocard+.ocard{margin-left:calc(var(--cbw)*-.6)}
.cbdead .ocard .card{filter:saturate(.8) brightness(.93)}
i.own{position:absolute; right:-3px; top:-5px; z-index:3; width:15px; height:15px; border-radius:50%; display:grid; place-items:center;
  font:800 9px/1 system-ui,sans-serif; font-style:normal; color:#1a1208; box-shadow:0 1px 3px rgba(0,0,0,.6); border:1px solid rgba(255,255,255,.7)}
i.own.o0{background:#eab47a} i.own.o1{background:#5fd3c4}
.ownkey{display:flex; flex-wrap:wrap; gap:3px 8px; justify-content:center; font-size:10px; color:#e8d8c4}
.ownkey>span{display:inline-flex; align-items:center; gap:4px; white-space:nowrap}
.ownkey i.own{position:static; width:13px; height:13px; font-size:8px}
.ownkey em{font-style:normal; color:#ff9a8a}
.cbteam .cbhead,.cbteam .cbrow{grid-template-columns:92px minmax(0,1.6fr) minmax(0,1fr) 56px}
.cbteam .cbwho{gap:4px} .cbteam .ownkey{flex-direction:column; align-items:flex-start}
.cbnote{margin:6px 0 0; text-align:center; font-size:11px; color:#d8c7a6}
#handView .ownkey{justify-content:flex-start; margin-bottom:6px; font-size:12px}
#handView .ocard i.own{right:-2px; top:-4px}
#handView .ownkey{flex:0 0 100%; width:100%}

/* (15 Nov 2026, user) no table lights: the water, moon, leaf and candle light layers over the table are gone (also less battery) */
#tableFx,body.in-game #tableFx{display:none !important}

/* ---------- POWER SAVER (15 Nov 2026): see js/fx.js powerSaver. Decorative loops stop, shadows get lighter ---------- */
html.saver #homeFx, html.saver #homeFx *, html.saver .brand.big b, html.saver .rwrays, html.saver .przlight, html.saver .hfcard, html.saver .packpic, html.saver .toastpic,
html.saver #roundOv::before, html.saver #roundOv::after, html.saver .winribbon::after, html.saver .btn.digu::before, html.saver .gpanel .sitem.prem::after, html.saver .gpanel .sopt:has(em)::after,
html.saver #homeOv .hbtn.main::before, html.saver .hflamp, html.saver .hfstar, html.saver .hfwater{ animation:none !important }
html.saver #hand .card:not(.dragging), html.saver body.in-game #hand .card:not(.dragging){ box-shadow:var(--edge), 0 3px 6px rgba(0,0,0,.4) !important }
html.saver *{ backdrop-filter:none !important; -webkit-backdrop-filter:none !important }

/* ---------- SMOOTH HAND (15 Nov 2026, user): every card of the fan gets its own graphics layer, so sliding, turning and lifting only move a ready picture
   (the big soft shadow is not redrawn each frame). Touch: no 300 ms wait, no grey flash, no text selection while playing. ---------- */
html body #hand .card:not(.dragging){ will-change:left,rotate,translate,scale; backface-visibility:hidden; -webkit-backface-visibility:hidden; transform:translateZ(0) }
html body #hand .card.dragging{ will-change:transform,scale,translate }
html, body, button, .card, .pile, .stock, .seat, .gcard{ -webkit-tap-highlight-color:transparent }
html body button, html body .card, html body [role=button], html body .gcard, html body .pile{ touch-action:manipulation }
html body .hand .card{ touch-action:none }
html body input, html body textarea, html body select{ -webkit-user-select:text; user-select:text; touch-action:manipulation }
html, body{ overscroll-behavior:none }
