/* Furlong Poker — play-money No-Limit Texas Hold'em. Builds on tokens in styles.css. */
.pk-disclaimer { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(224,178,76,.45); background: rgba(224,178,76,.08); color: var(--gold); border-radius: var(--r); font-weight: 700; font-size: var(--t-sm); margin-bottom: 12px; }
.pk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pk-head h1 { font-size: var(--t-2xl); }
.pk-head p { color: var(--text-2); max-width: 680px; margin-top: 4px; }
.pk-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pk-actions input { width: 120px; text-transform: uppercase; }
.pk-lobby td .btn { height: 30px; }
.pk-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--t-sm); }
.pk-status::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.pk-status.s-Playing::before { background: var(--firm); }
.pk-status.s-Waiting::before { background: var(--warn); }
.pk-status.s-Full::before { background: var(--drift); }
.pk-status.s-Paused::before { background: var(--blue); }
.pk-lock { font-size: var(--t-xs); color: var(--text-3); border: 1px solid var(--line-2); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.pk-sub { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

/* ---------- table page layout ---------- */
.pk-room { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.pk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pk-bar h2 { font-size: var(--t-lg); }
.pk-bar .grow { flex: 1; }
.pk-conn { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 700; padding: 3px 8px; border-radius: 10px; border: 1px solid var(--line-2); }
.pk-conn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }
.pk-conn.ok::before { background: var(--firm); }
.pk-conn.bad::before { background: var(--drift); }

/* ---------- felt ---------- */
.pk-felt-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9.4; min-height: 360px; }
.pk-felt {
  position: absolute; inset: 9% 10%;
  border-radius: 50% / 50%;
  background: radial-gradient(ellipse at 50% 42%, #1f7a53 0%, #145c3d 55%, #0d4029 100%);
  box-shadow: inset 0 0 0 10px #3b2416, inset 0 0 0 13px #5a3a24, inset 0 0 50px rgba(0,0,0,.55), 0 18px 50px rgba(0,0,0,.5);
}
.pk-felt::after { content: 'FURLONG POKER · PLAY MONEY'; position: absolute; left: 50%; top: 68%; transform: translateX(-50%); font-size: 11px; letter-spacing: .3em; color: rgba(255,255,255,.12); font-weight: 800; white-space: nowrap; }
.pk-center { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(440px, 62%); z-index: 2; }
.pk-board { display: flex; gap: 6px; justify-content: center; min-height: 72px; }
.pk-slot { width: 50px; height: 70px; border-radius: 6px; border: 1px dashed rgba(255,255,255,.18); }
.pk-pots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pk-pot { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); padding: 3px 10px; border-radius: 12px; font-weight: 800; font-size: var(--t-sm); color: #fff; }
.pk-pot small { font-weight: 600; color: rgba(255,255,255,.7); }
.pk-msg { text-align: center; background: rgba(0,0,0,.5); color: #fff; padding: 6px 12px; border-radius: var(--r); font-weight: 700; font-size: var(--t-sm); max-width: 100%; }
.pk-msg.win { background: rgba(224,178,76,.92); color: #1c1305; }
.pk-msg b { font-weight: 800; }

/* ---------- cards ---------- */
.pk-card {
  position: relative; width: 50px; height: 70px; border-radius: 6px; background: #fbfbf8; color: #15191c;
  box-shadow: 0 2px 6px rgba(0,0,0,.45); display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; line-height: 1; user-select: none; flex: none;
}
.pk-card .r { font-size: 22px; letter-spacing: -1px; }
.pk-card .s { font-size: 20px; margin-top: 2px; }
.pk-card .c { position: absolute; top: 3px; left: 4px; font-size: 11px; line-height: 1; text-align: center; }
.pk-card.red { color: #c62828; }
.pk-card.back { background: repeating-linear-gradient(45deg, #2b4f8f 0 5px, #24447c 5px 10px); border: 3px solid #f1f1ee; }
.pk-card.sm { width: 38px; height: 54px; }
.pk-card.sm .r { font-size: 17px; }
.pk-card.sm .s { font-size: 15px; }
.pk-card.sm .c { display: none; }
.pk-card.hl { box-shadow: 0 0 0 3px var(--gold), 0 2px 8px rgba(0,0,0,.5); }
.pk-card.dim { opacity: .45; }
.deal-in { animation: pkDeal .38s var(--ease) both; }
@keyframes pkDeal { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -40px)) scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.flip-in { animation: pkFlip .42s var(--ease) both; }
@keyframes pkFlip { from { opacity: 0; transform: rotateY(90deg) translateY(-6px); } to { opacity: 1; transform: none; } }
.muck { animation: pkMuck .45s var(--ease) forwards; }
@keyframes pkMuck { to { opacity: 0; transform: translate(var(--mx, 0), var(--my, 0)) scale(.4) rotate(25deg); } }

/* ---------- seats ---------- */
.pk-seat { position: absolute; transform: translate(-50%, -50%); width: 128px; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.pk-seat .cards { display: flex; gap: 3px; height: 54px; margin-bottom: -16px; z-index: 1; position: relative; }
.pk-plate {
  position: relative; z-index: 2; width: 100%; background: rgba(12,16,19,.92); border: 2px solid var(--line-2); border-radius: 10px;
  padding: 6px 8px 6px 46px; min-height: 48px; box-shadow: 0 6px 16px rgba(0,0,0,.45);
}
.pk-av { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #0b0e10; }
.pk-av svg { position: absolute; inset: -4px; width: 44px; height: 44px; transform: rotate(-90deg); }
.pk-av circle { fill: none; stroke-width: 3; }
.pk-av .trk { stroke: rgba(255,255,255,.12); }
.pk-av .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke .3s; }
.pk-av .bar.low { stroke: var(--drift); }
.pk-av .bar.bank { stroke: var(--gold); }
.pk-name { font-weight: 700; font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-stack { font-weight: 800; font-size: var(--t-md); color: var(--text); }
.pk-state { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 700; min-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-seat.turn .pk-plate { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(25,199,155,.35), 0 0 22px rgba(25,199,155,.45); }
.pk-seat.folded .pk-plate { opacity: .55; }
.pk-seat.away .pk-plate { border-style: dashed; }
.pk-seat.winner .pk-plate { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224,178,76,.45), 0 0 26px rgba(224,178,76,.5); }
.pk-seat.me .pk-plate { background: linear-gradient(180deg, rgba(25,199,155,.14), transparent), rgba(12,16,19,.95); }
.pk-act { position: absolute; top: -10px; right: -6px; z-index: 4; background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 8px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pk-act.a-fold, .pk-act.a-timeout_fold { color: var(--text-3); }
.pk-act.a-raise, .pk-act.a-bet { color: var(--warn); }
.pk-act.a-allin { color: var(--drift); border-color: rgba(255,106,92,.5); }
.pk-badges { position: absolute; left: -8px; bottom: -8px; display: flex; gap: 3px; z-index: 5; }
.pk-btn-d, .pk-btn-b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 900; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.pk-btn-d { background: #fff; color: #111; border: 2px solid #c9c9c9; }
.pk-btn-b { background: #0f3b6b; color: #fff; border: 2px solid #5aa9ff; font-size: 9px; }
.pk-btn-b.bb { background: #6b0f2a; border-color: #ff6a8a; }
.pk-hand-desc { margin-top: 4px; font-size: 10px; font-weight: 700; color: var(--gold); text-align: center; max-width: 150px; }
.pk-empty { width: 76px; height: 46px; border-radius: 10px; border: 2px dashed rgba(255,255,255,.22); color: rgba(255,255,255,.65); font-weight: 700; font-size: var(--t-xs); background: rgba(0,0,0,.25); }
.pk-empty:hover:not(:disabled) { border-color: var(--accent); color: #fff; }
.pk-empty:disabled { cursor: default; opacity: .6; }
.pk-bet { position: absolute; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.6); color: #fff; font-weight: 800; font-size: var(--t-xs); padding: 2px 7px 2px 3px; border-radius: 10px; white-space: nowrap; }
.pk-chip { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #f2f2f2 0 30%, #d33 31% 60%, #f2f2f2 61% 70%, #d33 71%); box-shadow: 0 1px 2px rgba(0,0,0,.6); flex: none; }
.pk-fly { position: absolute; z-index: 20; pointer-events: none; transition: transform .55s var(--ease), opacity .55s; }

/* ---------- controls ---------- */
.pk-controls { margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 64px; }
.pk-controls .row { margin-bottom: 0; }
.pk-me { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.pk-mycards { display: flex; gap: 4px; }
.pk-abtn { min-width: 110px; height: 44px; font-size: var(--t-md); }
.btn-fold { background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); }
.btn-fold:hover { border-color: var(--drift); }
.btn-call { background: var(--blue); color: #04111f; }
.btn-raise { background: var(--warn); color: #1f1203; }
.btn-allin { background: var(--drift); color: #1f0603; }
.pk-sizer { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-top: 10px; }
.pk-sizer input[type=range] { width: 100%; accent-color: var(--warn); }
.pk-sizer input[type=number] { width: 110px; }
.pk-quick { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.pk-quick button { padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 4px; font-size: var(--t-xs); font-weight: 700; color: var(--text-2); }
.pk-quick button:hover:not(:disabled) { color: var(--text); border-color: var(--warn); }
.pk-limits { font-size: var(--t-xs); color: var(--text-3); margin-top: 6px; }
.pk-pre { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--t-sm); }
.pk-pre label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; }
.pk-pre label.on { border-color: var(--accent); background: var(--accent-dim); }
.pk-kbd { font-size: var(--t-xs); color: var(--text-3); margin-top: 8px; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; font: inherit; font-size: 10px; color: var(--text-2); }

/* ---------- side panel ---------- */
.pk-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--top-h) + 12px); }
.pk-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; }
.pk-panel h3 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.pk-log { max-height: 180px; overflow: auto; font-size: var(--t-sm); display: flex; flex-direction: column; gap: 3px; }
.pk-log li { color: var(--text-2); }
.pk-log li b { color: var(--text); }
.pk-chat { height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 4px; font-size: var(--t-sm); padding-right: 4px; }
.pk-chat .m { display: flex; gap: 6px; align-items: baseline; }
.pk-chat .m b { color: var(--accent); flex: none; }
.pk-chat .m span { word-break: break-word; flex: 1; }
.pk-chat .m.quick span { font-style: normal; color: var(--gold); }
.pk-chat .m .mm { opacity: 0; font-size: 10px; color: var(--text-3); }
.pk-chat .m:hover .mm, .pk-chat .m:focus-within .mm { opacity: 1; }
.pk-chat .mm button { padding: 0 3px; color: var(--text-3); }
.pk-chat .mm button:hover { color: var(--text); }
.pk-chatf { display: flex; gap: 6px; margin-top: 8px; }
.pk-chatf input { flex: 1; }
.pk-qm { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pk-qm button { font-size: 10px; padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 10px; color: var(--text-2); }
.pk-qm button:hover { color: var(--text); border-color: var(--accent); }
.pk-modal-row { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.pk-modal-row input[type=range] { width: 100%; accent-color: var(--accent); }
.pk-hist td { vertical-align: middle; }
.pk-hist .pk-card.sm { width: 28px; height: 40px; }
.pk-hist .pk-card.sm .r { font-size: 13px; }
.pk-hist .pk-card.sm .s { font-size: 12px; margin: 0; }
.pk-cardrow { display: flex; gap: 3px; flex-wrap: wrap; }
.pk-street { margin-top: 10px; }
.pk-street h4 { font-size: var(--t-sm); color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.pk-flag td { font-size: var(--t-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1100px) {
  .pk-room { grid-template-columns: 1fr; }
  .pk-side { position: static; }
}
@media (max-width: 640px) {
  .pk-felt-wrap { aspect-ratio: 3 / 4.3; min-height: 480px; }
  .pk-felt { inset: 10% 8%; border-radius: 46% / 36%; }
  .pk-felt::after { top: 64%; font-size: 9px; }
  .pk-center { width: 72%; top: 47%; }
  .pk-card { width: 38px; height: 54px; }
  .pk-card .r { font-size: 17px; }
  .pk-card .s { font-size: 15px; }
  .pk-card .c { display: none; }
  .pk-slot { width: 38px; height: 54px; }
  .pk-board { gap: 4px; min-height: 56px; }
  .pk-seat { width: 96px; }
  .pk-seat .cards { height: 40px; margin-bottom: -12px; }
  .pk-seat .cards .pk-card { width: 28px; height: 40px; }
  .pk-seat .cards .pk-card .r { font-size: 13px; }
  .pk-seat .cards .pk-card .s { font-size: 11px; margin: 0; }
  .pk-plate { padding: 4px 5px 4px 34px; min-height: 40px; }
  .pk-av { width: 28px; height: 28px; font-size: 11px; left: 3px; }
  .pk-av svg { inset: -3px; width: 34px; height: 34px; }
  .pk-stack { font-size: var(--t-sm); }
  .pk-abtn { min-width: 0; flex: 1; }
  .pk-sizer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .deal-in, .flip-in, .muck { animation: none !important; }
  .pk-fly { transition: none !important; }
}
