:root {
  color-scheme: dark;
  --gold: #efc75e;
  --card-width: clamp(62px, 7.1vw, 108px);
  --card-height: calc(var(--card-width) * 1.485);
}

* { box-sizing: border-box; }

html, body, #app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: #050805;
  color: #fff0bc;
  font-family: Georgia, "Times New Roman", serif;
}

button { font: inherit; }

.intro-screen,
.start-screen,
.solitaire-table {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.intro-screen {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(199,145,36,.22), transparent 34%),
    linear-gradient(145deg, #160c05, #020201 72%);
}

.intro-glow {
  position: absolute;
  width: min(76vw, 560px);
  aspect-ratio: 1;
  border: 1px solid rgba(239,199,94,.18);
  border-radius: 50%;
  box-shadow: 0 0 100px rgba(208,148,37,.12), inset 0 0 80px rgba(208,148,37,.08);
}

.intro-brand {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  animation: intro-arrive 900ms ease-out both;
}

.intro-brand img {
  width: clamp(92px, 12vw, 150px);
  border: 2px solid #e0b959;
  border-radius: 10px;
  box-shadow: 0 18px 45px #000, 0 0 28px rgba(236,190,73,.26);
}

.intro-brand p { margin: 22px 0 4px; color: #c79b3e; font-size: 10px; letter-spacing: .38em; }
.intro-brand h1 { margin: 0; color: #f5d57d; font-size: clamp(42px, 8vw, 78px); letter-spacing: .11em; text-shadow: 0 5px 20px #000; }
.intro-brand span { color: #a57c30; font-size: 13px; letter-spacing: .48em; }

@keyframes intro-arrive {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.start-screen {
  display: grid;
  place-items: center;
  background: url("../assets/backgrounds/start.webp") center / cover no-repeat;
}

.start-screen__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4,2,1,.9), rgba(5,3,1,.35), rgba(4,2,1,.82));
}

.start-card {
  position: relative;
  z-index: 2;
  width: min(420px, 92vw);
  padding: 26px 32px 22px;
  border: 1px solid rgba(239,199,94,.52);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(43,22,9,.94), rgba(8,4,2,.94));
  box-shadow: 0 28px 80px rgba(0,0,0,.75), inset 0 1px rgba(255,255,255,.08);
  text-align: center;
}

.start-card__deck img { width: 78px; border: 2px solid #e0b959; border-radius: 7px; box-shadow: 0 10px 22px #000; }
.start-card__eyebrow { margin: 14px 0 2px; color: #b68a34; font-size: 9px; letter-spacing: .3em; }
.start-card h1 { margin: 0; color: #f4d276; font-size: clamp(38px, 7vw, 58px); letter-spacing: .08em; }
.start-card__mode { margin: 4px 0 20px; color: #dcc27e; font-size: 11px; letter-spacing: .18em; }
.start-card small { display: block; margin-top: 15px; color: #876c3d; font: 10px Arial, sans-serif; }

.start-menu { display: grid; gap: 8px; }
.start-menu button {
  min-height: 43px;
  border: 1px solid rgba(223,181,76,.35);
  border-radius: 8px;
  color: #e4ca89;
  background: rgba(0,0,0,.38);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
}
.start-menu button:not(:disabled) { cursor: pointer; }
.start-menu__play {
  color: #2a1604 !important;
  border-color: #ffe499 !important;
  background: linear-gradient(#f8dc83, #b87918) !important;
  box-shadow: 0 6px 18px rgba(215,157,42,.25);
}
.start-menu button:disabled { opacity: .35; }

.solitaire-table {
  padding: clamp(18px, 4vw, 68px);
  background:
    linear-gradient(rgba(0,0,0,.08), rgba(0,0,0,.2)),
    url("../assets/tables/MESA_FRANCESA.webp") center / 100% 100% no-repeat,
    #075222;
}

.solitaire-top-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(6px, 3vw, 42px);
}

.solitaire-stock-area,
.solitaire-foundations {
  display: flex;
  gap: clamp(8px, 1.4vw, 20px);
}

.solitaire-pile,
.solitaire-column {
  position: relative;
  width: var(--card-width);
  min-width: 0;
}

.solitaire-pile { height: var(--card-height); }

.solitaire-card {
  display: block;
  width: var(--card-width);
  height: var(--card-height);
  object-fit: cover;
  border-radius: clamp(5px, .65vw, 9px);
  box-shadow: 0 7px 12px rgba(0,0,0,.48);
}

.solitaire-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(236,211,143,.27);
  border-radius: 9px;
  color: rgba(246,218,145,.4);
  font-size: calc(var(--card-width) * .45);
  background: rgba(0,0,0,.12);
}

.solitaire-empty--corazones,
.solitaire-empty--diamantes { color: rgba(170,30,24,.5); }

.solitaire-count {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 9px;
  color: #f3d47e;
  background: rgba(0,0,0,.68);
  font: 10px Arial, sans-serif;
}

.solitaire-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, var(--card-width)));
  justify-content: space-between;
  gap: clamp(5px, 1.2vw, 18px);
  margin-top: clamp(32px, 5vh, 62px);
  padding: 0 clamp(4px, 2vw, 28px);
}

.solitaire-column {
  height: calc(100vh - var(--card-height) - 145px);
}

.solitaire-column {
  position: relative;
}

.solitaire-column > .solitaire-card {
  position: absolute;
  left: 0;
}

@media (max-width: 700px) {
  :root { --card-width: clamp(42px, 12vw, 66px); }
  .solitaire-table { padding: 24px 10px 12px; }
  .solitaire-top-row { padding: 0 4px; gap: 8px; }
  .solitaire-stock-area, .solitaire-foundations { gap: 5px; }
  .solitaire-columns { gap: 4px; margin-top: 35px; padding: 0 2px; }
  .solitaire-column > .solitaire-card { top: calc(var(--card-index) * clamp(23px, 4.2vh, 34px)); }
  .solitaire-card[data-face-up="false"] { top: calc(var(--card-index) * clamp(13px, 2.2vh, 20px)); }
  .start-card { padding: 22px 20px 18px; }
}

/* ETAPA A — Mesa Premium, sin interacción */
:root {
  --premium-gold: #e8c66e;
  --premium-panel: rgba(8, 13, 9, .82);
  --card-width: clamp(68px, 6.4vw, 102px);
  --card-height: calc(var(--card-width) * 1.485);
}

.solitaire-table {
  display: grid;
  grid-template-rows: 46px 56px minmax(0, 1fr) 46px;
  padding: 0;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(4,8,5,.1), rgba(2,5,3,.36)),
    url("../assets/tables/MESA_FRANCESA.webp") center / cover no-repeat,
    #075222;
}

.solitaire-table::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 48%, rgba(0,0,0,.34) 100%),
    linear-gradient(90deg, rgba(30,12,4,.42), transparent 9%, transparent 91%, rgba(30,12,4,.42));
}

.solitaire-ad-space {
  position: relative;
  border-bottom: 1px solid rgba(231,198,110,.18);
  background: rgba(3,7,4,.72);
}

.solitaire-ad-space::after {
  content: "PUBLICIDAD";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(239,215,151,.23);
  font: 8px Arial, sans-serif;
  letter-spacing: .28em;
}

.solitaire-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 4vw, 66px);
  border-bottom: 1px solid rgba(232,198,110,.35);
  background: linear-gradient(90deg, rgba(7,11,8,.91), rgba(20,23,16,.72), rgba(7,11,8,.91));
  box-shadow: 0 5px 18px rgba(0,0,0,.28);
}

