.bj { position: absolute; inset: 0; display: flex; flex-direction: row; }
.felt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 35%, #138a3a, #075a22 75%);
  color: #fff;
  padding: 8px 12px;
  gap: 6px;
  overflow: auto;
  --cw: clamp(44px, 8.5vmin, 84px);
}
.shoe {
  flex: none;
  height: 16px;
  border: 1px solid #000;
  background: #3a2410;
  position: relative;
  box-shadow: inset 1px 1px 0 #6a4a20;
}
.shoe .left {
  position: absolute; left: 0; top: 2px; bottom: 2px;
  background: repeating-linear-gradient(90deg, #fff 0 1px, #c8c8c8 1px 3px);
}
.shoe .cut { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #e00000; }
.area { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.area .lbl { font-size: 12px; opacity: .85; font-weight: normal; }
.hands { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; min-height: calc(var(--cw) * 1.45 + 30px); }
.hand { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; border: 2px solid transparent; border-radius: 6px; }
.hand.active { border-color: #ffff60; background: rgba(255,255,255,.07); }
.cards { display: flex; min-height: calc(var(--cw) * 1.4); padding-right: calc(var(--cw) * .55); }
.hand .info { font-size: 12px; min-height: 16px; white-space: nowrap; }
.card {
  width: var(--cw);
  height: calc(var(--cw) * 1.4);
  margin-right: calc(var(--cw) * -.55);
  background: #fff;
  color: #000;
  border-radius: 5px;
  border: 1px solid #000;
  position: relative;
  box-shadow: 1px 1px 2px rgba(0,0,0,.4);
  font-family: Georgia, "Times New Roman", serif;
  animation: deal .25s ease-out;
  flex: none;
}
.card.red { color: #c00000; }
.card .c { position: absolute; font-size: calc(var(--cw) * .24); line-height: .95; text-align: center; font-weight: bold; }
.card .c.tl { left: 3px; top: 3px; }
.card .c.br { right: 3px; bottom: 3px; transform: rotate(180deg); }
.card .pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: calc(var(--cw) * .55); }
.card .face {
  position: absolute; inset: 18% 20%;
  border: 1px solid currentColor;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: calc(var(--cw) * .36);
  background: #fff6d8;
  line-height: 1;
}
.card .face small { font-size: calc(var(--cw) * .2); }
.card.back { background-color: #fff; }
.card.back::after { content: ""; position: absolute; inset: 4px; border-radius: 3px; background: var(--back); }
.back-blue { --back: repeating-linear-gradient(45deg, #1d3fb0 0 4px, #4a6ee0 4px 8px); }
.back-red { --back: repeating-linear-gradient(-45deg, #a01010 0 4px, #e04040 4px 8px); }
.back-plaid { --back: repeating-linear-gradient(0deg, rgba(0,80,0,.7) 0 3px, transparent 3px 9px), repeating-linear-gradient(90deg, rgba(160,0,0,.7) 0 3px, #e8d080 3px 9px); }
.back-dots { --back: radial-gradient(circle at 50% 50%, #ffd000 0 2px, transparent 3px) 0 0/8px 8px, #7020a0; }
@keyframes deal { from { transform: translate(40px, -60px) rotate(8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.result {
  text-align: center;
  font-size: 18px;
  min-height: 26px;
  text-shadow: 1px 1px 0 #000;
  color: #ffff80;
}
.advice {
  margin-top: auto;
  background: #fffff0;
  color: #000;
  border: 1px solid #000;
  padding: 6px 10px 6px 54px;
  font-weight: normal;
  min-height: 44px;
  position: relative;
  border-radius: 4px;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}
.advice::before {
  content: "\1F3A9";
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 28px;
}
.advice b { color: #800000; }
.panel {
  flex: none;
  width: 220px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid #000;
  overflow: auto;
}
.panel .row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.panel .row span { font-weight: normal; font-size: 12px; }
.panel .lcd { min-width: 90px; }
.panel .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.panel .btns .btn { min-width: 0; }
.panel .player { font-weight: normal; text-align: center; padding: 2px; }
@media (max-width: 640px) {
  .bj { flex-direction: column; }
  .panel { width: auto; border-left: 0; border-top: 1px solid #000; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
  .panel .btns { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .panel .player { grid-column: 1 / -1; }
  .panel .lcd { min-width: 60px; font-size: 15px; }
  .advice { font-size: 12px; }
}
