/* Blackjack table — mobile first */
.game.bj.live .g-art { background: radial-gradient(circle at 50% 45%, #a8344b, #5a1220 70%, #2a0710); }
.game.bj.live .g-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%); transform: translateX(-100%); animation: shine 3.2s ease-in-out infinite; }
.game.bj.live:hover { transform: translateY(-3px); }

/* lobby */
.bj-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bj-room { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 12px; text-align: left; cursor: pointer; color: var(--text); box-shadow: var(--shadow); transition: transform .2s var(--ease); animation: fadeUp .35s var(--ease) both; }
.bj-room:active { transform: scale(.97); }
.bj-room.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-style: dashed; color: var(--muted); min-height: 150px; }
.bj-room .plus { font-size: 30px; }
.bjr-top { display: flex; align-items: center; gap: 4px; }
.bjr-name { font-weight: 800; flex: 1; }
.bjr-x { font-size: 13px; color: var(--muted); padding: 2px 5px; border-radius: 6px; }
.bjr-x:hover { background: var(--surface-2); color: var(--err); }
.bjr-felt { margin: 10px 0 8px; height: 64px; border-radius: 0 0 60px 60px; background: radial-gradient(ellipse at 50% 0%, #9c2a3f, #4a0f1a); box-shadow: inset 0 -3px 0 rgba(243,196,107,.35); position: relative; }
.bjr-seats { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; }
.bjr-seats i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }
.bjr-seats i.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px var(--gold); }
.bjr-info { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.bjr-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* room layout */
.bj { position: relative; display: flex; flex-direction: column; height: 100%; animation: fadeIn .3s; }
.bj .roombar { gap: 0; }
.bj .roombar .icon-btn { padding: 6px; font-size: 16px; }
.mic-off { opacity: .35; filter: grayscale(1); }
.bj-table { position: relative; flex: 1; min-height: 300px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #a3304a 0%, #7b1e2e 42%, #4a0f1a 78%, #2a0710 100%); color: #fff; box-shadow: inset 0 0 0 3px rgba(243,196,107,.28), inset 0 0 60px rgba(0,0,0,.45); }
.bj-table .felt-arc { position: absolute; left: 4%; right: 4%; top: 26%; height: 70%; border: 2px solid rgba(243,196,107,.25); border-radius: 0 0 50% 50% / 0 0 60% 60%; border-top: 0; pointer-events: none; }
.dealer { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); text-align: center; min-width: 160px; }
.dl-who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: rgba(0,0,0,.25); padding: 3px 10px 3px 4px; border-radius: 999px; margin-bottom: 6px; }
.dl-who .av.sm { width: 22px; height: 22px; font-size: 10px; }
.sysdealer { font-size: 16px; }
.dl-cards { display: flex; justify-content: center; min-height: 58px; }
.dl-cards .pcard + .pcard { margin-left: -14px; }
.dl-tot { display: inline-block; margin-top: 4px; background: rgba(0,0,0,.45); border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: 13px; }
.dl-tot.bust { background: #b42333; }
.shoe { position: absolute; top: 12px; right: 12px; text-align: center; }
.shoe-box { width: 30px; height: 44px; border-radius: 6px; background: rgba(0,0,0,.35); border: 2px solid rgba(255,255,255,.3); position: relative; overflow: hidden; transform: skewX(-8deg); }
.shoe-fill { position: absolute; bottom: 0; left: 0; right: 0; background: repeating-linear-gradient(0deg, #9c2a3f 0 3px, #7b1e2e 3px 5px); transition: height .4s; }
.shoe-txt { font-size: 10px; opacity: .8; margin-top: 2px; }
.bj-hist { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 3px; margin-top: 44px; }
.bj-hist span { font-size: 10px; font-weight: 700; background: rgba(0,0,0,.3); border-radius: 5px; padding: 1px 5px; text-align: center; min-width: 26px; }
.bj-hist span.x { background: rgba(180,35,51,.7); }
.bj-hist span.bj { background: var(--gold); color: #3b2200; }
.bj-hist span.latest { outline: 1.5px solid #fff; }
.bj-center { position: absolute; top: 36%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.bj-timer { font-size: 26px; font-weight: 800; height: 32px; text-shadow: 0 2px 8px rgba(0,0,0,.4); font-variant-numeric: tabular-nums; }
.bj-timer.urgent { color: #ffb3bf; animation: tick 1s infinite; }
.bj-phase { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; opacity: .9; }
.bj-rule { font-size: 10px; opacity: .6; margin-top: 2px; white-space: nowrap; }

/* cards */
.pcard { position: relative; width: 40px; height: 56px; border-radius: 6px; background: linear-gradient(170deg, #fffdf8, #f6eee3); border: 1px solid rgba(123,30,46,.25); color: #151214; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: inline-flex; flex-direction: column; align-items: flex-start; padding: 3px 4px; line-height: 1; flex: none; transform-style: preserve-3d; }
.pcard b { font-size: 14px; font-weight: 800; }
.pcard i { font-style: normal; font-size: 12px; }
.pcard u { position: absolute; right: 4px; bottom: 3px; font-size: 18px; text-decoration: none; opacity: .9; }
.pcard.red { color: #9c1f35; }
.pcard.back { background: radial-gradient(circle at 50% 50%, rgba(243,196,107,.55) 0 12%, transparent 13%), repeating-linear-gradient(45deg, transparent 0 4px, rgba(243,196,107,.22) 4px 5px), repeating-linear-gradient(-45deg, transparent 0 4px, rgba(243,196,107,.22) 4px 5px), linear-gradient(160deg, #9c2a3f, #5a1220); border: 2px solid #fbf7f0; outline: 1px solid rgba(243,196,107,.6); outline-offset: -5px; padding: 0; }
.pcard.back i { display: none; }
.pcard.mini { width: 22px; height: 31px; border-radius: 4px; padding: 2px; }
.pcard.mini b { font-size: 9.5px; } .pcard.mini i { font-size: 8px; } .pcard.mini u { display: none; }
.pcard.mini.back { border-width: 1.5px; }
.pcard.mid { width: 40px; height: 56px; }
.pcard.big { width: 46px; height: 64px; }
.pcard.big b { font-size: 16px; } .pcard.big u { font-size: 22px; }
.pcard.huge { width: 170px; height: 238px; border-radius: 14px; padding: 12px; }
.pcard.huge b { font-size: 46px; } .pcard.huge i { font-size: 36px; } .pcard.huge u { font-size: 90px; right: 18px; bottom: 14px; }
.pcard.huge.back { border-width: 6px; }

/* seats */
.seat { position: absolute; transform: translate(-50%, -50%); width: 58px; display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 2; }
.seat .hands { position: absolute; bottom: 100%; margin-bottom: 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mh { display: flex; align-items: center; position: relative; padding: 1px 2px; border-radius: 5px; }
.mh .pcard + .pcard { margin-left: -9px; }
.mh.act { background: rgba(243,196,107,.35); box-shadow: 0 0 0 1.5px var(--gold); }
.mh .tot { margin-left: 2px; font-size: 10px; font-weight: 800; background: rgba(0,0,0,.55); border-radius: 6px; padding: 0 4px; }
.mh .tot.bust { background: #b42333; } .mh .tot.bj { background: var(--gold); color: #3b2200; }
.mh .hres { position: absolute; top: -9px; right: -8px; font-size: 9px; font-weight: 800; border-radius: 5px; padding: 0 3px; background: #333; animation: pop .3s var(--ease); }
.hres.r-win, .hres.r-bj { background: var(--gold); color: #3b2200; } .hres.r-lose, .hres.r-bust { background: #b42333; color: #fff; } .hres.r-push { background: #6b7280; color: #fff; } .hres.r-surrender { background: #6b7280; color: #fff; }
.sav { position: relative; }
.seat .av.sm { width: 34px; height: 34px; border: 2px solid rgba(255,255,255,.7); }
.seat.me .av.sm { border-color: var(--gold); }
.seat.turn .sav::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p, 1) * 360deg), rgba(255,255,255,.12) 0); z-index: -1; animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 6px var(--gold)); } }
.seat.leaving { opacity: .55; }
.seat .sn { font-size: 10px; max-width: 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.6); margin-top: 1px; }
.schip { font-size: 10px; font-weight: 800; background: var(--gold); color: #3b2200; border-radius: 999px; padding: 0 6px; margin-top: 1px; animation: pop .25s var(--ease); white-space: nowrap; }
.schip em { font-style: normal; margin-left: 3px; color: #7b1e2e; }
.snet { position: absolute; top: -2px; left: 50%; transform: translate(-50%, -100%); font-weight: 900; font-size: 13px; padding: 1px 6px; border-radius: 6px; animation: rise 2.4s var(--ease) forwards; z-index: 3; white-space: nowrap; }
.snet.w { background: var(--gold); color: #3b2200; } .snet.l { background: rgba(0,0,0,.6); color: #ffb3bf; } .snet.p { background: rgba(0,0,0,.5); }
@keyframes rise { 0% { opacity: 0; transform: translate(-50%, -60%); } 15% { opacity: 1; transform: translate(-50%, -120%); } 80% { opacity: 1; } 100% { opacity: .9; transform: translate(-50%, -150%); } }
.vbadge { position: absolute; right: -6px; bottom: -4px; font-size: 11px; }
.sit-btn { width: 34px; height: 34px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.55); background: rgba(0,0,0,.15); color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s, background .15s; }
.sit-btn:hover { background: rgba(243,196,107,.3); transform: scale(1.08); }
.sit-btn.dim { opacity: .35; cursor: default; }
.seat.empty .sn { opacity: .6; }
.bot-add, .bot-del { position: absolute; border: 0; background: rgba(0,0,0,.5); color: #fff; border-radius: 999px; font-size: 10px; cursor: pointer; padding: 1px 4px; }
.bot-add { top: -10px; right: -2px; }
.bot-del { top: -6px; right: -10px; }

.emoji-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.emo-fly { position: absolute; font-size: 38px; transform: translate(-50%, -50%); animation: emo 2.1s var(--ease) forwards; filter: drop-shadow(0 4px 8px rgba(0,0,0,.4)); }
@keyframes emo { 0% { transform: translate(-50%, -30%) scale(.2); opacity: 0; } 20% { transform: translate(-50%, -110%) scale(1.3); opacity: 1; } 40% { transform: translate(-50%, -120%) scale(1) rotate(-8deg); } 60% { transform: translate(-50%, -125%) rotate(8deg); } 100% { transform: translate(-50%, -190%) scale(.9); opacity: 0; } }
.emo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.emo-grid button { font-size: 30px; border: 0; background: var(--surface-2); border-radius: 12px; padding: 10px 0; cursor: pointer; transition: transform .12s; }
.emo-grid button:active { transform: scale(.85); }

/* my hands */
.bj-me { flex: none; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 12px; min-height: 44px; }
.bjme-info { font-size: 13px; color: var(--muted); text-align: center; padding: 4px 0; }
.bjme-hands { display: flex; gap: 10px; overflow-x: auto; justify-content: center; }
.bjh { flex: none; padding: 6px 8px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); transition: border-color .2s, box-shadow .2s; }
.bjh.act { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243,196,107,.25); }
.bjh-cards { display: flex; }
.bjh-cards .pcard + .pcard { margin-left: -16px; }
.bjh-info { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; margin-top: 4px; }
.bjh-info b.bust { color: var(--err); }
.bjh-info .hres { position: static; font-size: 11px; padding: 1px 6px; border-radius: 6px; font-weight: 800; }

/* controls */
.bj-ctl { flex: none; background: var(--surface); padding: 8px 12px calc(8px); border-top: 1px solid var(--line); }
.ctl-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.ctl-row:first-child { margin-top: 0; }
.ctl-acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.btn.act { padding: 12px 4px; font-size: 14px; border-radius: 12px; }
.btn.act:disabled { opacity: .3; }
.btn.gold { background: var(--gold); color: #3b2200; }
.ctl-q { text-align: center; }
.ctl-q .btn small { display: block; font-size: 10.5px; font-weight: 500; opacity: .8; }
.ctl-q .btn { flex-direction: column; }
.betbox .bet-spots { display: flex; gap: 8px; }
.spot { flex: 1; border: 2px dashed var(--line); background: var(--surface-2); border-radius: 12px; padding: 6px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--text); transition: all .2s; }
.spot span { font-size: 12px; color: var(--muted); }
.spot b { font-size: 18px; font-variant-numeric: tabular-nums; }
.spot.sel { border-style: solid; border-color: var(--gold); background: rgba(243,196,107,.12); }
.spot.tie { flex: .8; }
.chip-tray { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0 2px; }
.chipb { width: 44px; height: 44px; border-radius: 50%; border: 4px dashed rgba(255,255,255,.85); color: #fff; font-weight: 900; font-size: 13px; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .12s; }
.chipb:active { transform: scale(.88); }
.chipb.c1 { background: #6b7280; } .chipb.c5 { background: #c0283c; } .chipb.c10 { background: #1d4ed8; } .chipb.c25 { background: #15803d; } .chipb.c100 { background: #111; } .chipb.c500 { background: #7c3aed; }

/* chat (top-left) */
.bj-chat { position: absolute; top: 58px; left: 8px; z-index: 20; max-width: 60%; }
.bjc-pill { display: flex; align-items: center; gap: 6px; border: 0; background: rgba(0,0,0,.45); color: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; max-width: 100%; backdrop-filter: blur(4px); }
.bjc-pill #bjcUnread { background: var(--err); border-radius: 999px; padding: 0 5px; font-size: 10px; font-weight: 800; }
.bjc-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; opacity: .85; }
.bjc-panel { display: none; width: min(320px, 86vw); height: min(330px, 46vh); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.35); flex-direction: column; overflow: hidden; animation: zin .2s var(--ease); }
.bj-chat.open .bjc-pill { display: none; }
.bj-chat.open .bjc-panel { display: flex; }
.bj-chat.open { max-width: none; }
.bjc-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--line); }
.bjc-list { flex: 1; overflow-y: auto; padding: 8px 10px; font-size: 13px; }
.bjc-m { margin-bottom: 5px; word-break: break-word; animation: fadeUp .2s; }
.bjc-m .n { font-weight: 700; color: var(--pos); margin-right: 6px; cursor: pointer; }
.bjc-m.me .n { color: var(--ok); }
.bjc-m.sys { color: var(--muted); font-size: 12px; font-style: italic; }
.bjc-in { display: flex; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.bjc-in .input { padding: 8px 10px; }

/* overlays */
.bj-ov { position: absolute; inset: 0; z-index: 40; background: rgba(30,6,12,.86); backdrop-filter: blur(3px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #fff; text-align: center; padding: 20px; animation: fadeIn .25s; }
.ov-t { font-size: 20px; font-weight: 800; }
.ov-s { font-size: 13px; opacity: .8; min-height: 18px; }
.shuf { position: relative; width: 180px; height: 120px; }
.shuf .half { position: absolute; top: 20px; width: 70px; height: 96px; }
.shuf .half.l { left: 10px; } .shuf .half.r { right: 10px; }
.shuf i { position: absolute; inset: 0; border-radius: 8px; background: repeating-linear-gradient(45deg, #7b1e2e 0 5px, #9c2a3f 5px 10px); border: 2px solid #fbf7f0; animation: riffleL 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms); }
.shuf .half.r i { animation-name: riffleR; }
@keyframes riffleL { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(35px, -30px) rotate(12deg); } }
@keyframes riffleR { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-35px, -30px) rotate(-12deg); } }
.cutbar { position: relative; width: min(340px, 86vw); height: 70px; margin: 14px 0; touch-action: none; cursor: ew-resize; }
.cutbar .deck { position: absolute; inset: 14px 0; border-radius: 8px; background: repeating-linear-gradient(90deg, #fbf7f0 0 2px, #d8cfc2 2px 4px); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.cutbar .zone { position: absolute; top: 6px; bottom: 6px; left: 65%; width: 15%; border: 2px dashed var(--gold); border-radius: 8px; background: rgba(243,196,107,.15); }
.cutcard { position: absolute; top: 0; bottom: 0; width: 8px; margin-left: -4px; background: #e02442; border-radius: 3px; box-shadow: 0 0 12px #e02442; transition: left .12s; }
.peel-wrap { touch-action: none; user-select: none; -webkit-user-select: none; padding: 10px; cursor: grab; }
.peel-card { position: relative; width: 170px; height: 238px; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.6); transform: scale(1.15); animation: zin .4s var(--ease); }
.peel-card > .pcard { position: absolute; inset: 0; }
.peel-cover { position: absolute; inset: 0; transition: transform .12s linear; }
.peel-cover .pc-back { position: absolute; inset: 0; border-radius: 14px; background: radial-gradient(circle at 50% 50%, rgba(243,196,107,.55) 0 9%, transparent 10%), repeating-linear-gradient(45deg, transparent 0 9px, rgba(243,196,107,.22) 9px 11px), repeating-linear-gradient(-45deg, transparent 0 9px, rgba(243,196,107,.22) 9px 11px), linear-gradient(160deg, #9c2a3f, #5a1220); border: 6px solid #fbf7f0; outline: 2px solid rgba(243,196,107,.6); outline-offset: -14px; }
.peel-cover .pc-curl { position: absolute; left: 0; right: 0; bottom: -18px; height: 22px; background: linear-gradient(#fbf7f0, #cfc6b8); border-radius: 0 0 50% 50%; opacity: calc(var(--p, 0) * 3); box-shadow: 0 6px 12px rgba(0,0,0,.4); }
.drama-card { perspective: 900px; transform: scale(1.15); }
.flip3d { position: relative; width: 170px; height: 238px; transform-style: preserve-3d; animation: slowflip 2.6s cubic-bezier(.7,0,.3,1) forwards; }
.flip3d .f { position: absolute; inset: 0; backface-visibility: hidden; }
.flip3d .front { transform: rotateY(180deg); }
@keyframes slowflip { 0% { transform: rotateY(0); } 70% { transform: rotateY(150deg); } 100% { transform: rotateY(180deg); } }
.ov-drama .ov-t { animation: pulseT 0.5s ease-in-out infinite alternate; color: var(--gold); }
@keyframes pulseT { to { transform: scale(1.08); } }
.bj-banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 45; font-size: 26px; font-weight: 900; padding: 10px 22px; border-radius: 16px; background: rgba(0,0,0,.75); color: #fff; animation: bannerIn 2s var(--ease) forwards; white-space: nowrap; pointer-events: none; }
.bj-banner.good { background: linear-gradient(135deg, #f3c46b, #c99227); color: #3b2200; }
.bj-banner.bad { background: rgba(180,35,51,.9); }
@keyframes bannerIn { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.bj-enter .enter-bg { background: radial-gradient(circle at 50% 45%, #9c2a3f, #4a0f1a 70%, #1a040a); }
.bj-enter-cards { position: relative; width: 140px; height: 120px; }
.bj-enter-cards .pcard { position: absolute; top: 0; width: 72px; height: 100px; border-radius: 10px; padding: 8px; }
.bj-enter-cards .pcard b { font-size: 26px; } .bj-enter-cards .pcard u { font-size: 40px; }
.bj-enter-cards .e1 { left: 10px; animation: e1 .8s var(--ease) both; }
.bj-enter-cards .e2 { left: 56px; animation: e2 .8s .1s var(--ease) both; }
@keyframes e1 { from { transform: translateY(80px) rotate(0); opacity: 0; } to { transform: rotate(-12deg); opacity: 1; } }
@keyframes e2 { from { transform: translateY(80px) rotate(0); opacity: 0; } to { transform: rotate(10deg); opacity: 1; } }

/* CCD packet prompt on other pages */
.pkt-prompt { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; pointer-events: none; background: rgba(0,0,0,.25); animation: fadeIn .25s; }
.pkt-prompt .packet { pointer-events: auto; animation: zin .35s var(--ease); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.pkt-prompt.out { opacity: 0; transition: opacity .25s; }
.pkt-prompt .packet { width: 300px; }
.grab-btn.ghostb { background: rgba(255,255,255,.2); color: #fff; animation: none; margin-right: 6px; }

@media (max-width: 370px) { .seat { width: 50px; } .chipb { width: 40px; height: 40px; } .ctl-acts .btn { font-size: 12.5px; } }

/* layout fixes */
.dealer { top: 40px; }
.bj-hist { margin-top: 70px; }
.bj-center { top: 40%; }
#bjSub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bj .roombar .grow { min-width: 0; }
.snet { top: auto; bottom: -4px; transform: translate(-50%, 100%); animation: riseB 2.4s var(--ease) forwards; }
@keyframes riseB { 0% { opacity: 0; transform: translate(-50%, 60%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 100%) scale(1.15); } 25% { transform: translate(-50%, 100%) scale(1); } 100% { opacity: 1; transform: translate(-50%, 100%); } }
body.in-bj .toasts { top: calc(var(--head-h) + var(--safe-t, 0px) + 64px); bottom: auto; flex-direction: column; }

/* burgundy theme extras */
.pcard.mini.back { outline-offset: -3px; }
.pcard.huge.back { outline-width: 2px; outline-offset: -14px; }
.bj-table .felt-arc { border-color: rgba(243,196,107,.35); }
.bj-ov, .bj-ov * { -webkit-user-select: none; user-select: none; }
.seat.edge-l .hands { left: -6px; align-items: flex-start; }
.seat.edge-r .hands { right: -6px; align-items: flex-end; }
.seat.edge-r .mh .hres { right: auto; left: -6px; }
.snet { font-size: 11px; padding: 0 5px; border-radius: 5px; z-index: 4; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
#bjSpk.on, #bjMic.on { color: var(--brand); background: var(--surface-2); }
/* confirm-bet pulse */
.btn.pulse { animation: betPulse 1.1s ease-in-out infinite; }
@keyframes betPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(243,196,107,.0); } 50% { box-shadow: 0 0 0 5px rgba(243,196,107,.55); } }
.ctl-row.small { margin-top: 4px; }
.bj-chat.muted .bjc-in input { opacity: .5; pointer-events: none; }
/* cut card pop */
.shoe-cut { margin-top: 2px; font-size: 8px; font-weight: 900; color: #fff; background: #e02442; border-radius: 3px; padding: 0 3px; animation: pop .3s var(--ease); }
.cutpop { position: absolute; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; padding-bottom: 12%; }
.cutpop.out { opacity: 0; transition: opacity .35s; }
.cp-card { width: 92px; height: 130px; border-radius: 10px; background: linear-gradient(160deg, #ff4b63, #c3132e); border: 4px solid #fff7ea; box-shadow: 0 0 40px rgba(224,36,66,.8), 0 16px 30px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.cp-card span { color: #fff; font-weight: 900; letter-spacing: 3px; font-size: 20px; transform: rotate(-90deg); text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.cp-t { margin-top: 18px; font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.7); animation: fadeUp .5s .7s both; }
.cp-s { margin-top: 4px; font-size: 13px; color: var(--gold); text-shadow: 0 1px 6px rgba(0,0,0,.7); animation: fadeUp .5s .9s both; }
/* fold-able peel */
.peel-card { overflow: visible !important; border-radius: 14px; }
.peel-card > .pcard { position: absolute; inset: 0; }
.peel-back { position: absolute; inset: 0; border-radius: 14px; background: radial-gradient(circle at 50% 50%, rgba(243,196,107,.55) 0 9%, transparent 10%), repeating-linear-gradient(45deg, transparent 0 9px, rgba(243,196,107,.22) 9px 11px), repeating-linear-gradient(-45deg, transparent 0 9px, rgba(243,196,107,.22) 9px 11px), linear-gradient(160deg, #9c2a3f, #5a1220); border: 6px solid #fbf7f0; box-shadow: inset 0 0 0 2px rgba(243,196,107,.55); }
.peel-flapw { position: absolute; left: -100%; top: -100%; width: 300%; height: 300%; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.peel-flap { position: absolute; inset: 0; clip-path: polygon(0 0, 0 0, 0 0); }
.peel-wrap { padding: 40px; margin: -30px; }
/* ---------- 3D table ---------- */
.bj-tablewrap { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 300px; }
.mode3d { position: absolute; left: 10px; bottom: 8px; z-index: 6; display: flex; padding: 2px; border-radius: 999px; border: 1px solid rgba(243,196,107,.45); background: rgba(16,5,8,.72); cursor: pointer; }
.mode3d b { font-size: 11px; font-weight: 900; color: rgba(255,255,255,.6); padding: 3px 8px; border-radius: 999px; transition: background .2s, color .2s; }
.mode3d b.on { background: var(--gold); color: #3b2200; }
.bj-table.is3d { background: #100508; }
.bj-table.is3d .felt-arc { display: none; }
.bj3d-host { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.bj3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.bj3d-labels { position: absolute; inset: 0; pointer-events: none; }
.l3 { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 11px; color: #fff; will-change: transform; }
.l3 button, .l3 [data-profile] { pointer-events: auto; }
.l3.ntag { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.l3.ntag .nm { background: rgba(20,6,10,.78); border: 1px solid rgba(243,196,107,.45); border-radius: 999px; padding: 2px 8px; font-weight: 700; cursor: pointer; }
.l3.ntag.me .nm { border-color: var(--gold); color: var(--gold); }
.l3.ntag.turn .nm { background: var(--gold); color: #3b2200; box-shadow: 0 0 14px rgba(243,196,107,.8); }
.l3.ntag.dealer .nm { background: rgba(123,30,46,.92); border-color: var(--gold); }
.l3.ntag .pool { font-size: 10px; color: var(--gold); text-shadow: 0 1px 3px #000; }
.l3.ntag i { font-style: normal; font-size: 10px; opacity: .8; }
.l3.ntag .net { font-size: 12px; font-weight: 900; padding: 0 6px; border-radius: 5px; animation: pop .3s var(--ease); }
.l3.ntag .net.w { background: var(--gold); color: #3b2200; } .l3.ntag .net.l { background: rgba(0,0,0,.7); color: #ffb3bf; } .l3.ntag .net.p { background: rgba(0,0,0,.6); }
.l3 .bd3 { border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 10px; cursor: pointer; }
.l3.bet { font-weight: 800; font-size: 10px; background: var(--gold); color: #3b2200; border-radius: 999px; padding: 0 6px; }
.l3.bet em { font-style: normal; color: #7b1e2e; }
.l3.tot span { font-size: 11px; font-weight: 800; background: rgba(0,0,0,.65); border-radius: 6px; padding: 1px 6px; }
.l3.tot span.act { background: var(--gold); color: #3b2200; }
.l3.tot span.bust { background: #b42333; } .l3.tot span.bj { background: var(--gold); color: #3b2200; }
.l3.empty { display: flex; gap: 4px; align-items: center; }
.sit3 { pointer-events: auto; border: 1.5px dashed rgba(243,196,107,.8); background: rgba(20,6,10,.55); color: var(--gold); border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.seatno { font-size: 10px; color: rgba(255,255,255,.5); }
.bot3 { border: 0; background: rgba(0,0,0,.5); border-radius: 50%; width: 22px; height: 22px; font-size: 12px; cursor: pointer; }
.bj3d-hud { position: absolute; left: 96px; right: 52px; bottom: 8px; justify-content: center; width: fit-content; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: rgba(16,5,8,.72); border: 1px solid rgba(243,196,107,.3); border-radius: 999px; padding: 3px 12px 3px 6px; color: #fff; font-size: 11px; pointer-events: none; max-width: calc(100% - 148px); }
.bj3d-hud .bj-timer { font-size: 16px; min-width: 18px; text-align: center; margin: 0; }
.bj3d-ph { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.shoe3d { position: absolute; right: 10px; top: 10px; font-size: 11px; color: #fff; background: rgba(16,5,8,.6); border-radius: 8px; padding: 2px 7px; pointer-events: none; }
.shoe3d b { color: #fff; background: #e02442; border-radius: 3px; padding: 0 3px; font-size: 9px; }
.bj3d-reset { position: absolute; right: 10px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(243,196,107,.4); background: rgba(16,5,8,.72); color: var(--gold); font-size: 17px; cursor: pointer; }
.bj-table.is3d .bj-hist { pointer-events: none; }
.bj-table.is3d .bj-hist { display: none; }
.bet-info { display: flex; align-items: center; gap: 8px; justify-content: center; }
.linkbtn { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px 4px; text-decoration: underline; }
/* traditional card faces (SVG art) */
.pcard.art { background: #fffdf8 center / 100% 100% no-repeat; padding: 0; border: 0; }
.pcard.art b, .pcard.art i, .pcard.art u { display: none; }
.pcard.mid.art, .pcard.big.art { width: 46px; height: 64px; }
.bjh-cards .pcard.art { width: 58px; height: 81px; }
.bjh-cards .pcard.art + .pcard.art { margin-left: -22px; }
.dl-cards .pcard.art { width: 50px; height: 70px; }
.dl-cards .pcard.art + .pcard.art { margin-left: -20px; }
.l3.ntag.spec .nm { background: rgba(20,6,10,.55); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.8); font-weight: 600; font-size: 10px; }
/* bet tools + real chip colours */
.bet-tools { display: flex; gap: 6px; margin: 6px 0; }
.bet-tools .btn { flex: 1; padding: 7px 4px; font-size: 12px; white-space: nowrap; }
.bet-tools .btn[disabled] { opacity: .4; }
.spot { position: relative; }
.cstack { position: relative; display: inline-block; width: 20px; height: 26px; margin-left: auto; margin-right: 6px; }
.cc { position: absolute; left: 0; bottom: calc(var(--k) * 2.4px); width: 20px; height: 7px; border-radius: 50%; border: 1px solid rgba(255,255,255,.75); box-shadow: 0 1px 1px rgba(0,0,0,.4); }
.cc.c1 { background: #6b7280; } .cc.c5 { background: #c0283c; } .cc.c10 { background: #1d4ed8; } .cc.c25 { background: #15803d; } .cc.c100 { background: #111; } .cc.c500 { background: #7c3aed; }
.schip .cstack { width: 14px; height: 18px; margin: 0 3px 0 0; vertical-align: middle; } .schip .cc { width: 14px; height: 5px; bottom: calc(var(--k) * 1.7px); }
.shoe3d { display: flex; align-items: center; gap: 5px; }
.shoebar { display: inline-block; width: 34px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.shoebar b { display: block; height: 100%; background: linear-gradient(90deg, #9c2a3f, #f3c46b); }
/* chat feed: bigger, last 5 messages */
.bj-chat { max-width: min(78%, 340px); }
.bjc-pill { align-items: flex-start; border-radius: 14px; padding: 7px 10px; font-size: 12.5px; background: rgba(10,3,6,.55); width: 100%; text-align: left; }
.bjc-feed { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.bjc-feed span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; opacity: .55; }
.bjc-feed span:nth-last-child(1) { opacity: 1; } .bjc-feed span:nth-last-child(2) { opacity: .85; } .bjc-feed span:nth-last-child(3) { opacity: .72; }
.bjc-feed span.sys { color: var(--gold); }
.bjc-feed b { font-weight: 700; color: #ffd8a8; }
.bj-table .bj-hist { left: auto; right: 10px; top: 96px; margin-top: 0; align-items: flex-end; }
/* emojis stay longer; off-screen senders get an edge arrow */
.emo-fly { animation: emo2 4.2s var(--ease) forwards; }
@keyframes emo2 { 0% { transform: translate(-50%, -30%) scale(.2); opacity: 0; } 8% { transform: translate(-50%, -110%) scale(1.3); opacity: 1; } 16% { transform: translate(-50%, -115%) scale(1) rotate(-8deg); } 26% { transform: translate(-50%, -118%) rotate(8deg); } 36% { transform: translate(-50%, -120%) rotate(0); } 85% { transform: translate(-50%, -128%); opacity: 1; } 100% { transform: translate(-50%, -170%) scale(.9); opacity: 0; } }
.emo-fly.edge { display: flex; flex-direction: column; align-items: center; font-size: 30px; animation: emoEdge 4.2s var(--ease) forwards; }
.emo-fly.edge .emo-arrow { position: absolute; left: 50%; top: 50%; margin: -9px 0 0 -9px; width: 18px; height: 18px; font-size: 16px; line-height: 18px; color: var(--gold); transform-origin: 50% 50%; text-shadow: 0 0 6px rgba(0,0,0,.8); }
.emo-fly.edge .emo-arrow { translate: 0 0; }
.emo-fly.edge .emo-e { background: rgba(16,5,8,.7); border: 1.5px solid var(--gold); border-radius: 50%; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.emo-fly.edge .emo-n { font-size: 10px; color: #fff; background: rgba(16,5,8,.75); border-radius: 999px; padding: 0 6px; margin-top: 2px; }
@keyframes emoEdge { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 10% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 20%, 85% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(.8); opacity: 0; } }
/* chat panel: a divider line between messages */
.bjc-list .bjc-m { padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.12); line-height: 1.45; }
.bjc-list .bjc-m:last-child { border-bottom: 0; }
.bjc-feed span + span { border-top: 1px solid rgba(255,255,255,.14); padding-top: 2px; }
/* 3D labels stay under the chat / overlays */
.bj3d-host { z-index: 0; isolation: isolate; }
.bj-chat { z-index: 30; }
/* meme sounds */
.meme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.meme-grid button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 10px 4px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text); transition: transform .12s; }
.meme-grid button:active { transform: scale(.92); }
.meme-grid span { font-size: 26px; line-height: 1; }
.meme-grid small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.meme-btn { font-size: 15px; }
.meme-pop { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); z-index: 46; background: rgba(16,5,8,.85); border: 1.5px solid var(--gold); color: #fff; border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; animation: zin .3s var(--ease); pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.meme-pop .mi { font-size: 22px; animation: wob .5s ease-in-out 3; }
.meme-pop b { color: var(--gold); }
.meme-pop.out { opacity: 0; transition: opacity .3s; }
@keyframes wob { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(14deg) scale(1.15); } }
.emo-cap { display: block; font-size: 10px; font-weight: 700; color: #fff; background: rgba(16,5,8,.8); border-radius: 999px; padding: 0 6px; text-align: center; white-space: nowrap; }
.bj-table:not(.is3d) .dealer { top: 128px; z-index: 3; }
.bj-table:not(.is3d) .bj-center { top: 53%; }
.emoji-layer { z-index: 35; }
/* chat feed fold: one line only */
.bjc-fold { flex: none; align-self: flex-start; width: 22px; height: 20px; margin: -2px -4px 0 2px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.1); pointer-events: auto; cursor: pointer; }
.bjc-fold::before { content: '▴'; }
body.chat-one .bjc-fold::before { content: '▾'; }
body.chat-one .bjc-feed span:not(:last-child) { display: none; }
body.chat-one .bjc-pill { padding-top: 5px; padding-bottom: 5px; }