.solitaire-hud__brand { display: flex; align-items: baseline; gap: 10px; }
.solitaire-hud__brand span { color: #a98035; font-size: 8px; letter-spacing: .28em; }
.solitaire-hud__brand strong { color: #f0d582; font-size: 18px; letter-spacing: .08em; }
.solitaire-hud__stats { display: flex; height: 100%; }
.solitaire-hud__stats > div {
  min-width: 112px;
  display: grid;
  place-content: center;
  text-align: center;
  border-left: 1px solid rgba(232,198,110,.17);
}
.solitaire-hud__stats > div:last-child { border-right: 1px solid rgba(232,198,110,.17); }
.solitaire-hud__stats small { color: #a89056; font: 7px Arial, sans-serif; letter-spacing: .16em; }
.solitaire-hud__stats strong { margin-top: 2px; color: #f4dda0; font: 700 15px Arial, sans-serif; }

.solitaire-board {
  position: relative;
  min-height: 0;
  margin: clamp(9px, 1.4vh, 16px) clamp(12px, 2.2vw, 36px) 8px;
  padding: clamp(14px, 2.2vh, 26px) clamp(14px, 2.2vw, 36px);
  border: 1px solid rgba(239,207,120,.2);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(6,74,31,.19), rgba(2,33,15,.23));
  box-shadow: inset 0 0 50px rgba(0,0,0,.24), 0 9px 24px rgba(0,0,0,.24);
}

.solitaire-top-row { padding: 0; }
.solitaire-stock-area, .solitaire-foundations { gap: clamp(9px, 1.25vw, 18px); }

.solitaire-card {
  border: 2px solid rgba(251,243,217,.88);
  border-radius: clamp(6px, .6vw, 9px);
  filter: saturate(1.03) contrast(1.02);
  box-shadow: 0 8px 12px rgba(0,0,0,.46), 0 2px 2px rgba(0,0,0,.35);
}

.solitaire-card--back {
  box-shadow: 5px 5px 0 rgba(218,207,176,.68), 8px 8px 0 rgba(74,52,28,.7), 0 12px 18px rgba(0,0,0,.45);
}

.solitaire-empty {
  border: 2px solid rgba(237,216,157,.34);
  background: rgba(0,0,0,.13);
  box-shadow: inset 0 0 18px rgba(0,0,0,.16);
}

.solitaire-count {
  bottom: -16px;
  border: 1px solid rgba(232,198,110,.3);
  color: #f2d889;
  background: rgba(4,8,5,.82);
}

.solitaire-columns {
  grid-template-columns: repeat(7, var(--card-width));
  gap: clamp(7px, 1.45vw, 22px);
  margin-top: clamp(30px, 4.2vh, 52px);
  padding: 0;
}

.solitaire-column {
  min-height: calc(var(--card-height) + 185px);
  height: calc(100vh - 330px);
}

.solitaire-column > .solitaire-card {
  top: calc(var(--card-index) * clamp(28px, 3.7vh, 42px));
}

.solitaire-card[data-face-up="false"] {
  top: calc(var(--card-index) * clamp(17px, 2.15vh, 25px));
}

.solitaire-bottom-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(12px, 3vw, 44px);
  border-top: 1px solid rgba(232,198,110,.28);
  background: rgba(3,7,4,.88);
}

.solitaire-bottom-bar > span { color: #94793f; font: 8px Arial, sans-serif; letter-spacing: .22em; }
.solitaire-bottom-bar > div { justify-self: end; display: flex; gap: 7px; }
.solitaire-bottom-bar button {
  min-width: 86px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(226,192,101,.28);
  border-radius: 5px;
  color: rgba(244,220,154,.62);
  background: rgba(43,35,20,.52);
  font: 700 8px Arial, sans-serif;
  letter-spacing: .08em;
  pointer-events: none;
}

@media (max-width: 700px) {
  :root { --card-width: clamp(42px, 11.6vw, 60px); }
  .solitaire-table { grid-template-rows: 38px 48px minmax(0,1fr) 40px; }
  .solitaire-hud { padding: 0 8px; gap: 5px; }
  .solitaire-hud__brand span { display: none; }
  .solitaire-hud__brand strong { font-size: 12px; }
  .solitaire-hud__stats > div { min-width: 58px; }
  .solitaire-hud__stats small { font-size: 5px; letter-spacing: .08em; }
  .solitaire-hud__stats strong { font-size: 11px; }
  .solitaire-board { margin: 5px 4px 3px; padding: 10px 4px; border-radius: 13px; }
  .solitaire-stock-area, .solitaire-foundations { gap: 4px; }
  .solitaire-columns { gap: 3px; margin-top: 29px; }
  .solitaire-column { height: calc(100vh - 255px); min-height: calc(var(--card-height) + 150px); }
  .solitaire-column > .solitaire-card { top: calc(var(--card-index) * clamp(25px, 4.1vh, 35px)); }
  .solitaire-card[data-face-up="false"] { top: calc(var(--card-index) * clamp(14px, 2.1vh, 20px)); }
  .solitaire-bottom-bar { grid-template-columns: 1fr auto; padding: 0 7px; }
  .solitaire-bottom-bar > span { display: none; }
  .solitaire-bottom-bar button { min-width: 61px; height: 26px; padding: 0 7px; font-size: 7px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --card-width: clamp(48px, 5.2vw, 70px); }
  .solitaire-table { grid-template-rows: 28px 38px minmax(0,1fr) 34px; }
  .solitaire-ad-space::after { font-size: 6px; }
  .solitaire-hud__brand strong { font-size: 12px; }
  .solitaire-hud__stats > div { min-width: 70px; }
  .solitaire-board { margin: 4px 12px 2px; padding: 7px 15px; }
  .solitaire-columns { margin-top: 22px; }
  .solitaire-column { height: calc(100vh - 190px); min-height: 170px; }
  .solitaire-column > .solitaire-card { top: calc(var(--card-index) * 25px); }
  .solitaire-card[data-face-up="false"] { top: calc(var(--card-index) * 14px); }
}

/* Victoria 0.3: estado visible, todavía sin animaciones */
.solitaire-win {
  position: absolute;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2,7,4,.7);
  backdrop-filter: blur(3px);
}

.solitaire-win > div {
  width: min(430px, 90vw);
  display: grid;
  justify-items: center;
  padding: 30px;
  border: 1px solid #e5c366;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(38,27,12,.97), rgba(5,9,6,.97));
  box-shadow: 0 25px 70px rgba(0,0,0,.68);
  text-align: center;
}

.solitaire-win small { color: #a88742; font: 8px Arial,sans-serif; letter-spacing: .25em; }
.solitaire-win strong { margin-top: 7px; color: #f4d478; font-size: clamp(38px, 7vw, 62px); letter-spacing: .06em; }
.solitaire-win b { color: #b9964e; font-size: 13px; letter-spacing: .28em; }
.solitaire-win span { margin-top: 5px; color: #dfcc92; font: 11px Arial,sans-serif; }
.solitaire-win button {
  min-width: 190px;
  height: 44px;
  margin-top: 22px;
  border: 1px solid #f0d274;
  border-radius: 7px;
  color: #251504;
  background: linear-gradient(#f5d779, #b87a1b);
  font: 900 11px Arial,sans-serif;
  letter-spacing: .12em;
  cursor: pointer;
}

/* Ajustes ópticos finales de la mesa */
.solitaire-stock-area {
  gap: clamp(14px, 1.7vw, 25px);
}

.solitaire-columns {
  position: relative;
  left: -5px;
}

@media (max-width: 700px) {
  .solitaire-stock-area { gap: 7px; }
  .solitaire-columns { left: -1px; }
}

/* ETAPA B — Selección y arrastre preciso */
.solitaire-card[data-face-up="true"],
.solitaire-stock {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.solitaire-card.is-selected {
  z-index: 80 !important;
  transform: translateY(-8px);
  border-color: #ffe79b;
  filter: brightness(1.08) drop-shadow(0 0 8px rgba(255,220,111,.62));
}

.solitaire-card.is-drag-source {
  opacity: .18;
}

.solitaire-column.is-valid-target,
.solitaire-foundation.is-valid-target {
  border-radius: 10px;
  outline: 2px solid rgba(255,224,126,.78);
  outline-offset: 5px;
  background: rgba(255,220,100,.08);
  box-shadow: 0 0 22px rgba(255,211,91,.2);
}

.solitaire-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  height: 1px;
  pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 15px 12px rgba(0,0,0,.55));
}

.solitaire-drag-ghost__card {
  position: absolute;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: .673;
  transform: none !important;
}

.solitaire-drag-ghost.is-returning {
  transition: transform 180ms cubic-bezier(.2,.8,.25,1);
}

.solitaire-drag-ghost.is-dropping {
  opacity: 0;
  transform: scale(.98);
  transition: opacity 120ms ease, transform 120ms ease;
}

@media (hover: hover) {
  .solitaire-card[data-face-up="true"]:hover {
    filter: brightness(1.06) drop-shadow(0 5px 7px rgba(0,0,0,.42));
  }
}

/* ETAPA D.3 — Comodidad */
.solitaire-bottom-bar button[data-undo],
.solitaire-bottom-bar button[data-hint],
.solitaire-bottom-bar button[data-back-game] {
  pointer-events: auto;
  cursor: pointer;
  color: rgba(248,224,158,.82);
}

.solitaire-game-notice {
  position: absolute;
  left: 50%;
  bottom: 58px;
  z-index: 500;
  transform: translateX(-50%);
  padding: 9px 15px;
  border: 1px solid rgba(239,203,105,.55);
  border-radius: 8px;
  color: #f3d88d;
  background: rgba(4,8,5,.9);
  box-shadow: 0 8px 24px rgba(0,0,0,.38);
  font: 800 9px Arial,sans-serif;
  letter-spacing: .08em;
  pointer-events: none;
  animation: solitaire-notice 1.5s ease both;
}

@keyframes solitaire-notice {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  15%, 78% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -4px); }
}

.is-hint-source {
  animation: solitaire-hint-source 760ms ease-in-out infinite alternate !important;
  z-index: 120 !important;
}

.is-hint-target {
  outline: 2px solid rgba(255,225,126,.82) !important;
  outline-offset: 6px;
  border-radius: 10px;
  animation: solitaire-hint-target 760ms ease-in-out infinite alternate;
}

@keyframes solitaire-hint-source {
  from { filter: brightness(1) drop-shadow(0 0 2px rgba(255,221,112,.3)); }
  to { filter: brightness(1.14) drop-shadow(0 0 12px rgba(255,221,112,.9)); }
}

@keyframes solitaire-hint-target {
  from { background-color: rgba(255,220,100,.03); }
  to { background-color: rgba(255,220,100,.14); }
}

/* ETAPA D.2 — Animaciones Premium */
.solitaire-card.is-deal-card {
  animation: solitaire-deal-card 440ms cubic-bezier(.18,.78,.28,1) both;
  animation-delay: var(--deal-delay, 0ms);
  will-change: transform, opacity;
}

@keyframes solitaire-deal-card {
  0% {
    opacity: 0;
    transform: translate3d(var(--deal-x), var(--deal-y), 0) rotate(-4deg) scale(.94);
  }
  72% { opacity: 1; transform: translate3d(0, -3px, 0) rotate(.5deg) scale(1.012); }
  100% { opacity: 1; transform: none; }
}

.solitaire-card.is-card-flipping {
  animation: solitaire-card-flip 390ms cubic-bezier(.3,.72,.25,1) both;
  transform-origin: center;
  backface-visibility: hidden;
}

@keyframes solitaire-card-flip {
  0% { transform: perspective(700px) rotateY(-88deg) scale(.97); filter: brightness(.72); }
  55% { transform: perspective(700px) rotateY(5deg) scale(1.02); filter: brightness(1.1); }
  100% { transform: perspective(700px) rotateY(0) scale(1); filter: none; }
}

.solitaire-card.is-foundation-arrival {
  animation: solitaire-foundation-arrival 330ms cubic-bezier(.2,.78,.28,1) both;
  animation-delay: var(--arrival-delay, 0ms);
  z-index: 90;
}

@keyframes solitaire-foundation-arrival {
  0% { opacity: .65; transform: translate3d(-28px, 34px, 0) scale(.94); }
  72% { opacity: 1; transform: translate3d(0, -3px, 0) scale(1.015); }
  100% { transform: none; }
}

.solitaire-card.is-card-landing {
  animation: solitaire-card-landing 240ms cubic-bezier(.2,.8,.3,1) both;
}

@keyframes solitaire-card-landing {
  0% { transform: translateY(-5px) scale(1.012); }
  58% { transform: translateY(2px) scale(.995); }
  100% { transform: none; }
}

.solitaire-win {
  animation: solitaire-win-shade 340ms ease-out both;
}

.solitaire-win > div,
.solitaire-win > div.is-win-arriving {
  animation: solitaire-win-panel 460ms cubic-bezier(.2,.78,.28,1) both;
}

@keyframes solitaire-win-shade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes solitaire-win-panel {
  0% { opacity: 0; transform: translateY(14px) scale(.97); }
  75% { opacity: 1; transform: translateY(-2px) scale(1.006); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .solitaire-card.is-deal-card,
  .solitaire-card.is-card-flipping,
  .solitaire-card.is-foundation-arrival,
  .solitaire-card.is-card-landing,
  .solitaire-win,
  .solitaire-win > div { animation: none !important; }
}

/* Infraestructura común de Configuración y Legales */
.settings-overlay[hidden],
.legal-view[hidden],
[data-settings-main][hidden] { display: none !important; }

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(2,3,2,.78);
  backdrop-filter: blur(5px);
}

.full-settings {
  width: min(760px, 96vw);
  max-height: min(790px, 95vh);
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
  border: 1px solid #d9b453;
  border-radius: 18px;
  color: #f3dfaa;
  background: linear-gradient(145deg, #291608, #090704 72%);
  box-shadow: 0 25px 80px rgba(0,0,0,.82);
}

.full-settings > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 19px;
  border-bottom: 1px solid rgba(234,197,101,.24);
  background: rgba(0,0,0,.25);
}

.full-settings > header small { color: #a78039; font: 8px Arial,sans-serif; letter-spacing: .2em; }
.full-settings h2 { margin: 2px 0 0; color: #f6dda0; font-size: 22px; }
.full-settings > header button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(234,197,101,.38);
  border-radius: 50%;
  color: #f7dda0;
  background: #160d07;
  font-size: 25px;
}

.settings-scroll {
  overflow: auto;
  padding: 4px 19px 22px;
  scrollbar-color: #a87525 #130b06;
}

.settings-scroll h3 {
  margin: 18px 0 8px;
  color: #cfa544;
  font: 800 9px Arial,sans-serif;
  letter-spacing: .2em;
}

.setting-block {
  padding: 11px;
  border: 1px solid rgba(234,197,101,.15);
  border-radius: 11px;
  background: rgba(0,0,0,.19);
}
.setting-block + .setting-block { margin-top: 9px; }
.setting-block > b { display: block; margin-bottom: 9px; font: 800 11px Arial,sans-serif; }

.setting-backs,
.setting-tables { display: flex; flex-wrap: wrap; gap: 8px; }
.setting-backs button,
.setting-tables button {
  position: relative;
  width: 76px;
  min-height: 90px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(230,194,99,.25);
  border-radius: 8px;
  color: #d9bd76;
  background: rgba(0,0,0,.25);
  font: 8px Arial,sans-serif;
}
.setting-backs img { width: 52px; height: 76px; object-fit: cover; border-radius: 5px; }
.setting-tables button { width: 128px; min-height: 82px; }
.setting-tables img { width: 112px; height: 62px; object-fit: cover; border-radius: 5px; }
.setting-tables i { font-size: 28px; font-style: normal; color: #806d43; }
.setting-backs button.is-selected,
.setting-tables button.is-selected,
.language-row button.is-selected {
  border-color: #f1d06e;
  box-shadow: 0 0 0 2px rgba(238,197,83,.15), 0 0 16px rgba(238,197,83,.12);
  background: rgba(115,78,20,.27);
}
.setting-tables button:disabled { opacity: .36; }

.settings-options {
  overflow: hidden;
  border: 1px solid rgba(234,197,101,.14);
  border-radius: 11px;
  background: rgba(0,0,0,.18);
}
.toggle-row,
.volume-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 13px;
  border-bottom: 1px solid rgba(234,197,101,.1);
  font: 12px Arial,sans-serif;
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row small { margin-left: 5px; color: #7e704d; font-size: 7px; letter-spacing: .12em; }
.toggle-row.is-future { opacity: .46; }
.toggle-row button {
  width: 70px;
  height: 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px 3px 4px;
  border: 1px solid #66491d;
  border-radius: 17px;
  color: #95866a;
  background: #21150d;
}
.toggle-row button i { width: 21px; height: 21px; border-radius: 50%; background: #84765f; }
.toggle-row button b { font-size: 8px; }
.toggle-row button[aria-checked="true"] { color: #211403; background: #d6a23d; border-color: #f7d87c; }
.toggle-row button[aria-checked="true"] i { order: 2; background: #fff0bd; }
.volume-row input { flex: 1; accent-color: #d2a039; }
.volume-row output { min-width: 38px; color: #e8c362; text-align: right; }

.language-row,
.legal-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.language-row button,
.legal-row button {
  min-height: 39px;
  border: 1px solid rgba(234,197,101,.28);
  border-radius: 7px;
  color: #dfc784;
  background: rgba(0,0,0,.24);
  font: 800 9px Arial,sans-serif;
}

.full-settings > footer {
  padding: 10px 19px;
  border-top: 1px solid rgba(234,197,101,.2);
  text-align: right;
}
.full-settings > footer button {
  min-width: 125px;
  height: 37px;
  border: 1px solid #e4c361;
  border-radius: 7px;
  color: #211304;
  background: linear-gradient(#f0cf72,#aa711a);
  font: 900 10px Arial,sans-serif;
}

.legal-view {
  min-height: 440px;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 12px 18px 18px;
}
.legal-view > button { justify-self: start; margin-bottom: 8px; border: 0; color: #e4bd58; background: transparent; }
.legal-view iframe { width: 100%; height: 100%; min-height: 390px; border: 1px solid rgba(234,197,101,.25); border-radius: 8px; background: #120d09; }

.reduce-game-motion *,
.reduce-game-motion *::before,
.reduce-game-motion *::after {
  animation-duration: .01ms !important;
  transition-duration: .01ms !important;
}

@media (max-width: 600px) {
  .settings-overlay { padding: 5px; }
  .full-settings { width: 100%; max-height: 98vh; border-radius: 12px; }
  .full-settings > header { padding: 10px 12px; }
  .full-settings h2 { font-size: 18px; }
  .settings-scroll { padding: 3px 10px 16px; }
  .language-row, .legal-row { grid-template-columns: 1fr; }
  .setting-tables button { width: calc(33.333% - 6px); }
  .legal-view { min-height: 68vh; }
}

/* Cierre definitivo SOLITARIO 0.2 */
.solitaire-ad-space::after {
  content: none;
}

.solitaire-hud {
  background: linear-gradient(90deg, rgba(7,11,8,.82), rgba(20,23,16,.65), rgba(7,11,8,.82));
  box-shadow: 0 4px 16px rgba(0,0,0,.22);
}

.solitaire-foundations {
  transform: translateY(-24px);
}

.solitaire-columns {
  transform: translateY(-24px);
}

.solitaire-card {
  box-shadow: 0 8px 17px rgba(0,0,0,.34), 0 2px 5px rgba(0,0,0,.25);
}

.solitaire-card--back {
  box-shadow: 5px 5px 0 rgba(218,207,176,.62), 8px 8px 0 rgba(74,52,28,.58), 0 13px 22px rgba(0,0,0,.34);
}

@media (max-width: 700px) {
  .solitaire-foundations,
  .solitaire-columns {
    transform: translateY(-14px);
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .solitaire-foundations,
  .solitaire-columns {
    transform: translateY(-10px);
  }
}

/* SOLITARIO 0.2 — Pulido visual */
:root {
  --card-width: clamp(74px, 6.95vw, 111px);
}

.solitaire-table {
  grid-template-rows: clamp(64px, 9vh, 96px) 56px minmax(0, 1fr) 46px;
}

.solitaire-ad-space {
  margin: 6px clamp(12px, 2.2vw, 36px) 0;
  border: 1px solid rgba(231,198,110,.12);
  border-radius: 8px;
  background: rgba(3,7,4,.58);
}

.solitaire-board {
  margin-top: clamp(12px, 1.7vh, 20px);
}

.solitaire-columns {
  gap: clamp(10px, 1.7vw, 27px);
}

.solitaire-foundation .solitaire-empty {
  border-width: 1px;
  border-color: rgba(237,206,121,.46);
  color: rgba(236,210,143,.4);
  font-size: calc(var(--card-width) * .34);
  background: linear-gradient(145deg, rgba(16,68,35,.26), rgba(0,0,0,.17));
  box-shadow:
    inset 0 0 0 3px rgba(235,200,107,.035),
    inset 0 0 18px rgba(0,0,0,.18),
    0 5px 12px rgba(0,0,0,.18);
}

.solitaire-foundation .solitaire-empty--corazones,
.solitaire-foundation .solitaire-empty--diamantes {
  color: rgba(168,40,29,.48);
}

.solitaire-waste .solitaire-count {
  display: none;
}

.start-screen__shade {
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

.start-menu__play {
  min-height: 52px !important;
  font-size: 14px !important;
  letter-spacing: .14em !important;
}

@media (max-width: 700px) {
  :root { --card-width: clamp(44px, 12.15vw, 63px); }
  .solitaire-table { grid-template-rows: clamp(54px, 8vh, 70px) 48px minmax(0,1fr) 40px; }
  .solitaire-ad-space { margin: 4px 5px 0; }
  .solitaire-board { margin-top: 7px; }
  .solitaire-columns { gap: 4px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  :root { --card-width: clamp(51px, 5.55vw, 75px); }
  .solitaire-table { grid-template-rows: 42px 38px minmax(0,1fr) 34px; }
  .solitaire-ad-space { margin: 3px 10px 0; }
  .solitaire-board { margin-top: 4px; }
  .solitaire-columns { gap: clamp(7px, 1.4vw, 18px); }
}
.solitaire-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.solitaire-tools button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.solitaire-tools img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.45));
}

.solitaire-tools button:hover img {
  filter:
    brightness(1.12)
    drop-shadow(0 0 9px rgba(239,199,94,.55))
    drop-shadow(0 5px 8px rgba(0,0,0,.45));
}

.solitaire-mode-label {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);

  color: rgba(239,199,94,.58);
  font: 700 8px Arial, sans-serif;
  letter-spacing: .22em;
  pointer-events: none;
  z-index: 40;
}

.solitaire-bottom-bar {
  display: none !important;
}
/* =========================================================
   A16.1 — PUCARÁ POKER · ESTRUCTURA GENERAL
   ========================================================= */

:root {
  --poker-gold: #efc75e;
  --poker-gold-light: #ffe59a;
  --poker-gold-dark: #8d5b16;

  --poker-panel: rgba(4, 8, 5, 0.86);
  --poker-panel-soft: rgba(8, 16, 10, 0.72);
  --poker-border: rgba(239, 199, 94, 0.38);

  --poker-card-width: clamp(66px, 7vw, 108px);
  --poker-card-height: calc(var(--poker-card-width) * 1.485);

  --poker-action-height: 46px;
}

.poker-table {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows:
    clamp(56px, 8vh, 76px)
    minmax(0, 1fr)
    clamp(64px, 10vh, 88px);
  overflow: hidden;
  isolation: isolate;
  color: #fff1bd;
  background:
    radial-gradient(
      ellipse at center,
      rgba(20, 120, 58, 0.13) 0%,
      rgba(0, 0, 0, 0.12) 54%,
      rgba(0, 0, 0, 0.52) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.06),
      rgba(0, 0, 0, 0.30)
    ),
    var(--table-image, url("../assets/tables/MESA_FRANCESA.webp"))
      center / cover no-repeat,
    #075222;
}

.poker-table::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      rgba(30, 12, 4, 0.44),
      transparent 12%,
      transparent 88%,
      rgba(30, 12, 4, 0.44)
    ),
    radial-gradient(
      ellipse at 50% 52%,
      transparent 36%,
      rgba(0, 0, 0, 0.32) 100%
    );
}

.poker-table button {
  font-family: Arial, Helvetica, sans-serif;
}

.poker-exit-confirm {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(5px);
}

.poker-exit-confirm__panel {
  width: min(520px, 92vw);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid rgba(239, 199, 94, .72);
  border-radius: 20px;
  text-align: center;
  color: #ffe59a;
  background: linear-gradient(145deg, rgba(42, 22, 8, .98), rgba(5, 9, 6, .98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7), inset 0 0 35px rgba(239, 199, 94, .06);
}

.poker-exit-confirm__panel small {
  display: block;
  margin-bottom: 9px;
  color: #c69b3e;
  font: 700 10px/1.2 Arial, sans-serif;
  letter-spacing: .22em;
}

.poker-exit-confirm__panel strong {
  display: block;
  font: 800 clamp(21px, 3vw, 34px)/1.1 Georgia, serif;
  letter-spacing: .06em;
}

.poker-exit-confirm__panel p {
  margin: 13px 0 22px;
  color: #cdbd8e;
  font: 13px/1.4 Arial, sans-serif;
}

.poker-exit-confirm__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.poker-exit-confirm__actions button {
  min-height: 48px;
  border: 1px solid rgba(239, 199, 94, .55);
  border-radius: 11px;
  color: #ffe59a;
  background: rgba(0, 0, 0, .36);
  font: 800 12px/1.2 Arial, sans-serif;
  letter-spacing: .08em;
}

.poker-exit-confirm__actions button.is-danger {
  color: #2a1604;
  border-color: #ffe499;
  background: linear-gradient(#f8dc83, #b87918);
}

@media (max-height: 430px) {
  .poker-exit-confirm__panel { padding: 16px 20px; }
  .poker-exit-confirm__panel p { margin: 8px 0 13px; }
  .poker-exit-confirm__actions button { min-height: 40px; }
}

.poker-board {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin:
    clamp(8px, 1.5vh, 16px)
    clamp(12px, 2.6vw, 42px);
  overflow: hidden;
  border: 1px solid rgba(239, 207, 120, 0.22);
  border-radius: clamp(28px, 4vw, 56px);
  background:
    radial-gradient(
      ellipse at center,
      rgba(17, 112, 51, 0.24),
      rgba(3, 50, 23, 0.12) 58%,
      rgba(0, 0, 0, 0.20)
    );
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.30),
    inset 0 0 0 5px rgba(219, 181, 82, 0.025),
    0 12px 28px rgba(0, 0, 0, 0.28);
}
/* =========================================================
   A16.2 — HUD
   ========================================================= */

.poker-hud {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(100px, 1fr);
  align-items: center;
  gap: clamp(10px, 2vw, 28px);
  padding:
    0
    clamp(12px, 3vw, 48px);
  border-bottom: 1px solid rgba(232, 198, 110, 0.32);
  background:
    linear-gradient(
      90deg,
      rgba(5, 9, 6, 0.94),
      rgba(22, 25, 17, 0.78),
      rgba(5, 9, 6, 0.94)
    );
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.32);
}

.poker-hud__brand {
  display: grid;
  align-content: center;
  justify-items: start;
  line-height: 1;
}

.poker-hud__brand span {
  color: #a98035;
  font: 700 8px Arial, sans-serif;
  letter-spacing: 0.30em;
}

.poker-hud__brand strong {
  margin-top: 3px;
  color: #f2d681;
  font-size: clamp(17px, 2vw, 25px);
  letter-spacing: 0.10em;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.72);
}

.poker-hud__brand small {
  margin-top: 4px;
  color: #9f8750;
  font: 700 7px Arial, sans-serif;
  letter-spacing: 0.17em;
}

.poker-hud__info {
  height: 100%;
  display: flex;
  align-items: stretch;
}

.poker-hud-stat {
  min-width: clamp(78px, 9vw, 126px);
  display: grid;
  place-content: center;
  padding: 0 10px;
  text-align: center;
  border-left: 1px solid rgba(232, 198, 110, 0.16);
}

.poker-hud-stat:last-child {
  border-right: 1px solid rgba(232, 198, 110, 0.16);
}

.poker-hud-stat small {
  color: #a89056;
  font: 700 7px Arial, sans-serif;
  letter-spacing: 0.15em;
}

.poker-hud-stat strong {
  margin-top: 3px;
  color: #f5dda0;
  font: 800 clamp(12px, 1.35vw, 17px) Arial, sans-serif;
}

.poker-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
}

.poker-tools button {
  width: clamp(36px, 4vw, 44px);
  height: clamp(36px, 4vw, 44px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.poker-tools img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 5px 8px rgba(0, 0, 0, 0.46));
  transition:
    filter 160ms ease,
    transform 160ms ease;
}

@media (hover: hover) {
  .poker-tools button:hover img {
    transform: translateY(-1px);
    filter:
      brightness(1.14)
      drop-shadow(0 0 9px rgba(239, 199, 94, 0.52))
      drop-shadow(0 5px 8px rgba(0, 0, 0, 0.46));
  }
}
/* =========================================================
   A16.3 — ASIENTOS DEL JUGADOR Y CPU
   ========================================================= */

.poker-seat {
  position: absolute;
  z-index: 12;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.poker-seat--cpu {
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
}

.poker-seat--player{
    left:50%;
    bottom:18px;
    transform:translateX(-50%);
}

.poker-player-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: clamp(150px, 17vw, 225px);
  padding: 7px 13px 7px 8px;
  border: 1px solid var(--poker-border);
  border-radius: 34px;
  background:
    linear-gradient(
      145deg,
      rgba(25, 20, 11, 0.94),
      rgba(4, 8, 5, 0.92)
    );
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.06);
}

.poker-avatar {
  width: clamp(36px, 4vw, 49px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid #d7ad47;
  border-radius: 50%;
  color: #f6dda0;
  background:
    radial-gradient(
      circle at 38% 30%,
      #67501e,
      #181108 68%
    );
  box-shadow:
    0 0 0 3px rgba(226, 185, 79, 0.10),
    0 5px 12px rgba(0, 0, 0, 0.48);
}

.poker-avatar span {
  font: 900 clamp(9px, 1vw, 12px) Arial, sans-serif;
  letter-spacing: 0.06em;
}

.poker-player-data {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.poker-player-data strong {
  overflow: hidden;
  color: #f2d687;
  font: 900 clamp(9px, 1vw, 12px) Arial, sans-serif;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poker-player-data span {
  color: #c4ad73;
  font: 700 clamp(8px, 0.9vw, 11px) Arial, sans-serif;
}

.poker-dealer-button {
  position: absolute;
  right: -10px;
  bottom: -8px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid #6c4b15;
  border-radius: 50%;
  color: #231604;
  background:
    radial-gradient(
      circle at 35% 30%,
      #fff2ac,
      #d29b2d 70%
    );
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.46);
  font: 900 11px Arial, sans-serif;
}

.poker-thinking {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 1px solid rgba(239, 199, 94, 0.35);
  border-radius: 14px;
  color: #dfc579;
  background: rgba(2, 7, 4, 0.86);
  font: 800 7px Arial, sans-serif;
  letter-spacing: 0.13em;
  white-space: nowrap;
  animation: poker-thinking 900ms ease-in-out infinite alternate;
}

@keyframes poker-thinking {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
    box-shadow:
      0 0 12px rgba(239, 199, 94, 0.18);
  }
}
/* =========================================================
   A16.4 — CARTAS
   ========================================================= */

.poker-hand {
  position: relative;
  z-index: 14;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(var(--poker-card-height) * 0.72);
}

.poker-hand--cpu {
  order: 2;
  margin-top: -22px;
}

.poker-hand--player {
  margin-bottom: 34px;
}

.poker-card {
  display: block;
  width: var(--poker-card-width);
  height: var(--poker-card-height);
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  border: 2px solid rgba(252, 245, 221, 0.90);
  border-radius: clamp(6px, 0.65vw, 10px);
  background: #eee4c9;
  box-shadow:
    0 9px 17px rgba(0, 0, 0, 0.46),
    0 2px 4px rgba(0, 0, 0, 0.32);
}

.poker-hand .poker-card + .poker-card {
  margin-left: calc(var(--poker-card-width) * -0.26);
}

.poker-hand--player .poker-card:first-child {
  transform: rotate(-4deg) translateY(2px);
  transform-origin: right bottom;
}

.poker-hand--player .poker-card:last-child {
  transform: rotate(4deg) translateY(2px);
  transform-origin: left bottom;
}

.poker-hand--player .poker-card:nth-child(2) {
  transform: rotate(-1.5deg) translateY(-2px);
}

.poker-hand--player .poker-card:nth-child(3) {
  transform: rotate(1.5deg) translateY(-2px);
}

.poker-hand--cpu .poker-card:first-child {
  transform: rotate(4deg);
  transform-origin: right top;
}

.poker-hand--cpu .poker-card:last-child {
  transform: rotate(-4deg);
  transform-origin: left top;
}

.poker-hand--cpu .poker-card:nth-child(2) {
  transform: rotate(1.5deg) translateY(2px);
}

.poker-hand--cpu .poker-card:nth-child(3) {
  transform: rotate(-1.5deg) translateY(2px);
}

.poker-hand .poker-card + .poker-card,
.poker-card-slot--hand + .poker-card-slot--hand {
  margin-left: calc(var(--poker-card-width) * -0.38);
}

.poker-card-slot {
  width: var(--poker-card-width);
  height: var(--poker-card-height);
  border: 1px solid rgba(239, 210, 131, 0.28);
  border-radius: clamp(6px, 0.65vw, 10px);
  background:
    linear-gradient(
      145deg,
      rgba(17, 86, 40, 0.18),
      rgba(0, 0, 0, 0.12)
    );
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.18);
}

.poker-card-slot--hand + .poker-card-slot--hand {
  margin-left: calc(var(--poker-card-width) * -0.26);
}

.poker-community-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 0.85vw, 13px);
  min-height: var(--poker-card-height);
}

.poker-community-cards .poker-card,
.poker-community-cards .poker-card-slot {
  width: var(--poker-card-width);
  height: var(--poker-card-height);
}

.poker-card--community {
  transform: none;
}
/* =========================================================
   A16.5 — CENTRO DE LA MESA
   ========================================================= */

.poker-center {
  position: absolute;
  z-index: 10;
  top: 46%;
  left: 50%;
  width: min(82%, 860px);
  display: grid;
  justify-items: center;
  gap: clamp(7px, 1.2vh, 13px);
  transform: translate(-50%, -50%);
}

.poker-pot {
  min-width: 118px;
  display: grid;
  justify-items: center;
  padding: 7px 18px;
  border: 1px solid rgba(239, 199, 94, 0.38);
  border-radius: 30px;
  background:
    linear-gradient(
      145deg,
      rgba(26, 20, 10, 0.90),
      rgba(3, 9, 5, 0.88)
    );
  box-shadow:
    0 9px 22px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.05);
   margin-bottom:18px;
z-index:20; 
}

.poker-pot small {
  color: #9f8449;
  font: 800 7px Arial, sans-serif;
  letter-spacing: 0.20em;
}

.poker-pot strong {
  color: #f5d675;
  font: 900 clamp(17px, 2vw, 24px) Arial, sans-serif;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.58);
}

.poker-pot span {
  color: #ae955d;
  font: 700 6px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.poker-message {
  max-width: min(92vw, 560px);
  min-height: 28px;
  display: grid;
  place-items: center;
  padding: 6px 17px;
  border: 1px solid rgba(237, 203, 109, 0.18);
  border-radius: 16px;
  color: #ead492;
  background: rgba(2, 8, 4, 0.68);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25);
  font: 700 clamp(8px, 0.95vw, 11px) Arial, sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
  margin-top:12px;
z-index:25;
}

.poker-contribution {
  position: absolute;
  z-index: 18;
  display: grid;
  place-items: center;
  min-width: 35px;
  height: 25px;
  padding: 0 8px;
  border: 2px solid #d8aa3d;
  border-radius: 50%;
  color: #2b1903;
  background:
    radial-gradient(
      circle at 35% 30%,
      #fff2a5,
      #c98b1e 72%
    );
  box-shadow:
    0 5px 9px rgba(0, 0, 0, 0.40);
  font: 900 8px Arial, sans-serif;
}

.poker-contribution--player {
  top: -31px;
  right: -31px;
}

.poker-contribution--cpu {
  bottom: -31px;
  right: -31px;
}
/* =========================================================
   A16.6 — BOTONES DE APUESTA
   ========================================================= */

.poker-actions {
  position: relative;
  z-index: 32;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
  padding:
    8px
    clamp(10px, 2vw, 28px);
  border-top: 1px solid rgba(232, 198, 110, 0.30);
  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 4, 0.96),
      rgba(20, 22, 15, 0.88),
      rgba(3, 7, 4, 0.96)
    );
  box-shadow:
    0 -6px 18px rgba(0, 0, 0, 0.26);
}

.poker-action {
  min-width: clamp(92px, 10vw, 142px);
  height: var(--poker-action-height);
  padding: 0 15px;
  border: 1px solid rgba(238, 202, 106, 0.42);
  border-radius: 8px;
  color: #edd89a;
  background:
    linear-gradient(
      180deg,
      rgba(66, 50, 24, 0.92),
      rgba(22, 17, 10, 0.96)
    );
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.30),
    inset 0 1px rgba(255, 255, 255, 0.06);
  font: 900 clamp(8px, 0.9vw, 11px) Arial, sans-serif;
  letter-spacing: 0.09em;
  cursor: pointer;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    border-color 120ms ease;
}

.poker-action--fold {
  color: #e9b1a3;
  border-color: rgba(194, 77, 52, 0.48);
  background:
    linear-gradient(
      180deg,
      rgba(91, 35, 24, 0.94),
      rgba(33, 13, 9, 0.96)
    );
}

.poker-action--call {
  color: #211503;
  border-color: #ffe298;
  background:
    linear-gradient(
      180deg,
      #f5d576,
      #b77717
    );
}

.poker-action:disabled {
  opacity: 0.28;
  filter: grayscale(0.55);
  cursor: default;
  box-shadow: none;
}

@media (hover: hover) {
  .poker-action:not(:disabled):hover {
    transform: translateY(-2px);
    filter: brightness(1.11);
    border-color: #f7d779;
  }
}

.poker-action:not(:disabled):active {
  transform: translateY(1px) scale(0.98);
}

.poker-raise-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: clamp(5px, 1vw, 14px);
  border-left: 1px solid rgba(232, 198, 110, 0.19);
}

