.bj { flex: 1; width: min(1180px, 100%); margin: 0 auto; padding: clamp(14px, 3vh, 26px) clamp(12px, 3vw, 28px) 40px; }
.muted { color: var(--muted); }

/* ---- table list ---- */
.bj-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.bj-head h1 { margin: 0; font: 400 clamp(40px, 6.5vw, 84px)/.9 var(--display); color: #fff; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 var(--title-a); }
.create { display: flex; gap: 10px; flex-wrap: wrap; }
.sub { margin: 0 0 10px; font: 400 20px var(--display); color: #fff; text-shadow: 2px 2px 0 var(--title-a); }
.tables { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tables li { background: var(--panel); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.tables li.empty { background: none; color: #fff; text-shadow: 1px 1px 0 var(--title-a); padding: 0; }
.tables .t-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tables b { font-size: 17px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.pill.friend { background: #4dff8f; color: var(--ink); }
.tables .who { font-size: 14px; color: var(--muted); }
.rules-line { margin: 18px 0 0; font-size: 14px; color: #fff; text-shadow: 1px 1px 0 var(--title-a); }

/* ---- table ---- */
.table-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
             background: var(--panel); border-radius: 14px 14px 0 0; padding: 10px 14px; }
.table-btns { display: flex; gap: 8px; }
.felt { background: #17603e; border-radius: 0 0 22px 22px; padding: clamp(14px, 2.5vw, 26px);
        box-shadow: inset 0 0 0 6px #0f4a2f, inset 0 0 0 8px rgba(255, 216, 77, .35); display: grid; gap: 16px; }
.dealer { display: flex; align-items: center; justify-content: center; gap: 16px; }
.dealer-face { width: clamp(64px, 9vw, 104px); height: clamp(64px, 9vw, 104px); object-fit: cover; object-position: 50% 15%;
               border-radius: 50%; border: 3px solid var(--gold); }
.label { font: 400 15px var(--display); color: #dfffe9; margin-bottom: 6px; letter-spacing: .03em; }
.total { display: inline-block; min-width: 30px; text-align: center; background: rgba(0, 0, 0, .35); border-radius: 6px; padding: 2px 6px;
         font: 700 14px var(--body); color: #fff; }
.total:empty { display: none; }

.status { text-align: center; }
.status p { margin: 0 0 6px; font-weight: 700; font-size: 18px; color: #fff; min-height: 1.4em; }
.timer { height: 6px; background: rgba(0, 0, 0, .3); border-radius: 3px; overflow: hidden; max-width: 360px; margin: 0 auto; }
.timer i { display: block; height: 100%; width: 0; background: var(--gold); }

/* cards: pure CSS, no images */
.cards { display: flex; gap: 6px; min-height: 76px; }
.card { width: 52px; height: 74px; border-radius: 7px; background: #fffdf8; color: #1b1240; position: relative; flex: none;
        box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); font: 700 16px/1 var(--body); animation: deal .22s ease-out; }
.card.red { color: #d8344d; }
.card .r { position: absolute; top: 5px; left: 6px; text-align: center; }
.card .r small { display: block; font-size: 13px; margin-top: 1px; }
.card .big { position: absolute; right: 6px; bottom: 5px; font-size: 24px; }
.card.back { background: var(--pink) repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, .25) 6px 9px); border: 3px solid #fff; }
@keyframes deal { from { transform: translateY(-14px) rotate(-6deg); opacity: 0; } }

.seats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: start; }
.seat { background: rgba(0, 0, 0, .22); border-radius: 14px; padding: 10px; min-height: 150px; display: grid; gap: 8px; align-content: start;
        border: 2px solid transparent; }
.seat.empty { display: grid; place-items: center; color: rgba(255, 255, 255, .35); font-size: 14px; border: 2px dashed rgba(255, 255, 255, .15); }
.seat.me { border-color: var(--gold); }
.seat.turn { border-color: #4dff8f; background: rgba(77, 255, 143, .12); }
.seat .name { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; color: #fff; font-size: 15px; }
.seat .name small { font-weight: 500; color: #bfe8cf; font-size: 12px; }
.seat .cards { flex-wrap: wrap; min-height: 0; }
.seat .card { width: 40px; height: 58px; font-size: 13px; }
.seat .card .big { font-size: 18px; }
.seat .card .r small { font-size: 11px; }
.hand { display: grid; gap: 5px; padding: 6px; border-radius: 10px; }
.hand.active { background: rgba(255, 216, 77, .18); }
.hand .meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13px; color: #dfffe9; }
.betchip { display: inline-flex; align-items: center; gap: 5px; font: 700 13px var(--body); color: #fff; }
.betchip::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--pink); box-shadow: inset 0 0 0 3px #fff; }
.result { font: 400 13px var(--display); padding: 3px 7px; border-radius: 6px; }
.result.win, .result.blackjack { background: #4dff8f; color: var(--ink); }
.result.push { background: #efe9ff; color: var(--ink); }
.result.lose, .result.bust { background: #d8344d; color: #fff; }

/* controls */
.controls { margin-top: 14px; background: var(--panel); border-radius: 16px; padding: 14px; min-height: 76px; display: grid; align-items: center; }
.bet-ui { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; }
.chipset { display: flex; gap: 8px; flex-wrap: wrap; }
.pchip { width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; font: 700 14px var(--body); color: #fff;
         box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .85), inset 0 0 0 7px currentColor; transition: transform .1s; }
.pchip:hover { transform: translateY(-3px); }
.c10 { background: #2f7de0; } .c25 { background: #14a38a; } .c100 { background: #1b1240; } .c500 { background: #c2309c; } .c1k { background: #e0a400; }
.bet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bet-row label { font-weight: 700; }
.bet-row input { width: 110px; padding: 10px; font-weight: 700; }
.play-ui { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.play-ui .btn { min-width: 110px; font-size: 18px; padding: 14px 18px; }
.wait-ui { margin: 0; text-align: center; color: var(--muted); }

.feed { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feed li { font-size: 13px; background: var(--panel); color: var(--muted); border-radius: 8px; padding: 5px 9px; }
.feed li:last-child { color: #fff; }

@media (max-width: 860px) {
  .seats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .seats { grid-template-columns: 1fr 1fr; }
  .seat.empty { display: none; }
  .seat { min-height: 0; }
  .card { width: 44px; height: 63px; }
  .play-ui .btn { min-width: 0; flex: 1; }
  .dealer { justify-content: flex-start; }
}

/* phones: nothing may push the page wider than the screen */
.c5k { background: #e0442f; }
.seats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seat, .felt, .controls, .bet-ui, .chipset, .bet-row { min-width: 0; }
.seat .name > :first-child { min-width: 0; }
.bj { overflow-x: clip; }
@media (max-width: 860px) { .seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bj { padding-left: 10px; padding-right: 10px; }
  .pchip { width: 46px; height: 46px; font-size: 13px; }
  .bet-row input { flex: 1; width: auto; min-width: 70px; }
  .bet-row .btn { flex: 1; }
  .table-btns { flex-wrap: wrap; }
}

/* profile pictures */
.seat .name .who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.seat .name .who .nt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat .av { width: 30px; height: 30px; font-size: 13px; }
.tables .who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.faces { display: flex; }
.faces .av { width: 26px; height: 26px; font-size: 12px; margin-right: -8px; }
.faces:empty { display: none; }
.faces .av:last-child { margin-right: 4px; }

/* table list sits on a panel so it reads over the bay */
#view-lobby { background: var(--panel); border-radius: 16px; padding: clamp(14px, 2.5vw, 24px); }
.side-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.side-row label { display: inline-flex; align-items: center; gap: 6px; }
.side-row small { opacity: .75; }
.t-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-q { align-self: center; font-weight: 700; }
#limit { padding: 9px 10px; border: 0; border-radius: 10px; background: #f7f3ff; color: var(--ink); font: 500 14px var(--body); }
.result.surrender { background: #6a5a9e; color: #fff; }
