[hidden] { display: none !important; }
.top h1 a.home { color: inherit; text-decoration: none; }
.top h1 .sub { font: 500 15px var(--sans); color: var(--muted); margin-left: 6px; }
.code { font: 600 14px var(--sans); letter-spacing: .12em; color: var(--brass); padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--good); }
.dot.off { background: var(--bad); }

/* lobby */
.lobby { display: grid; place-items: center; min-height: calc(100vh - 60px); padding: 16px; background: radial-gradient(ellipse at 50% 45%, var(--felt) 0%, var(--felt-deep) 45%, var(--bg) 80%); }
.lobby-card { width: min(420px, 100%); padding: 26px 24px; border-radius: 16px; background: rgba(13,20,18,.94); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.lobby-card h2 { margin: 0 0 4px; text-align: center; font: 600 26px var(--serif); color: var(--brass); letter-spacing: .04em; }
.lobby-card .lede { margin: 0 0 18px; text-align: center; color: var(--muted); }
.lobby-card label { display: block; margin: 12px 0 6px; font-weight: 600; }
.lobby-card .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.lobby-card .act { width: 100%; margin-top: 18px; }
.lobby-card .err { min-height: 20px; margin: 10px 0 0; color: var(--bad); text-align: center; font-size: 14px; }
.lobby-card .check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; }
.lobby-card .check-row input { width: 20px; height: 20px; accent-color: var(--brass); }
.in { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 500 16px var(--sans); }
select.in { appearance: auto; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money-in .in { padding-left: 24px; }
.invite { display: flex; gap: 8px; margin-top: 8px; }
.invite .in { font-size: 13px; }

/* seats: a fixed table. The felt keeps one height and each seat keeps its spot on the curve. */
.felt { height: clamp(500px, calc(100vh - 190px), 660px); min-height: 0; }
.seats { position: absolute; left: 3%; right: 3%; bottom: 7%; z-index: 1; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); align-items: end; gap: 4px; }
.seats-1, .seats-2 { --base: clamp(54px, 6vw, 78px); }
.seats-3, .seats-4 { --base: clamp(44px, 4.8vw, 66px); }
.seats-5, .seats-6 { --base: clamp(34px, 3.8vw, 54px); }
.seat { --cw: var(--base); }
.seat.split-2 { --cw: calc(var(--base) * .72); }
.seat.split-3, .seat.split-4 { --cw: calc(var(--base) * .52); }
.tag { font-size: 11px; color: rgba(238,232,218,.7); text-transform: uppercase; letter-spacing: .06em; }
.seat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 6px 2px; border-radius: 12px; border: 1px solid transparent; transform: translateY(calc(var(--lift, 0) * -70px)); }
.seat.turn { border-color: var(--brass); background: rgba(220,183,101,.08); }
.seat.me .name { color: var(--brass); }
.seat .hands { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: calc(var(--cw) * 1.4 + 34px); transform-origin: 50% 100%; }
.seat .hand { padding: 2px; gap: 4px; }
.seat .hand + .hand { margin-left: calc(var(--cw) * -.2); }
.seat .hand .card + .card { margin-left: calc(var(--cw) * -.68); }
.seat .meta { gap: 3px; flex-wrap: wrap; justify-content: center; }
.seat .result { font-size: 11px; padding: 1px 5px; }
.seat .name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px var(--serif); }
.seat .stack { font-size: 12px; color: rgba(238,232,218,.8); font-variant-numeric: tabular-nums; }
.seat.empty .ring { width: 44px; height: 44px; border-radius: 50%; border: 1px dashed rgba(238,232,218,.22); }
.spot { width: auto; min-width: 34px; padding: 0 6px; border-radius: 17px; }