.poker-raise-group small {
  margin-right: 3px;
  color: #9d854c;
  font: 800 7px Arial, sans-serif;
  letter-spacing: 0.14em;
}

.poker-raise-group .poker-action {
  min-width: clamp(49px, 5vw, 70px);
  padding: 0 8px;
}

.poker-actions[data-disabled="true"] {
  pointer-events: none;
}
/* =========================================================
   A16.7 — RESULTADOS Y AVISOS
   ========================================================= */

.poker-result-overlay {
  position: absolute;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 7, 4, 0.76);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.poker-result-card {
  width: min(450px, 92vw);
  display: grid;
  justify-items: center;
  padding: clamp(23px, 4vw, 36px);
  border: 1px solid #e5c366;
  border-radius: 17px;
  color: #efdda7;
  background:
    linear-gradient(
      145deg,
      rgba(41, 28, 12, 0.98),
      rgba(5, 9, 6, 0.98)
    );
  box-shadow:
    0 28px 75px rgba(0, 0, 0, 0.72),
    inset 0 1px rgba(255, 255, 255, 0.07);
  text-align: center;
}

.poker-result-card > small {
  color: #a88742;
  font: 800 8px Arial, sans-serif;
  letter-spacing: 0.24em;
}

.poker-result-card > strong {
  margin-top: 7px;
  color: #f4d478;
  font-size: clamp(35px, 6vw, 58px);
  letter-spacing: 0.05em;
  text-shadow:
    0 5px 18px rgba(0, 0, 0, 0.54);
}

