*{box-sizing:border-box}
html{height:100%}
body{margin:0;min-height:100%}
/* during a game the page itself never scrolls (the table is pinned full-screen) */
body.in-game{height:100%;overflow:hidden}
body{
  background-color:#0b0f0d;
  background-image:conic-gradient(#0f1512 25%,transparent 0 50%,#0f1512 0 75%,transparent 0);
  background-size:4px 4px;
  font-family:'Jersey 10',monospace;
  color:#f3efe6;
  font-size:24px;
  overflow-x:hidden;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation; /* no double-tap zoom, no tap delay */
  -webkit-text-size-adjust:100%;
  overscroll-behavior:none;
  
}
[hidden]{display:none!important}
.px{font-family:'Jersey 10',monospace}
:root{--ease:cubic-bezier(.22,.9,.24,1)}

/* ---------- screens ---------- */
/* Menus and the lobby are ordinary page content: the PAGE scrolls if a panel is taller
   than the screen. (Full-screen fixed panels with their own scrolling keep stale touch
   areas on iPhones after the phone turns, so taps stop working.) The panel is centered
   with margin:auto, so it can always be scrolled all the way to its top. */
.screen{position:relative;min-height:100vh;min-height:100dvh;display:flex;padding:16px;animation:screenIn .32s var(--ease)}
/* Only the game table is pinned full-screen; it never scrolls. */
.screen.game{position:fixed;inset:0;min-height:0}
.screen.settled{animation:none}
@keyframes screenIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.screen.game{animation:fadeIn .4s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.nt{clip-path:polygon(1px 0,calc(100% - 1px) 0,calc(100% - 1px) 1px,100% 1px,100% calc(100% - 1px),calc(100% - 1px) calc(100% - 1px),calc(100% - 1px) 100%,1px 100%,1px calc(100% - 1px),0 calc(100% - 1px),0 1px,1px 1px)}

.panel{background:#151a17;box-shadow:0 0 0 1px #000,3px 3px 0 1px rgba(0,0,0,.45);padding:28px;width:100%;margin:auto}
.narrow{max-width:460px}
.wide-panel{max-width:760px}
.title{font-family:'Jersey 10',monospace;font-size:45px;line-height:44px;text-align:center;color:#e0b04a;margin:0 0 8px;text-shadow:1px 1px 0 #000}
.title.small{font-size:33px;line-height:32px}
.title.big{font-size:110px;line-height:92px;letter-spacing:4px;text-shadow:3px 3px 0 #000;margin-bottom:4px}
.kicker{text-align:center;color:#7d8f85;margin:0 0 26px}
.hello{text-align:center;margin:6px 0 22px;color:#b9c7bf}
.hello b{color:#f3efe6;font-weight:normal}
.link{font:inherit;color:#7d8f85;background:none;border:0;text-decoration:underline;cursor:pointer;padding:4px}
.link:hover{color:#e0b04a}

.field{display:flex;flex-direction:column;gap:8px;margin-bottom:18px}
.field span,.label{font-family:'Jersey 10',monospace;font-size:18px;color:#b9c7bf;margin:0}
input{font:inherit;font-size:30px;color:#f3efe6;background:#0b0f0d;border:0;box-shadow:inset 0 0 0 1px #3a4a40;padding:8px 12px;height:52px;width:100%;outline:none;transition:box-shadow .15s}
input:focus{box-shadow:inset 0 0 0 1px #e0b04a}

.btn{
  font-family:'Jersey 10',monospace;font-size:21px;height:52px;padding:0 18px;border:0;cursor:pointer;
  background:#2c3a32;color:#f3efe6;box-shadow:0 0 0 1px #000,2px 2px 0 1px rgba(0,0,0,.45);
  transition:transform .08s,box-shadow .08s,filter .15s,opacity .2s;
}
.btn:hover{filter:brightness(1.12)}
.btn:active{transform:translate(2px,2px);box-shadow:0 0 0 1px #000,1px 1px 0 1px rgba(0,0,0,.45)}
.btn.gold{background:#e0b04a;color:#1a1206}
.btn.ghost{background:transparent;box-shadow:inset 0 0 0 1px #3a4a40}
.btn.ghost:active{box-shadow:inset 0 0 0 1px #3a4a40}
.btn:disabled{opacity:.45;cursor:default;transform:none;filter:none}
.btn.wide{width:100%}
.btn:focus-visible,input:focus-visible,.clause:focus-visible,.count:focus-visible,.seat:focus-visible,.link:focus-visible{outline:2px solid #fff;outline-offset:4px}
.msg{min-height:28px;margin:14px 0 0;color:#f08a7a;text-align:center}

/* home clauses */
.clauses{display:flex;flex-direction:column;gap:14px}
.clause{
  display:grid;grid-template-columns:52px 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center;text-align:left;
  font:inherit;color:inherit;background:#0f1411;border:0;cursor:pointer;padding:14px 16px;
  box-shadow:inset 0 0 0 1px #26302a;transition:box-shadow .15s,transform .15s var(--ease),background .15s;
}
.clause:active{box-shadow:inset 0 0 0 1px #e0b04a;background:#131915}
.clause .no{grid-row:1/3;width:52px;height:52px;display:flex;align-items:center;justify-content:center;background:#e0b04a;color:#1a1206;font-family:'Jersey 10',monospace;font-size:30px}
.clause .cl{font-family:'Jersey 10',monospace;font-size:23px}
.clause .cs{color:#7d8f85;font-size:23px}

.page-head{display:flex;align-items:center;gap:18px;margin-bottom:22px}
.page-head h2{margin:0;font-family:'Jersey 10',monospace;font-size:28px;color:#e0b04a}
.back{height:40px;font-size:16px;padding:0 12px}

/* host */
.count-pick{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:12px 0 16px}
.count{font:inherit;color:#b9c7bf;background:#0f1411;border:0;cursor:pointer;padding:14px;box-shadow:inset 0 0 0 1px #26302a;display:flex;align-items:center;gap:14px;text-align:left;transition:box-shadow .15s,color .15s}
.count b{font-family:'Jersey 10',monospace;font-size:45px;color:#7d8f85;transition:color .15s}
.count span{font-size:20px;line-height:20px}
.count.on{box-shadow:inset 0 0 0 1px #e0b04a;color:#f3efe6}
.count.on b{color:#e0b04a}
.rules-panel{max-width:720px}
.rules-pick{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0 0}
.rulebox{
  font:inherit;color:#b9c7bf;background:#0f1411;border:0;cursor:pointer;padding:20px 20px 18px;text-align:left;
  box-shadow:inset 0 0 0 1px #26302a;display:flex;flex-direction:column;gap:12px;
  transition:box-shadow .15s,transform .15s var(--ease),background .15s;
}
.rulebox b{font-family:'Jersey 10',monospace;font-weight:normal;font-size:34px;line-height:32px;color:#e0b04a}
.rulebox ul{margin:0;padding:0 0 0 20px;display:flex;flex-direction:column;gap:8px}
.rulebox li{font-size:21px;line-height:21px}
.rulebox em{font-style:normal;color:#f3efe6}
.rulebox:active{box-shadow:inset 0 0 0 1px #e0b04a;background:#131915;transform:translate(2px,2px)}
.rulebox:focus-visible{outline:2px solid #fff;outline-offset:4px}
@media (hover:hover){.rulebox:hover{box-shadow:inset 0 0 0 1px #e0b04a;background:#131915}}
@media (max-width:600px){.rules-pick{grid-template-columns:1fr;gap:12px}.rulebox{padding:14px 16px}.rulebox b{font-size:28px;line-height:28px}}
.rules-chosen{font-family:'Jersey 10',monospace;font-size:18px;color:#7d8f85;margin:-10px 0 14px}
.rules-chosen b{font-weight:normal;color:#e0b04a}
.tag-rules{color:#e0b04a}
.mini-preview{position:relative;height:170px;margin:0 0 18px}
.mini-preview .mf{position:absolute;left:50%;top:50%;width:220px;height:110px;transform:translate(-50%,-50%);background:#14583a;box-shadow:0 0 0 3px #5c3a22,0 0 0 4px #000;border-radius:50%}
.mini-preview .ms{position:absolute;width:30px;height:30px;transform:translate(-50%,-50%);box-shadow:0 0 0 1px #000;display:flex;align-items:center;justify-content:center;font-family:'Jersey 10',monospace;font-size:15px;transition:left .35s var(--ease),top .35s var(--ease),opacity .25s}
.ta{background:#e0483c;color:#fff}.tb{background:#4b8ef0;color:#fff}

/* join list */
.table-list{display:flex;flex-direction:column;gap:10px;min-height:220px;padding:2px}
.trow{display:grid;grid-template-columns:1fr auto auto auto;align-items:center;gap:18px;background:#0f1411;box-shadow:inset 0 0 0 1px #26302a;padding:12px 14px;animation:rowIn .3s var(--ease)}
@keyframes rowIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.trow .tn{font-size:28px;line-height:26px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trow .tc{font-family:'Jersey 10',monospace;font-size:15px;color:#7d8f85}
.dots{display:flex;gap:5px}
.dots i{width:14px;height:14px;background:#26302a;box-shadow:inset 0 0 0 1px #3a4a40}
.dots i.on{background:#e0b04a;box-shadow:none}
.status{font-family:'Jersey 10',monospace;font-size:15px;color:#7bd389}
.status.playing{color:#f0c050}
.trow .btn{height:44px;font-size:18px}
.empty{color:#7d8f85;text-align:center;padding:60px 0}
.code-row{display:flex;align-items:center;gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid #26302a}
.code-row label{font-family:'Jersey 10',monospace;font-size:18px;color:#b9c7bf;white-space:nowrap}
.code-row input{flex:1;min-width:0;text-transform:uppercase;letter-spacing:8px;font-family:'Jersey 10',monospace;font-size:28px}

/* how to play */
.how .how-body{line-height:26px}
.how h3{font-family:'Jersey 10',monospace;font-size:20px;color:#e0b04a;margin:22px 0 8px}
.how p,.how li{color:#d6ded9;margin:6px 0}
.how .lead{color:#7d8f85}
.how b{color:#f3efe6;font-weight:normal;text-decoration:underline;text-decoration-color:#e0b04a}

/* lobby */
.lobby-panel{max-width:640px}
.lobby-top{display:flex;gap:16px;align-items:center;justify-content:center}
.plate{background:#0f1411;box-shadow:0 0 0 1px #000;height:52px;display:flex;align-items:center;gap:14px;padding:0 16px;font-family:'Jersey 10',monospace;font-size:24px}
.hint{text-align:center;color:#b9c7bf;margin:16px 0 8px}
.seat-ring{position:relative;height:360px}
.seat-ring .felt{position:absolute;left:50%;top:50%;width:300px;height:150px;transform:translate(-50%,-50%);background:#14583a;box-shadow:0 0 0 4px #5c3a22,0 0 0 5px #000;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;color:#0b2f20;font-family:'Jersey 10',monospace;font-size:14px;line-height:15px}
.seat{
  position:absolute;width:150px;min-height:72px;transform:translate(-50%,-50%);
  font:inherit;color:inherit;border:0;background:#0f1411;box-shadow:0 0 0 1px #000;padding:6px 8px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center;
  transition:left .35s var(--ease),top .35s var(--ease),box-shadow .15s;animation:fadeIn .25s ease;
}
.seat.open{background:transparent;box-shadow:inset 0 0 0 1px #3a4a40;color:#7d8f85}
.seat.me{box-shadow:0 0 0 1px #7bd389}
.seat .nm{font-size:25px;line-height:24px;word-break:break-word}
.seat .tm{font-family:'Jersey 10',monospace;font-size:13px}
.seat .tm.a{color:#e0483c}.seat .tm.b{color:#4b8ef0}
.seat.team-a{box-shadow:0 0 0 2px #e0483c}.seat.team-b{box-shadow:0 0 0 2px #4b8ef0}
.seat .off{color:#f08a7a;font-size:19px}
.seat .acts{display:flex;gap:6px}
.mini{font-family:'Jersey 10',monospace;font-size:14px;background:#2c3a32;color:#f3efe6;border:0;padding:6px 7px;cursor:pointer;box-shadow:0 0 0 1px #000;transition:filter .15s}
.mini:hover{filter:brightness(1.2)}
.mini.gold{background:#e0b04a;color:#1a1206}
.mini.red{background:#7a2a2a}
.watchers{text-align:center;color:#7d8f85;min-height:26px;margin:6px 0 0}
.lobby-bottom{display:flex;justify-content:space-between;gap:12px;margin-top:14px}
#start{flex:1}

/* ---------- the table ---------- */
.game{padding:0;overflow:hidden}
.stage{position:absolute;left:50%;top:50%;width:1280px;height:800px;transform:translate(-50%,-50%) scale(var(--k,1));transform-origin:center}
.stage .felt{position:absolute;pointer-events:none}
#cardLayer,#uiLayer{position:absolute;inset:0}
#cardLayer{z-index:1}
#uiLayer{z-index:2}
#uiLayer{pointer-events:none}
#uiLayer .ui{pointer-events:auto}
#uiLayer .center-msg,#uiLayer .log,#uiLayer .bubble,#uiLayer .chip{pointer-events:none}

/* cards: every card on the table is one element that glides between places */
.card{position:absolute;left:0;top:0;width:100px;height:144px;will-change:transform,opacity;
  transition:transform .55s var(--ease),opacity .4s ease;filter:drop-shadow(1px 1px 0 rgba(0,0,0,.45))}
.card .lift{width:100%;height:100%;transition:transform .16s var(--ease),filter .2s}
.card.play{cursor:pointer}
.card.play .lift{transform:translateY(-10px)}
@media (hover:hover){.card.play:hover .lift{transform:translateY(-26px)}.clause:hover{box-shadow:inset 0 0 0 1px #e0b04a;transform:translateX(4px);background:#131915}}
.card.pick{cursor:pointer}

.card.picked .lift{transform:translateY(-30px)}
.card.picked .face-out{background:#e0b04a}
.card.pick:not(.picked) .lift{filter:brightness(.82)}
.card .keep{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);background:#e0b04a;color:#1a1206;font-family:'Jersey 10',monospace;font-size:18px;padding:2px 8px;box-shadow:0 0 0 1px #000}
.card.dead .lift{filter:brightness(.5)}
.card.dim .lift{filter:brightness(.45)}
/* tapped a card you can't play: quick shake + red flash */
.card .lift.nope{animation:nope .46s cubic-bezier(.36,.07,.19,.97)}
.card .lift.nope .face-out{background:#e0503a}
.card .lift.nope .face-in{background:#f7c9c0;transition:none}
@keyframes nope{
  0%{transform:translate(0,-10px)}
  15%{transform:translate(-10px,-10px) rotate(-3deg)}
  30%{transform:translate(9px,-10px) rotate(3deg)}
  45%{transform:translate(-7px,-10px) rotate(-2deg)}
  60%{transform:translate(5px,-10px) rotate(1deg)}
  75%{transform:translate(-3px,-10px)}
  100%{transform:translate(0,-10px)}
}
.card.win .face-out{background:#e0b04a}
.card.five .face-out{background:#e0503a}
.card .face-out{width:100%;height:100%;background:#1b1b1b;padding:1px}
.card .face-in{position:relative;width:100%;height:100%;background:#f6f0df}
.card .idx{position:absolute;display:flex;flex-direction:column;align-items:center;gap:3px;font-family:'Jersey 10',monospace;font-size:40px;line-height:30px;letter-spacing:-1px}
.card .idx.tl{left:6px;top:5px}
.card .idx.br{right:6px;bottom:5px;transform:rotate(180deg)}
.card .pip{position:absolute;left:26px;top:48px}
.card .back-out{width:100%;height:100%;background:#f1e7cf;padding:2px}
.card .pat{width:100%;height:100%;background-color:#8c2432;background-image:conic-gradient(#b13a49 25%,transparent 0 50%,#b13a49 0 75%,transparent 0);background-size:3px 3px}
.card .lift{position:relative}
.card .cover{position:absolute;inset:0;opacity:0;transition:opacity .18s ease;pointer-events:none}
.card.down .cover{opacity:1;transition:none}
/* face-up flip: squeeze to edge-on, swap faces at the midpoint, open back up */
.card.flipping .lift{animation:flip .42s cubic-bezier(.45,0,.55,1)}
.card.flipping .cover{animation:flipCover .42s steps(1,end)}
@keyframes flip{0%{transform:scaleX(1)}50%{transform:scaleX(0)}100%{transform:scaleX(1)}}
@keyframes flipCover{0%{opacity:1}50%{opacity:0}100%{opacity:0}}
.card .toss{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#b3202a;color:#fff;font-family:'Jersey 10',monospace;font-size:15px;padding:5px 6px;box-shadow:0 0 0 1px #000}

/* UI pieces fade/pop in and out */
.ui{position:absolute;animation:uiIn .3s var(--ease) both}
#uiLayer .ui.settled:not(.out){animation:none}
.ui.out{animation:uiOut .22s ease forwards;pointer-events:none}
@keyframes uiIn{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}
@keyframes uiOut{to{opacity:0;transform:scale(.96)}}
.ui.pop{animation:pop .34s cubic-bezier(.3,1.6,.5,1) both}
@keyframes pop{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:none}}

.topbar{left:24px;top:24px;display:flex;align-items:center;gap:20px}
.topbar .plate{height:44px}
.topbar .btn{height:44px}
/* LAST TRICK: hold it down. No text selection / long-press menu on phones. */
.center-msg.peek-label{left:50%;width:auto;translate:-50% 0;white-space:nowrap;background:#0f1411;padding:4px 14px;color:#e0b04a;box-shadow:inset 0 0 0 1px #e0b04a,0 0 0 1px #000}
.topbar .btn.peek{background:#1d2a23;box-shadow:inset 0 0 0 1px #e0b04a,0 0 0 1px #000;color:#e0b04a;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;animation:fadeIn .25s ease}
.topbar .btn.peek.held{background:#e0b04a;color:#1a1206;transform:translate(2px,2px)}
.hostbar{right:24px;top:24px;display:flex;gap:14px}
.hostbar .btn{height:44px;font-size:16px}

.pplate{height:56px;background:#151a17;box-shadow:0 0 0 1px #000,2px 2px 0 1px rgba(0,0,0,.45);display:flex;align-items:center;gap:10px;padding:0 10px;transition:box-shadow .3s,opacity .3s}
.pplate.turn{box-shadow:0 0 0 1px #e0b04a,2px 2px 0 1px rgba(0,0,0,.45),0 0 18px 2px rgba(224,176,74,.35)}
/* Team colors, fixed by seat: Team A red, Team B blue */
:root{--red:#e0483c;--blue:#4b8ef0}
.pplate.team-a{box-shadow:0 0 0 2px var(--red),2px 2px 0 2px rgba(0,0,0,.45)}
.pplate.team-b{box-shadow:0 0 0 2px var(--blue),2px 2px 0 2px rgba(0,0,0,.45)}
.pplate.team-a.turn{box-shadow:0 0 0 2px var(--red),0 0 0 4px #e0b04a,0 0 18px 4px rgba(224,176,74,.4)}
.pplate.team-b.turn{box-shadow:0 0 0 2px var(--blue),0 0 0 4px #e0b04a,0 0 18px 4px rgba(224,176,74,.4)}
.srow.team-a .snm b,.srow.team-a .tnames{color:var(--red)}
.srow.team-b .snm b,.srow.team-b .tnames{color:var(--blue)}
.pegs.team-a i.on{background:var(--red);box-shadow:none}
.pegs.team-b i.on{background:var(--blue);box-shadow:none}
.pplate.offline{opacity:.55}
.pplate .av{width:36px;height:36px;flex:none;font-family:'Jersey 10',monospace;font-size:24px;display:flex;align-items:center;justify-content:center}
.pplate .nm{font-size:26px;line-height:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pplate .sub{font-size:20px;line-height:18px;color:#b9c7bf;white-space:nowrap;transition:color .2s}
.pplate .sub.gold{color:#f0c050}
.chip{width:28px;height:28px;background:#f6f0df;color:#1b1b1b;font-family:'Jersey 10',monospace;font-size:24px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1px #000;transition:left .5s var(--ease),top .5s var(--ease)}
.bubble{background:#f6f0df;color:#1b1b1b;font-family:'Jersey 10',monospace;font-size:18px;padding:8px 10px;box-shadow:0 0 0 1px #000,2px 2px 0 0 rgba(0,0,0,.45);white-space:nowrap}
.bubble.dim{background:#9aa39d}
.bubble.gold{background:#e0b04a}
.bubble.red{background:#e0503a;color:#fff}

.box{width:300px;background:#151a17;box-shadow:0 0 0 1px #000,2px 2px 0 1px rgba(0,0,0,.45);padding:10px 12px}
.srow{display:flex;justify-content:space-between;align-items:center;gap:8px}
.snm{font-size:23px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b9c7bf}
.snm b{font-family:'Jersey 10',monospace;font-size:16px;color:#f3efe6;margin-right:4px;font-weight:normal}
.sval{font-family:'Jersey 10',monospace;font-size:24px;transition:color .3s}
.neg{color:#f08a7a}.pos{color:#7bd389}
.pegs{display:flex;justify-content:space-between;margin:7px 0 11px}
.pegs:last-child{margin-bottom:0}
.pegs span{display:flex;gap:2px}
.pegs i{width:6px;height:6px;background:#2a170c;box-shadow:inset 0 0 0 1px #5c3a22;transition:background .4s ease,box-shadow .4s}
.pegs i.on{background:#b58ae0;box-shadow:none}
.pegs i.on.us{background:#7bd389}
.irow{display:flex;justify-content:space-between;gap:10px;font-size:23px;line-height:28px}
.irow span{font-family:'Jersey 10',monospace;font-size:15px;color:#7d8f85;align-self:center}
.irow b{font-weight:normal;display:flex;align-items:center;gap:6px;white-space:nowrap}
.ico{display:inline-block;vertical-align:-3px}

.center-msg{left:0;width:100%;text-align:center;font-family:'Jersey 10',monospace;font-size:21px;letter-spacing:2px;color:#f3efe6;text-shadow:1px 1px 0 #000;pointer-events:none}
.center-msg.lead-msg{font-size:44px;line-height:1;letter-spacing:3px;color:#f0c050;text-shadow:2px 2px 0 #000}
.deck-count{width:120px;text-align:center;font-size:23px;color:#0b2f20}
.watchbar{left:0;width:100%;bottom:20px;top:auto;text-align:center;font-family:'Jersey 10',monospace;font-size:18px;color:#e0b04a}

.action{background:#151a17;box-shadow:0 0 0 1px #000,2px 2px 0 1px rgba(0,0,0,.45);padding:16px;text-align:center;z-index:300}

.atitle{font-family:'Jersey 10',monospace;font-size:21px;margin-bottom:14px;display:flex;align-items:center;justify-content:center;gap:8px}
.abtns{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
/* big, well-spaced action buttons so nobody taps the wrong one */
.abtns .btn{height:64px;min-width:120px;font-size:28px;padding:0 20px}
.action.bids .abtns{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.action.bids.tall .abtns{grid-template-columns:repeat(5,1fr);gap:12px}
.action.bids .abtns .btn{min-width:0;width:100%;padding:0 8px}
.abtns .btn.suit{width:100px;min-width:0;height:84px;padding:0;background:#f6f0df;display:flex;align-items:center;justify-content:center}
.action.trump .abtns{flex-wrap:nowrap;gap:14px}
.btn.suit svg{width:46px;height:46px}
/* discard: make trump and what to do impossible to miss */
.trumpline{display:flex;align-items:center;justify-content:center;gap:16px;font-family:'Jersey 10',monospace;font-size:46px;line-height:1;color:#f0c050;letter-spacing:2px;text-shadow:2px 2px 0 #000}
.trumpline .tsuit{width:64px;height:64px;background:#f6f0df;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 2px #000,3px 3px 0 1px rgba(0,0,0,.5)}
.keephint{margin:14px 0 16px;font-family:'Jersey 10',monospace;font-size:32px;line-height:1;letter-spacing:1px;color:#f3efe6;text-shadow:1px 1px 0 #000}
.keephint b{font-weight:normal;color:#f0c050}
.anote{margin-top:12px;color:#f0c050;font-size:21px}

.log{left:24px;bottom:18px;top:auto;width:440px;font-size:20px;line-height:21px;color:#7d8f85;pointer-events:none}
.log div:last-child{color:#d6ded9}

.result{background:#151a17;box-shadow:0 0 0 1px #e0b04a,3px 3px 0 1px rgba(0,0,0,.55);padding:22px 26px;text-align:center;z-index:400}
.rtitle{font-family:'Jersey 10',monospace;font-size:33px;color:#e0b04a;margin-bottom:12px;text-shadow:1px 1px 0 #000}
.rsub{color:#b9c7bf;margin:8px 0;font-size:23px;display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap}
.rrow{display:grid;grid-template-columns:80px 1fr 60px;align-items:center;font-size:24px;padding:6px 0;border-top:1px solid #26302a}
.rrow b{font-family:'Jersey 10',monospace;font-size:20px;font-weight:normal}
.result .btn{margin-top:12px;width:100%}
.conn{right:24px;bottom:20px;top:auto;font-size:23px;color:#f08a7a}

.badge{height:26px;display:flex;align-items:center;gap:6px;padding:0 8px;background:#e0b04a;color:#1a1206;box-shadow:0 0 0 1px #000,2px 2px 0 0 rgba(0,0,0,.45);font-family:'Jersey 10',monospace;font-size:19px;white-space:nowrap;pointer-events:none}
.badge b{}
.badge span{}
.badge .ico{background:#151a17;padding:2px;box-sizing:content-box}
.badge .calling{opacity:.7}
/* big bid / dealer labels over each player's cards during the deal and bidding */
.bigtag{min-width:150px;background:#151a17;text-align:center;font-family:'Jersey 10',monospace;pointer-events:none;z-index:50;overflow:hidden}
.bigtag.team-a{box-shadow:0 0 0 3px var(--red),4px 4px 0 2px rgba(0,0,0,.5)}
.bigtag.team-b{box-shadow:0 0 0 3px var(--blue),4px 4px 0 2px rgba(0,0,0,.5)}
.bigtag .dl{background:#e0b04a;color:#1a1206;font-size:24px;line-height:30px;letter-spacing:3px}
.bigtag .bt{font-size:48px;line-height:52px;padding:4px 16px;color:#f3efe6;white-space:nowrap}
.bigtag.high .bt{color:#f0c050}
.bigtag.pass .bt{color:#7d8f85}
.bigtag.thinking .bt{font-size:30px;line-height:40px;color:#b9c7bf}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,8px);background:#e0b04a;color:#1a1206;font-family:'Jersey 10',monospace;font-size:18px;padding:12px 16px;box-shadow:0 0 0 1px #000;opacity:0;pointer-events:none;transition:opacity .2s,transform .25s var(--ease);z-index:1000}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* the table: no text selection or long-press menus while tapping cards */
.game{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}

/* small phones (menus, lobby) */
@media (max-width:520px){
  .screen{padding:10px}
  .panel{padding:18px}
  .title.big{font-size:84px;line-height:72px}
  .clause{padding:10px 12px;grid-template-columns:44px 1fr}
  .clause .no{width:44px;height:44px}
  .page-head{gap:12px;margin-bottom:16px}
  .count{padding:10px;gap:10px}
  .count b{font-size:30px}
  .trow{grid-template-columns:1fr auto;grid-template-areas:"name btn" "dots status";row-gap:6px;gap:10px}
  .trow>div:first-child{grid-area:name}
  .trow .dots{grid-area:dots}
  .trow .status{grid-area:status;justify-self:end}
  .trow .btn{grid-area:btn}
  .code-row{flex-wrap:wrap}
  .code-row label{width:100%}
  .seat .nm{font-size:24px;line-height:22px}
  .lobby-top{flex-wrap:wrap;gap:10px}
}

@media (max-height:420px){ .mini-preview{display:none} }

/* seats as a list (small or short screens) */
.seat-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0}
.seat-list.cols-4{grid-template-columns:repeat(4,1fr);gap:10px}
.seat-list.cols-3{grid-template-columns:repeat(3,1fr);gap:10px}
.seat-list .seat{position:static;transform:none;width:auto;min-height:84px}

/* short screens (phones held sideways): compact menus and lobby so they fit */
@media (max-height:520px){
  .screen{padding:8px}
  .panel{padding:14px 18px}
  .title.big{font-size:64px;line-height:56px}
  .kicker{margin-bottom:12px}
  .hello{margin:2px 0 10px}
  .clauses{gap:8px}
  .clause{padding:8px 12px}
  .clause .no{width:40px;height:40px}
  .field{margin-bottom:10px}
  .page-head{margin-bottom:10px}
  .mini-preview{height:110px;margin-bottom:8px}
  .count-pick{margin:6px 0 8px}
  .hint{margin:6px 0 2px}
  .seat-ring{height:250px}
  .seat-ring .felt{width:220px;height:100px}
  .seat{min-height:56px;padding:3px 6px;gap:1px}
  .seat-list .seat{min-height:72px}
  .lobby-panel{max-width:760px}
  .lobby-bottom{margin-top:8px}
  .lobby-bottom .btn{height:44px}
  .table-list{min-height:120px}
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
