/* ==========================================================================
   FREE CASINO ONLINE · Texas Hold'em
   ========================================================================== */

.pk-app {
  min-height: 100dvh;
}

.pk-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: calc(100vh - var(--fc-header-h) - 2px);
  min-height: calc(100dvh - var(--fc-header-h) - 2px);
  display: flex;
  align-items: stretch;
}

/* Panel ------------------------------------------------------------------- */
.pk-panel {
  order: 0;
  flex: 0 0 372px;
  width: 372px;
  max-height: calc(100vh - var(--fc-header-h) - 36px);
  max-height: calc(100dvh - var(--fc-header-h) - 36px);
  margin: 18px 0 18px 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border: 1px solid var(--fc-line);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 100% 32% at 50% 0%, rgba(232, 191, 98, 0.09), transparent 68%),
    linear-gradient(158deg, rgba(9, 35, 21, 0.96) 0%, rgba(4, 18, 11, 0.95) 58%, rgba(3, 14, 9, 0.97) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 240, 184, 0.08);
}

.pk-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(246, 216, 128, 0.11);
}

.pk-panel-title {
  min-width: 0;
}

.pk-panel-head .fc-bet-title {
  margin: 0;
}

.pk-panel .fc-bet-kicker {
  display: block;
  margin-bottom: 3px;
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: var(--fc-gold);
}

.pk-panel .fc-bet-title {
  font-size: 27px;
  line-height: 0.9;
}

.pk-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8d8778;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.pk-meta #pk-hand-no {
  margin-left: auto;
  color: rgba(231, 195, 118, 0.8);
}

.pk-meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(231, 195, 118, 0.48);
}

/* Caja de mano ------------------------------------------------------------- */
.pk-hand-box {
  padding: 12px 13px;
  border: 1px solid rgba(246, 216, 128, 0.14);
  border-radius: 15px;
  background:
    radial-gradient(ellipse 90% 120% at 0% 0%, rgba(232, 191, 98, 0.09), transparent 66%),
    rgba(2, 15, 9, 0.5);
}

.pk-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pk-role {
  padding: 3px 7px 2px;
  border: 1px solid rgba(246, 216, 128, 0.24);
  border-radius: 999px;
  color: var(--fc-gold);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1;
}

.pk-hole-labels {
  display: flex;
  gap: 7px;
  min-height: 37px;
  margin-top: 7px;
  align-items: center;
}