.poker-result-card > p {
  margin: 8px 0 0;
  color: #dfcc92;
  font: 700 12px Arial, sans-serif;
}

.poker-result-card > button {
  min-width: 205px;
  height: 45px;
  margin-top: 22px;
  border: 1px solid #f0d274;
  border-radius: 8px;
  color: #251504;
  background:
    linear-gradient(
      #f5d779,
      #b87a1b
    );
  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.34);
  font: 900 11px Arial, sans-serif;
  letter-spacing: 0.11em;
  cursor: pointer;
}

.poker-showdown-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 17px;
}

.poker-showdown-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(232, 198, 110, 0.20);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.20);
}

.poker-showdown-summary small {
  color: #9b824b;
  font: 800 7px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.poker-showdown-summary strong {
  color: #f0d995;
  font: 900 11px Arial, sans-serif;
}

.poker-game-notice {
  position: absolute;
  left: 50%;
  bottom: 78px;
  z-index: 600;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid rgba(239, 203, 105, 0.56);
  border-radius: 8px;
  color: #f3d88d;
  background: rgba(4, 8, 5, 0.94);
  box-shadow:
    0 9px 25px rgba(0, 0, 0, 0.44);
  font: 800 9px Arial, sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: poker-notice 1.6s ease both;
}

@keyframes poker-notice {
  0% {
    opacity: 0;
    transform: translate(-50%, 9px);
  }

  15%,
  78% {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -5px);
  }
}
/* =========================================================
   A16.8 — ANIMACIONES
   ========================================================= */

.poker-card.is-poker-card-dealing {
  animation:
    poker-card-deal 520ms
    cubic-bezier(0.18, 0.78, 0.28, 1)
    both;
  animation-delay:
    var(--deal-delay, 0ms);
}

