/* Sala Cero v22.0 · capa final de experiencia, accesibilidad y adaptación real */
:root{
  --sc-gold:#f1cf82;
  --sc-gold-strong:#ffd98b;
  --sc-ink:#050b09;
  --sc-surface:#0a1813;
  --sc-surface-2:#10271f;
  --sc-text:#fff8e9;
  --sc-muted:#b6c0ba;
  --sc-line:rgba(255,255,255,.12);
  --sc-soft-line:rgba(241,207,130,.2);
  --sc-shadow:0 24px 70px rgba(0,0,0,.42);
  --sc-radius:22px;
  --sc-tap:46px;
  --sc-vh:100dvh;
  color-scheme:dark;
  font-synthesis:none;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
*{box-sizing:border-box}
html{min-width:320px;scroll-behavior:smooth;background:var(--sc-ink);-webkit-text-size-adjust:100%}
body{min-width:320px;min-height:var(--sc-vh);overflow-x:hidden}
body.sc-ready{animation:scPageIn .32s ease both}
::selection{color:#191006;background:var(--sc-gold)}
img,svg,canvas,video{max-width:100%}
img{-webkit-user-drag:none;user-select:none}
button,input,select,textarea{font:inherit}
button,[role="button"],a{-webkit-tap-highlight-color:transparent}
button:not(:disabled),[role="button"],a[href],label[for],select{cursor:pointer}
button:disabled,[aria-disabled="true"]{cursor:not-allowed;filter:saturate(.4);opacity:.52}
button,a,input,select,textarea{outline:none}
:focus-visible{outline:3px solid var(--sc-gold-strong)!important;outline-offset:3px!important}
button:active:not(:disabled),a:active{transform:translateY(1px) scale(.985)}
.hidden,[hidden]{display:none!important}
.sc-skip-link{position:fixed;z-index:100000;left:14px;top:14px;padding:12px 16px;border-radius:12px;color:#1b1208;background:var(--sc-gold);font-size:13px;font-weight:900;text-decoration:none;transform:translateY(-180%);transition:transform .18s ease}
.sc-skip-link:focus{transform:none}
.sc-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sc-touching{filter:brightness(1.08)}

/* Cabeceras coherentes, legibles y sin saltos */
.topbar,.hub-topbar,.hub-top,.g-topbar,.sg-top,.local-topbar,.multi-topbar,.pk-topbar,.bj-top,.im-top,.ten-topbar{
  isolation:isolate;
  border-bottom-color:rgba(255,255,255,.1)!important;
  backdrop-filter:blur(18px) saturate(1.15);
  -webkit-backdrop-filter:blur(18px) saturate(1.15);
}
.topbar a,.topbar button,.hub-nav a,.hub-nav button,.g-topbar a,.g-topbar button,.sg-top a,.sg-top button,
.local-topbar a,.local-topbar button,.multi-topbar a,.multi-topbar button,.pk-topbar a,.pk-topbar button,
.bj-top a,.bj-top button,.im-top a,.im-top button,.ten-topbar a,.ten-topbar button{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.brand strong,.hub-brand strong,.g-brand strong,.sg-brand strong,.pk-brand strong,.bj-brand strong,.im-brand strong,.ten-brand strong{letter-spacing:.1em!important}
.brand small,.hub-brand small,.g-brand small,.sg-brand small,.pk-brand small,.bj-brand small,.im-brand small,.ten-brand small{letter-spacing:.15em!important}

/* Tarjetas, paneles y diálogos */
.hub-profile-card,.hub-game,.hub-panel,.hub-stat,.hub-career-callout,.club-challenge,.club-achievement,
.home-mode,.g-mode-card,.sg-mode,.pk-mode,.bj-mode,.im-mode,.variant-card,
.score-card,.intel-card,.log-card,.g-score-panel,.g-category-panel,.g-intel-card,.g-log-card,.sg-panel,
.multi-panel,.side-panel,.pk-seat,.bj-player,.im-card,.ten-table{
  border-color:var(--sc-line)!important;
}
.hub-game,.home-mode,.g-mode-card,.sg-mode,.pk-mode,.bj-mode,.im-mode,.variant-card{
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease,background .2s ease;
}
.hub-game:hover,.home-mode:hover,.g-mode-card:hover,.sg-mode:hover,.pk-mode:hover,.bj-mode:hover,.im-mode:hover,.variant-card:hover{
  transform:translateY(-3px);
  border-color:rgba(241,207,130,.38)!important;
  box-shadow:0 28px 70px rgba(0,0,0,.36);
}
dialog{max-width:calc(100vw - 24px);max-height:calc(var(--sc-vh) - 24px);padding:0;border:0;background:transparent;color:var(--sc-text)}
dialog::backdrop{background:rgba(1,5,4,.82);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
dialog[open]{animation:scDialogIn .2s ease both}
.modal-card,.g-modal-card,.sg-modal-card,.multi-modal-card,.local-modal-card,.pk-modal-card,.result-card,.club-dialog-card,.tutorial-card,
#bjSetup,#imSetup{
  max-height:calc(var(--sc-vh) - 28px)!important;
  overflow:auto!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  box-shadow:0 30px 100px rgba(0,0,0,.62)!important;
}
input,select,textarea{
  min-height:46px;
  border-color:rgba(255,255,255,.15)!important;
  border-radius:12px!important;
  font-size:16px!important;
}
input:focus,select:focus,textarea:focus{border-color:rgba(241,207,130,.7)!important;box-shadow:0 0 0 3px rgba(241,207,130,.11)!important}

/* Botones principales: siempre parecen pulsables */
.primary,.secondary,.danger,.home-primary,.home-secondary,.g-primary,.g-secondary,.sg-primary,.sg-secondary,.sg-danger,
.pk-primary,.pk-secondary,.bj-primary,.bj-secondary,.im-primary,.im-secondary,.ten-primary,.club-save-button,
.g-roll-button,.multi-primary,.local-primary,.tutorial-actions button,
button[class*="primary"],button[class*="secondary"]{
  min-height:var(--sc-tap);
  border-radius:13px!important;
  transition:transform .12s ease,filter .12s ease,box-shadow .18s ease,border-color .18s ease;
}
.primary:hover,.home-primary:hover,.g-primary:hover,.sg-primary:hover,.pk-primary:hover,.bj-primary:hover,.im-primary:hover,.ten-primary:hover,
button[class*="primary"]:hover:not(:disabled){filter:brightness(1.08);box-shadow:0 12px 28px rgba(0,0,0,.25)}

/* Portada: menos saturación, mejor ritmo y tarjetas más premium */
.hub-wrap{width:min(1360px,100%);padding-bottom:64px}
.hub-hero{padding-top:clamp(32px,5vw,68px);padding-bottom:clamp(28px,4vw,54px)}
.hub-hero h1{max-width:900px;text-wrap:balance}
.hub-hero p{max-width:760px;color:#b7c1bb!important;line-height:1.7}
.hub-games{gap:22px}
.hub-game{min-width:0;border-radius:28px;box-shadow:0 24px 65px rgba(0,0,0,.3)}
.hub-game-visual{min-height:310px}
.hub-game-copy{padding:25px 26px 27px}
.hub-game-copy strong{line-height:.98!important;text-wrap:balance}
.hub-game-copy p{font-size:14px!important;line-height:1.65!important}
.hub-game-copy b{min-height:40px;align-items:center}
.hub-section{scroll-margin-top:90px}
.hub-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.hub-stat{min-width:0}
.hub-challenges{grid-template-columns:repeat(3,minmax(0,1fr))}
.hub-achievements{grid-template-columns:repeat(5,minmax(0,1fr))}
.hub-footer{gap:14px!important}

/* Pantallas de bienvenida: foco claro en empezar */
.home-screen,.g-welcome,.sg-welcome,.pk-welcome,.bj-welcome,.im-welcome{scroll-margin-top:70px}
.home-copy p,.g-hero-copy p,.sg-hero p,.pk-hero p,.bj-hero p,.im-hero p,.ten-copy p{color:#b6c0ba!important;line-height:1.68!important}
.home-mode p,.g-mode-card p,.sg-mode p,.pk-mode p,.bj-mode p,.im-mode p{line-height:1.55!important}
.home-mode small,.g-mode-card small,.sg-mode small,.pk-mode small,.bj-mode small,.im-mode small{line-height:1.45!important}

/* Mesas: respiro, contraste y estados claros */
.app-shell:not(.hidden),.g-game:not(.hidden),.sg-game:not(.hidden),.pk-game:not(.hidden),.bj-game:not(.hidden),.im-game:not(.hidden),
.local-layout,.multi-layout{isolation:isolate}
.table-message,.g-table-message,.sg-message,.pk-table-message,.bj-message,.im-message,.ten-status{
  text-wrap:balance;
  line-height:1.45!important;
}
.toast,.sg-toast,.pk-toast,.bj-toast,.im-toast{
  max-width:min(420px,calc(100vw - 24px));
  border:1px solid rgba(241,207,130,.24)!important;
  border-radius:14px!important;
  box-shadow:0 18px 48px rgba(0,0,0,.42)!important;
  font-size:12px!important;
  line-height:1.45!important;
}
.playing-card,.local-card,.multi-card,.sg-card,.pk-card,.bj-card,.ten-card{filter:drop-shadow(0 10px 18px rgba(0,0,0,.3))}
.playing-card,.local-card,.multi-card,.sg-card{transition:transform .15s ease,filter .15s ease,opacity .15s ease}
.playing-card:hover,.local-card:hover,.multi-card:hover,.sg-card:hover{filter:drop-shadow(0 14px 22px rgba(0,0,0,.38)) brightness(1.04)}

/* Selector de formato: útil pero no invasivo */
.sc-device-picker{padding:14px;background:rgba(1,5,4,.79)}
.sc-device-card{width:min(610px,100%);padding:28px;border-radius:24px}
.sc-device-options>button{min-height:142px;padding:17px}
.sc-device-options strong{font-size:15px!important}.sc-device-options small{font-size:11px!important}.sc-device-note{font-size:10px!important;line-height:1.5}
.sc-device-recommended{font-size:8px!important}
.sc-device-switch{left:auto!important;right:max(10px,env(safe-area-inset-right));min-height:42px;opacity:.9;transition:opacity .2s ease,transform .2s ease}
.sc-device-switch:hover{opacity:1}
.sc-device-switch small{font-size:7px!important}.sc-device-switch strong{font-size:10px!important}
.sc-device-switch.sc-device-idle{opacity:.58;transform:translateY(3px)}

/* Póker y Blackjack: controles inferiores más fiables */
.pk-actions,.controls{box-shadow:0 -16px 44px rgba(0,0,0,.24)}
.pk-actions button,.controls button{min-height:48px!important}
.pk-range input[type="range"],input[type="range"]{min-height:30px}
.bj-player,.pk-seat{backdrop-filter:blur(8px)}

/* Es un 10: carta protagonista y menos ruido */
.ten-main{max-width:1240px;margin-inline:auto}
.ten-copy h1{text-wrap:balance}
.ten-primary{box-shadow:0 15px 35px rgba(0,0,0,.28)}

/* Utilidades de movimiento */
@keyframes scPageIn{from{opacity:0}to{opacity:1}}
@keyframes scDialogIn{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}

@media (max-width:1050px){
  .hub-achievements{grid-template-columns:repeat(3,minmax(0,1fr))}
  .hub-challenges{grid-template-columns:1fr 1fr}
  .hub-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Móvil/iPhone: legibilidad real, controles táctiles y nada de microtexto */
@media (max-width:820px){
  :root{--sc-tap:48px;--sc-radius:18px}
  html[data-device-mode="mobile"] body{overscroll-behavior-y:auto!important}
  body{font-size:14px}
  .topbar,.hub-topbar,.hub-top,.g-topbar,.sg-top,.local-topbar,.multi-topbar,.pk-topbar,.bj-top,.im-top,.ten-topbar{
    min-height:58px!important;
    padding-top:max(6px,env(safe-area-inset-top))!important;
    padding-left:max(10px,env(safe-area-inset-left))!important;
    padding-right:max(10px,env(safe-area-inset-right))!important;
    gap:8px!important;
  }
  .topbar,.g-topbar,.sg-top,.local-topbar,.multi-topbar,.pk-topbar,.bj-top,.im-top,.ten-topbar{position:sticky!important;top:0!important;z-index:500!important}
  .topbar>*,.g-topbar>*,.sg-top>*,.local-topbar>*,.multi-topbar>*,.pk-topbar>*,.bj-top>*,.im-top>*,.ten-topbar>*{flex-shrink:0}
  .brand strong,.hub-brand strong,.g-brand strong,.sg-brand strong,.pk-brand strong,.bj-brand strong,.im-brand strong,.ten-brand strong{font-size:10px!important}
  .brand small,.hub-brand small,.g-brand small,.sg-brand small,.pk-brand small,.bj-brand small,.im-brand small,.ten-brand small{font-size:7px!important}
  .brand-mark,.hub-mark,.g-brand-mark,.sg-mark,.pk-mark,.bj-mark,.im-mark,.ten-mark{flex:0 0 auto}
  .hub-nav,.topbar-actions,.g-top-actions,.sg-actions,.pk-top-actions,.bj-top-actions,.im-top-actions,.ten-actions{
    min-width:0;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .hub-nav::-webkit-scrollbar,.topbar-actions::-webkit-scrollbar,.g-top-actions::-webkit-scrollbar,.sg-actions::-webkit-scrollbar,.pk-top-actions::-webkit-scrollbar,.bj-top-actions::-webkit-scrollbar,.im-top-actions::-webkit-scrollbar,.ten-actions::-webkit-scrollbar{display:none}
  .hub-nav a,.hub-nav button,.topbar a,.topbar button,.g-topbar a,.g-topbar button,.sg-top a,.sg-top button,.local-topbar a,.local-topbar button,.multi-topbar a,.multi-topbar button,.pk-topbar a,.pk-topbar button,.bj-top a,.bj-top button,.im-top a,.im-top button,.ten-topbar a,.ten-topbar button{
    min-width:42px!important;
    min-height:42px!important;
    padding:0 11px!important;
    font-size:10px!important;
    white-space:nowrap;
  }

  /* Portada móvil */
  .hub-wrap{padding:10px 10px calc(76px + env(safe-area-inset-bottom))}
  .hub-top{position:sticky!important;top:0!important;z-index:600!important;margin:-10px -10px 0;padding:8px 10px;background:rgba(4,14,11,.9)}
  .hub-hero{grid-template-columns:1fr!important;gap:18px!important;padding:28px 2px 22px!important}
  .hub-kicker{font-size:9px!important;padding:7px 10px}
  .hub-hero h1{margin:13px 0 10px!important;font-size:clamp(52px,19vw,78px)!important;line-height:.9!important}
  .hub-hero p{font-size:14px!important;line-height:1.62!important}
  .hub-profile-card{padding:16px!important;border-radius:20px!important}
  .hub-profile-head strong{font-size:23px!important}.hub-profile-head small{font-size:8px!important}
  .hub-profile-actions button,.hub-profile-actions a{min-height:46px!important;font-size:11px!important}
  .hub-games{grid-template-columns:1fr!important;gap:14px!important}
  .hub-game{grid-template-rows:220px auto!important;border-radius:22px!important}
  .hub-game-visual{height:220px!important;min-height:220px!important}
  .hub-game-copy{padding:18px 17px 19px!important}
  .hub-game-copy small{font-size:9px!important;line-height:1.4!important}
  .hub-game-copy strong{margin:6px 0 8px!important;font-size:clamp(36px,12vw,52px)!important}
  .hub-game-copy p{font-size:13px!important;line-height:1.58!important}
  .hub-game-copy b{margin-top:12px!important;font-size:12px!important}
  .hub-game-seal{left:14px!important;top:14px!important;width:52px!important;height:52px!important;font-size:22px!important}
  .hub-career-callout{grid-template-columns:54px 1fr!important;gap:12px!important;padding:17px!important;border-radius:20px!important}
  .hub-career-status{grid-column:1/-1!important}.hub-career-copy h2{font-size:30px!important}.hub-career-copy p{font-size:12px!important;line-height:1.55!important}
  .hub-section{margin-top:22px!important}.hub-section-head{display:block!important}.hub-section-head h2{font-size:31px!important}.hub-section-head p{margin-top:6px!important;font-size:11px!important;text-align:left!important}
  .hub-stats,.hub-challenges,.hub-achievements,.hub-lower{grid-template-columns:1fr!important;gap:9px!important}
  .hub-stat{padding:15px!important}.hub-stat span{font-size:8px!important}.hub-stat strong{font-size:31px!important}.hub-stat small{font-size:10px!important}
  .club-challenge{grid-template-columns:44px minmax(0,1fr)!important}.club-challenge button{grid-column:1/-1!important;min-height:44px!important}.club-challenge strong{font-size:17px!important}.club-challenge p{font-size:10px!important}
  .club-achievement{min-height:138px!important}.club-achievement p{font-size:10px!important}.club-achievement>small{font-size:8px!important}
  .hub-footer{display:grid!important;grid-template-columns:1fr 1fr!important;padding:18px 10px!important}.hub-footer-center{grid-column:1/-1;grid-row:1;text-align:center}.hub-foot{min-width:0}.hub-foot small{font-size:8px!important}

  /* Bienvenidas */
  .home-screen,.g-welcome,.sg-welcome,.pk-welcome,.bj-welcome,.im-welcome{padding:18px 10px 28px!important}
  .home-copy,.g-hero-copy,.sg-hero,.pk-hero,.bj-hero,.im-hero{padding:10px 2px!important}
  .home-copy h1,.g-hero-copy h1,.sg-hero h1,.pk-hero h1,.bj-hero h1,.im-hero h1{font-size:clamp(43px,14vw,60px)!important;line-height:.92!important;text-wrap:balance}
  .home-copy p,.g-hero-copy p,.sg-hero p,.pk-hero p,.bj-hero p,.im-hero p{font-size:13px!important;line-height:1.6!important}
  .home-kicker,.g-kicker,.sg-kicker,.pk-kicker,.bj-kicker,.im-kicker{font-size:9px!important}
  .home-mode-grid,.g-mode-grid,.sg-mode-grid,.pk-mode-grid,.bj-mode-grid,.im-mode-grid{grid-template-columns:1fr!important;gap:10px!important}
  .home-mode,.g-mode-card,.sg-mode,.pk-mode,.bj-mode,.im-mode{min-height:0!important;padding:17px!important;border-radius:18px!important}
  .home-mode strong,.g-mode-card strong,.sg-mode strong,.pk-mode strong,.bj-mode strong,.im-mode strong{font-size:24px!important}
  .home-mode p,.g-mode-card p,.sg-mode p,.pk-mode p,.bj-mode p,.im-mode p{font-size:12px!important}
  .home-mode small,.g-mode-card small,.sg-mode small,.pk-mode small,.bj-mode small,.im-mode small{font-size:10px!important}

  /* Microtexto prohibido en móvil */
  .eyebrow,.label,.kicker,.turn-label,.seat-role,.pk-seat-name small,.pk-stack,.pk-seat-action,.g-roll-counter small,
  .sg-turn small,.sg-pile span,.g-category-button span,.ten-round span,.bj-player small,.im-progress small{
    font-size:max(9px,1em)!important;
    line-height:1.25!important;
  }

  /* Mesas generales: panel principal desplazable y controles accesibles */
  .app-shell:not(.hidden),.g-game:not(.hidden),.sg-game:not(.hidden),.pk-game:not(.hidden),.bj-game:not(.hidden),.im-game:not(.hidden),
  .local-layout,.multi-layout{
    min-height:calc(var(--sc-vh) - 58px)!important;
    height:auto!important;
  }
  .table-panel,.g-table,.sg-table,.pk-casino-stage,.bj-game,.im-game,.local-table,.multi-table{
    min-height:calc(var(--sc-vh) - 58px)!important;
  }
  .score-card,.intel-card,.log-card,.g-score-panel,.g-category-panel,.g-intel-card,.g-log-card,.sg-panel,.multi-panel,.side-panel{
    border-radius:16px!important;
  }
  .table-message,.g-table-message,.sg-message,.pk-table-message,.bj-message,.im-message,.ten-status{font-size:11px!important;min-height:24px!important}
  .toast,.sg-toast,.pk-toast,.bj-toast,.im-toast{font-size:12px!important;bottom:calc(72px + env(safe-area-inset-bottom))!important}

  /* Tute: mano legible y paneles sin invadir */
  .app-shell:not(.hidden){padding-bottom:calc(88px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .player-hand .playing-card,.private-hand .local-card,.player-multi-hand .multi-card{width:68px!important;height:auto!important;aspect-ratio:620/956!important;flex:0 0 68px!important}
  .player-hand,.private-hand,.player-multi-hand{min-height:132px!important;padding-left:calc(50vw - 34px)!important;padding-right:calc(50vw - 34px)!important;overflow-x:auto!important;scroll-snap-type:x proximity!important}
  .player-hand .playing-card,.private-hand .local-card,.player-multi-hand .multi-card{scroll-snap-align:center!important}
  .mobile-action-dock,.multi-actions-dock,.local-actions-dock{min-height:64px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
  .mobile-action-dock button,.multi-actions-dock button,.local-actions-dock button{min-height:48px!important;font-size:11px!important}
  .seat-badge strong{font-size:10px!important}.seat-badge small{font-size:8px!important}
  .order-helper{font-size:10px!important;line-height:1.4!important}

  /* Generala: no comprimir dados ni casillas */
  .g-game:not(.hidden){padding-bottom:calc(92px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .g-table{overflow:visible!important;padding:10px 8px 18px!important}
  .g-turn-banner{min-height:54px!important}.g-turn-banner span{font-size:9px!important}.g-turn-banner strong{font-size:19px!important}.g-roll-counter b{font-size:13px!important}
  .g-cup-launcher{width:128px!important;height:166px!important}.g-cup-label{font-size:9px!important}
  .g-dice-tray{min-height:90px!important;gap:6px!important;padding-bottom:18px!important;overflow-x:auto!important;justify-content:flex-start!important;scroll-snap-type:x proximity!important}
  .g-die{--die:60px!important;flex:0 0 var(--die)!important;scroll-snap-align:center!important}.g-die i{font-size:9px!important;bottom:-17px!important}
  .g-roll-button{min-height:52px!important;font-size:11px!important}.g-roll-button b{font-size:12px!important}.g-roll-button small{font-size:9px!important}
  .g-category-panel{padding:10px!important}.g-category-heading span{font-size:10px!important}.g-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .g-category-button{min-height:54px!important;padding:7px!important}.g-category-button span{font-size:9px!important}.g-category-button strong{font-size:15px!important}
  .g-score-panel{max-height:88px!important}.g-score-panel.expanded{max-height:72vh!important}.g-score-table{font-size:11px!important}.g-score-table th{font-size:9px!important}

  /* Chinchón, Escoba y Culo */
  .sg-game:not(.hidden){padding-bottom:calc(90px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .sg-table{overflow:visible!important;padding:9px 7px 18px!important}
  .sg-turn{min-height:52px!important}.sg-turn small{font-size:9px!important}.sg-turn strong{font-size:18px!important}.sg-turn b{font-size:11px!important}
  .sg-center{min-height:250px!important}.sg-pile{width:72px!important;height:111px!important}.sg-pile span{font-size:9px!important}
  .sg-controls{position:sticky!important;bottom:0!important;z-index:90!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:10px 4px calc(8px + env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,transparent,rgba(3,14,10,.96) 24%)!important}
  .sg-primary,.sg-secondary,.sg-danger{min-height:48px!important;padding:0 10px!important;font-size:10px!important}
  .sg-hand{min-height:144px!important;padding-left:calc(50vw - 35px)!important;padding-right:calc(50vw - 35px)!important;overflow-x:auto!important;scroll-snap-type:x proximity!important}
  .sg-hand .sg-card{width:70px!important;flex:0 0 70px!important;margin-left:-15px!important;scroll-snap-align:center!important}.sg-hand .sg-card:first-child{margin-left:0!important}
  .sg-opponent-hand img{width:42px!important;height:auto!important}.sg-table-cards .sg-card{width:58px!important}
  .sg-combo{font-size:10px!important}.sg-score-row strong{font-size:11px!important}.sg-score-row small{font-size:9px!important}
  .culo-opponent{min-width:122px!important}.culo-opponent strong{font-size:10px!important}.culo-opponent small{font-size:9px!important}.culo-rank-strip span{font-size:10px!important}

  /* Póker: mesa completa pero controles fuera del tapón visual */
  html[data-device-mode="mobile"] .pk-game{height:auto!important;min-height:calc(var(--sc-vh) - 58px)!important;overflow-y:auto!important;padding-bottom:calc(155px + env(safe-area-inset-bottom))!important}
  html[data-device-mode="mobile"] .pk-casino-stage{height:clamp(620px,calc(var(--sc-vh) - 58px),780px)!important;min-height:620px!important;padding-top:82px!important;padding-bottom:180px!important;overflow:visible!important}
  html[data-device-mode="mobile"] .pk-dealer{width:102px!important;height:122px!important}.pk-dealer-plaque span{display:block!important;font-size:7px!important}
  html[data-device-mode="mobile"] .pk-seat{width:98px!important;padding:5px!important}.pk-seat-name strong{font-size:8px!important}.pk-seat-name small{font-size:7px!important}.pk-stack{font-size:8px!important}.pk-seat-action{font-size:7px!important;min-height:10px!important}
  html[data-device-mode="mobile"] .pk-avatar{width:27px!important;height:27px!important;font-size:8px!important}.pk-seat-cards{height:30px!important}.pk-seat-cards .pk-card{width:21px!important;height:29px!important}
  html[data-device-mode="mobile"] .pk-board .pk-card{width:clamp(41px,12vw,50px)!important}.pk-pot strong{font-size:16px!important}
  html[data-device-mode="mobile"] .pk-hero-zone{bottom:112px!important;min-height:92px!important;padding:7px!important}.pk-private-hand .pk-card{width:48px!important}.pk-hand-info strong{font-size:15px!important}
  .pk-actions{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:700!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;background:rgba(3,12,9,.96)!important;backdrop-filter:blur(16px)!important}
  .pk-actions button{min-height:50px!important;font-size:9px!important}.pk-actions button strong{font-size:10px!important}.pk-raise-control{grid-column:1/-1!important}

  /* Blackjack */
  .bj-game:not(.hidden){padding-bottom:calc(112px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  .bj-game .table{min-height:520px!important;padding-bottom:120px!important}
  .controls{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:700!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;background:rgba(3,12,9,.96)!important;backdrop-filter:blur(16px)!important}
  .controls button{min-height:50px!important;font-size:10px!important}
  .bj-player{min-width:108px!important}.bj-player strong{font-size:10px!important}.bj-player small{font-size:9px!important}

  /* Impostor: una sola decisión por pantalla */
  .im-shell{padding:0 10px calc(30px + env(safe-area-inset-bottom))!important}
  .im-game:not(.hidden){display:grid!important;place-items:center!important;padding:18px 4px!important}
  .handoff,.role,.discussion{width:min(520px,100%)!important;padding:24px 16px!important;border-radius:22px!important}
  .handoff h2,.role h2,.discussion h2{font-size:clamp(30px,10vw,46px)!important;line-height:1!important}
  .handoff p,.role p,.discussion p{font-size:13px!important;line-height:1.6!important}
  .handoff button,.role button,.discussion button{width:100%!important;min-height:52px!important;font-size:12px!important}

  /* Es un 10: aprovecha la altura sin textos diminutos */
  html[data-device-mode="mobile"] .ten-topbar{position:sticky!important;height:auto!important;min-height:58px!important;padding-top:max(6px,env(safe-area-inset-top))!important}
  html[data-device-mode="mobile"] .ten-main{height:auto!important;min-height:calc(var(--sc-vh) - 58px)!important;padding:10px 8px calc(18px + env(safe-area-inset-bottom))!important;overflow:visible!important}
  html[data-device-mode="mobile"] .ten-copy{padding:8px 4px!important}.ten-copy h1{font-size:clamp(38px,13vw,52px)!important;white-space:normal!important}.ten-copy p{display:block!important;font-size:12px!important}
  html[data-device-mode="mobile"] .ten-table{min-height:calc(var(--sc-vh) - 190px)!important;padding:45px 8px 13px!important;overflow:hidden!important}
  html[data-device-mode="mobile"] .ten-deck-wrap{--card-w:min(72vw,290px)!important;flex:0 0 auto!important}.ten-round span{font-size:8px!important}.ten-status{font-size:11px!important}.ten-primary{min-height:54px!important}.ten-primary strong{font-size:12px!important}.ten-hint{display:block!important;font-size:9px!important}

  /* Diálogos móviles */
  dialog{max-width:calc(100vw - 10px)!important;max-height:calc(var(--sc-vh) - 10px)!important}
  .modal-card,.g-modal-card,.sg-modal-card,.multi-modal-card,.local-modal-card,.pk-modal-card,.result-card,.club-dialog-card,.tutorial-card,
  #bjSetup,#imSetup{width:calc(100vw - 12px)!important;max-height:calc(var(--sc-vh) - 12px)!important;padding:20px 14px calc(18px + env(safe-area-inset-bottom))!important;border-radius:20px!important}
  .modal-card h1,.modal-card h2,.g-modal-card h1,.sg-modal-card h2,.pk-modal-card h2,.result-card h2,.club-dialog-card h2{font-size:30px!important;line-height:1!important}
  .choice-group label>span,.g-choice-group label>span{min-height:66px!important}.choice-group b,.g-choice-group b{font-size:11px!important}.choice-group small,.g-choice-group small{font-size:9px!important}

  /* Selector de dispositivo */
  .sc-device-card{padding:22px 14px 18px!important}.sc-device-card h2{padding-right:38px;font-size:36px!important}.sc-device-card>p{font-size:12px!important}
  .sc-device-options{grid-template-columns:1fr!important}.sc-device-options>button{min-height:104px!important;grid-template-columns:48px 1fr!important}.sc-device-icon{width:48px!important;height:62px!important}
  .sc-device-options strong{font-size:14px!important}.sc-device-options small{font-size:10px!important}.sc-device-note{font-size:9px!important}
  .sc-device-switch{right:max(7px,env(safe-area-inset-right))!important;bottom:max(7px,calc(env(safe-area-inset-bottom) + 5px))!important;min-height:40px!important;padding:5px 7px!important}
  .sc-device-switch>span:first-child{width:27px!important;height:27px!important}.sc-device-switch small{display:none}.sc-device-switch strong{font-size:8px!important}
}

@media(max-width:380px){
  .hub-game{grid-template-rows:200px auto!important}.hub-game-visual{height:200px!important;min-height:200px!important}
  .g-category-grid{grid-template-columns:1fr 1fr!important}
  .player-hand .playing-card,.private-hand .local-card,.player-multi-hand .multi-card{width:64px!important;flex-basis:64px!important}
  .sg-hand .sg-card{width:65px!important;flex-basis:65px!important}
}

@media(max-width:820px) and (orientation:landscape) and (max-height:520px){
  .topbar,.g-topbar,.sg-top,.local-topbar,.multi-topbar,.pk-topbar,.bj-top,.im-top,.ten-topbar{min-height:50px!important}
  .home-screen,.g-welcome,.sg-welcome,.pk-welcome,.bj-welcome,.im-welcome{padding-top:8px!important}
  .home-deck-showcase,.g-dice-showcase,.sg-showcase{display:none!important}
  .app-shell:not(.hidden),.g-game:not(.hidden),.sg-game:not(.hidden),.local-layout,.multi-layout{min-height:calc(var(--sc-vh) - 50px)!important}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

/* Ajustes finales tras validación visual de las mesas móviles */
@media(max-width:820px){
  .sg-controls{
    position:relative!important;
    bottom:auto!important;
    width:100%!important;
    padding:8px 0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  .sg-center{padding-bottom:8px!important}
  .sg-hand{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
  .bj-game .table{
    min-height:calc(var(--sc-vh) - 225px)!important;
  }
}
@media(max-width:820px){
  .sg-controls{grid-template-columns:repeat(auto-fit,minmax(105px,1fr))!important}
}