.pk-card-label {
  min-width: 47px;
  height: 37px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(255, 240, 184, 0.46);
  border-radius: 7px;
  background: linear-gradient(160deg, #fffdf6, #f1e7d2);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.26);
  color: #171a17;
  font-family: var(--fc-display);
  font-size: 24px;
  line-height: 1;
}

.pk-card-label i {
  font-style: normal;
  font-family: var(--fc-body);
  font-size: 13px;
  font-weight: 700;
}

.pk-card-label.is-red i,
.pk-card-label.is-red {
  color: #b3263b;
}

.pk-hand-name {
  display: block;
  margin-top: 7px;
  color: #f4e8c8;
  font-family: var(--fc-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Mesa y mano en el panel -------------------------------------------------- */
.pk-board-block {
  margin: 14px 0 16px;
}

.pk-board-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.pk-board-cards .pk-card-label {
  width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 2 / 3;
  padding: 4px 2px;
  flex-direction: column;
  gap: 1px;
  border-radius: 8px;
  font-size: 22px;
}

.pk-board-cards .pk-card-label i {
  font-size: 13px;
  line-height: 1;
}

.pk-hand-box--simple {
  padding: 12px 13px;
}

.pk-section-title {
  display: block;
  margin: 0 0 6px;
  color: var(--fc-gold);
  font-family: var(--fc-display);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.045em;
}

.pk-hand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-top: 8px;
}

.pk-hand-line .pk-hole-labels {
  min-height: 0;
  margin-top: 0;
  gap: 8px;
  align-items: flex-start;
  flex: 0 0 auto;
}

.pk-hand-rank {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 9px;
  border-left: 1px solid rgba(246, 216, 128, 0.3);
  border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, rgba(246, 216, 128, 0.08), transparent);
  color: #f4dfa6;
  font-family: var(--fc-body);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.pk-hole-labels .pk-card-label {
  width: 62px;
  height: 88px;
  min-width: 0;
  padding: 4px;
  flex-direction: column;
  gap: 2px;
  border-radius: 8px;
  font-size: 30px;
}

.pk-hole-labels .pk-card-label i {
  font-size: 16px;
}

.pk-card-label.is-back {
  position: relative;
  overflow: hidden;
  border-color: rgba(246, 216, 128, 0.28);
  background:
    radial-gradient(circle at 50% 45%, rgba(246, 216, 128, 0.12), transparent 44%),
    repeating-linear-gradient(45deg, rgba(246, 216, 128, 0.07) 0 2px, transparent 2px 8px),
    linear-gradient(145deg, #0b3a22, #03130a);
  color: transparent;
  box-shadow:
    inset 0 0 0 3px rgba(246, 216, 128, 0.06),
    0 5px 12px rgba(0, 0, 0, 0.26);
}

.pk-card-label.is-back::after {
  content: "♠";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--fc-gold);
  font-family: var(--fc-body);
  font-size: 20px;
  opacity: 0.55;
}

/* Bote --------------------------------------------------------------------- */
.pk-pot-box {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(231, 195, 118, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(100deg, rgba(231, 195, 118, 0.1), transparent 60%),
    rgba(1, 12, 7, 0.5);
}

.pk-pot-box .fc-label {
  display: block;
  margin-bottom: 2px;
  font-size: 7px;
  color: #9d9684;
}

.pk-pot-box strong {
  color: #ffe8ae;
  font-family: var(--fc-display);
  font-size: 27px;
  font-weight: 400;
  line-height: 0.9;
}

.pk-pot-box small {
  color: rgba(255, 232, 174, 0.55);
  font-size: 8px;
  font-weight: 800;
}

.pk-pot-side {
  padding-left: 13px;
  border-left: 1px solid rgba(231, 195, 118, 0.16);
  text-align: right;
}

.pk-message {
  min-height: 18px;
  margin: -1px 0 0;
  color: #a9a18e;
  font-size: 9.5px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* Acciones ----------------------------------------------------------------- */
.pk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.pk-btn {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(246, 216, 128, 0.25);
  border-radius: 12px;
  background: rgba(10, 40, 24, 0.8);
  color: #ded6c3;
  font-family: var(--fc-body);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition:
    transform 0.22s var(--fc-ease),
    border-color 0.22s ease,
    background 0.22s ease,
    filter 0.22s ease,
    opacity 0.22s ease;
}

.pk-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(246, 216, 128, 0.5);
  background: rgba(18, 57, 34, 0.9);
}

.pk-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.pk-btn:disabled {
  opacity: 0.32;
  cursor: default;
}

.pk-btn--primary {
  border-color: rgba(255, 239, 180, 0.55);
  background: linear-gradient(135deg, #ffe9a3 0%, #e3b454 50%, #bd8626 100%);
  color: #1d1304;
  box-shadow:
    0 10px 22px rgba(198, 146, 43, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.pk-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #fff1b8 0%, #e9bf63 50%, #c8912d 100%);
  filter: brightness(1.03);
}

.pk-btn--danger {
  border-color: rgba(210, 104, 85, 0.4);
  color: #f0c7b6;
  background: rgba(52, 17, 12, 0.5);
}

.pk-btn--danger:hover:not(:disabled) {
  border-color: rgba(210, 104, 85, 0.68);
  background: rgba(70, 22, 15, 0.65);
}

.pk-next {
  width: 100%;
  flex: 0 0 auto;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subida ------------------------------------------------------------------- */
.pk-raise-box {
  padding: 11px 12px 12px;
  border: 1px solid rgba(231, 195, 118, 0.25);
  border-radius: 14px;
  background: rgba(2, 14, 8, 0.62);
}

.pk-raise-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #a49b86;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pk-raise-head strong {
  color: #ffe8ae;
  font-family: var(--fc-display);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.pk-raise-head small {
  color: rgba(255, 232, 174, 0.55);
  font-size: 8px;
  font-weight: 800;
}

.pk-range {
  width: 100%;
  height: 22px;
  margin: 5px 0 4px;
  accent-color: #e3b454;
  cursor: pointer;
}

.pk-raise-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

/* Oponentes en panel ------------------------------------------------------- */
.pk-opponents {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
}

.pk-opponent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid rgba(246, 216, 128, 0.08);
  border-radius: 8px;
  background: rgba(2, 13, 8, 0.38);
  color: #a49c8a;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.pk-opponent-row.is-acting {
  border-color: rgba(231, 195, 118, 0.35);
  color: #f1e4c4;
  background: rgba(231, 195, 118, 0.08);
}

.pk-opponent-row.is-out {
  opacity: 0.38;
}

.pk-opponent-name {
  min-width: 52px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pk-opponent-stack {
  margin-left: auto;
  color: #e9d7aa;
  font-weight: 800;
}

.pk-opponent-state {
  min-width: 42px;
  text-align: right;
  color: #777163;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Reglas ------------------------------------------------------------------- */
.pk-rules {
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid rgba(246, 216, 128, 0.1);
}

.pk-rules summary {
  color: #a49b87;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  list-style: none;
}

.pk-rules summary::-webkit-details-marker {
  display: none;
}

.pk-rules summary::before {
  content: "+";
  display: inline-block;
  margin-right: 6px;
  color: var(--fc-gold);
}

.pk-rules[open] summary::before {
  content: "−";
}

.pk-rules-body {
  padding-top: 9px;
  color: #8f887a;
  font-size: 8.5px;
  line-height: 1.6;
}

.pk-rules-body p {
  margin: 0 0 7px;
}

.pk-rules-body b {
  color: #c9bd9e;
}

/* Escenario ---------------------------------------------------------------- */
.pk-stage {
  order: 1;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px 18px 18px 8px;
  display: flex;
}

.pk-table {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(246, 216, 128, 0.12);
  border-radius: 26px;
  background:
    radial-gradient(ellipse 68% 58% at 50% 46%, rgba(18, 105, 61, 0.26), transparent 72%),
    linear-gradient(180deg, #05160d 0%, #04110a 100%);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.5),
    inset 0 0 110px rgba(0, 0, 0, 0.5);
}

.pk-table::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 240, 184, 0.035);
}

#pk-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Título ------------------------------------------------------------------- */
.pk-head {
  position: absolute;
  top: clamp(14px, 2.2vh, 24px);
  left: 50%;
  z-index: 8;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.pk-badge {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 7;
  padding: 6px 9px 5px;
  border: 1px solid rgba(246, 216, 128, 0.2);
  border-radius: 999px;
  background: rgba(3, 20, 12, 0.64);
  color: #b9ae93;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.11em;
  backdrop-filter: blur(8px);
}

/* Asientos HTML ------------------------------------------------------------ */
.pk-seat {
  position: absolute;
  z-index: 6;
  min-width: 122px;
  padding: 8px 10px 7px;
  border: 1px solid rgba(246, 216, 128, 0.18);
  border-radius: 11px;
  background:
    linear-gradient(155deg, rgba(9, 37, 23, 0.92), rgba(2, 14, 8, 0.85));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  color: #b8ae96;
  pointer-events: none;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s var(--fc-ease);
}

.pk-seat--left {
  left: 11%;
  top: 30%;
}

.pk-seat--top {
  left: 50%;
  top: 5.5%;
  transform: translateX(-50%);
}

.pk-seat--right {
  right: 11%;
  top: 30%;
}

.pk-seat.is-acting {
  border-color: rgba(231, 195, 118, 0.58);
  box-shadow: 0 0 0 1px rgba(231, 195, 118, 0.12), 0 14px 30px rgba(0, 0, 0, 0.42);
  color: #f3e6c5;
}

.pk-seat.is-folded {
  opacity: 0.35;
}

.pk-seat-head {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pk-seat-head strong {
  color: #f0e3c2;
  font-family: var(--fc-body);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.pk-seat-head span {
  padding: 2px 4px 1px;
  border: 1px solid rgba(231, 195, 118, 0.2);
  border-radius: 3px;
  color: rgba(231, 195, 118, 0.72);
  font-size: 5.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pk-seat-stack {
  margin-top: 3px;
  color: #d8c79f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.pk-seat-badges {
  position: absolute;
  top: -7px;
  right: 7px;
  display: flex;
  gap: 3px;
}

.pk-badge-role:empty {
  display: none;
}

.pk-badge-role {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 240, 184, 0.62);
  border-radius: 50%;
  background: #f3e4bd;
  color: #2b210f;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}

.pk-badge-role.is-blind {
  border-radius: 4px;
  background: rgba(12, 48, 28, 0.92);
  color: #e8d4a3;
  border-color: rgba(231, 195, 118, 0.32);
}

.pk-seat-status {
  min-height: 10px;
  margin-top: 4px;
  color: #777163;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pk-seat.is-acting .pk-seat-status {
  color: #e3c276;
}

.pk-seat-hand {
  margin-top: 2px;
  color: #d4b96e;
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  min-height: 8px;
}

.pk-pot-float {
  position: absolute;
  left: 50%;
  top: 23%;
  z-index: 7;
  transform: translateX(-50%);
  min-width: 100px;
  padding: 7px 12px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(231, 195, 118, 0.25);
  border-radius: 999px;
  background: rgba(3, 20, 12, 0.7);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(9px);
  color: #a89d84;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.pk-pot-float strong {
  color: #ffeaad;
  font-family: var(--fc-display);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.pk-pot-chip {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 240, 184, 0.7);
  background: #b8752a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Toast -------------------------------------------------------------------- */
.pk-toast {
  position: absolute;
  left: 50%;
  top: 21%;
  z-index: 9;
  transform: translate(-50%, -50%);
  max-width: min(90%, 430px);
  padding: 12px 20px 11px;
  border: 1px solid rgba(246, 216, 128, 0.24);
  border-radius: 12px;
  background: rgba(2, 15, 9, 0.86);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
  color: #ffe9ad;
  font-family: var(--fc-display);
  font-size: clamp(24px, 3.1vw, 36px);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 0.95;
  text-align: center;
  backdrop-filter: blur(10px);
  pointer-events: none;
  animation: pk-toast-in 0.3s var(--fc-ease) both;
}

.pk-toast.is-lose {
  color: #d9c8b0;
  border-color: rgba(210, 160, 120, 0.22);
}

.pk-toast small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 233, 173, 0.62);
  font-family: var(--fc-body);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

@keyframes pk-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Loading ------------------------------------------------------------------ */
.pk-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(13, 67, 38, 0.54), transparent 76%),
    #04110a;
  color: #d9c9a5;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.pk-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pk-loading-mark {
  color: #e7c376;
  font-size: 38px;
  animation: pk-pulse 1.6s ease-in-out infinite;
}

.pk-loading strong {
  display: block;
  color: #f2e4c3;
  font-size: 9px;
  letter-spacing: 0.18em;
}

.pk-loading span {
  display: block;
  margin-top: 4px;
  color: #8b8475;
  font-size: 8px;
  letter-spacing: 0.06em;
}

@keyframes pk-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1180px) {
  .pk-panel {
    flex-basis: 338px;
    width: 338px;
    padding: 17px;
  }

  .pk-panel .fc-bet-title {
    font-size: 24px;
  }

  .pk-seat {
    min-width: 110px;
    padding: 7px 9px 6px;
  }
}

@media (max-width: 900px) {
  .pk-main {
    flex-direction: column;
    min-height: 0;
  }

  .pk-stage {
    order: 1;
    flex: 0 0 auto;
    height: clamp(390px, 56vh, 560px);
    padding: 8px 10px 0;
  }

  .pk-table {
    min-height: 0;
    border-radius: 22px;
  }

  .pk-panel {
    order: 2;
    flex: 0 0 auto;
    width: calc(100% - 20px);
    max-height: none;
    margin: 10px auto 24px;
    padding: 18px;
    border-radius: 20px;
    overflow: visible;
    animation: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
  }

  .pk-head {
    top: 14px;
    left: 50%;
  }

  .pk-badge {
    top: 13px;
    right: 14px;
    font-size: 6px;
  }

  .pk-seat {
    min-width: 98px;
    padding: 6px 8px 5px;
    border-radius: 9px;
  }

  .pk-seat--left {
    left: 13%;
    top: 23%;
  }

  .pk-seat--right {
    right: 13%;
    top: 23%;
  }

  .pk-seat--top {
    top: 9%;
  }

  .pk-seat-head strong {
    font-size: 8px;
  }

  .pk-seat-stack {
    font-size: 8px;
  }

  .pk-seat-status {
    font-size: 5.5px;
  }

  .pk-seat-hand {
    display: none;
  }

  .pk-pot-float {
    display: none;
  }

  .pk-pot-float strong {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .pk-stage {
    height: clamp(340px, 49vh, 470px);
  }

  .pk-panel {
    width: calc(100% - 20px);
    margin-top: 8px;
    padding: 15px 13px;
    gap: 11px;
  }

  .pk-panel .fc-bet-title {
    font-size: 23px;
  }

  .pk-btn {
    min-height: 43px;
    font-size: 8px;
  }

  .pk-badge {
    display: none;
  }

  .pk-seat {
    min-width: 86px;
    padding: 5px 7px 4px;
  }

  .pk-seat--left {
    left: 3%;
    top: 21%;
  }

  .pk-seat--right {
    right: 3%;
    top: 21%;
  }

  .pk-seat--top {
    top: 11%;
  }

  .pk-seat-head strong {
    font-size: 7px;
    letter-spacing: 0.06em;
  }

  .pk-flag {
    width: 14px;
    height: 9px;
  }

  .pk-seat-head .pk-flag {
    width: 15px;
    height: 9px;
  }

  .pk-opponent-flag {
    width: 14px;
    height: 9px;
    margin-left: 4px;
  }

  .pk-seat-head span {
    font-size: 4.5px;
  }

  .pk-seat-stack {
    font-size: 7px;
  }

  .pk-seat-status {
    font-size: 5px;
    letter-spacing: 0.04em;
  }

  .pk-seat-badges {
    top: -5px;
    right: 5px;
  }

  .pk-badge-role {
    min-width: 14px;
    height: 14px;
    font-size: 5.5px;
  }

  .pk-pot-float {
    top: 24%;
  }

  .pk-toast {
    top: 78%;
    padding: 9px 14px 8px;
    font-size: 23px;
  }
}

@media (max-width: 390px) {
  .pk-panel {
    padding: 14px 12px;
  }

  .pk-actions {
    gap: 6px;
  }

  .pk-btn {
    min-height: 41px;
    padding: 0 8px;
    font-size: 7.5px;
  }

  .pk-panel .fc-bet-title {
    font-size: 21px;
  }

  .pk-seat {
    min-width: 78px;
  }

  .pk-seat--left {
    left: 2%;
  }

  .pk-seat--right {
    right: 2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-loading-mark {
    animation-duration: 3s;
  }
}

/* El atributo hidden debe ganar a los display de componente. */
.pk-actions[hidden],
.pk-raise-box[hidden],
.pk-next[hidden],
.pk-toast[hidden],
.pk-pot-float[hidden] {
  display: none !important;
}

/* Cámara ------------------------------------------------------------------ */
.pk-cam {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 9;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(246, 216, 128, 0.28);
  border-radius: 50%;
  background: rgba(3, 20, 12, 0.78);
  color: var(--fc-gold);
  cursor: pointer;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 240, 184, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s var(--fc-ease);
}

.pk-cam svg {
  width: 22px;
  height: 22px;
}

.pk-cam:hover {
  border-color: rgba(246, 216, 128, 0.58);
  background: rgba(10, 36, 22, 0.9);
  transform: translateY(-1px);
}

.pk-cam:active {
  transform: translateY(0) scale(0.97);
}

.pk-cam:focus-visible {
  outline: 2px solid rgba(246, 216, 128, 0.6);
  outline-offset: 2px;
}

/* En vistas altas el bote flotante taparía las cartas; queda en el panel. */
.pk-table.is-topview .pk-pot-float {
  display: none;
}

/* --------------------------------------------------------------------------
   Selección de mesa
   -------------------------------------------------------------------------- */
.pk-wallet-line {
  margin-top: -7px;
  color: #7f796b;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.pk-wallet-line strong {
  color: #d9c18a;
  font-weight: 800;
}

.pk-change {
  min-height: 36px;
  font-size: 8px;
}

.pk-table-select {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 4vh, 44px) 18px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(25, 103, 60, 0.32), transparent 72%),
    rgba(2, 11, 6, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.pk-table-select[hidden] {
  display: none !important;
}

.pk-select-panel {
  width: min(880px, 100%);
  margin: auto;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid rgba(246, 216, 128, 0.2);
  border-radius: 24px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(232, 191, 98, 0.1), transparent 70%),
    linear-gradient(155deg, rgba(9, 35, 21, 0.98), rgba(3, 14, 9, 0.98));
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 240, 184, 0.08);
}

.pk-select-head {
  text-align: center;
}

.pk-select-head .fc-bet-kicker {
  font-size: 8px;
  color: var(--fc-gold);
}

.pk-select-title {
  margin: 5px 0 0;
  font-family: var(--fc-display);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: #f8eed6;
}

.pk-select-title em {
  color: var(--fc-gold);
  font-style: normal;
}

.pk-select-wallet {
  margin: 12px 0 0;
  color: #898273;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.pk-select-wallet strong {
  color: #ffe9ad;
  font-family: var(--fc-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.pk-table-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 22px;
}

.pk-table-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 112px;
  padding: 12px;
  border: 1px solid rgba(246, 216, 128, 0.15);
  border-radius: 12px;
  background: rgba(3, 18, 10, 0.56);
  color: #a9a08b;
  font-family: var(--fc-body);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    transform 0.22s var(--fc-ease),
    opacity 0.22s ease;
}

.pk-table-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(231, 195, 118, 0.48);
  background: rgba(16, 47, 28, 0.8);
}

.pk-table-option:disabled {
  opacity: 0.34;
  cursor: default;
}

.pk-table-option.is-featured {
  border-color: rgba(231, 195, 118, 0.38);
  background:
    linear-gradient(155deg, rgba(231, 195, 118, 0.12), transparent 62%),
    rgba(5, 22, 13, 0.72);
}

.pk-table-option-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.pk-table-option-top strong {
  color: #f2e4c2;
  font-family: var(--fc-display);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.07em;
}

.pk-table-option-top span {
  color: var(--fc-gold);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.pk-table-option-buyin {
  color: #cdbb93;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.pk-table-option-buyin b {
  color: #ffe9ad;
  font-family: var(--fc-display);
  font-size: 17px;
  font-weight: 400;
}

.pk-table-option-bots {
  color: #767060;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.pk-table-option-action {
  margin-top: auto;
  color: rgba(231, 195, 118, 0.78);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.pk-custom-table {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(246, 216, 128, 0.1);
  border-radius: 12px;
  background: rgba(3, 17, 10, 0.48);
}

.pk-custom-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #8d8573;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.pk-custom-head strong {
  color: #ffe9ad;
  font-family: var(--fc-display);
  font-size: 20px;
  font-weight: 400;
}

.pk-custom-range {
  width: 100%;
  height: 23px;
  margin: 3px 0 0;
  accent-color: #e3b454;
  cursor: pointer;
}

.pk-custom-meta {
  margin: 0 0 9px;
  color: #7f796b;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.pk-custom-meta span {
  color: #cbb78c;
}

.pk-custom-table .pk-btn {
  width: 100%;
}

.pk-select-note {
  margin: 14px 0 0;
  color: #7e7768;
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.pk-select-home {
  display: block;
  margin-top: 9px;
  color: #b9a77e;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  text-decoration: none;
}

.pk-select-home:hover {
  color: var(--fc-gold);
}

body.pk-selecting {
  overflow: hidden;
}

@media (max-width: 700px) {
  .pk-table-select {
    padding: 12px;
  }

  .pk-select-panel {
    padding: 20px 14px;
    border-radius: 20px;
  }

  .pk-table-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 16px;
  }

  .pk-table-option {
    min-height: 100px;
    padding: 10px;
  }

  .pk-table-option-top strong {
    font-size: 18px;
  }

  .pk-select-note {
    font-size: 7.5px;
  }
}

.pk-flag {
  display: inline-block;
  width: 17px;
  height: 11px;
  object-fit: cover;
  vertical-align: -1px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.pk-seat-head .pk-seat-flag {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  margin-left: 4px;
  line-height: 1;
}

.pk-seat-head .pk-flag {
  width: 18px;
  height: 11px;
}

.pk-opponent-flag {
  width: 16px;
  height: 10px;
  margin-left: 6px;
}

/* Marcador grande del bote, fuera del tapete */
.pk-pot-hud {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 9;
  min-width: 158px;
  padding: 10px 16px 11px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  border: 1px solid rgba(231, 195, 118, 0.3);
  border-radius: 15px;
  background:
    radial-gradient(ellipse 120% 150% at 100% 0%, rgba(232, 191, 98, 0.12), transparent 62%),
    linear-gradient(150deg, rgba(7, 33, 19, 0.94), rgba(2, 13, 8, 0.9));
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 240, 184, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
}

.pk-pot-hud[hidden] {
  display: none !important;
}

.pk-pot-hud-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #a89d84;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.pk-pot-hud strong {
  color: #ffeaad;
  font-family: var(--fc-display);
  font-size: 42px;
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: 0.03em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.pk-pot-hud strong small {
  margin-left: 4px;
  color: rgba(255, 232, 174, 0.55);
  font-family: var(--fc-body);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

@media (max-width: 900px) {
  .pk-pot-hud {
    top: 10px;
    right: 10px;
    min-width: 128px;
    padding: 7px 11px 8px;
  }

  .pk-pot-hud strong {
    font-size: 32px;
  }

  .pk-pot-hud strong small {
    font-size: 7px;
  }
}

@media (max-width: 700px) {
  .pk-pot-hud {
    top: 8px;
    right: 8px;
    min-width: 92px;
    padding: 5px 8px 6px;
    border-radius: 11px;
  }

  .pk-pot-hud strong {
    font-size: 26px;
  }

  .pk-pot-hud strong small {
    margin-left: 3px;
    font-size: 6px;
  }

  .pk-pot-hud-label {
    gap: 4px;
    font-size: 5.5px;
  }

  .pk-pot-hud .pk-pot-chip {
    width: 8px;
    height: 8px;
  }
}


@media (max-width: 340px) {
  .pk-head {
    transform: translateX(calc(-50% - 22px));
  }
}


/* Móvil: acciones siempre visibles y mesa a sangre */
@media (max-width: 900px) {
  .pk-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 9px calc(8px + env(safe-area-inset-bottom));
    background:
      linear-gradient(180deg, rgba(4, 18, 10, 0.92), rgba(2, 10, 6, 0.98));
    border-top: 1px solid rgba(246, 216, 128, 0.18);
    box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .pk-actions[hidden] {
    display: none !important;
  }

  .pk-actions .pk-btn {
    min-height: 46px;
    padding: 0 6px;
    font-size: 8px;
    letter-spacing: 0.06em;
  }

  .pk-panel {
    padding-bottom: 88px;
  }

  .pk-raise-box {
    position: fixed;
    left: 9px;
    right: 9px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 62;
    background: rgba(3, 16, 9, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  }

  .pk-next,
  .pk-reload {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 61;
    width: auto;
    min-height: 50px;
  }

  .pk-stage {
    padding-left: 4px;
    padding-right: 4px;
  }
}


@media (max-width: 900px) {
  .pk-cam {
    left: 10px;
    bottom: 10px;
    width: 42px;
    height: 42px;
  }

  .pk-cam svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 700px) {
  .pk-cam {
    left: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
  }

  .pk-cam svg {
    width: 19px;
    height: 19px;
  }
}


@media (max-width: 700px) {
  .pk-board-cards {
    gap: 5px;
  }

  .pk-board-cards .pk-card-label {
    font-size: 21px;
  }

  .pk-hole-labels .pk-card-label {
    width: 58px;
    height: 82px;
    font-size: 28px;
  }
}


/* En móvil, las dos secciones de cartas caben antes de la barra fija */
@media (max-width: 700px) {
  .pk-panel {
    gap: 8px;
  }

  .pk-panel-head {
    padding-bottom: 6px;
  }

  .pk-board-block {
    margin: 6px 0;
  }

  .pk-board-cards {
    max-width: 250px;
    margin-inline: auto;
    gap: 5px;
  }

  .pk-board-cards .pk-card-label {
    height: 58px;
    aspect-ratio: auto;
    padding: 2px;
    font-size: 18px;
    border-radius: 7px;
  }

  .pk-board-cards .pk-card-label i {
    font-size: 11px;
  }

  .pk-hand-box--simple {
    padding: 9px 10px;
  }



  .pk-hand-box--simple .pk-hole-labels {
    margin-top: 5px;
    gap: 7px;
  }

  .pk-hole-labels .pk-card-label {
    width: 50px;
    height: 64px;
    font-size: 24px;
  }

  .pk-hole-labels .pk-card-label i {
    font-size: 14px;
  }
}


@media (max-width: 700px) {
  .pk-hand-line {
    gap: 8px;
    margin-top: 5px;
  }

  .pk-hand-rank {
    font-size: 14px;
    line-height: 1.3;
    padding: 5px 8px;
  }
}


/* Panel: dos secciones iguales, MESA y TU MANO ---------------------------- */
.pk-panel {
  --pk-card-w: 54px;
}

.pk-card-section {
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(246, 216, 128, 0.11);
}

.pk-card-section:last-of-type {
  border-bottom: 1px solid rgba(246, 216, 128, 0.11);
}

.pk-card-section .pk-section-title {
  margin: 0 0 6px;
}

.pk-card-section .pk-board-cards,
.pk-card-section .pk-hole-labels {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 0;
  margin: 0;
}

.pk-card-section .pk-card-label {
  flex: 0 0 var(--pk-card-w);
  width: var(--pk-card-w);
  height: calc(var(--pk-card-w) * 1.5);
  min-width: 0;
  padding: 4px 2px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 8px;
  aspect-ratio: auto;
  font-size: 26px;
}

.pk-card-section .pk-card-label i {
  font-size: 14px;
  line-height: 1;
}

.pk-card-section .pk-hand-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  margin: 0;
}

.pk-card-section .pk-hand-line .pk-hole-labels {
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .pk-panel {
    --pk-card-w: 46px;
  }

  .pk-card-section {
    padding: 10px 0;
  }

  .pk-card-section .pk-board-cards,
  .pk-card-section .pk-hole-labels {
    gap: 6px;
  }

  .pk-card-section .pk-card-label {
    padding: 3px 2px;
    border-radius: 7px;
    font-size: 23px;
  }

  .pk-card-section .pk-card-label i {
    font-size: 12px;
  }

  .pk-card-section .pk-hand-line {
    gap: 8px;
  }

  .pk-card-section .pk-hand-line .pk-hole-labels {
    gap: 6px;
  }
}

/* Ajuste fino para que las dos secciones queden completas sobre la barra fija */
@media (max-width: 700px) {
  .pk-stage {
    height: clamp(330px, 47vh, 450px);
  }

  .pk-panel {
    --pk-card-w: 42px;
    gap: 6px;
  }

  .pk-card-section {
    padding: 8px 0;
  }

  .pk-actions {
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .pk-actions .pk-btn {
    min-height: 42px;
  }
}

.fd-draw-actions {
  grid-template-columns: 1fr 1fr;
}

.pk-hole-labels .pk-card-label[data-index] {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pk-hole-labels .pk-card-label.is-selected {
  border-color: rgba(255, 240, 184, 0.95);
  box-shadow:
    0 0 0 2px rgba(232, 191, 98, 0.45),
    0 8px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-5px);
}

.pk-hole-labels .pk-card-label.is-back {
  cursor: default;
}

@media (max-width: 900px) {
  .fd-draw-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* Cinco cartas dejan más sitio al nombre de la jugada */
.pk-panel {
  --pk-card-w: 40px;
}

.pk-hand-rank {
  font-size: 13px;
}

@media (max-width: 700px) {
  .pk-panel {
    --pk-card-w: 38px;
  }

  .pk-hand-line {
    gap: 7px;
  }

  .pk-hand-rank {
    font-size: 11.5px;
  }
}

/* Selección de mesa: tamaños y header visible */
.pk-table-option-top strong { font-size: 20px; }
.pk-table-option-top span { font-size: 10px; }
.pk-table-option-buyin { font-size: 12px; }
.pk-table-option-buyin b { font-size: 18px; }
.pk-table-option-bots { font-size: 11px; }
.pk-table-option-action { font-size: 11px; }
@media (max-width: 900px) {
  .pk-table-select { z-index: 25; padding-top: 122px; }
}
@media (max-width: 700px) {
  .pk-table-option { min-height: 145px; }
  .pk-table-option-top strong { font-size: 16px; }
  .pk-table-option-top span { font-size: 10px; }
  .pk-table-option-buyin { font-size: 12px; }
  .pk-table-option-buyin b { font-size: 16px; }
  .pk-table-option-bots { font-size: 11px; }
  .pk-table-option-action { font-size: 11px; }
}

/* Acciones del póker con el tamaño de GIRAR/LIMPIAR */
.pk-actions .pk-btn {
  min-height: 48px;
  font-size: 18px;
  letter-spacing: 0.06em;
}
@media (max-width: 900px) {
  .pk-actions .pk-btn {
    min-height: 50px;
    font-size: 16px;
    padding: 0 4px;
    letter-spacing: 0.04em;
  }
}


/* Mano sin cortar letras y botones a 15 px en móvil */
.pk-hand-rank {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.pk-actions .pk-btn { font-size: 17px; }
@media (max-width: 900px) {
  .pk-actions .pk-btn { font-size: 15px; }
}
#pk-call small { font-size: 1em; }