@keyframes poker-card-deal {
  0% {
    opacity: 0;
    transform:
      translate3d(0, -90px, 0)
      rotate(-8deg)
      scale(0.86);
  }

  72% {
    opacity: 1;
    transform:
      translate3d(0, 3px, 0)
      rotate(1deg)
      scale(1.025);
  }

  100% {
    opacity: 1;
  }
}

.poker-card.is-community-arrival {
  animation:
    poker-community-arrival 480ms
    cubic-bezier(0.20, 0.78, 0.28, 1)
    both;
  animation-delay:
    var(--community-delay, 0ms);
}

@keyframes poker-community-arrival {
  0% {
    opacity: 0;
    transform:
      translate3d(0, -34px, 0)
      rotateY(-82deg)
      scale(0.92);
  }

  70% {
    opacity: 1;
    transform:
      translate3d(0, 2px, 0)
      rotateY(4deg)
      scale(1.02);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.poker-seat.is-poker-action {
  animation:
    poker-seat-action 400ms ease both;
}

@keyframes poker-seat-action {
  0% {
    filter: brightness(1);
  }

  45% {
    filter:
      brightness(1.18)
      drop-shadow(
        0 0 11px
        rgba(239, 199, 94, 0.36)
      );
  }

  100% {
    filter: none;
  }
}

.poker-message.is-message-updated {
  animation:
    poker-message-update 340ms ease both;
}

@keyframes poker-message-update {
  0% {
    opacity: 0.35;
    transform: translateY(4px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.poker-pot.is-pot-updated {
  animation:
    poker-pot-update 400ms ease both;
}

@keyframes poker-pot-update {
  0% {
    transform: scale(1);
  }

  48% {
    transform: scale(1.10);
    box-shadow:
      0 0 20px
      rgba(239, 199, 94, 0.33);
  }

  100% {
    transform: scale(1);
  }
}

.poker-result-overlay.is-result-visible {
  animation:
    poker-result-shade 340ms ease both;
}

.poker-result-card,
.poker-result-card.is-result-arriving {
  animation:
    poker-result-card 470ms
    cubic-bezier(0.20, 0.78, 0.28, 1)
    both;
}

@keyframes poker-result-shade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes poker-result-card {
  0% {
    opacity: 0;
    transform:
      translateY(16px)
      scale(0.96);
  }

  75% {
    opacity: 1;
    transform:
      translateY(-2px)
      scale(1.008);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.poker-card.is-card-revealing {
  animation:
    poker-card-reveal 440ms ease both;
  animation-delay:
    var(--reveal-delay, 0ms);
}

@keyframes poker-card-reveal {
  0% {
    opacity: 0.45;
    transform:
      perspective(700px)
      rotateY(-88deg);
  }

  60% {
    opacity: 1;
    transform:
      perspective(700px)
      rotateY(5deg);
  }

  100% {
    transform:
      perspective(700px)
      rotateY(0);
  }
}

/* =========================================================
   RESPONSIVE HORIZONTAL
   ========================================================= */

@media (max-height: 650px) and (orientation: landscape) {
  :root {
    --poker-card-width:
      clamp(52px, 5.5vw, 76px);

    --poker-action-height: 38px;
  }

  .poker-table {
    grid-template-rows:
      48px
      minmax(0, 1fr)
      54px;
  }

  .poker-board {
    margin: 4px 12px;
    border-radius: 28px;
  }

  .poker-hud__brand strong {
    font-size: 15px;
  }

  .poker-hud__brand small {
    display: none;
  }

  .poker-hud-stat {
    min-width: 70px;
  }

  .poker-player-info {
    min-width: 142px;
    padding: 4px 10px 4px 5px;
  }

  .poker-avatar {
    width: 34px;
  }

  .poker-seat--cpu {
    top: 4px;
  }

  .poker-seat--player {
    bottom: 3px;
  }

  .poker-center {
    gap: 5px;
  }

  .poker-pot {
    min-width: 92px;
    padding: 4px 14px;
  }

  .poker-pot strong {
    font-size: 17px;
  }

  .poker-message {
    min-height: 22px;
    padding: 4px 12px;
    font-size: 8px;
  }

  .poker-action {
    min-width: 80px;
    padding: 0 9px;
    font-size: 8px;
  }

  .poker-raise-group .poker-action {
    min-width: 46px;
  }
}

/* =========================================================
   RESPONSIVE ANGOSTO
   ========================================================= */

@media (max-width: 760px) {
  :root {
    --poker-card-width:
      clamp(47px, 10vw, 68px);
  }

  .poker-hud {
    grid-template-columns:
      minmax(82px, 1fr)
      auto
      auto;
    gap: 4px;
    padding: 0 7px;
  }

  .poker-hud__brand span,
  .poker-hud__brand small {
    display: none;
  }

  .poker-hud__brand strong {
    font-size: 12px;
  }

  .poker-hud-stat {
    min-width: 53px;
    padding: 0 5px;
  }

  .poker-hud-stat small {
    font-size: 5px;
    letter-spacing: 0.07em;
  }

  .poker-hud-stat strong {
    font-size: 10px;
  }

  .poker-tools button {
    width: 34px;
    height: 34px;
  }

  .poker-board {
    margin: 4px;
    border-radius: 22px;
  }

  .poker-community-cards {
    gap: 3px;
  }

  .poker-actions {
    gap: 4px;
    padding: 6px 5px;
  }

  .poker-action {
    min-width: 64px;
    padding: 0 6px;
    font-size: 7px;
    letter-spacing: 0.04em;
  }

  .poker-raise-group {
    gap: 3px;
    padding-left: 4px;
  }

  .poker-raise-group small {
    display: none;
  }

  .poker-raise-group .poker-action {
    min-width: 42px;
  }
}

/* =========================================================
   MOVIMIENTO REDUCIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .poker-card.is-poker-card-dealing,
  .poker-card.is-community-arrival,
  .poker-seat.is-poker-action,
  .poker-message.is-message-updated,
  .poker-pot.is-pot-updated,
  .poker-result-overlay,
  .poker-result-card,
  .poker-card.is-card-revealing {
    animation: none !important;
  }
}
/* =========================================================
   A27 — PUCARÁ POKER · ESTADÍSTICAS
   ========================================================= */

.statistics-screen {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(10px, 2vw, 24px);
  background:
    url("../assets/backgrounds/start.webp")
    center / cover no-repeat,
    #080503;
}

.statistics-screen__shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(201, 151, 52, 0.12),
      transparent 34%
    ),
    linear-gradient(
      90deg,
      rgba(3, 2, 1, 0.92),
      rgba(7, 4, 2, 0.64),
      rgba(3, 2, 1, 0.92)
    );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.statistics-panel {
  position: relative;
  z-index: 2;
  width: min(900px, 96vw);
  max-height: 94vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(232, 195, 96, 0.72);
  border-radius: 18px;
  color: #f1dfaa;
  background:
    linear-gradient(
      145deg,
      rgba(43, 24, 10, 0.98),
      rgba(7, 8, 5, 0.98) 70%
    );
  box-shadow:
    0 28px 85px rgba(0, 0, 0, 0.82),
    inset 0 1px rgba(255, 255, 255, 0.07);
}

.statistics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(232, 195, 96, 0.22);
  background: rgba(0, 0, 0, 0.24);
}

.statistics-header small {
  color: #ac8435;
  font: 800 8px Arial, sans-serif;
  letter-spacing: 0.24em;
}

.statistics-header h1 {
  margin: 3px 0 0;
  color: #f4d77c;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0.08em;
}

.statistics-header button {
  width: 39px;
  height: 39px;
  border: 1px solid rgba(232, 195, 96, 0.38);
  border-radius: 50%;
  color: #f4d991;
  background: rgba(20, 12, 6, 0.94);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.statistics-content {
  overflow: auto;
  padding: 18px 20px 24px;
  scrollbar-color: #a87525 #130b06;
}

.statistics-highlight {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.statistics-highlight-card {
  min-height: 84px;
  display: grid;
  place-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(235, 199, 103, 0.23);
  border-radius: 11px;
  text-align: center;
  background:
    linear-gradient(
      145deg,
      rgba(89, 60, 19, 0.27),
      rgba(0, 0, 0, 0.22)
    );
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.04);
}

.statistics-highlight-card small {
  color: #a98d55;
  font: 800 7px Arial, sans-serif;
  letter-spacing: 0.16em;
}

.statistics-highlight-card strong {
  color: #f3d473;
  font: 900 clamp(18px, 2.5vw, 29px) Arial, sans-serif;
}

.statistics-section-title {
  margin: 23px 0 9px;
  color: #d2aa49;
  font: 900 9px Arial, sans-serif;
  letter-spacing: 0.22em;
}

.statistics-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(232, 195, 96, 0.16);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.statistics-row {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(232, 195, 96, 0.10);
}

.statistics-row:nth-child(odd) {
  border-right: 1px solid rgba(232, 195, 96, 0.10);
}

.statistics-row span {
  color: #c8b37c;
  font: 700 11px Arial, sans-serif;
}

.statistics-row strong {
  color: #f1d98e;
  font: 900 12px Arial, sans-serif;
  text-align: right;
}

.statistics-last-update {
  margin: 19px 0 0;
  color: #877248;
  font: 9px Arial, sans-serif;
  text-align: center;
}

.statistics-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 12px 20px;
  border-top: 1px solid rgba(232, 195, 96, 0.20);
  background: rgba(0, 0, 0, 0.24);
}

.statistics-footer button {
  min-width: 155px;
  height: 40px;
  padding: 0 15px;
  border-radius: 7px;
  font: 900 9px Arial, sans-serif;
  letter-spacing: 0.09em;
  cursor: pointer;
}

.statistics-reset-button {
  border: 1px solid rgba(176, 74, 49, 0.58);
  color: #e9b0a0;
  background:
    linear-gradient(
      #5d281c,
      #29110c
    );
}

.statistics-reset-button.is-confirming {
  border-color: #df7658;
  color: #fff0d7;
  background:
    linear-gradient(
      #a7472f,
      #592014
    );
}

.statistics-back-button {
  border: 1px solid #e7c563;
  color: #241504;
  background:
    linear-gradient(
      #f2d477,
      #ac7018
    );
}

@media (hover: hover) {
  .statistics-header button:hover,
  .statistics-footer button:hover {
    filter: brightness(1.12);
  }
}

@media (max-width: 700px) {
  .statistics-panel {
    width: 100%;
    max-height: 97vh;
    border-radius: 12px;
  }

  .statistics-header {
    padding: 12px;
  }

  .statistics-content {
    padding: 12px;
  }

  .statistics-highlight {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .statistics-grid {
    grid-template-columns: 1fr;
  }

  .statistics-row:nth-child(odd) {
    border-right: 0;
  }

  .statistics-footer {
    padding: 9px 12px;
  }

  .statistics-footer button {
    min-width: 0;
    flex: 1;
  }
}

@media (
  max-height: 560px
) and (
  orientation: landscape
) {
  .statistics-panel {
    max-height: 98vh;
  }

  .statistics-header {
    padding: 8px 14px;
  }

  .statistics-header h1 {
    font-size: 20px;
  }

  .statistics-content {
    padding: 9px 14px 14px;
  }

  .statistics-highlight-card {
    min-height: 58px;
    padding: 7px;
  }

  .statistics-highlight-card strong {
    font-size: 18px;
  }

  .statistics-section-title {
    margin-top: 13px;
  }

  .statistics-row {
    min-height: 35px;
    padding: 6px 10px;
  }

  .statistics-footer {
    padding: 7px 14px;
  }

  .statistics-footer button {
    height: 33px;
  }
}
/*=========================================
=           PUCARÁ CHIP MANAGER
=========================================*/

.poker-chip-stack{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

.poker-chip{
    width:42px;
    height:42px;
    object-fit:contain;
    user-select:none;
    pointer-events:none;
    display:block;

    filter:
        drop-shadow(0 2px 4px rgba(0,0,0,.55));
}
/* ==========================================================
   BOTONES DE APUESTA CON FICHAS
========================================================== */

.poker-raise-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poker-raise-group > small {
  flex: 0 0 auto;
}

.poker-action--raise.poker-chip-button {
  width: 58px;
  min-width: 58px;
  height: 58px;
  padding: 4px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}

.poker-chip-button__image {
  width: 50px;
  height: 50px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter:
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.55));
}

.poker-action--raise.poker-chip-button:disabled {
  opacity: 0.32;
  filter: grayscale(0.55);
}

@media (hover: hover) {
  .poker-action--raise.poker-chip-button:not(:disabled):hover {
    transform: translateY(-3px) scale(1.07);
    filter: brightness(1.12);
  }
}

@media (max-width: 760px) {
  .poker-action--raise.poker-chip-button {
    width: 48px;
    min-width: 48px;
    height: 48px;
  }

  .poker-chip-button__image {
    width: 42px;
    height: 42px;
  }
}
/* ==========================================================
   BOTONES DE ACCIÓN CON ASSETS
========================================================== */

.poker-table .poker-actions {
  position: relative;
  z-index: 30;

  min-height: 72px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;

  padding: 8px 18px;

  overflow: hidden;

  border-top:
    1px solid rgba(224, 179, 71, 0.35);

  background:
    linear-gradient(
      180deg,
      rgba(9, 13, 9, 0.98),
      rgba(2, 5, 3, 1)
    );
}

/* Botones que usan imagen completa */

.poker-table
.poker-actions
.poker-action.poker-action--asset {
  position: relative;

  width: 176px;
  min-width: 176px;
  height: 54px;

  display: grid;
  place-items: center;

  margin: 0;
  padding: 0;

  overflow: hidden;

  border: 0;
  border-radius: 13px;

  color: transparent;
  background: transparent;

  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.42);

  cursor: pointer;

  transition:
    transform 140ms ease,
    filter 140ms ease,
    opacity 140ms ease;
}

/* Imagen del botón */

.poker-table
.poker-actions
.poker-action__image {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: contain;

  pointer-events: none;
  user-select: none;

  filter:
    drop-shadow(
      0 4px 5px
      rgba(0, 0, 0, 0.48)
    );
}

/* Importe dinámico sobre IGUALAR */

.poker-table
.poker-actions
.poker-action__amount {
  position: absolute;

  right: 13px;
  bottom: 7px;

  min-width: 24px;
  height: 20px;

  display: grid;
  place-items: center;

  padding: 0 6px;

  border:
    1px solid rgba(255, 223, 128, 0.75);
  border-radius: 11px;

  color: #181006;

  background:
    linear-gradient(
      180deg,
      #ffe590,
      #c9891b
    );

  box-shadow:
    0 3px 7px rgba(0, 0, 0, 0.45);

  font:
    900 10px Arial,
    sans-serif;

  line-height: 1;

  pointer-events: none;
}

/* Estado deshabilitado */

.poker-table
.poker-actions
.poker-action.poker-action--asset:disabled {
  opacity: 0.30;

  filter:
    grayscale(0.72)
    brightness(0.64);

  cursor: default;

  box-shadow: none;
}

/* Fichas 10, 20 y 50 */

.poker-table
.poker-actions
.poker-raise-group {
  width: auto;
  min-width: 250px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  margin: 0;
  padding: 3px 11px;

  border:
    1px solid rgba(224, 179, 71, 0.28);
  border-radius: 32px;

  background:
    linear-gradient(
      180deg,
      rgba(61, 40, 17, 0.66),
      rgba(7, 9, 6, 0.94)
    );
}

.poker-table
.poker-actions
.poker-raise-group > small {
  margin-right: 4px;

  color: #c6a454;

  font:
    900 8px Arial,
    sans-serif;

  letter-spacing: 0.15em;
}

.poker-table
.poker-actions
.poker-action.poker-action--raise.poker-chip-button {
  width: 49px;
  min-width: 49px;
  height: 49px;

  display: grid;
  place-items: center;

  padding: 0;

  border:
    1px solid rgba(231, 191, 83, 0.35);
  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(73, 49, 20, 0.48),
      rgba(6, 8, 5, 0.95)
    );
}

.poker-table
.poker-actions
.poker-chip-button__image {
  width: 45px;
  height: 45px;

  display: block;

  object-fit: contain;

  pointer-events: none;
}

/* Interacción PC */

@media (hover: hover) {
  .poker-table
  .poker-actions
  .poker-action.poker-action--asset:not(:disabled):hover {
    transform:
      translateY(-2px)
      scale(1.02);

    filter: brightness(1.12);
  }

  .poker-table
  .poker-actions
  .poker-action.poker-action--raise.poker-chip-button:not(:disabled):hover {
    transform:
      translateY(-3px)
      scale(1.08);

    filter: brightness(1.12);
  }
}

/* Pantallas más angostas */

@media (max-width: 900px) {
  .poker-table .poker-actions {
    gap: 6px;
    padding: 6px;
  }

  .poker-table
  .poker-actions
  .poker-action.poker-action--asset {
    width: 138px;
    min-width: 138px;
    height: 46px;
  }

  .poker-table
  .poker-actions
  .poker-action__amount {
    right: 8px;
    bottom: 5px;

    min-width: 20px;
    height: 17px;

    font-size: 8px;
  }

  .poker-table
  .poker-actions
  .poker-raise-group {
    min-width: 170px;
    height: 49px;

    gap: 3px;
    padding: 2px 6px;
  }

  .poker-table
  .poker-actions
  .poker-raise-group > small {
    display: none;
  }

  .poker-table
  .poker-actions
  .poker-action.poker-action--raise.poker-chip-button {
    width: 41px;
    min-width: 41px;
    height: 41px;
  }

  .poker-table
  .poker-actions
  .poker-chip-button__image {
    width: 38px;
    height: 38px;
  }
}
/* =========================================================
   A2 — PUCARÁ POKER · DISTRIBUCIÓN DEFINITIVA DEL PAÑO

   IZQUIERDA: identidad
   CENTRO: cartas
   DERECHA: apuestas y pozo
   ========================================================= */

/* =========================================================
   A2.1 — FILAS DE CPU Y JUGADOR
   ========================================================= */

.poker-seat {
  position: absolute;
  left: 7%;
  right: 7%;
  width: auto;

  display: grid;
  grid-template-columns:
    clamp(170px, 18vw, 230px)
    minmax(240px, 1fr)
    clamp(130px, 14vw, 185px);
  align-items: center;
  justify-items: stretch;
  gap: clamp(18px, 3vw, 54px);

  transform: none;
}

/* Rival arriba */

.poker-seat--cpu {
  top: clamp(20px, 3.5vh, 42px);
  bottom: auto;
}

/* Jugador abajo */

.poker-seat--player {
  top: auto;
  bottom: clamp(18px, 3vh, 36px);
}

/* =========================================================
   A2.2 — IDENTIDAD A LA IZQUIERDA
   ========================================================= */

.poker-seat__identity {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 20;
  justify-self: start;
}

.poker-player-info {
  position: relative;
  width: clamp(170px, 18vw, 230px);
  min-width: 0;
  margin: 0;
}

/* CPU y jugador usan el mismo ancho visual */

.poker-seat--cpu .poker-player-info,
.poker-seat--player .poker-player-info {
  width: clamp(170px, 18vw, 230px);
}

/* =========================================================
   A2.3 — BOTÓN DEALER BIEN DEBAJO DEL CARTEL
   ========================================================= */

.poker-dealer-button {
  left: 50%;
  right: auto;
  bottom: -28px;

  transform: translateX(-50%);

  width: 27px;
  height: 27px;

  z-index: 30;
}

/* =========================================================
   A2.4 — CARTAS DE LOS DOS JUGADORES EN EL MEDIO
   ========================================================= */

.poker-hand {
  grid-column: 2;
  grid-row: 1;

  position: relative;
  z-index: 16;

  justify-self: center;
  align-self: center;

  display: flex;
  justify-content: center;
  align-items: center;

  margin: 0;
}

/* Eliminamos las posiciones viejas */

.poker-hand--cpu {
  order: initial;
  margin: 0;
}

.poker-hand--player {
  margin: 0;
}

/* Cartas levemente superpuestas */

.poker-hand .poker-card + .poker-card,
.poker-hand
.poker-card-slot--hand
+
.poker-card-slot--hand {
  margin-left:
    calc(
      var(--poker-card-width) * -0.24
    );
}

/* =========================================================
   A2.5 — TODAS LAS APUESTAS A LA DERECHA
   ========================================================= */

.poker-contribution,
.poker-contribution--cpu,
.poker-contribution--player {
  grid-column: 3;
  grid-row: 1;

  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;

  z-index: 22;

  justify-self: end;
  align-self: center;

  width: clamp(105px, 11vw, 150px);
  min-width: 0;
  height: auto;

  display: grid;
  place-items: center;

  padding: 8px 10px;

  border:
    1px solid rgba(231, 191, 82, 0.28);
  border-radius: 22px;

  background:
    linear-gradient(
      180deg,
      rgba(52, 34, 14, 0.72),
      rgba(5, 8, 5, 0.88)
    );

  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.36),
    inset 0 1px rgba(255, 255, 255, 0.05);
}

/* Pilas de fichas de cada apuesta */

.poker-contribution
.poker-chip-stack {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  gap: 0;
}

/* Las fichas se apilan levemente */

.poker-contribution
.poker-chip + .poker-chip {
  margin-left: -14px;
}

.poker-contribution
.poker-chip {
  width: 46px;
  height: 46px;

  flex: 0 0 auto;

  object-fit: contain;
}

/* =========================================================
   A2.6 — CENTRO DE LA MESA
   ========================================================= */

.poker-center {
  position: absolute;
  top: 50%;
  left: 50%;

  width: min(70%, 980px);

  display: grid;
  justify-items: stretch;
  gap: 12px;

  transform:
    translate(-50%, -50%);
}

/* Fila: comunitarias + pozo */

.poker-center-row {
  width: 100%;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    clamp(125px, 14vw, 180px);
  align-items: center;
  gap: clamp(22px, 4vw, 60px);
}

/* Cinco cartas comunitarias centradas */

.poker-community-cards {
  min-width: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: clamp(7px, 0.9vw, 14px);
}

/* =========================================================
   A2.7 — POZO A LA DERECHA
   ========================================================= */

.poker-pot-zone {
  position: relative;

  display: grid;
  justify-items: center;
  align-content: center;

  gap: 5px;

  min-width: 125px;
}

/* Fichas del pozo */

.poker-pot-chips {
  min-height: 50px;

  display: grid;
  place-items: center;
}

.poker-pot-chips
.poker-chip-stack {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 0;
}

.poker-pot-chips
.poker-chip {
  width: 44px;
  height: 44px;

  object-fit: contain;
}

.poker-pot-chips
.poker-chip + .poker-chip {
  margin-left: -15px;
}

/* Cartel POZO debajo de sus fichas */

.poker-pot {
  position: static;

  min-width: 118px;

  margin: 0;
  transform: none;
}

/* =========================================================
   A2.8 — MENSAJE DE PARTIDA
   ========================================================= */

.poker-message {
  position: absolute;
  left: 50%;
  top: calc(100% + 16px);

  transform: translateX(-50%);

  max-width: min(76vw, 640px);

  white-space: nowrap;
}

/* =========================================================
   A2.9 — PENSANDO CPU
   ========================================================= */

.poker-thinking {
  grid-column: 1;
  grid-row: 1;

  top: auto;
  left: 0;
  bottom: -48px;

  transform: none;
}

/* =========================================================
   A2.10 — RESPONSIVE HORIZONTAL
   ========================================================= */

@media (
  max-height: 650px
) and (
  orientation: landscape
) {

  .poker-seat {
    left: 5%;
    right: 5%;

    grid-template-columns:
      clamp(145px, 17vw, 190px)
      minmax(190px, 1fr)
      clamp(105px, 12vw, 140px);

    gap: clamp(10px, 2vw, 28px);
  }

  .poker-seat--cpu {
    top: 8px;
  }

  .poker-seat--player {
    bottom: 7px;
  }

  .poker-player-info,
  .poker-seat--cpu
  .poker-player-info,
  .poker-seat--player
  .poker-player-info {
    width: clamp(145px, 17vw, 190px);
  }

  .poker-dealer-button {
    bottom: -22px;

    width: 13px;
    height: 13px;

    font-size: 9px;
  }

  .poker-contribution,
  .poker-contribution--cpu,
  .poker-contribution--player {
    width: clamp(92px, 10vw, 120px);

    padding: 5px 7px;
  }

  .poker-contribution
  .poker-chip {
    width: 38px;
    height: 38px;
  }

  .poker-contribution
  .poker-chip + .poker-chip {
    margin-left: -12px;
  }

  .poker-center {
    width: min(72%, 820px);
  }

  .poker-center-row {
    grid-template-columns:
      minmax(0, 1fr)
      clamp(105px, 12vw, 140px);

    gap: 18px;
  }

  .poker-pot-chips
  .poker-chip {
    width: 37px;
    height: 37px;
  }

  .poker-message {
    top: calc(100% + 8px);

    font-size: 8px;
  }
}
/* =========================================================
   A3 — AJUSTES ÓPTICOS DE LA MESA
   ========================================================= */

/* Mensaje debajo de las cartas comunitarias */

.poker-message {
  top: calc(100% + 10px);
  z-index: 35;

  min-width: 350px;
  max-width: 560px;

  pointer-events: none;
}

/* Evita que el mensaje quede detrás de las cartas del jugador */

.poker-seat--player {
  bottom: clamp(8px, 1.5vh, 18px);
}

/* Cartas del jugador un poco más arriba */

.poker-seat--player .poker-hand {
  transform: translateY(-10px);
}

/* Cartas de CPU un poco más abajo para equilibrar */

.poker-seat--cpu .poker-hand {
  transform: translateY(5px);
}

/* Apuestas alineadas dentro de la misma columna derecha */

.poker-seat--cpu .poker-contribution {
  justify-self: end;
  transform: translateY(2px);
}

.poker-seat--player .poker-contribution {
  justify-self: end;
  transform: translateY(-2px);
}

/* Columna del pozo centrada entre ambas apuestas */

.poker-pot-zone {
  justify-self: end;
  transform: translateX(8px);
}

/* Las cajas de apuesta quedan algo más compactas */

.poker-contribution,
.poker-contribution--cpu,
.poker-contribution--player {
  width: 126px;
  min-height: 70px;
  padding: 7px 9px;
}

/* Cartas comunitarias ligeramente más arriba */

.poker-community-cards {
  transform: translateY(-8px);
}

/* Dealer centrado debajo de la identidad */

.poker-seat--player .poker-dealer-button {
  left: 50%;
  right: auto;
  bottom: -27px;
  transform: translateX(-50%);
}

/* Pantallas horizontales bajas */

@media (max-height: 650px) and (orientation: landscape) {
  .poker-message {
    top: calc(100% + 5px);
    min-width: 300px;
  }

  .poker-seat--player .poker-hand {
    transform: translateY(-6px);
  }

  .poker-community-cards {
    transform: translateY(-5px);
  }

  .poker-contribution,
  .poker-contribution--cpu,
  .poker-contribution--player {
    width: 112px;
    min-height: 58px;
  }
}
/* =========================================================
   A4 — MENSAJE CENTRAL LIBRE DE LAS CARTAS
   ========================================================= */

.poker-message {
  top: auto;
  bottom: -28px;

  left: 50%;
  transform: translateX(-50%);

  z-index: 35;

  min-width: 350px;
  max-width: 560px;

  white-space: nowrap;
  pointer-events: none;
}
/* =========================================================
   A6 — AVATARES REALES EN EL PAÑO
   ========================================================= */

.poker-avatar img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;

  border-radius: inherit;

  pointer-events: none;
  user-select: none;
}

.poker-avatar:has(img) {
  background: #151008;
}

.poker-avatar:has(img)::after {
  content: "";

  position: absolute;
  inset: 0;

  border-radius: inherit;

  pointer-events: none;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.13),
      transparent 36%
    );
}