.status { min-height: 24px; margin-top: 10px; text-align: center; font: 500 16px var(--serif); color: var(--ink); }
.status b { color: var(--brass); }
.betbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.betbox .money-in { width: 120px; }
.betbox .in { text-align: center; font-weight: 700; font-size: 18px; }
.small-act { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.small-act:hover:not(:disabled) { border-color: var(--brass); }

/* side panels */
.coach { gap: 10px; }
.panel { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.panel h3 { margin: 0 0 8px; font: 600 15px var(--serif); color: var(--brass); }
.panel table { font-size: 13px; }
.panel td.num, .panel th.num { text-align: right; }
.panel .pos { color: var(--good); }
.panel .neg { color: var(--bad); }
.panel .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.panel .row:last-child { border-bottom: 0; }
.panel .row .btns { display: flex; gap: 6px; }
.pay { font-variant-numeric: tabular-nums; }
.pay b { color: var(--brass); }
.feed.panel { max-height: 260px; overflow-y: auto; font-size: 13px; color: #d4d2c6; }
.feed.panel p { margin: 3px 0; }
.closed-banner { padding: 14px; margin-bottom: 10px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--brass); text-align: center; }
.closed-banner h3 { margin: 0 0 4px; font: 600 18px var(--serif); color: var(--brass); }

@media (max-width: 560px) {
  .seats { left: 1%; right: 1%; bottom: 5%; }
  .seats-1, .seats-2 { --base: 50px; }
  .seats-3, .seats-4 { --base: 40px; }
  .seats-5, .seats-6 { --base: 30px; }
  .seat { transform: translateY(calc(var(--lift, 0) * -40px)); }
  .seat .name { font-size: 12px; }
  /* Short enough that the table, the status line and your buttons fit on one phone screen. */
  .felt { height: clamp(360px, 50vh, 470px); padding-top: 10px; }
  #dealer { --cw: 44px; }
  #dealer .card + .card { margin-left: calc(var(--cw) * -.72); }
  .shoe { font-size: 12px; }
  .seat .spot { min-width: 28px; height: 28px; padding: 0 4px; font-size: 11px; border-width: 1px; }
  .seat .total { min-height: 18px; padding: 1px 5px; font-size: 11px; }
  .seat .result { font-size: 10px; padding: 1px 4px; }
  .seat .meta { gap: 2px; }
  .seat.split-2 { --cw: calc(var(--base) * .62); }
  .seat.split-3, .seat.split-4 { --cw: calc(var(--base) * .42); }
  .seat .hand + .hand { margin-left: 0; }
  .seat .hands { gap: 1px; }
  .status { margin-top: 6px; font-size: 15px; }
  .controls { padding-top: 8px; min-height: 0; }
  .top h1 .sub { display: none; }
  .betbox .act { flex: 1 1 40%; }
}

/* face-down double, dealt sideways */
.side { flex: none; display: grid; place-items: center; width: var(--cw); height: calc(var(--cw) * 1.4); margin-left: calc(var(--cw) * -.15); transform: rotate(90deg); transform-origin: 50% 50%; }
.side .card { margin-left: 0; }
.cards .side + .card, .cards .card + .side { margin-left: calc(var(--cw) * -.15); }
.peelable { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.peelable .card.back { transform-origin: 0% 100%; transition: transform .45s cubic-bezier(.3,.6,.4,1), box-shadow .45s; }
.peelable:hover .card.back { box-shadow: 0 0 0 2px var(--brass), 0 2px 5px rgba(0,0,0,.4); }
.peelable.squeeze { cursor: grabbing; }
.peelable.squeeze .card.back { transform: perspective(500px) rotateY(-38deg); box-shadow: 0 0 0 2px var(--brass), 6px 4px 12px rgba(0,0,0,.55); }

/* turning a card over: the back lifts at one edge, hangs there a beat, then comes off */
.card.turning { overflow: visible; }
.peel-back { position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, #7c1e1a 0 4px, #94302a 4px 8px); border: calc(var(--cw) * .05) solid var(--card); transform-origin: 0% 100%; backface-visibility: hidden; box-shadow: 4px 3px 10px rgba(0,0,0,.45); }
.peel-back.peel { animation: peel .7s cubic-bezier(.45,.05,.4,1) both; animation-delay: var(--d, 0ms); }
.peel-back.quick { animation: peelquick .28s ease-in both; animation-delay: var(--d, 0ms); }
@keyframes peel {
  0% { transform: perspective(500px) rotateY(0); opacity: 1; }
  30% { transform: perspective(500px) rotateY(-26deg); opacity: 1; }
  62% { transform: perspective(500px) rotateY(-36deg); opacity: 1; }
  88% { transform: perspective(500px) rotateY(-100deg) translateX(-20%); opacity: 1; }
  100% { transform: perspective(500px) rotateY(-130deg) translateX(-30%); opacity: 0; }
}
@keyframes peelquick {
  0% { transform: perspective(500px) rotateY(-38deg); opacity: 1; }
  75% { transform: perspective(500px) rotateY(-100deg) translateX(-20%); opacity: 1; }
  100% { transform: perspective(500px) rotateY(-130deg) translateX(-30%); opacity: 0; }
}
.card.new { animation-delay: var(--d, 0ms); }
input[type="range"] { width: 160px; }
@media (prefers-reduced-motion: reduce) {
  .peel-back.peel, .peel-back.quick { animation-duration: .01s; }
  .peelable .card.back { transition: none; }
}

.notice { position: absolute; left: 50%; top: 40%; z-index: 3; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 22px; border-radius: 12px; background: rgba(13,20,18,.82); border: 1px solid var(--brass); box-shadow: 0 8px 24px rgba(0,0,0,.4); text-align: center; animation: fade .25s both; pointer-events: none; }
.notice b { font: 600 22px var(--serif); color: var(--brass); letter-spacing: .04em; }
.notice span { font-size: 13px; color: var(--ink); }

.short { display: none; }
.top-actions { flex-wrap: wrap; justify-content: flex-end; align-items: center; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 8px; padding: 10px 16px 6px; }
  .top-actions { width: 100%; justify-content: flex-start; gap: 6px; }
  .top-actions .ghost { padding: 6px 9px; }
  .code { padding: 5px 8px; font-size: 13px; }
  .long { display: none; }
  .short { display: inline; }
}
