/* app additions on top of the v10 look (style.css) */
:root{--kP:url(/assets/key-primary.webp);--kPp:url(/assets/key-primary-pressed.webp);--kS:url(/assets/key-secondary.webp);--kSp:url(/assets/key-secondary-pressed.webp);--kD:url(/assets/key-disabled.webp)}
#app.lobbyOn #top,#app.lobbyOn #sheet,#app.lobbyOn #stage{display:none}
#lobby{position:absolute;inset:0;z-index:9;display:none;overflow:auto;padding:16px var(--gutR) 24px var(--gutL)}
#app.lobbyOn #lobby{display:block}
.lb-wrap{max-width:520px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.lb-card{background:#f7f0e6;border-radius:8px;box-shadow:inset 0 0 0 1px #fff,var(--sh);padding:14px;display:flex;flex-direction:column;gap:10px}
.lb-card h1{margin:0;font-size:24px;display:flex;align-items:center;gap:10px}
.lb-card h2{margin:0;font-size:18px}
.lb-card h3{margin:0;font-size:15px;color:var(--ink2);font-weight:500}
.lb-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.lb-in{font:inherit;font-size:17px;min-height:48px;padding:0 12px;border-radius:8px;border:0;background:#fffaf2;box-shadow:inset 0 0 0 1px rgba(58,42,31,.18);color:var(--ink);flex:1;min-width:0}
.lb-code{font-size:34px;font-weight:700;letter-spacing:0}
.lb-link{font-size:14px;color:var(--ink2);word-break:break-all}
.lb-pl{display:flex;align-items:center;gap:10px;min-height:48px}
.lb-pl .tag{font-size:14px;color:var(--ink2)}
.chars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.chr{position:relative;border:0;background:none;padding:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:14px;font-weight:600;color:var(--ink)}
.chr .fr{position:relative;width:80px}
.chr .fr img{position:absolute;display:block;max-width:none}
.chr .fr .pt{object-fit:cover;object-position:50% 22%;border-radius:3px}
.chr.taken{opacity:.42;pointer-events:none}
.chr.lit .fr{filter:drop-shadow(0 0 8px rgba(243,163,60,.95))}
.chr .who{font-size:14px;color:var(--ink2);font-weight:400}
.ib .lbl{font-size:15px}
.vk{min-width:48px;padding:0 10px;gap:4px}
.vk.alert{animation:pls 1s ease-in-out infinite}
.room{font-size:14px}
/* seat status words (owner rule: a symbol about offers always carries a small word) */
/* live strip while a player looks at the board during a deal */
#liveStrip{position:absolute;left:0;right:0;z-index:4;display:none;justify-content:center;pointer-events:none}
#liveStrip.on{display:flex}
.ls{pointer-events:auto;display:flex;align-items:center;gap:8px;max-width:520px;margin:0 8px;padding:4px 10px;border-radius:8px;background:var(--dk);color:var(--dkInk);font-size:15px;box-shadow:0 10px 20px -10px rgba(40,25,10,.6)}
.ls .w{font-size:14px;color:var(--dkSub)}
.ls b{font-weight:600}
/* panels in my strip */
#panel{max-height:44vh;overflow-y:auto}
.pn{border-top:1px solid var(--rule);padding-top:6px;margin-top:6px;display:flex;flex-direction:column;gap:6px}
.pr{display:flex;align-items:center;gap:6px;min-height:50px}
.pr .w{font-size:14px;color:var(--ink2)}
.pr .nm{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}
.pr .amt{font-size:22px;font-weight:600;min-width:58px;text-align:center}
.pr .sp{flex:1}
.pr .ib{min-height:46px}
.pr .ib.sq{width:46px;min-width:46px}
.ttl{display:flex;align-items:center;gap:8px;font-size:15px}
.ttl .big{font-size:26px;font-weight:600}
.w14{font-size:14px;color:var(--ink2);font-weight:400}
.banner{background:#fff6e6;border-radius:8px;padding:6px 8px;box-shadow:0 0 0 1.5px var(--acc),0 0 14px 2px var(--accGlow)}
/* social sheet (whisper / under the table) */
#social{position:absolute;inset:0;z-index:15;background:rgba(58,42,31,.32);display:none;align-items:flex-end;justify-content:center;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
#social.on{display:flex}
#socIn{width:100%;max-width:520px;max-height:86vh;overflow:auto;background:#f7f0e6;border-radius:8px 8px 0 0;box-shadow:inset 0 0 0 1px #fff,var(--sh);padding:12px var(--gutR) calc(14px + env(safe-area-inset-bottom)) var(--gutL);display:flex;flex-direction:column;gap:10px}
#socIn h2{margin:0;font-size:18px;display:flex;align-items:center;gap:8px}
.pick{display:flex;gap:8px;flex-wrap:wrap}
.pk{display:flex;flex-direction:column;align-items:center;gap:2px;border:0;background:var(--card);border-radius:8px;padding:6px;min-width:64px;font-size:14px;font-weight:600;color:var(--ink);box-shadow:inset 0 0 0 1px var(--card-edge)}
.pk.lit{box-shadow:var(--glow),inset 0 0 0 1px #fff;background:#fffaf2}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip7{border:0;border-radius:6px;background:#fffaf2;box-shadow:inset 0 0 0 1px rgba(58,42,31,.16);font:inherit;font-size:15px;min-height:44px;padding:0 10px;color:var(--ink)}
.wh{display:flex;flex-direction:column;gap:4px;max-height:160px;overflow:auto}
.wh div{font-size:15px;background:#fffaf2;border-radius:6px;padding:4px 8px;align-self:flex-start;max-width:85%}
.wh div.me{align-self:flex-end;background:#f3e4c8}
#toast{position:absolute;left:50%;top:96px;z-index:19;transform:translateX(-50%);display:none;max-width:92%;background:var(--dk);color:var(--dkInk);border-radius:8px;padding:8px 12px;font-size:15px;box-shadow:0 14px 30px -12px rgba(40,25,10,.6)}
#toast.on{display:flex;align-items:center;gap:8px}
#coach{position:absolute;z-index:21;display:none;max-width:260px;background:#fffaf2;color:var(--ink);border-radius:8px;padding:8px 10px;font-size:15px;box-shadow:0 0 0 1.6px var(--acc),0 0 20px 4px var(--accGlow),0 14px 30px -12px rgba(40,25,10,.6)}
#coach.on{display:flex;flex-direction:column;gap:6px}
#coach .row{display:flex;gap:8px;justify-content:flex-end}
#netBar{position:absolute;left:0;right:0;bottom:0;z-index:30;display:none;justify-content:center;background:var(--no);color:#fff;font-size:15px;padding:4px}
#netBar.on{display:flex}
.endc .sec2{margin-top:10px;border-top:1px solid var(--rule);padding-top:6px}
.endc .sec2 h3{font-size:15px;margin:0 0 4px;color:var(--ink2);font-weight:500}
.endc .ln{font-size:14px;display:flex;gap:6px;align-items:center;min-height:26px}
.endc{max-height:88vh;overflow:auto}
#cardView .cvt{background:#fffaf2;border-radius:8px;padding:8px 12px;max-width:300px;font-size:15px;display:flex;flex-direction:column;gap:4px}
#cardView .cvt .w14{font-size:14px}

/* ---- real viewport: the iPhone viewer shows ~390x660; everything sizes to the dynamic viewport height */
html,body{height:100dvh}
#app{inset:auto;left:0;right:0;top:0;height:100dvh}
/* ---- deal table: flow layout, scaled by app.js to fit between the top bar and my strip (owner iPhone screenshot 15/11/2569) */
#dealView{left:0;right:0;max-width:none;overflow:hidden}
#dealView .dvBody{position:absolute;left:0;right:0;top:0;transform-origin:50% 0;display:flex;justify-content:center;padding:6px 16px 0}
.dv{position:relative;width:100%;max-width:520px;display:flex;flex-direction:column;align-items:center;gap:6px}
.dvOut{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.dvMid{display:flex;align-items:flex-start;justify-content:center;gap:6px;width:100%}
.dvCol{display:flex;flex-direction:column;gap:6px;width:78px;flex:none}
.dvHead{display:flex;justify-content:center}
.dseat{position:relative;width:78px;min-width:0}
.dseat .nm{max-width:78px;overflow:hidden;text-overflow:ellipsis}
.dseat .sw{display:flex;flex-wrap:wrap;justify-content:center;column-gap:4px;font-size:14px;font-weight:400;color:var(--ink2);background:rgba(247,240,230,.92);border-radius:4px;padding:0 4px;line-height:1.45;max-width:78px;text-align:center}
.dseat .sw b{font-weight:600;color:var(--ink)}
.dseat .sw.ok{color:#33502d} .dseat .sw.no{color:var(--no)} .dseat .sw.ask{color:#8a4f10}
.dseat .sd{position:absolute;right:-6px;top:-6px}
.dseat.out{opacity:.7}
.dtab{position:relative;flex:1 1 auto;min-width:0;max-width:250px;padding:10px 10px 10px;gap:2px}
.dtab .tot{font-size:32px}
.dtab .need{flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:8px;margin-top:4px}
.dtab .need .nl{display:flex;flex-direction:column;align-items:center;gap:1px;font-size:14px;color:var(--dkInk)}
.dtab .need .nl.off{opacity:.4}
.dtab .need .nw{font-size:14px;color:var(--dkSub);align-self:center}
.dtab .stp{gap:5px;flex-wrap:wrap;justify-content:center}
.dtab .stp i{width:20px;height:20px;border-radius:4px;border:1.5px solid var(--dkSub);font-style:normal;font-size:14px;line-height:17px;text-align:center;color:var(--dkSub);font-weight:600;box-sizing:border-box}
.dtab .stp i.done{color:var(--dk)}
.dtab .stp .cur i{border-color:var(--dk);color:var(--dk);width:18px;height:18px;line-height:15px}
.dtab .kp{margin-top:4px}
.dtab .chn{display:flex;align-items:center;gap:4px;margin-top:6px}
.dtab .chn .cc{position:relative;width:34px}
.dtab .chn .cc img{display:block;width:100%}
.dtab .chn .cc .face{position:absolute;left:-6px;top:-6px;border-radius:4px;box-shadow:0 0 0 1.5px #fff}
.dtab .chn .dvcnt{position:static;margin-left:4px}
.dtab .rh{display:flex;align-items:center;gap:6px;font-size:22px;margin-top:4px}
.dtab .rh svg{width:24px;height:24px}
.dtab.res.ok .rh{color:#bfe3a8} .dtab.res.fail .rh{color:#f0a08d}
.dtab .tot.bonus{color:var(--acc)}
.dvw{pointer-events:none}
/* ---- answer panel: one sentence, three equal keys (owner 15/11/2569) */
.say{display:flex;align-items:center;gap:8px;min-height:52px}
.say .w{font-size:14px;color:var(--ink2);font-weight:400}
.say .nm{font-weight:600}
.say .big{margin-left:auto;font-size:28px;font-weight:600}
.k3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.k3 .ib{min-height:50px;flex-direction:column;gap:0;font-size:15px}
.k3 .ib svg{width:20px;height:20px}
.amtRow{display:flex;align-items:center;gap:8px;min-height:50px}
.amtRow .w{font-size:14px;color:var(--ink2);font-weight:400}
.amtRow .amt{font-size:24px;font-weight:600;min-width:64px;text-align:center}
.cfmRow{display:flex;gap:8px;justify-content:flex-end;min-height:50px;align-items:center}
.cfmRow .ib{min-width:120px}
.ib.wide{flex:1}
/* row1 keys with a small word under the picture */
.wk{flex-direction:column;gap:0;min-width:50px;min-height:48px;padding:0 6px;font-size:14px;font-weight:500;line-height:1.2}
.wk svg{width:20px;height:20px}
.wk.alert{animation:pls 1s ease-in-out infinite}

.pc .hd{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:44px}
.pc .hd .big{font-size:24px;font-weight:600}
.pc .hd .id{font-size:15px}
.pcl{display:flex;gap:10px;align-items:center;flex-wrap:wrap;width:100%}
.pcl .nl{display:flex;align-items:center;gap:4px}
.pcl .face{border-radius:4px}
.card .cl{display:flex;align-items:center;gap:2px;font-size:14px;font-weight:500}
#handRow .card .nx{left:auto;right:4px;font-weight:500}
#handRow .card.lock{opacity:.55}
#handRow .hand{flex-wrap:wrap}
#handRow .card{flex:0 0 calc(25% - 5px)}
.neg{color:var(--no)}
.ttl b{font-size:20px;font-weight:600}
.ttl .sp{flex:1}
.dieBox{filter:drop-shadow(0 16px 24px rgba(40,25,10,.45))}
.endf{display:flex;gap:6px}
.ef{width:34px;height:34px;border-radius:6px;background:#fffaf2;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:17px;box-shadow:inset 0 0 0 1.5px var(--dk)}
.ef.red{background:#c9573f;color:#fff}
.ef.got{box-shadow:0 0 0 2px var(--acc),0 0 16px 3px var(--accGlow)}
.dieW{font-size:17px;font-weight:600;background:#fffaf2;border-radius:6px;padding:2px 10px}
#legIn .lg{display:flex;align-items:center;gap:10px;min-height:36px}
#legIn .lg svg{width:24px;height:24px;flex:none}
#legIn h3{margin:8px 0 2px}
#top .ti{display:flex;align-items:center;gap:6px;font-size:15px;min-height:28px}
#top .ti .face{border-radius:4px}
#roomCode b{font-weight:600}
#sheetIn{max-height:calc(100dvh - 150px);overflow-y:auto}
#turnP .tb .w14{font-size:14px;font-weight:400}

/* round 2 after the first look */
#coach{position:static;max-width:none;margin:4px 0 2px;box-shadow:0 0 0 1.5px var(--acc),0 0 12px 2px var(--accGlow);padding:6px 8px}
#coach.on{display:flex;flex-direction:row;align-items:center;gap:8px}
#coach .row{flex:none;gap:6px}
#coach .ib{min-height:44px;padding:0 8px;font-size:15px}
.cfmRow{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px}
.cfmRow .ib{min-width:0;padding:0 6px}
.cfmRow .ib span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pr{min-height:46px;gap:5px}
.pr .ib{min-height:44px}
.pr .ib.sq{width:44px;min-width:44px}
.pr .amt{min-width:50px;font-size:20px}
.pr .nm{max-width:96px;font-size:15px}
.pr .wk{min-width:52px;padding:0 4px}
.dtab .stp{flex-direction:column;gap:2px}
.dtab .stp .of{font-size:14px;color:var(--dkSub)}
.dseat.nochar .fr{filter:grayscale(1);opacity:.7}
@keyframes seatIn{0%{transform:rotateY(90deg) scale(.8);opacity:.2}60%{transform:rotateY(0) scale(1.08)}100%{transform:none;opacity:1}}
.dseat.just .fr{animation:seatIn .7s ease-out both;filter:drop-shadow(0 0 8px rgba(243,163,60,.9))}
/* several people for one line (r6 §5.3ข): their seats tied under the line's emblem */
.dgrp{display:flex;flex-direction:column;align-items:center;gap:4px;width:78px;padding:4px 0;border-radius:8px;box-shadow:inset 0 0 0 1.5px var(--acc2);background:rgba(255,246,230,.55)}
.dgrp.picked{box-shadow:inset 0 0 0 1.5px var(--ok)}
.dgrp .gh{display:flex;flex-direction:column;align-items:center;font-size:14px;line-height:1.2;color:var(--ink)}
.dgrp .dseat{width:74px}
.grpH{display:flex;align-items:center;gap:6px;margin-top:4px}

.dtab .tl{flex-wrap:wrap;row-gap:2px}
.dtab .tl .id,.dtab .rnd{white-space:nowrap}
.dtab .clk i,.dvcnt i{font-style:normal;font-size:14px;font-weight:500;margin-left:1px}
.dtab .chn .cw{font-size:14px;color:var(--dkSub);margin-left:4px}
.dtab .chn .dvcnt{min-width:44px;padding:0 4px}
#coach .ct{flex:1;font-size:15px;line-height:1.35}
#panel{padding:2px 4px 2px 2px;margin:0 -4px 0 -2px}
.dvCol{width:84px} .dseat{width:84px} .dseat .nm,.dseat .sw{max-width:84px}

/* ================= phase 2 (15/11/2569) ================= */
/* ---- transitions: short, ease-out, only when something changed (fx.js adds the class with the right delay) */
@keyframes fxEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes fxChg{0%{transform:scale(.92)}60%{transform:scale(1.05)}100%{transform:none}}
@keyframes fxFlip{0%{transform:rotateY(80deg);opacity:.3}100%{transform:none;opacity:1}}
@keyframes fxDrop{0%{transform:translateY(-18px) scale(1.15);opacity:0}100%{transform:none;opacity:1}}
@keyframes fxUp{0%{transform:translateY(26px);opacity:0}100%{transform:none;opacity:1}}
@keyframes fxGone{0%{opacity:1;transform:none}100%{opacity:0;transform:translateY(24px) rotate(-14deg)}}
@keyframes dvIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes dvOut{from{opacity:1}to{opacity:0;transform:translateY(10px)}}
@keyframes ovIn{from{opacity:0}to{opacity:1}}
@keyframes cardIn{0%{opacity:0;transform:translate(-50%,-50%) scale(.86)}100%{opacity:1;transform:translate(-50%,-50%)}}
@keyframes cardOut{to{opacity:0;transform:translate(-50%,-46%)}}
@keyframes tumble{0%{transform:rotate(-200deg) scale(.5);opacity:0}70%{transform:rotate(12deg) scale(1.06);opacity:1}100%{transform:none}}
.enter{animation:fxEnter .3s ease-out both}
.chg .sw,.chg .fr .st{animation:fxChg .36s ease-out both}
.dseat.flip .fr{animation:fxFlip .6s ease-out both}
.cc.drop{animation:fxDrop .36s ease-out both}
.dtab .tot.chg{animation:fxChg .36s ease-out both}
#board g.rise.up{animation:fxUp .7s ease-out both;transform-box:fill-box;transform-origin:50% 100%}
#dealView.dvIn{animation:dvIn .26s ease-out both}
#dealView.dvOut{animation:dvOut .26s ease-in both}
#dealView .dvFx{position:absolute;left:0;right:0;top:40%;display:flex;justify-content:center;pointer-events:none;z-index:3}
.fx1 .gone{display:flex;flex-direction:column;align-items:center;gap:4px;animation:fxGone .9s ease-in both}
.fx1 .gone img{width:64px;filter:grayscale(.6)}
.fx1 .gone span{font-size:15px;font-weight:600;background:var(--no);color:#fff;border-radius:5px;padding:0 8px}
.dieBox{animation:tumble .45s ease-out both}
#endView.on .endc{animation:fxEnter .4s ease-out both}
.er{animation:fxEnter .3s ease-out both}.er:nth-child(3){animation-delay:.1s}.er:nth-child(4){animation-delay:.2s}.er:nth-child(5){animation-delay:.3s}.er:nth-child(6){animation-delay:.4s}.er:nth-child(7){animation-delay:.5s}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:1ms!important;animation-delay:0ms!important;transition-duration:1ms!important}}

/* ---- top bar: every key has a word */
.bar .ib.wk{min-height:48px;min-width:56px;padding:0 6px}
#ticker.coach{min-height:48px}
#ticker .ti.cl{display:flex;align-items:center;gap:6px;width:100%}
#ticker .ti.cl .tw{flex:1;display:flex;align-items:center;gap:6px;font-size:15px;color:var(--ink);line-height:1.3;white-space:normal}
#ticker .ti.cl .tw svg{width:18px;height:18px;flex:none;color:var(--acc2)}
#ticker .ti.cl .ib{min-height:44px;flex:none}

/* ---- the scenes: intro · rock–paper–scissors · ready gate · turn card */
.scene{position:absolute;inset:0;z-index:14;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(58,42,31,.28);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);overflow:auto}
.scene.on{display:flex;animation:ovIn .25s ease-out both}
.scn{width:100%;max-width:440px;background:#f7f0e6;border-radius:8px;box-shadow:inset 0 0 0 1px #fff,var(--sh);padding:14px;display:flex;flex-direction:column;gap:10px;margin:auto}
.scn h2{margin:0;font-size:26px;line-height:1.35;text-align:center}
.scn .sub{font-size:15px;color:var(--ink2);text-align:center}
.scn .nx{font-size:16px;text-align:center;min-height:24px}
.scn .c{text-align:center}
.fc{display:flex;flex-direction:column;align-items:center;gap:1px;text-align:center}
.fc .fr{position:relative}
.fc .fr img{position:absolute;display:block;max-width:none}
.fc .fr .pt{object-fit:cover;object-position:50% 22%;border-radius:3px}
.fc b{font-size:15px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.ig{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 6px}
.ic{animation:fxEnter .32s ease-out both}
.ic .who{font-size:14px;font-weight:600;background:#fff6e6;border-radius:4px;padding:0 6px}
.ic .who.free{background:var(--dk);color:var(--dkInk);font-weight:400}
.rg{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 8px}
.rp{width:96px}
.rp .hand{display:flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:8px;background:linear-gradient(160deg,#4a3628,#2e2118);color:#f3c27a;box-shadow:inset 0 0 0 1px rgba(224,180,90,.6),0 6px 12px -6px rgba(40,25,10,.6);margin:2px 0}
.rp .hand svg{width:30px;height:30px}
.rp .hand.back{color:#8a786a}
.rp .hand.flip{animation:fxFlip .42s ease-out both}
.rp.out{opacity:.45}.rp.lose{opacity:.55}
.rp.win .hand,.rp.stay .hand{box-shadow:0 0 0 1.6px var(--acc),0 0 16px 3px var(--accGlow)}
.k3 .ib svg{width:22px;height:22px}
.gc h2{font-size:30px}
.gw{display:flex;align-items:center;justify-content:center;gap:8px;font-size:17px}
.gg{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.gp{display:flex;flex-direction:column;align-items:center;gap:1px;width:72px;padding:4px 0;border-radius:8px;background:#fffaf2;box-shadow:inset 0 0 0 1px rgba(58,42,31,.1)}
.gp b{font-size:14px;font-weight:600;max-width:70px;overflow-wrap:anywhere;text-align:center;line-height:1.25}
.gp.ok{box-shadow:0 0 0 1.6px var(--acc),0 0 12px 2px var(--accGlow)}
.gp.ok .w14{color:#33502d;font-weight:600}
.gp.away{opacity:.5}
.gp.chg{animation:fxChg .3s ease-out both}
#turnCard{position:absolute;left:50%;top:46%;z-index:17;display:none;pointer-events:none;transform:translate(-50%,-50%)}
#turnCard.on{display:block;animation:cardIn .3s ease-out both, cardOut .3s ease-in 1.2s both}
.tcard{background:#f7f0e6;border-radius:8px;padding:14px 24px;box-shadow:0 0 0 1.6px var(--acc),0 0 30px 6px var(--accGlow),var(--sh);display:flex;flex-direction:column;align-items:center;gap:2px;min-width:180px}
.tcard .no{font-size:52px;font-weight:700;line-height:1.1}
.tcard .sub{font-size:16px;color:var(--ink2)}
.tcard b{font-size:20px}

/* ---- lobby settings: a label above, keys below */
.lb-set{display:flex;flex-direction:column;gap:4px}
.lb-set .lab{font-size:15px;color:var(--ink)}
.lb-set .lb-row .ib{flex:1}
.lb-set .lb-row .ib.sq{flex:none}
.lb-set .lb-row b{min-width:96px;text-align:center}

/* ---- deal table: never smaller than 14 px — tighter arrangements instead (layout() picks d1..d3) */
.dseat .nm{max-width:none;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;text-align:center;line-height:1.25;padding:1px 3px}
.dvOutLine{display:none;font-size:14px;color:var(--ink2);background:rgba(247,240,230,.92);border-radius:4px;padding:1px 8px;text-align:center}
.dv.d1 .dseat .fr{zoom:.82}
.dv.d1 .dvOut .dseat .fr{zoom:.7}
.dv.d2 .dvOut{display:none}
.dv.d2 .dvOutLine{display:block}
.dv.d2 .dtab .stp .of{display:none}
.dv.d3 .dseat .fr{zoom:.64}
.dv.d3 .dtab .tot{font-size:26px}
.dv.d3 .dtab .need .nl{flex-direction:row;gap:3px}
.dv.d3{gap:3px}
#dealView.scroll{overflow-y:auto;pointer-events:auto}
#dealView .dvBody{transform:none!important}
.dtab .chn{flex-wrap:wrap;justify-content:center}
.dtab .chn .ccs{display:flex}
.dtab .chn .cc{position:relative;width:52px;display:flex;flex-direction:column;align-items:center}
.dtab .chn .cc + .cc{margin-left:-14px}
.dtab .chn .cc img{width:52px;display:block;filter:drop-shadow(0 6px 8px rgba(0,0,0,.4))}
.dtab .chn .cc .cn{font-size:14px;color:var(--dkInk);white-space:nowrap;line-height:1.3}
.dtab .chn .cc .face{position:absolute;left:-6px;top:-6px}
.pn .note{margin-top:2px}
.gp{width:78px}.gp b{font-weight:500;overflow-wrap:break-word;max-width:76px}
.fc b{overflow-wrap:break-word}

/* deal table, short screens: d4 = the owner sits in the table head · d5 = no step pill, seat words on one line */
.dtab .hdl{display:none;align-items:center;gap:5px;font-size:14px;color:var(--dkSub);width:100%}
.dtab .hdl b{color:var(--dkInk);font-weight:600}
.dtab .hdl .face{border-radius:4px}
.dv.d4 .dtab .hdl{display:flex;flex-wrap:wrap}
.dv.d4 .dvHead{display:none}
.dv.d5 .dtab .stp{display:none}
.dseat .sw > span{white-space:nowrap}
.dv.d5 .dtab .need{margin-top:2px;gap:4px}
#app{overflow:clip}
.dv.d3 .dtab .chn .cc,.dv.d3 .dtab .chn .cc img{width:42px}
.dv.d3 .dtab .chn{margin-top:2px}
/* d6 (smallest phones): the line of people outside the deal is dropped; their faces stay on the cards they play */
.dv.d6 .dvOutLine{display:none}
.dv.d6{gap:2px}

/* board (r3): its own scroll area when it is taller than the room (never drawn under 14 px) */
#stage{overflow-y:auto;overflow-x:hidden;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scrollbar-width:none}
#stage::-webkit-scrollbar{display:none}
#stageEnd{position:absolute;left:0;width:1px;height:1px}
#app.dealOn #stage{overflow:hidden}

/* ===== phase 3 ===== */
/* loading screen */
#splash{position:fixed;inset:0;z-index:50;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:linear-gradient(180deg,var(--g-bg1),var(--g-bg2));transition:opacity .35s ease-out}
#splash.gone{opacity:0;pointer-events:none}
#splash .ld{width:120px;height:6px;border-radius:3px;background:rgba(58,42,31,.15);overflow:hidden}
#splash .ld i{display:block;width:40%;height:100%;background:var(--acc2);animation:ld 1s ease-in-out infinite}
@keyframes ld{0%{transform:translateX(-100%)}100%{transform:translateX(260%)}}
/* title screen */
.lb-card.title{align-items:center;text-align:center}
.lb-card.title .logo{width:180px;height:auto;filter:drop-shadow(0 12px 18px rgba(40,25,10,.35))}
.lb-card.title h1{justify-content:center;font-size:32px;line-height:1.4}
.lb-card .howto{align-self:center;text-decoration:none;color:var(--ink);flex-direction:row;gap:6px}
.lb-pl .sp{flex:1}
/* connection bar: red while down, green when back */
#netBar{top:0;bottom:auto;padding:calc(6px + env(safe-area-inset-top)) 12px 6px;font-weight:600}
#netBar.ok{background:#4f8a50}
/* group stats table */
.scn.stats table{width:100%;border-collapse:collapse;font-size:15px}
.scn.stats th{font-size:14px;font-weight:500;color:var(--ink2);text-align:left;padding:4px 3px;border-bottom:1px solid var(--rule)}
.scn.stats td{padding:6px 3px;border-bottom:1px solid var(--rule)}
.scn.stats tbody tr:first-child td{font-weight:700}
/* the win scene */
.winS{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 0 6px;overflow:hidden;border-radius:8px;background:radial-gradient(circle at 50% 40%,rgba(243,180,90,.55),rgba(247,240,230,0) 65%)}
.winS .wcard .face{width:96px;height:96px;border-radius:8px;box-shadow:0 0 0 2px var(--acc),0 0 30px 8px var(--accGlow);animation:fxChg .6s ease-out both}
.winS .crown svg{width:34px;height:34px;color:var(--acc2)}
.winS h2{font-size:26px;margin:2px 0 0;text-align:center;line-height:1.35}
.winS .fall{position:absolute;top:-30px;animation:fall 2.6s ease-in 1 both;opacity:.95}
@keyframes fall{0%{transform:translateY(0) rotate(0)}100%{transform:translateY(260px) rotate(320deg);opacity:0}}
/* safe areas on phones with notches */
.scene{padding:calc(16px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left))}
#statsView,#sndView,#histView{z-index:20}
/* d7 (smallest phones, counter window open): played cards smaller, their names on tap */
.dv.d7 .dtab .chn .cc,.dv.d7 .dtab .chn .cc img{width:34px}
.dv.d7 .dtab .chn .cc .cn{display:none}
.dv.d7 .dtab .tot{font-size:24px}

/* r6 §5.5 ask to see cards: red, with the eye symbol and words (not colour alone) */
#ticker .ti.red .tw{color:var(--no);font-weight:600;display:inline-flex;align-items:center;gap:4px}
#ticker .ti.red .tw svg{width:18px;height:18px}
.pn.red{box-shadow:inset 0 0 0 2px var(--no);border-radius:8px;padding:6px;background:#fbeae5}
.pn.red .say svg{width:22px;height:22px;color:var(--no)}
.ib.red{color:var(--no);box-shadow:inset 0 0 0 1.5px var(--no)}
.redt{color:var(--no)} .redt svg{width:16px;height:16px;vertical-align:-3px}
#peekView{z-index:20}
.peekS{box-shadow:0 0 0 2px var(--no),var(--sh)}
.peekS h2{color:var(--no);display:flex;align-items:center;justify-content:center;gap:8px}
.peekS h2 svg{width:26px;height:26px}
.pcards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pc1{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center}
.pc1 img{width:56px}
.pc1 b{font-size:14px;font-weight:600}
/* r6 §11 dividends: the gold ticker line; the payout moment (coins from the bank band to each building, then +฿nM) */
#ticker .ti.gold .tw{color:#8a5a12;font-weight:700;display:inline-flex;align-items:center;gap:4px}
#ticker .ti.gold .tw svg{width:18px;height:18px}
#board .coinRun{animation:coinRun 900ms cubic-bezier(.25,.7,.3,1) both}
#board .coinLbl{animation:coinLbl 1500ms ease-out both}
@keyframes coinRun{0%{translate:0 0;opacity:0}12%{opacity:1}88%{opacity:1}100%{translate:var(--dx) var(--dy);opacity:0}}
@keyframes coinLbl{0%,55%{opacity:0;translate:0 8px}70%{opacity:1;translate:0 0}100%{opacity:1}}
@media (prefers-reduced-motion: reduce){#board .coinRun{display:none}#board .coinLbl{animation:none}}

/* ตัวแทน per line: the six emblems in the legend; the line name under a ตัวแทน card on the table */
#legIn .lg .ems{display:inline-flex;flex-wrap:wrap;gap:2px;max-width:92px;flex:none}
#legIn .lg .ems img{width:28px;height:28px}
.dtab .chn .cc .cn small{display:block;font-size:14px;color:var(--sub,#7a6a5a)}

/* what happened lately (a tap on the ticker) */
#ticker{cursor:pointer}
.scn.hist .hl{max-height:60vh;overflow:auto;display:flex;flex-direction:column;gap:2px;border-top:1px solid var(--rule)}
.scn.hist .hl .ti{display:flex;align-items:center;gap:8px;font-size:15px;line-height:1.45;padding:6px 2px;border-bottom:1px solid var(--rule)}
.scn.hist .hl .ti .tw{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.scn.hist .hl .ti.red .tw{color:var(--no)}
.scn.hist .hl .ti.gold .tw{color:#8a5a12}
.dseat.think .fr::after{content:'กำลังคิด…';position:absolute;left:50%;bottom:-2px;translate:-50% 0;white-space:nowrap;font-size:14px;font-weight:700;color:#fff6e6;background:#a0620f;border-radius:5px;padding:1px 6px;z-index:2}

/* the phases of a turn: always on screen, current one lit amber and named, past dimmed, next visible */
#phase{display:none;align-items:center;gap:2px;padding:4px 2px 2px;flex-wrap:nowrap;overflow:hidden}
#phase.on{display:flex}
#phase .ph{flex:1 1 0;min-width:0;text-align:center;font-size:14px;line-height:1.5;padding:2px 2px;border-radius:6px;white-space:nowrap;color:var(--ink2);background:rgba(255,250,242,.7);box-shadow:inset 0 0 0 1px var(--rule)}
#phase .ph.past{opacity:.45}
#phase .ph.now{color:#3a2410;font-weight:700;background:linear-gradient(180deg,#ffe3b0,#f3c27a);box-shadow:inset 0 0 0 1px #d98a2f,0 0 10px 1px rgba(243,170,70,.55)}
#phase .ph.opt{border-style:dashed;opacity:.6}
#phase .ar{flex:none;width:5px;height:5px;border-right:1.5px solid var(--ink2);border-top:1.5px solid var(--ink2);transform:rotate(45deg);opacity:.5}
#phaseBan{position:fixed;left:50%;top:38%;translate:-50% 0;z-index:30;pointer-events:none;opacity:0}
#phaseBan span{display:block;font-size:26px;font-weight:700;color:#3a2410;padding:10px 26px;border-radius:8px;background:linear-gradient(180deg,#fff3dc,#f3c27a);box-shadow:0 0 0 1px #d98a2f,0 10px 30px -8px rgba(160,98,15,.6)}
#phaseBan.on{animation:phBan var(--ban,900ms) ease-out both}
@keyframes phBan{0%{opacity:0;scale:.9}15%{opacity:1;scale:1}80%{opacity:1}100%{opacity:0}}
@media (prefers-reduced-motion: reduce){#phaseBan.on{animation:none;opacity:1}}
/* r6 §13 the negotiation view: compact header + one page (owner's list, or my exchange page); rows update in place */
.nego{display:flex;flex-direction:column;gap:8px;padding:6px 8px 10px;min-height:100%}
.ngH{background:#f7f0e6;border-radius:8px;box-shadow:inset 0 0 0 1px #fff,0 4px 14px -8px rgba(70,48,28,.35);padding:8px;display:flex;flex-direction:column;gap:6px}
.ngH .r1{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:15px}
.ngH .pl{font-weight:700}.ngH .tot{font-size:22px;font-family:Manrope,Sarabun,sans-serif}
.ngH .own{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:var(--ink2);min-width:0}
.ngH .clk{margin-left:auto;display:inline-flex;align-items:center;gap:3px;font-weight:700;font-size:16px;background:#3a2a1f;color:#f6ead8;border-radius:6px;padding:1px 7px}
.ngH .clk svg{width:16px;height:16px}.ngH .clk i{font-style:normal;font-size:14px;font-weight:500}
.ngH .need{font-size:14px;color:var(--ink2)}
.ngH .lns{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px}
.ngH .ln{display:flex;gap:6px;align-items:center;border-radius:8px;padding:5px 6px;background:#fffaf2;min-width:0}
.ngH .ln.ok{box-shadow:inset 0 0 0 1.5px #6c9a5a}
.ngH .ln.pend{box-shadow:inset 0 0 0 1.5px #d98a2f}
.ngH .ln.miss{background:#fff3f0;box-shadow:none;outline:2px dashed #c0503a;outline-offset:-2px}
.ngH .ln .lt{display:flex;flex-direction:column;min-width:0;line-height:1.35}
.ngH .ln .lt b{font-size:15px}.ngH .ln .miss{font-size:14px;font-weight:700;color:#b0412c}
.ngH .ln .lh{font-size:14px;color:var(--ink2);display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.ngH .uns{display:flex;gap:10px;flex-wrap:wrap}.ngH .un{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:var(--ink2);opacity:.6;text-decoration:line-through}
.who1{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%}
.who1 .sym,.who1 .face{flex:none;border-radius:50%}
.who1 .nm1{min-width:3.2em;max-width:9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;font-size:15px;word-break:keep-all}
.ngP{display:flex;flex-direction:column;gap:8px}
.ngP .grp{background:#f7f0e6;border-radius:8px;box-shadow:inset 0 0 0 1px #fff;padding:6px;display:flex;flex-direction:column;gap:6px}
.ngP .gh{display:flex;align-items:center;gap:6px;font-size:15px;flex-wrap:wrap}.ngP .gh svg{width:20px;height:20px}
.ngP .pr{background:#fffaf2;border-radius:8px;padding:6px 8px;display:flex;flex-direction:column;gap:4px;box-shadow:inset 0 0 0 1px var(--rule);transition:box-shadow .25s,background .25s}
.ngP .pr.turn{background:#fff3dc;box-shadow:inset 0 0 0 1.5px #d98a2f,0 0 12px rgba(243,170,70,.45)}
.ngP .pr.gone{opacity:.5}
.ngP .pr .pt{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:wrap}
.ngP .pr .kd{font-size:14px;color:var(--ink2);white-space:nowrap}
.ngP .pr .am{font-size:18px;font-family:Manrope,Sarabun,sans-serif}
.ngP .pr .nw{font-size:14px;font-weight:700;color:#fff;background:#d98a2f;border-radius:5px;padding:0 6px}
.ngP .pr .ps{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.ngP .st{font-size:14px;font-weight:600}.ngP .st.ok{color:#4f7c3f}.ngP .st.out{color:var(--ink2)}.ngP .st.me{color:#a0620f}.ngP .st.wait{color:var(--ink2)}
.ngP .rk{display:flex;gap:6px;flex-wrap:wrap}.ngP .rk .ib{flex:1 1 0;min-width:72px}
.ngP .by{display:flex;align-items:center;gap:6px;font-size:14px;flex-wrap:wrap}
.ngP .wait1{display:flex;align-items:center;gap:8px;font-size:15px;padding:10px;background:#f7f0e6;border-radius:8px}.ngP .wait1 svg{width:20px;height:20px}
.ngP .wait1.last{background:#3a2a1f;color:#f6ead8}
.ngP .pad{padding:8px}
.ngF{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(239,229,214,0),#efe5d6 30%);padding-top:10px;display:flex;flex-direction:column;gap:6px}
.ngF .keep{display:flex;align-items:baseline;gap:8px;justify-content:flex-end}.ngF .keep b{font-size:20px}
.ngF .wide,.ngP .wide{flex:2 1 0}
.ex{background:#f7f0e6;border-radius:8px;padding:8px;display:flex;flex-direction:column;gap:8px;box-shadow:inset 0 0 0 1px #fff}
.ex .exH{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.ex .exH b{font-size:17px}
.ex .gv{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px}
.ex .gi{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;border-radius:8px;border:0;background:#fffaf2;box-shadow:inset 0 0 0 1px var(--rule);font:500 14px Sarabun,sans-serif;color:var(--ink);text-align:center;line-height:1.3}
.ex .gi.lit{background:#fff3dc;box-shadow:inset 0 0 0 2px #d98a2f,0 0 12px rgba(243,170,70,.5)}
.ex .gi .cimg{width:44px;height:auto}.ex .gi svg{width:36px;height:36px}
#dealView .dvBody.isNego,#dealView .dvBody:has(>.nego){pointer-events:auto;bottom:0;overflow-y:auto;overscroll-behavior:contain;display:block;padding:0 4px}
.ex .gi small{font-size:14px;color:#8a5a12;font-weight:600}
.ngP .rk .ib,.ngF .ib{flex-direction:row;gap:5px;min-height:42px;padding:4px 8px}
.ngP .rk .ib span,.ngF .ib span{white-space:nowrap;font-size:15px}
.ngP .rk .ib svg,.ngF .ib svg{width:20px;height:20px}
.ngF .cfmRow{flex-wrap:wrap}
.ngF [data-z="close"]{order:-1;flex:1 1 100%}
.ngF [data-z="close"] span{white-space:normal;text-align:left;line-height:1.3}
.ngF [data-z="giveUp"]{flex:1 1 100%;min-height:38px}

/* exchange page r2 (coordinator from the owner's mockup): my cards along the top, the picked ones gathered in the ฉันให้ box */
.ex .hs{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:none}
.ex .hs::-webkit-scrollbar{display:none}
.ex .hc{flex:none;width:68px;display:flex;flex-direction:column;align-items:center;gap:3px;border:0;background:transparent;padding:4px 2px;border-radius:8px;font:600 14px Sarabun,sans-serif;color:var(--ink);transition:transform .25s cubic-bezier(.3,1.4,.5,1),box-shadow .25s}
.ex .hc img.cimg,.ex .hc img.lem{width:52px;height:auto}
.ex .hc span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ex .hc.lit{background:#fff3dc;box-shadow:inset 0 0 0 2px #d98a2f,0 0 14px rgba(243,170,70,.55);transform:translateY(-3px)}
.ex .box{background:#fffaf2;border-radius:8px;box-shadow:inset 0 0 0 1.5px #d6b67a;padding:6px;display:flex;flex-direction:column;gap:6px}
.ex .bh{display:flex;align-items:center;gap:8px;justify-content:space-between}.ex .bh b{font-size:16px}
.ex .ib.sm{min-height:36px;flex-direction:row;gap:4px;padding:2px 8px}.ex .ib.sm span{font-size:14px;white-space:nowrap}.ex .ib.sm svg{width:18px;height:18px}
.ex .bi{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}
.ex .bi .bp img,.ex .bi .bp svg{width:28px;height:auto}
.ex .bi .bm{font-size:14px;font-weight:600;min-width:0}
.ex .bi .ask{display:inline-flex;align-items:center;gap:4px}.ex .bi .ask .ib.sq{width:36px;height:36px;min-height:36px}
.ex .bi .amt{min-width:46px;text-align:center;font-weight:700}
/* the owner page footer is solid (nothing shows through), and the header folds to one line when the screen is short */
.ngF{background:#efe5d6;box-shadow:0 -8px 12px -6px rgba(70,48,28,.25);padding:8px 2px 6px;z-index:2}
@media (max-height:720px){
  .ngH{padding:6px;gap:4px}.ngH .tot{font-size:18px}
  .ngH .lns{display:flex;flex-wrap:wrap;gap:4px}
  .ngH .ln{padding:2px 6px}.ngH .ln .lt b{font-size:14px}.ngH .ln .lh .who1,.ngH .need{display:none}
  .ngH .ln .lt{flex-direction:row;gap:4px;align-items:center}
}

/* 7 phases at 360 px: past phases shrink to a tick, current and next keep their words (14 px) */
#phase .ph{padding:2px 1px}
@media (max-width:400px){
  #phase{gap:1px}#phase .ar{width:4px;height:4px}
  #phase .ph.past{flex:0 0 22px;font-size:0}#phase .ph.past::before{content:'✓';font-size:14px}
}
.ngP .opts{margin:0;padding:0 0 0 22px;font-size:14px;color:var(--ink2);line-height:1.5}
.ngP .opts li:nth-last-child(2){color:#a0620f;font-weight:600}

/* owner page r2: return always in view; rows open in place */
.ngP .pr .pt{all:unset;display:flex;align-items:center;gap:6px;min-width:0;cursor:pointer}
.ngP .pr .pt0{display:flex;align-items:center;gap:6px}
.ngP .pr.picked{box-shadow:inset 0 0 0 1.5px #6c9a5a}
.ngP .pr .tg{font-size:14px;font-weight:700;border-radius:5px;padding:0 6px;white-space:nowrap}
.ngP .pr .tg.best{background:#e5f0dc;color:#3f6a30}.ngP .pr .tg.nw{background:#d98a2f;color:#fff}
.ngP .pr .ex2{display:flex;flex-direction:column;gap:6px;border-top:1px dashed var(--rule);padding-top:6px}
.ngP .pr .df{font-size:15px;font-weight:700}.ngP .pr .df.up{color:#3f6a30}.ngP .pr .df.dn{color:#b0412c}
.ngP .grp .gh{all:unset;display:flex;align-items:center;gap:6px;font-size:15px;flex-wrap:wrap;cursor:pointer}
.ngP .grp .gh svg{width:20px;height:20px}.ngP .grp .gs{font-size:14px;color:var(--ink2);display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap}
.ngP .grp.fold{padding:4px 6px}
.ngF .ret{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.ngF .ret b{font-size:24px;color:#3f6a30}
.ngF .rb{font-size:14px;color:var(--ink2);line-height:1.4}
.ngP .opts{display:block}.ngP .opts li{display:list-item}

/* the payout card */
#payView{z-index:19}
.scn.pay h2{font-size:22px}
.scn.pay .pys{display:flex;flex-direction:column;gap:6px}
.scn.pay .pyr{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;background:#fffaf2;box-shadow:inset 0 0 0 1px var(--rule);flex-wrap:wrap}
.scn.pay .pyr.me{background:#fff3dc;box-shadow:inset 0 0 0 2px #d98a2f,0 0 14px rgba(243,170,70,.5)}
.scn.pay .pyr .sym{width:32px;height:32px}.scn.pay .pyr b{font-size:16px}.scn.pay .pyr .am{font-size:20px;color:#3f6a30}
.scn.pay .bds{display:inline-flex;gap:1px}.scn.pay .bd{width:20px;height:auto}
.scn.pay .pyme{text-align:center;font-size:17px;font-weight:700;color:#3f6a30}.scn.pay .pyme.no{color:var(--ink2);font-weight:500}
.flyc{position:fixed;width:24px;height:24px;z-index:40;pointer-events:none;animation:flyc 900ms cubic-bezier(.3,.8,.3,1) both}
@keyframes flyc{0%{translate:0 0;opacity:0;scale:.6}15%{opacity:1;scale:1.1}100%{translate:var(--dx) var(--dy);opacity:.2;scale:.7}}
@media (prefers-reduced-motion: reduce){.flyc{display:none}}

/* one type scale (owner liked board-clean-r1 "ชอบ font นี้"): Sarabun 500 for running text, 700 for headings and key words,
   Manrope 700 for every number and amount, no weight under 500, 14 px minimum */
body{font-family:'Sarabun','Manrope',system-ui,sans-serif;font-weight:500}
.w14,.chr .who,.dseat .sw,.say .w,.amtRow .w,#turnP .tb .w14,.ic .who.free{font-weight:500}
.mny,.money,.amt,.am,.tot,.ret b,.ngH .clk span,#dealNo,.lb-code,.pyr .am{font-family:'Manrope','Sarabun',sans-serif;font-weight:700}
.mny .cu{font-family:'Sarabun',sans-serif;font-weight:500}
#top .ti.turn{width:100%}#top .ti.turn .sp{flex:1}#top .ti .sym{border-radius:50%}

/* the chain scene */
#chainView{z-index:18;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:12px}
#chainView .chs{width:100%;max-width:560px;background:linear-gradient(180deg,#3d2a1d,#2a1c14);border-radius:8px;box-shadow:inset 0 0 0 2px #8a6420;padding:10px 12px 12px;display:flex;flex-direction:column;align-items:center;gap:8px}
#chainView .chh{width:100%;display:flex;align-items:center;justify-content:center;gap:8px;position:relative;min-height:32px}
#chainView .chh .hd{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap;justify-content:center;color:#f6ead8;font-size:17px;font-weight:700}
#chainView .chh .hd .sym,#chainView .tg2 .sym{width:22px;height:22px;border-radius:50%}
#chainView .clk2{position:absolute;right:0;top:0;background:#b04a3a;color:#fff;border-radius:6px;padding:0 8px;font:700 18px Manrope,Sarabun,sans-serif}#chainView .clk2 i{font:500 14px Sarabun;font-style:normal;margin-left:2px}
#chainView .stk{position:relative;margin:6px auto}
#chainView .cc2{position:absolute;transition:transform .35s cubic-bezier(.3,1.3,.5,1),filter .3s}
#chainView .cc2 img{width:100%;display:block;filter:drop-shadow(0 6px 10px rgba(0,0,0,.45))}
#chainView .cc2.top img{filter:drop-shadow(0 0 12px rgba(243,170,70,.85)) drop-shadow(0 6px 10px rgba(0,0,0,.45))}
#chainView .cc2 .pl2{position:absolute;left:17%;right:17%;bottom:17%;text-align:center;font-weight:700;font-size:14px;color:#3a2410}
#chainView .cc2 .tg2{position:absolute;left:-4px;top:-18px;display:inline-flex;align-items:center;gap:4px;background:#fffaf2;border-radius:6px;padding:1px 6px 1px 2px;font-size:14px;font-weight:700;color:#3a2a1f;max-width:110%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2}
#chainView .cc2 .no{position:absolute;right:-6px;top:-16px;background:#f3c27a;color:#3a2410;border-radius:6px;min-width:26px;text-align:center;font:700 16px Manrope,Sarabun,sans-serif;z-index:2}
#chainView .cc2.no img{filter:grayscale(1) brightness(.55)}
#chainView .stamp{position:absolute;left:4%;top:44%;rotate:-14deg;padding:2px 10px;border-radius:6px;font-weight:700;font-size:16px;color:#fff;z-index:3}
#chainView .stamp.no{background:#b04a3a}#chainView .stamp.ok{background:#4f7c3f}
#chainView .chl{width:100%;background:rgba(255,255,255,.08);border-radius:6px;padding:6px 8px;color:#f6ead8;font-size:15px;text-align:center}#chainView .chl b{color:#f3c27a}
#chainView .mine2{display:flex;align-items:center;gap:8px;font-size:15px;width:100%;max-width:560px}#chainView .mine2 img{width:34px}
#chainView>.cfmRow{width:100%;max-width:560px}
#chainView .c{text-align:center}

/* the top bar row is gone; the phase bar shares its row with one small menu key */
#top .bar{display:none}
#phaseRow{display:flex;align-items:center;gap:6px}
#phaseRow #phase{flex:1;min-width:0}
#btnMenu{flex:none;width:44px;height:44px;border-radius:8px;border:0;background:linear-gradient(180deg,#fffaf2,#efe2cc);box-shadow:inset 0 0 0 1.5px #d6b67a,0 2px 0 #c9b28c;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;transition:transform .12s}
#btnMenu i{display:block;width:20px;height:3.5px;border-radius:2px;background:#3a2a1f}
#btnMenu:active{transform:scale(.94)}
.scn.menu .mg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.scn.menu .mg .ib{min-height:48px;text-decoration:none;color:inherit;display:flex;align-items:center;justify-content:center}
.scn.menu .mg .ib span{font-size:16px;font-weight:700}
#menuView{z-index:21}
/* keys carry words, not thin outline pictograms */
.ib:not(.sq):not(.mk) > svg.i{display:none}
.ib.sq svg.i{stroke-width:3.2}
/* the cards key: a fan of card backs and a bold count */

/* r7 pick group: header slots and the owner's list */
.ngH .lgh0{font-size:14px;font-weight:700;color:var(--ink2);margin-top:2px}
.ngH .lgrp{border:1.6px dashed #d98a2f;border-radius:8px;padding:4px 6px 6px;margin-top:6px;background:#fff8ec}
.ngH .lgrp .lgh{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:14px}
.ngH .lgrp .lgh b{font-weight:700}
.ngH .ln.off{opacity:.55}.ngH .ln.gmiss .lh{color:var(--ink2)}
.ngP .pgrp{border:1.6px dashed #d98a2f;border-radius:8px;padding:6px;margin:8px 0;background:#fff8ec}
.ngP .pgrp .pgh{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;font-size:15px;margin:0 2px 6px}
.ngP .pgrp .pgh b{font-size:16px}
.pcard .nw2,.nw2{font-size:15px;font-weight:700;margin:2px 0}

/* the chain scene sits under the phase bar (mockup chain-r1: the bar stays in view); the stamp leaves the player tag readable */
#chainView{top:calc(56px + env(safe-area-inset-top));justify-content:flex-start;padding-top:8px}
#chainView .stamp{top:58%}

/* chain scene r2 (coordinator 16/11: cards clear, sized to the room; my strip hides while the scene is up) */
body.chainOn #sheet{visibility:hidden}
#chainView .chh{padding:0 58px}
#chainView .chh .hd{line-height:1.45}
#chainView .clk2{top:2px}
#chainView .cc2 .pl2{font-size:15px;bottom:15%;left:12%;right:12%;white-space:nowrap}
#chainView .cc2 .tg2{top:-22px;left:0}
#chainView .cc2 .no{top:-20px;right:0}
#chainView .stamp{top:auto;bottom:30%;left:6%;rotate:-8deg}
#chainView .old2{display:flex;gap:6px;flex-wrap:wrap;justify-content:center;font-size:14px;color:#f6ead8}
#chainView .old2 span{display:inline-flex;gap:4px;align-items:center;background:rgba(255,255,255,.1);border-radius:6px;padding:2px 8px}
#chainView .old2 b{font:700 14px Manrope,Sarabun,sans-serif;color:#f3c27a}#chainView .old2 .no{opacity:.6;text-decoration:line-through}
#chainView .chn{color:#e9dcc6;font-size:15px;text-align:center}

#chainView .cc2 .num{position:absolute;right:0;top:-20px;background:#f3c27a;color:#3a2410;border-radius:6px;min-width:26px;text-align:center;font:700 16px Manrope,Sarabun,sans-serif;z-index:2}
#chainView .cc2.gone img{filter:grayscale(1) brightness(.55)}
#chainView .stamp{position:absolute;bottom:30%;left:6%;top:auto;rotate:-8deg;padding:2px 10px;border-radius:6px;font-weight:700;font-size:16px;color:#fff;z-index:3;white-space:nowrap}
#chainView .stamp.sg{background:#b04a3a}#chainView .stamp.sk{background:#4f7c3f}
#chainView .vimg{width:22px;margin-right:2px}
#chainView .nov{align-self:center}

/* the wheel (r6 §14, mockup wheel-r1): over the lower board; my strip hides while it is up */
body.spinOn #sheet{visibility:hidden}
#spinView{z-index:17;justify-content:flex-end;align-items:stretch;background:rgba(58,42,31,.18);-webkit-backdrop-filter:none;backdrop-filter:none}
#spinView .spw{background:linear-gradient(180deg,#3d2a1d,#2a1c14);border-radius:8px;box-shadow:inset 0 0 0 2px #b98a3a,0 10px 30px rgba(0,0,0,.35);padding:12px 10px 12px;display:flex;flex-direction:column;gap:8px;color:#f6ead8;max-width:560px;margin:0 auto;width:100%}
#spinView h2{margin:0;text-align:center;font-size:22px;font-weight:700;line-height:1.45}
#spinView .sub{text-align:center;font-size:14px;color:#e2d2b8}
#spinView .win{position:relative;overflow:hidden;border-radius:8px;background:#1c130d;box-shadow:inset 0 6px 14px rgba(0,0,0,.6);padding:12px 0}
#spinView .strip{display:flex;gap:10px;will-change:transform}
#spinView .cl{flex:none;width:124px}
#spinView .chm{height:150px;border-radius:8px;background:linear-gradient(180deg,#e8ddcc,#cdbfa8);color:#3a2a1f;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:6px;opacity:.78}
#spinView .chm.lit{opacity:1;background:linear-gradient(180deg,#fffaf2,#f6e6c8);box-shadow:0 0 0 3px #e0973a,0 0 22px rgba(243,170,70,.75)}
#spinView .pr2{font:700 24px Manrope,Sarabun,sans-serif}
#spinView .em2,#spinView .pg2{display:flex;gap:3px;align-items:center;justify-content:center}
#spinView .pg2{position:relative;border:1.6px dashed #d98a2f;border-radius:6px;padding:9px 4px 3px;background:#fff6e6}
#spinView .pg2 i{position:absolute;top:-10px;right:2px;background:#f3c27a;border-radius:4px;padding:0 4px;font:700 14px Sarabun,sans-serif;font-style:normal;line-height:1.35;color:#3a2a1f}
#spinView .pn2{font-size:15px;font-weight:500;color:#5a4636}
#spinView .ptr{position:absolute;left:50%;width:0;height:0;border:9px solid transparent;margin-left:-9px;z-index:2}
#spinView .ptr.t{top:0;border-top-color:#f3c27a}#spinView .ptr.b{bottom:0;border-bottom-color:#f3c27a}
#spinView .wds{background:rgba(255,255,255,.08);border-radius:6px;padding:6px 10px}
#spinView .sw2{font-size:15px;font-weight:700;color:#f6ead8;line-height:1.5}
#spinView .ib{color:#3a2a1f}
#spinView .ib.pri{min-height:52px;font-size:18px}
#spinView .c{text-align:center;color:#e9dcc6}

#spinView{flex-direction:column;justify-content:flex-end;align-items:center}
#spinView .spw{flex:none}
/* on the dark wheel panel the keys are the light ones (a dark key vanished there); the main key is larger */
#spinView .ib.go{min-height:54px;font-size:20px;font-weight:700}
#spinView .ib.go:disabled{opacity:.45}

/* ---- the hand (hand.js; CARD-HANDLING-r1): a held fan; tucked behind my strip during a deal, open from the cards key or a touch */
#fan{position:absolute;left:0;right:0;bottom:var(--fanB,0px);height:0;z-index:5;display:none;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#fan.on{display:block}
#fan .fz{position:absolute;left:0;right:0;bottom:0;transition:transform .15s ease-out}
#fan.tuck .fz{transform:translateY(46%)}
#fan.open{z-index:7}#fan.open .fz{transform:translateY(-6px)}
body.aiming #fan{z-index:32}
#fan .fc{position:absolute;left:0;top:0;transform-origin:50% 120%;transition:transform .15s ease-out,opacity .12s;will-change:transform}
#fan .fc img{width:100%;display:block;border-radius:6px;filter:drop-shadow(0 3px 4px rgba(40,25,10,.35));pointer-events:none}
#fan .fc.can img{filter:drop-shadow(0 0 6px rgba(243,170,70,.75)) drop-shadow(0 3px 4px rgba(40,25,10,.35))}
#fan .fc.away{opacity:0}
#fan .fi.enter{animation:fanIn .42s cubic-bezier(.2,.8,.25,1) both}
@keyframes fanIn{from{transform:translate(0,-55vh) scale(.6) rotate(-8deg);opacity:0}to{transform:none;opacity:1}}
#fan .fcount{position:absolute;right:10px;bottom:6px;background:#3a2a1f;color:#fff3dc;border-radius:6px;padding:0 7px;font:700 15px Manrope,Sarabun,sans-serif}
#fan.tuck .fcount{bottom:calc(100% * 0 + 4px)}
#lift{position:fixed;inset:0;z-index:30;display:none;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#lift.on{display:block}
#lift .veil{position:absolute;inset:0;background:rgba(30,20,12,.42)}
#lift .tgF{position:absolute;border:0;border-radius:8px;background:rgba(243,170,70,.16);box-shadow:0 0 0 2.5px #f3b65a,0 0 18px rgba(243,170,70,.8);padding:0;cursor:pointer;animation:tgPulse 1.2s ease-in-out infinite}
#lift .tgF.hover,#lift .tgF.armed{background:rgba(243,170,70,.32);box-shadow:0 0 0 3.5px #ffcf7a,0 0 26px rgba(255,190,90,.95)}
#lift .tgF .tgL{position:absolute;left:50%;top:-30px;transform:translateX(-50%);white-space:nowrap;background:#3a2a1f;color:#fff3dc;border-radius:6px;padding:2px 8px;font:700 14px Sarabun,sans-serif;display:none}
#lift .tgF.hover .tgL,#lift .tgF.armed .tgL{display:block}
@keyframes tgPulse{50%{box-shadow:0 0 0 2.5px #f3b65a,0 0 8px rgba(243,170,70,.5)}}
#lift .lc{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%) perspective(700px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .15s ease-out;z-index:33;touch-action:none;animation:liftIn .15s ease-out}
#lift .lc.drag{transform:translate(-50%,-60%) scale(.5) rotate(-4deg);transition:none;pointer-events:none}
@keyframes liftIn{from{transform:translate(-50%,-10%) scale(.45)}}
#lift .lc img{width:100%;display:block;border-radius:10px;filter:drop-shadow(0 18px 24px rgba(0,0,0,.5))}
#lift .lc .sheen{position:absolute;inset:0;border-radius:10px;pointer-events:none;background:linear-gradient(105deg,transparent calc(var(--sx,30%) - 18%),rgba(255,245,220,.28) var(--sx,30%),transparent calc(var(--sx,30%) + 18%));mix-blend-mode:screen}
#lift .lc .pl3{position:absolute;left:14%;right:14%;bottom:15%;text-align:center;font-weight:700;font-size:17px;color:#3a2410}
#lift .info{position:absolute;left:50%;transform:translateX(-50%);top:calc(38% + 190px);width:min(92vw,420px);background:#fffaf2;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column;gap:2px;z-index:33;box-shadow:0 8px 20px rgba(0,0,0,.3)}
#lift .info.hide{display:none}
#lift .info b{font-size:17px}#lift .info span{font-size:15px}
#lift .info .why{color:#a9533f;font-weight:700}#lift .info .why.ok{color:#5a4636;font-weight:500}
#lift .info .ib.go{min-height:50px;font-size:18px;font-weight:700}
#chainView .cc2{transform-style:preserve-3d}
#chainView .cc2 .fr,#chainView .cc2 .bk{backface-visibility:hidden;-webkit-backface-visibility:hidden}
#chainView .cc2 .bk{position:absolute;inset:0;width:100%;transform:rotateY(180deg);filter:drop-shadow(0 6px 10px rgba(0,0,0,.45))}
@media (prefers-reduced-motion: reduce){#fan .fc,#fan .fz,#lift .lc{transition:opacity .1s}#lift .lc{animation:none}#lift .tgF{animation:none}}
/* the hand stays in reach over the counter scene (คัดค้าน is lifted from it) */
body.chainOn #fan{z-index:19}
body.chainOn.aiming #fan{z-index:32}
#lift .tgF{z-index:34}
/* while dragging, the card rides below the finger so the finger, the lit place and its words stay readable */
#lift .lc.drag{transform:translate(-35%,22%) scale(.5) rotate(-4deg)}
#lift .tgF .tgL{top:-34px;z-index:2}

/* ---- bottom-r1 proposal (body.bottom2) */
body.bottom2 #sheetIn{background:none;box-shadow:none;border:0;-webkit-backdrop-filter:none;backdrop-filter:none;padding-bottom:0}
/* my money and the chat key in normal flow just above the fan; the fan lies in the sheet's bottom padding (so the board keeps clear of it) */
body.bottom2 #sheet{padding-bottom:calc(var(--fanVis,58px) + 4px + env(safe-area-inset-bottom))}
body.bottom2 #sheetIn{overflow:visible}
body.bottom2 .row1{min-height:52px;padding:0 4px}
body.bottom2 .me2{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
body.bottom2 .me2 .sym{width:26px;height:26px;border-radius:50%}
body.bottom2 .me2 .lb{font-size:14px;font-weight:500;color:var(--ink2)}
body.bottom2 .me2 .mn{font:700 24px Manrope,Sarabun,sans-serif;color:var(--ink)}
body.bottom2 .chatK{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-width:56px;min-height:52px;padding:4px 8px;border:0;border-radius:8px;
  background:linear-gradient(180deg,#4a3526,#2c1f15);box-shadow:inset 0 0 0 1.5px #b98a3a,0 4px 10px rgba(40,25,10,.35);color:#f3d9a8;cursor:pointer}
body.bottom2 .chatK svg{width:22px;height:22px;fill:none;stroke:#e9b45f;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
body.bottom2 .chatK span{font-size:14px;font-weight:700;line-height:1.2}
body.bottom2 .chatK.alert{box-shadow:inset 0 0 0 1.5px #f3b65a,0 0 14px rgba(243,170,70,.75)}
body.bottom2 .chatK .cnt{position:absolute;top:-8px;right:-8px;background:#d98a2f;color:#2c1f15;border-radius:6px;min-width:22px;padding:0 5px;font:700 14px Manrope,Sarabun,sans-serif;text-align:center}
body.bottom2 #fan{bottom:env(safe-area-inset-bottom)}
body.bottom2 #fan.tuck{z-index:7}
body.bottom2 #fan .fcount{right:8px;bottom:calc(100% - 4px);cursor:pointer;min-width:30px;min-height:24px;text-align:center}
body.bottom2.aiming .row1{opacity:.35}
body.bottom2 #fan.tuck .fz{transform:translateY(58%)}      /* on the table edge the hand lies deeper: 42% of a card shows */

/* ---- bottom-r2: one family on the table edge — money | count plate | chat key on one baseline above a shallower fan */
/* the card's own picture (its centre icon) must show whole: 62% of each card above the edge; smaller cards on the board page */
body.bottom2 #fan.tuck .fz{transform:translateY(38%)}
body.bottom2 .row1{min-height:44px;align-items:center}
body.bottom2 .me2 .sym{width:24px;height:24px}
body.bottom2 .me2 .mn{font-size:22px}
body.bottom2 .chatK{min-width:48px;min-height:44px;padding:3px 6px;box-shadow:inset 0 0 0 1px #8a6420,0 2px 6px rgba(40,25,10,.25)}
body.bottom2 .chatK svg{width:18px;height:18px}
body.bottom2 #fan .fcount{left:50%;right:auto;transform:translateX(-50%);bottom:calc(var(--fanVis,40px) + 10px);min-width:48px;min-height:30px;line-height:30px;font-size:16px;
  background:linear-gradient(180deg,#4a3526,#2c1f15);color:#f3d9a8;box-shadow:inset 0 0 0 1px #8a6420;z-index:40}
body.bottom2 #fan .fcount::before{content:'';position:absolute;inset:-7px -2px}

/* ---- the deck and the draw */
#deckSpot{position:absolute;right:10px;top:calc(104px + env(safe-area-inset-top));z-index:6;display:flex;gap:6px;align-items:flex-end;pointer-events:none}
#deckSpot .dk{position:relative;width:34px;height:49px}
#deckSpot .dk img{position:absolute;left:0;top:0;width:34px;border-radius:4px;box-shadow:0 1px 1px rgba(40,25,10,.35)}
#deckSpot .dk b{position:absolute;right:-6px;bottom:-6px;background:#3a2a1f;color:#fff3dc;border-radius:5px;padding:0 4px;font:700 14px Manrope,Sarabun,sans-serif}
#deckSpot .ds{width:30px;height:43px;border-radius:4px;box-shadow:inset 0 0 0 1.5px rgba(138,100,32,.45)}
#deckSpot .ds img{width:30px;border-radius:4px;opacity:.85}
body.aiming #deckSpot,body.chainOn #deckSpot,body.spinOn #deckSpot{opacity:.4}
#drawFx{position:fixed;inset:0;z-index:35;display:none}
#drawFx.on{display:block}
#drawFx .dc{position:absolute;transform-style:preserve-3d;perspective:900px}
#drawFx .dc img{position:absolute;left:0;top:0;width:100%;border-radius:10px;backface-visibility:hidden;-webkit-backface-visibility:hidden;filter:drop-shadow(0 16px 22px rgba(0,0,0,.45))}
#drawFx .dc .bk{transform:rotateY(180deg)}
#drawFx .dc .fr{position:relative;display:block}      /* block: an inline picture left a gap under it, so the name sat 4 px low on the plate */
#drawFx .dc .sheen{position:absolute;inset:0;border-radius:10px;pointer-events:none;opacity:0;background:linear-gradient(105deg,transparent 35%,rgba(255,240,205,.55) 50%,transparent 65%) no-repeat;background-size:60% 100%;mix-blend-mode:screen}
#drawFx .dn{position:absolute;left:0;right:0;text-align:center;font-size:18px;font-weight:700;color:#fff3dc;text-shadow:0 2px 6px rgba(0,0,0,.6);opacity:0}
img.fly{position:fixed;z-index:34;border-radius:4px;pointer-events:none}
#fan .fi.fade{animation:fanFade .25s ease-out both}@keyframes fanFade{from{opacity:0}}
#drawFx .dc .pl4{position:absolute;left:14%;right:14%;bottom:15%;text-align:center;font-weight:700;font-size:17px;color:#3a2410;backface-visibility:hidden;-webkit-backface-visibility:hidden}
#drawFx .dn{color:#3a2a1f;text-shadow:none}#drawFx .dn::before{content:'';position:absolute;inset:-4px 30%;background:#fffaf2;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.25);z-index:-1}
/* the deck in the price band: small, with its count; the discard beside it */
#deckSpot{top:auto;right:auto}#deckSpot.hid{display:none}
#deckSpot .dk{width:21px;height:30px}#deckSpot .dk img{width:21px;border-radius:3px}
#deckSpot .dk b{right:-14px;bottom:-4px;font-size:14px;padding:0 3px;background:#5a4030}
#deckSpot .ds{width:21px;height:30px;margin-left:14px;box-shadow:inset 0 0 0 1px rgba(243,194,122,.5);border-radius:3px}#deckSpot .ds img{width:21px;border-radius:3px}

/* the symbol picker (lobby) */
.syms{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:8px}
.syms .sy{position:relative;border:0;border-radius:8px;background:#fffaf2;box-shadow:inset 0 0 0 1px var(--edge);min-height:64px;padding:6px 2px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}
.syms .sy img{width:40px;height:40px;border-radius:50%}
.syms .sy.lit{box-shadow:inset 0 0 0 2px #d98a2f,0 0 14px rgba(243,170,70,.7)}
.syms .sy.mine{box-shadow:inset 0 0 0 2px #4f7c3f}
.syms .sy.taken{opacity:.45}
.syms .sy .who{font-size:14px;font-weight:500;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* the floating secret chat: a compact panel at a corner, the table stays visible and clear (no blur, no veil) */
#social{background:none;-webkit-backdrop-filter:none;backdrop-filter:none;pointer-events:none;align-items:flex-end;justify-content:flex-end;padding:0 10px calc(120px + env(safe-area-inset-bottom))}
#social.left{justify-content:flex-start}
#social #socIn{pointer-events:auto;width:min(340px,92vw);max-height:58vh;overflow:auto;border-radius:8px;box-shadow:0 12px 30px rgba(40,25,10,.35),inset 0 0 0 1px var(--edge)}
#social #socIn h2{display:flex;align-items:center;gap:6px;font-size:17px;margin:0 0 6px}
#chatBubble{position:fixed;right:12px;bottom:calc(128px + env(safe-area-inset-bottom));z-index:31;max-width:min(300px,80vw);background:#fffaf2;border-radius:8px;padding:8px 12px;box-shadow:0 8px 20px rgba(40,25,10,.3),inset 0 0 0 1.5px #d98a2f;display:none;flex-direction:column;gap:2px;cursor:pointer}
#chatBubble.left{right:auto;left:12px}
#chatBubble.on{display:flex;animation:bubIn .2s ease-out}
#chatBubble b{font-size:14px}#chatBubble span{font-size:16px}
@keyframes bubIn{from{opacity:0;transform:translateY(8px)}}
/* motion: every key presses in and springs back (transform only; interruptible by nature) */
.ib,.tb,.chatK,.sy,.chr,#btnMenu{transition:transform .16s cubic-bezier(.3,1.7,.5,1),box-shadow .12s ease-out}
.ib:active:not(:disabled),.tb:active:not(:disabled),.chatK:active,.sy:active:not(:disabled),.chr:active,#btnMenu:active{transform:scale(.95);transition-duration:.06s}
@media (prefers-reduced-motion: reduce){.ib,.tb,.chatK,.sy,.chr,#btnMenu{transition:none}}
/* a name inside a sentence shares the sentence's baseline (owner on the big screen: "ชื่อผู้เล่นกับคำที่ระบบเขียนขึ้น บรรทัดไม่ตรงกัน"):
   the chip is inline text, the symbol is centred on the x-height (vertical-align: middle), and the clipped name keeps its baseline
   (overflow: clip, unlike hidden, does not move an inline-block's baseline to its bottom edge) */
.who1{display:inline;white-space:nowrap;gap:0}
.who1 .sym,.who1 .face{vertical-align:middle;margin-right:4px;display:inline-block}
.who1 .nm1{display:inline-block;vertical-align:baseline;overflow:clip;text-overflow:ellipsis;min-width:0;max-width:9em}
#chainView .chh .hd{display:block;text-align:center}
#chainView .chh .hd .sym{vertical-align:middle;margin:0 3px}
#chainView .cc2 .tg2 .sym{vertical-align:middle}
.ngH .own{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}      /* words and the name chip on one baseline */
.who1 .nm1{display:inline;overflow:visible;max-width:none}      /* see shortName() in nego.js */
/* the A1 card art (art3d/out-r2, RULES §18): its gold plate is the rectangle 17.2%–81% across, 72.4%–84% down the picture (the picture
   includes the card's shadow, so the plate is not centred in it); the name sits in the middle of that rectangle on every card shown large */
#lift .lc .pl3,#chainView .cc2 .pl2,#drawFx .dc .pl4{left:17.2%;right:19%;top:72.4%;bottom:16%;display:flex;align-items:center;justify-content:center;line-height:1.2;white-space:nowrap}
/* bottom-r2 is the default: its tucked fan (z 7) must still come above the counter scene (z 18), as the hand did
   before (body.chainOn #fan lost to the more specific body.bottom2 #fan.tuck — คัดค้าน could not be dragged from the hand) */
body.bottom2.chainOn #fan.tuck{z-index:19}      /* (while a card is lifted the fan stays under the lift layer: its count plate would cover ยืนยัน) */
/* RULES §12 secret goal: the choice at the first gate, and my goal afterwards (rounded rectangles, no capsules; 14 px and up) */
.goal2,.goal1{display:flex;flex-direction:column;gap:6px;width:100%;max-width:420px;margin:6px auto;text-align:center}
.goal2 .gk{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.goal2 .gcard{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:92px;padding:8px 6px;border-radius:8px;white-space:normal;line-height:1.35}
.goal2 .gcard b{font-size:17px}.goal2 .gcard span{font-size:14px;font-weight:500}
.goal1{background:#fffaf2;border-radius:8px;padding:8px 10px;box-shadow:inset 0 0 0 1.5px #d9a24a}.goal1 b{font-size:18px}.goal1 span{font-size:15px}
.er .gl{font-size:14px;color:var(--ink2)}.er .gl.ok{color:#4f7c3f;font-weight:700}
.sec2.goals .ln{animation:goalIn .5s ease-out both}@keyframes goalIn{from{opacity:0;transform:translateY(6px)}}
@media (prefers-reduced-motion: reduce){.sec2.goals .ln{animation:none}}

/* the wheel thrown by the finger (owner 16/11/2569 "อยากให้ user เป็นคน swipe หมุนเอง" · "เน้น physic"): the row is the grip; no page
   scroll, text selection or long-press menu on it; a fixed light over the marker so each chamber is lit as it passes it, darker
   sides for depth (no per-frame work); the marker is a flapper that flicks at every edge; a finger cue on the first turn only */
#spinView .win{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
#spinView .win.grab{cursor:grab}#spinView .win.grab:active{cursor:grabbing}
#spinView .strip{transform:translate3d(calc(50% - 62px),0,0)}
#spinView .shade{position:absolute;inset:0;pointer-events:none;z-index:1;border-radius:8px;
  background:radial-gradient(ellipse 70px 120% at 50% 50%,rgba(255,236,200,.16),rgba(255,236,200,0) 70%),linear-gradient(90deg,rgba(18,11,7,.62),rgba(18,11,7,0) 26%,rgba(18,11,7,0) 74%,rgba(18,11,7,.62))}
#spinView .ptr.t{transform-origin:50% 0}
#spinView .fcue{position:absolute;left:50%;top:50%;z-index:3;pointer-events:none;width:0;height:0}
#spinView .fcue i{position:absolute;left:-17px;top:-17px;width:34px;height:34px;border-radius:50%;background:rgba(255,246,230,.9);box-shadow:0 0 0 6px rgba(243,194,122,.35),0 4px 10px rgba(0,0,0,.4);animation:fcue 1.8s cubic-bezier(.3,.1,.3,1) infinite}
@keyframes fcue{0%{transform:translateX(60px) scale(.9);opacity:0}15%{opacity:1;transform:translateX(60px) scale(1)}70%{transform:translateX(-60px) scale(1);opacity:1}100%{transform:translateX(-80px) scale(.9);opacity:0}}
#spinView .spHint{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:3;pointer-events:none;background:rgba(28,19,13,.92);color:#fff3dc;border-radius:6px;padding:4px 12px;font-size:16px;font-weight:700;line-height:1.5;white-space:nowrap;box-shadow:0 0 0 1.5px #b98a3a}
@media (prefers-reduced-motion: reduce){#spinView .fcue i{animation:none;transform:none}}
/* a card let go away from every target flies back into the fan (hand.js returnFlight) */
.retG{position:fixed;z-index:31;pointer-events:none;border-radius:6px;transform-origin:0 0;box-shadow:0 8px 18px rgba(40,25,10,.35);will-change:transform}
/* (r9) the deck and the discard in the price band, whole: card size from the band (hand.js renderDeck sets --cw/--ch), the count a
   number beside the stack at 15 px (it overlapped the band's lower edge), then the discard; nothing leaves the band */
#deckSpot{gap:0;align-items:center}
#deckSpot .dk{width:var(--cw,24px);height:var(--ch,34px)}
#deckSpot .dk img{width:var(--cw,24px);height:var(--ch,34px);object-fit:cover;border-radius:3px}
#deckSpot .dn{margin:0 12px 0 6px;font:700 15px/1 Manrope,Sarabun,sans-serif;color:#fff3dc;min-width:2ch}
#deckSpot .ds{width:var(--cw,24px);height:var(--ch,34px);margin-left:0;border-radius:3px;box-shadow:inset 0 0 0 1.5px rgba(243,194,122,.55)}
#deckSpot .ds img{width:var(--cw,24px);height:var(--ch,34px);object-fit:cover;border-radius:3px;opacity:.9}
/* the wheel's row lays out on its own: a change of heading or keys does not lay out 77 chambers again */
#spinView .win{contain:layout paint}#spinView .cl{contain:layout paint style}
/* bug 14 (r9): with a panel in the sheet (vote, card trade, ask to see, …) the count plate gets its own strip under the panel */
body.bottom2.panelOn #sheet{padding-bottom:calc(var(--fanVis,58px) + 50px + env(safe-area-inset-bottom))}