.poker-avatar {
  position: relative;
}
/* =========================================================
   FICHAS VOLADORAS
   ========================================================= */

.poker-flying-chip {
  position: fixed;
  z-index: 2000;

  width: 42px;
  height: 42px;

  object-fit: contain;

  transform:
    translate(-50%, -50%)
    scale(0.86);

  opacity: 0;

  pointer-events: none;
  user-select: none;

  filter:
    drop-shadow(
      0 7px 8px
      rgba(0, 0, 0, 0.58)
    );

  transition:
    transform 620ms
      cubic-bezier(
        0.20,
        0.78,
        0.28,
        1
      ),
    opacity 120ms ease;
}

.poker-flying-chip.is-flying {
  opacity: 1;

  transform:
    translate(
      calc(
        -50% + var(--chip-x)
      ),
      calc(
        -50% + var(--chip-y)
      )
    )
    rotate(360deg)
    scale(1);
}
/* =========================================================
   A2 — MAZO VISIBLE EN EL PAÑO
   ========================================================= */

.poker-community-zone {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(18px, 2vw, 32px);
}

/* Conserva las cinco posiciones comunitarias */

.poker-community-zone
.poker-community-cards {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(7px, 0.9vw, 14px);

  transform: none;
}

/* Zona independiente del mazo */

.poker-deck-zone {
  position: relative;

  flex: 0 0 auto;

  width:
    calc(
      var(--poker-card-width) * 1.05
    );

  display: grid;
  justify-items: center;

  gap: 6px;

  z-index: 24;
}

/* Grupo de tres capas */

.poker-deck-stack {
  position: relative;

  width: var(--poker-card-width);
  aspect-ratio: 0.69;

  filter:
    drop-shadow(
      0 8px 9px
      rgba(0, 0, 0, 0.48)
    );
}

/* Todas las capas del mazo */

.poker-deck-card {
  position: absolute;

  width: 100%;
  height: 100%;

  display: block;

  border:
    1px solid rgba(238, 200, 103, 0.64);
  border-radius:
    clamp(5px, 0.5vw, 9px);

  object-fit: cover;

  pointer-events: none;
  user-select: none;
}

/* Carta posterior */

.poker-deck-card--back {
  left: 8px;
  top: -6px;

  background:
    linear-gradient(
      145deg,
      #d9bd70,
      #665025
    );

  opacity: 0.72;
}

/* Carta intermedia */

.poker-deck-card--middle {
  left: 4px;
  top: -3px;

  background:
    linear-gradient(
      145deg,
      #f0d48b,
      #7c5b22
    );

  opacity: 0.86;
}

/* Dorso visible */

.poker-deck-card--front {
  left: 0;
  top: 0;

  background: #090b08;
}

/* Etiqueta discreta */

.poker-deck-zone small {
  color: #caa650;

  font:
    900 7px Arial,
    sans-serif;

  letter-spacing: 0.16em;

  text-shadow:
    0 2px 4px
    rgba(0, 0, 0, 0.76);
}

/* Leve iluminación mientras quedan cartas */

.poker-deck-zone::after {
  content: "";

  position: absolute;
  left: 50%;
  top: 44%;

  width: 75%;
  height: 75%;

  transform:
    translate(-50%, -50%);

  border-radius: 50%;

  background:
    radial-gradient(
      circle,
      rgba(231, 185, 74, 0.13),
      transparent 70%
    );

  pointer-events: none;

  z-index: -1;
}

/* Pantallas horizontales bajas */

@media (
  max-height: 650px
) and (
  orientation: landscape
) {

  .poker-community-zone {
    gap: 15px;
  }

  .poker-deck-zone {
    gap: 3px;
  }

  .poker-deck-card--back {
    left: 6px;
    top: -4px;
  }

  .poker-deck-card--middle {
    left: 3px;
    top: -2px;
  }

  .poker-deck-zone small {
    font-size: 6px;
  }
}
/* =========================================================
   A3 — SEPARACIÓN ENTRE RIVER Y MAZO
   ========================================================= */

.poker-deck-zone {
  margin-left: 28px;
}
/* =========================================================
   A4 — VUELO DE COMUNITARIAS DESDE EL MAZO
   ========================================================= */

/*
 * La carta real permanece oculta mientras
 * la copia animada se desplaza.
 */

.poker-card--community.is-community-waiting {
  opacity: 0;
}


/* Elemento flotante */

.poker-community-flying-card {
  position: fixed;
  z-index: 2200;

  transform:
    translate(-50%, -50%)
    scaleX(
      var(
        --community-start-scale-x,
        1
      )
    )
    scaleY(
      var(
        --community-start-scale-y,
        1
      )
    );

  transform-origin: center;

  pointer-events: none;
  user-select: none;

  perspective: 900px;

  filter:
    drop-shadow(
      0 10px 12px
      rgba(0, 0, 0, 0.58)
    );

  transition:
    transform 620ms
      cubic-bezier(
        0.18,
        0.72,
        0.22,
        1
      );
}


/* Recorrido hacia la posición comunitaria */

.poker-community-flying-card.is-community-card-flying {
  transform:
    translate(
      calc(
        -50% +
        var(--community-flight-x)
      ),
      calc(
        -50% +
        var(--community-flight-y) +
        var(--community-arc)
      )
    )
    scale(1);
}


/* Contenedor que realiza el giro */

.poker-community-flying-card__inner {
  position: relative;

  width: 100%;
  height: 100%;

  transform-style: preserve-3d;

  transition:
    transform 280ms ease;
}


/* Giro de dorso a frente */

.poker-community-flying-card.is-community-card-flipped
.poker-community-flying-card__inner {
  transform: rotateY(180deg);
}


/* Dos caras de la misma carta */

.poker-community-flying-card__back,
.poker-community-flying-card__front {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  border-radius:
    clamp(5px, 0.5vw, 9px);

  backface-visibility: hidden;

  pointer-events: none;
  user-select: none;
}


/* Dorso visible al salir del mazo */

.poker-community-flying-card__back {
  transform: rotateY(0deg);
}


/* Frente visible después del giro */

.poker-community-flying-card__front {
  transform: rotateY(180deg);
}


/* Llegada final de la carta real */

.poker-card--community.is-community-arrival {
  animation:
    pucara-community-land
    420ms
    cubic-bezier(
      0.18,
      0.82,
      0.26,
      1.18
    )
    both;
}


@keyframes pucara-community-land {
  0% {
    opacity: 0;
    transform:
      translateY(-8px)
      scale(0.91);
  }

  65% {
    opacity: 1;
    transform:
      translateY(2px)
      scale(1.035);
  }

  100% {
    opacity: 1;
    transform:
      translateY(0)
      scale(1);
  }
}


/* Accesibilidad: sin animación */

.reduce-game-motion
.poker-community-flying-card {
  display: none;
}

.reduce-game-motion
.poker-card--community.is-community-waiting {
  opacity: 1;
}
/* =========================================================
   A4 — CARTAS QUEMADAS A LA DERECHA DEL MAZO
   ========================================================= */

.poker-burn-zone {
  position: relative;

  flex: 0 0 auto;

  width:
    calc(
      var(--poker-card-width) * 0.78
    );

  min-height:
    calc(
      var(--poker-card-width) * 1.12
    );

  display: grid;
  justify-items: center;
  align-content: center;

  gap: 4px;

  margin-left: 2px;

  z-index: 23;
}

.poker-burn-stack {
  position: relative;

  width:
    calc(
      var(--poker-card-width) * 0.72
    );

  height:
    calc(
      var(--poker-card-width) * 1.06
    );
}

.poker-burn-card {
  position: absolute;

  left: 50%;
  top: 0;

  width: 100%;
  height: auto;

  display: block;

  object-fit: contain;

  border:
    1px solid rgba(231, 191, 82, 0.46);
  border-radius:
    clamp(4px, 0.42vw, 7px);

  transform:
    translateX(-50%);

  pointer-events: none;
  user-select: none;

  filter:
    drop-shadow(
      0 5px 7px
      rgba(0, 0, 0, 0.5)
    );
}

/* Apilado vertical */

.poker-burn-card[data-burn-card-index="0"] {
  top: 0;
  z-index: 3;
}

.poker-burn-card[data-burn-card-index="1"] {
  top: 8px;
  z-index: 2;
}

.poker-burn-card[data-burn-card-index="2"] {
  top: 16px;
  z-index: 1;
}

/* Etiqueta secundaria */

.poker-burn-zone small {
  color: #977b3c;

  font:
    900 6px Arial,
    sans-serif;

  letter-spacing: 0.13em;

  opacity: 0.78;

  text-shadow:
    0 2px 4px
    rgba(0, 0, 0, 0.72);
}

/* Sin cartas durante PREFLOP */

.poker-burn-stack:empty {
  opacity: 0;
}

/* Pantallas horizontales bajas */

@media (
  max-height: 650px
) and (
  orientation: landscape
) {
  .poker-burn-zone {
    width:
      calc(
        var(--poker-card-width) * 0.70
      );

    margin-left: 0;
  }

  .poker-burn-stack {
    width:
      calc(
        var(--poker-card-width) * 0.65
      );
  }

  .poker-burn-card[data-burn-card-index="1"] {
    top: 6px;
  }

  .poker-burn-card[data-burn-card-index="2"] {
    top: 12px;
  }

  .poker-burn-zone small {
    font-size: 5px;
  }
}
/* =========================================================
   A5 — CARTAS QUEMADAS · DESCARTE PREMIUM
   ========================================================= */

/* La zona queda compacta y secundaria */

.poker-burn-zone {
  width:
    calc(
      var(--poker-card-width) * 0.76
    );

  min-height:
    calc(
      var(--poker-card-width) * 1.08
    );

  gap: 0;
}

/* Ocultamos la etiqueta: el descarte debe entenderse visualmente */

.poker-burn-zone > small {
  display: none;
}

/* Área donde se acomodan las quemadas */

.poker-burn-stack {
  position: relative;

  width:
    calc(
      var(--poker-card-width) * 0.68
    );

  height:
    calc(
      var(--poker-card-width) * 1.04
    );
}

/* Base común */

.poker-burn-card {
  left: 70%;
  top: 50%;

  width: 100%;
  height: auto;

  opacity: 0.88;

  transform-origin: center;

  filter:
    brightness(0.82)
    saturate(0.78)
    drop-shadow(
      0 5px 7px
      rgba(0, 0, 0, 0.54)
    );
}

/* Primera quemada */

.poker-burn-card[data-burn-card-index="0"] {
  z-index: 1;

  transform:
    translate(-54%, -55%)
    rotate(-7deg);
}

/* Segunda quemada */

.poker-burn-card[data-burn-card-index="1"] {
  z-index: 2;

  transform:
    translate(-48%, -48%)
    rotate(4deg);
}

/* Tercera quemada */

.poker-burn-card[data-burn-card-index="2"] {
  z-index: 3;

  transform:
    translate(-52%, -40%)
    rotate(-2deg);
}

/* Oscurecimiento leve para diferenciarlas del mazo */

.poker-burn-stack::after {
  content: "";

  position: absolute;
  inset: 8% 5% 4%;

  z-index: 5;

  border-radius:
    clamp(4px, 0.42vw, 7px);

  background:
    linear-gradient(
      145deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.22)
    );

  pointer-events: none;
}

/* Pantallas horizontales bajas */

@media (
  max-height: 650px
) and (
  orientation: landscape
) {
  .poker-burn-zone {
    width:
      calc(
        var(--poker-card-width) * 0.68
      );
  }

  .poker-burn-stack {
    width:
      calc(
        var(--poker-card-width) * 0.61
      );
  }

  .poker-burn-card[data-burn-card-index="0"] {
    transform:
      translate(-54%, -54%)
      rotate(-6deg);
  }

  .poker-burn-card[data-burn-card-index="1"] {
    transform:
      translate(-48%, -47%)
      rotate(4deg);
  }

  .poker-burn-card[data-burn-card-index="2"] {
    transform:
      translate(-52%, -39%)
      rotate(-2deg);
  }
}
/* =========================================================
   A6 — MAZO + QUEMADAS HACIA LA DERECHA
   Sin apretar las cartas comunitarias
   ========================================================= */

/*
  La zona comunitaria queda estable.
  Las 5 cartas no se redistribuyen.
*/
.poker-community-zone {
  position: relative;
}

/*
  Movemos el MAZO hacia la derecha visualmente,
  sin cambiar su espacio dentro del layout.
*/
.poker-deck-zone {
  position: relative;

  transform:
    translateX(40px);
}

/*
  Las QUEMADAS acompañan al mazo.
*/
.poker-burn-zone {
  position: relative;

  transform:
    translateX(70px);

  margin-left: 1px;
}

.poker-deck-zone {
  transform: translateX(35px);
}

.poker-burn-zone {
  transform: translateX(35px);
}

/* =========================================================
   A7 — POSICIONES COMUNITARIAS FIJAS
   ========================================================= */

.poker-community-zone
.poker-community-cards {
  flex: 0 0 auto;
  flex-shrink: 0;
}

.poker-community-cards
.poker-card,
.poker-community-cards
.poker-card-slot {
  flex: 0 0 var(--poker-card-width);
  width: var(--poker-card-width);
}
/* =========================================================
   A9 — FICHA DE 100 MÁS GRANDE EN SUBIR
   ========================================================= */

.poker-chip-button[data-poker-raise="100"] {
  overflow: visible;
}

.poker-chip-button[data-poker-raise="100"]
.poker-chip-button__image {
  width: 118%;
  height: 118%;

  max-width: none;
  max-height: none;

  transform: scale(1.28);
}
/* =========================================================
   A1 — INTRO COMPACTA PARA ANDROID HORIZONTAL
   ========================================================= */

@media (
  max-height: 650px
) and (
  orientation: landscape
) {

  .intro-screen {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;

    overflow: hidden;
  }

  .intro-glow {
    width: min(50vw, 360px);

    box-shadow:
      0 0 60px rgba(208, 148, 37, 0.10),
      inset 0 0 45px rgba(208, 148, 37, 0.06);
  }

  .intro-brand {
    transform: scale(0.82);
    transform-origin: center;
  }

  .intro-brand img {
    width: clamp(72px, 8vw, 102px);

    border-radius: 8px;

    box-shadow:
      0 10px 28px #000,
      0 0 18px rgba(236, 190, 73, 0.22);
  }

  .intro-brand p {
    margin: 12px 0 3px;

    font-size: 8px;

    letter-spacing: 0.30em;
  }

  .intro-brand h1 {
    margin: 0;

    font-size:
      clamp(
        30px,
        5vw,
        48px
      );

    letter-spacing: 0.09em;

    text-shadow:
      0 4px 14px #000;
  }

  .intro-brand span {
    font-size: 9px;

    letter-spacing: 0.34em;
  }
}
/* =========================================================
   A1 — ANDROID LANDSCAPE
   SUBIR BARRA DE ACCIONES SIN ALTERAR EL LAYOUT
   ========================================================= */

@media (max-height: 650px) and (orientation: landscape) {

  .poker-actions {
    transform: translateY(-18px);
    z-index: 100;
  }

}
/* =========================================================
   ANDROID LANDSCAPE — MENÚ PRINCIPAL EXTRA COMPACTO
   ========================================================= */

@media (max-height: 650px) and (orientation: landscape) {

  .poker-start-screen {
    overflow: hidden;
  }

  .poker-start-card {
    width: min(380px, 52vw);
    max-height: calc(100vh - 8px);

    display: grid;
    justify-items: center;
    align-content: center;

    gap: 1px;

    padding: 4px 14px 6px;
  }

  /* Dorso superior */
  .poker-start-card__deck {
    margin: 0 0 1px;
  }

  .poker-start-card__deck img {
    width: 42px;
    height: auto;
    display: block;
  }

  /* PUCARÁ PRESENTA */
  .poker-start-card .start-card__eyebrow {
    margin: 1px 0 0;

    font-size: 5px;
    line-height: 1;

    letter-spacing: 0.22em;
  }

  /* POKER */
  .poker-start-card h1 {
    margin: 1px 0;

    font-size: 27px;
    line-height: 0.92;

    letter-spacing: 0.08em;
  }

  /* POKER OMAHA · MANO A MANO */
  .poker-start-card .start-card__mode {
    margin: 1px 0 4px;

    font-size: 6px;
    line-height: 1;

    letter-spacing: 0.12em;
  }

  /* Menú */
  .poker-start-card .start-menu {
    width: min(330px, 46vw);

    display: grid;

    gap: 3px;

    margin: 0;
  }

  .poker-start-card .start-menu button {
    width: 100%;

    height: 24px;
    min-height: 24px;

    padding: 0 10px;

    font-size: 8px;
    line-height: 1;

    letter-spacing: 0.05em;
  }

  /* MOTOR FRANCÉS PUCARÁ */
  .poker-start-card > small {
    margin-top: 2px;

    font-size: 4px;
    line-height: 1;

    letter-spacing: 0.08em;
  }
}

/* =========================================================
   POKER OMAHA · CIERRE MÓVIL HORIZONTAL
   ========================================================= */

html,
body,
#app {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#app,
#app * {
  -webkit-tap-highlight-color: transparent;
}

#app img {
  -webkit-user-drag: none;
}

#app button,
#app [role="button"] {
  touch-action: manipulation;
}

.poker-rotate-notice {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: #f8dc8a;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(67, 42, 8, .55), transparent 48%),
    #050806;
}

.poker-rotate-notice__phone {
  width: 72px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 3px solid #d8a833;
  border-radius: 14px;
  font-size: 40px;
  animation: poker-phone-rotate 1.5s ease-in-out infinite;
}

.poker-rotate-notice strong {
  font: 800 20px/1 Arial, sans-serif;
  letter-spacing: .12em;
}

.poker-rotate-notice span {
  color: #bda76c;
  font: 700 10px/1.3 Arial, sans-serif;
  letter-spacing: .09em;
}

@keyframes poker-phone-rotate {
  0%, 25% { transform: rotate(0); }
  65%, 100% { transform: rotate(90deg); }
}

@media (orientation: portrait) and (max-width: 900px) {
  .poker-rotate-notice { display: grid; }
}

@media (orientation: landscape) and (max-height: 650px) {
  :root {
    --poker-card-width: clamp(42px, 5.2vw, 66px);
    --poker-action-height: 38px;
  }

  .intro-screen,
  .start-screen,
  .statistics-screen,
  .poker-table {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
  }

  .intro-brand {
    transform: scale(.72);
  }

  .poker-start-card {
    width: min(720px, 92vw);
    height: min(330px, calc(100dvh - 10px));
    max-height: none;
    grid-template-columns: minmax(180px, .8fr) minmax(250px, 1.2fr);
    grid-template-rows: auto auto auto auto 1fr auto;
    column-gap: clamp(12px, 3vw, 36px);
    padding: 10px clamp(18px, 4vw, 42px);
  }

  .poker-start-card__deck,
  .poker-start-card .start-card__eyebrow,
  .poker-start-card h1,
  .poker-start-card .start-card__mode,
  .poker-start-card > small {
    grid-column: 1;
  }

  .poker-start-card .start-menu {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    width: 100%;
    gap: 7px;
  }

  .poker-start-card .start-menu button {
    height: 38px;
    min-height: 38px;
    font-size: 10px;
  }

  .poker-board {
    margin: 2px max(4px, env(safe-area-inset-right)) 2px max(4px, env(safe-area-inset-left));
  }

  .poker-hand .poker-card + .poker-card,
  .poker-card-slot--hand + .poker-card-slot--hand {
    margin-left: calc(var(--poker-card-width) * -.43);
  }

  /* La mano del jugador necesita mayor presencia y legibilidad en Android. */
  .poker-hand--player .poker-card,
  .poker-hand--player .poker-card-slot--hand {
    width: calc(var(--poker-card-width) * 1.22);
    height: calc(var(--poker-card-height) * 1.22);
  }

  .poker-hand--player .poker-card + .poker-card,
  .poker-hand--player .poker-card-slot--hand + .poker-card-slot--hand {
    margin-left: calc(var(--poker-card-width) * -.56);
  }

  .poker-hand--cpu { margin-top: -16px; }
  .poker-hand--player { margin-bottom: 25px; }
  .poker-actions { transform: none; }

  .poker-result-overlay {
    padding: 6px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
  }

  .poker-result-card {
    width: min(620px, 92vw);
    max-height: calc(100dvh - 12px);
    overflow: auto;
    padding: 12px 18px;
  }

  .full-settings {
    width: min(720px, 96vw);
    height: calc(100dvh - 8px);
    max-height: none;
  }

  .settings-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
/* FIVE CARD DRAW: selección táctil de descartes */
.poker-card--player {
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, outline-color 160ms ease;
  touch-action: manipulation;
}

.poker-card--player.is-selected-for-draw {
  transform: translateY(-18px) scale(1.04) !important;
  filter: drop-shadow(0 0 10px #f5c84b);
  outline: 3px solid #f5c84b;
  outline-offset: -3px;
}

.poker-actions--draw {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.poker-draw-help { display: flex; flex-direction: column; color: #f6d77a; text-align: center; }
.poker-draw-help span { font-size: 12px; opacity: .8; }
.poker-draw-confirm {
  min-width: 190px;
  padding: 12px 24px;
  border: 1px solid #f5c84b;
  border-radius: 14px;
  color: #211200;
  background: linear-gradient(#ffe38a, #c99120);
  font: 800 16px Georgia, serif;
  letter-spacing: 1px;
}
.poker-draw-table-mark {
  min-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(235, 200, 104, .72);
  letter-spacing: 3px;
}
.poker-draw-table-mark strong { font: 800 22px Georgia, serif; }
.poker-draw-table-mark span { margin-top: 7px; font-size: 10px; }
