/* POKERANDO Mobile V5 — single-screen play layout.
   Loaded AFTER style.css, on phones only. Doesn't alter server rules or desktop. */
@media screen and (max-width:760px) {
  html, body { width:100% !important; margin:0 !important; padding:0 !important; overflow-x:hidden !important; -webkit-text-size-adjust:100%; }
  body.poker-in-game, body:has(#game:not(.hidden)) {height:100dvh !important; overflow:hidden !important;overscroll-behavior:none;}
  body.poker-in-game .wrap, body:has(#game:not(.hidden)) .wrap {
    height:100dvh !important;max-height:100dvh !important;min-height:0 !important;
    padding:env(safe-area-inset-top,0px) 5px env(safe-area-inset-bottom,0px) !important;
    margin:0 !important;display:flex !important;flex-direction:column !important;gap:2px !important;
    overflow:hidden !important; box-sizing:border-box !important;
  }
  .ambient,.casino-room,.vip-croupier,.mobile-table-hint {display:none !important}
  .wrap .top-head {
    flex:0 0 38px !important; height:38px !important;min-height:0 !important;
    padding:0 3px !important;margin:0 !important; display:flex !important;
    flex-wrap:nowrap !important;align-items:center !important;justify-content:space-between !important;
    gap:3px !important;
  }
  .head-brand {min-width:0 !important;gap:5px !important;flex:0 1 auto !important}
  .brand-emblem {font-size:22px !important;line-height:1 !important}
  .head-brand h1 {font:900 17px/1.05 Georgia,serif !important;white-space:nowrap !important;letter-spacing:.2px !important}
  .head-brand em,.head-brand p {display:none !important}
  .header-actions {width:auto !important;flex:0 0 auto !important;display:flex !important;flex-wrap:nowrap !important;gap:3px !important;align-items:center !important}
  .header-actions .pill {display:none !important}
  .header-actions a.hdr-chat {width:35px!important;min-width:0!important;height:31px!important;padding:0!important;font-size:0!important;border-radius:8px!important}
  .header-actions a.hdr-chat:after {content:'🏆';font:16px/1 sans-serif!important}
  .header-actions .sound-controls {display:flex!important;gap:0!important}
  .header-actions #soundToggle {width:34px!important;height:31px!important;min-width:0!important;overflow:hidden!important;padding:0!important;font-size:0!important;border-radius:8px!important}
  .header-actions #soundToggle:after {content:'🔊';font:16px/1 sans-serif!important}
  .header-actions #soundVolume {display:none!important}
  .header-actions #chatToggle {height:31px!important;width:34px!important;min-width:0!important;padding:0!important;font-size:0!important;border-radius:8px!important}
  .header-actions #chatToggle:after {content:'💬';font:16px/1 sans-serif!important}
  body.poker-in-game #game,body:has(#game:not(.hidden)) #game {display:flex!important;flex-direction:column!important;flex:1 1 0!important;min-height:0!important;overflow:hidden!important}
  #game .layout {display:flex!important;flex:1 1 0!important;min-height:0!important;width:100%!important;margin:0!important;padding:0!important;max-width:none!important;overflow:hidden!important}
  #game .table-column {display:flex!important;flex-direction:column!important;gap:3px!important;flex:1 1 0!important;min-height:0!important;width:100%!important;padding:0!important;margin:0!important;overflow:hidden!important}
  .game-meta {flex:0 0 22px!important;height:22px!important;min-height:22px!important;margin:0!important;padding:3px 6px!important;font-size:10px!important;line-height:15px!important;gap:3px!important;border-radius:7px!important;}
  .game-meta .muted {font-size:9px!important}
  .table-column .table-outer {
    flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;
    box-sizing:border-box!important;width:100%!important;max-width:455px!important;
    padding:4px!important;margin:0 auto!important;overflow:hidden!important;
    border-radius:44% / 13%!important;box-shadow:0 2px 0 #38220e!important;
  }
  .table-column .table-outer .table-shell {
    position:relative!important;box-sizing:border-box!important;min-height:0!important;
    height:100%!important;width:100%!important;max-height:100%!important;
    margin:0!important;border:3px solid #224937!important;
    border-radius:44% / 13%!important;overflow:hidden!important;
    background:radial-gradient(ellipse at center,#117347 0%,#0a603c 57%,#05422e 100%)!important;
  }
  .felt-logo {top:25%!important;opacity:.1!important;font-size:11px!important}
  .deal-deck{top:21%!important;left:50%!important;transform:translateX(-50%) rotate(-10deg) scale(.55)!important;transform-origin:center!important}
  .phase-label {left:50%!important;top:33%!important;transform:translateX(-50%)!important;font-size:8px!important;white-space:nowrap!important;padding:3px 8px!important}
  .table-shell .community{
    position:absolute!important;left:50%!important;top:45%!important;width:92%!important;max-width:92%!important;
    transform:translate(-50%,-50%)!important;justify-content:center!important;gap:2px!important;
    overflow:visible!important;
  }
  .table-shell .community .poker-card {width:clamp(35px,10.8vw,49px)!important;height:clamp(48px,15vw,65px)!important;flex:0 0 auto!important;min-width:0!important;border-radius:5px!important}
  .table-shell .community .poker-card .readable-corner {font-size:12px!important}
  .table-shell .pot-panel {top:58%!important;left:50%!important;transform:translate(-50%,-50%)!important;padding:3px 9px!important;min-width:76px!important;font-size:10px!important;z-index:12!important}
  .table-shell .pot-panel strong {font-size:17px!important;line-height:1.1!important}
  .table-shell .pot-panel small {font-size:8px!important}
  .table-shell .pot-chips {top:65%!important;left:50%!important;transform:translateX(-50%) scale(.52)!important;transform-origin:top center!important;z-index:8!important}
  .table-shell .seat,.table-shell .seat:not(.empty) {
    position:absolute!important;box-sizing:border-box!important;width:clamp(74px,24vw,101px)!important;
    min-height:28px!important;padding:3px 3px 3px 20px!important;transform:translate(-50%,-50%)!important;
    text-align:left!important;border-radius:7px!important;box-shadow:0 2px 5px #0007!important;
    z-index:16!important;background:#061c17e8!important;
  }
  .table-shell .seat.empty{padding:3px!important;width:clamp(54px,17vw,70px)!important;min-height:22px!important;font-size:8px!important;opacity:.52!important}
  .table-shell .seat.empty .muted {font-size:7px!important;letter-spacing:0!important}
  .table-shell .seat .avatar {width:18px!important;height:18px!important;left:2px!important;top:50%!important}
  .table-shell .seat .seatname {font-size:clamp(9px,2.7vw,11px)!important;line-height:1.1!important;max-width:100%!important;white-space:nowrap!important;text-overflow:ellipsis!important}
  .table-shell .seat .stack {font-size:clamp(9px,2.65vw,11px)!important;line-height:1.2!important;white-space:nowrap!important}
  .table-shell .seat .stack small {font-size:7px!important;letter-spacing:0!important}
  .table-shell .seat0 {left:50%!important;top:90%!important}
  .table-shell .seat1 {left:30%!important;top:80%!important}
  .table-shell .seat2 {left:20%!important;top:64%!important}
  .table-shell .seat3 {left:19%!important;top:32%!important}
  .table-shell .seat4 {left:33%!important;top:12%!important}
  .table-shell .seat5 {left:67%!important;top:12%!important}
  .table-shell .seat6 {left:81%!important;top:32%!important}
  .table-shell .seat7 {left:80%!important;top:64%!important}
  .table-shell .seat8 {left:70%!important;top:80%!important}
  .table-shell .seat .seat-mini {position:absolute!important;left:50%!important;right:auto!important;top:auto!important;bottom:calc(100% + 2px)!important;transform:translateX(-50%)!important;gap:2px!important}
  .table-shell .seat .seat-mini .poker-card.back {width:17px!important;height:23px!important;border-width:1px!important}
  .table-shell .seat.showdown-seat:not(.me) .seat-mini .poker-card:not(.back){width:27px!important;height:39px!important}
  .table-shell .seat.win-seat.showdown-seat:not(.me) .seat-mini .poker-card:not(.back){width:29px!important;height:42px!important}
  .table-shell .seat .seat-bet {position:absolute!important;left:50%!important;right:auto!important;top:calc(100% + 2px)!important;bottom:auto!important;transform:translateX(-50%)!important;z-index:9!important;max-width:65px!important;white-space:nowrap!important}
  .table-shell .seat .seat-bet .chips3d {transform:scale(.42)!important;transform-origin:top center!important}
  .table-shell .seat .seat-bet strong {font-size:9px!important}
  .winner-banner {flex:0 0 auto!important;width:100%!important;max-width:100%!important;margin:0 auto!important;padding:3px 5px!important;min-height:0!important;font-size:10px!important;line-height:1.2!important}
  .my-hand {flex:0 0 auto!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    height:68px!important;min-height:0!important;margin:0!important;padding:3px 7px!important;gap:6px!important;
    display:flex!important;justify-content:center!important;align-items:center!important;border-radius:8px!important;
  }
  .my-hand.hidden {display:none!important}
  .my-hand .hand-title {font-size:10px!important;max-width:85px!important;line-height:1.1!important}
  .my-hand .hand-title .muted {font-size:8px!important;line-height:1.15!important}
  .my-hand .hero-cards {gap:4px!important;flex:0 0 auto!important;align-items:center!important}
  .my-hand .hero-cards .poker-card,.my-hand .poker-card {width:42px!important;height:59px!important;border-radius:5px!important}
  .my-hand .hand-info {font-size:9px!important;max-width:98px!important;line-height:1.15!important}
  .notice {flex:0 0 24px!important;min-height:0!important;height:24px!important;width:100%!important;max-width:100%!important;margin:0!important;
    padding:3px 5px!important;line-height:17px!important;font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;border-radius:7px!important}
  .actions {display:flex!important;flex:0 0 auto!important;flex-wrap:wrap!important;justify-content:space-around!important;align-items:center!important;
    gap:3px!important;width:100%!important;max-width:100%!important;min-height:48px!important;max-height:86px!important;margin:0!important;padding:3px!important;border-radius:8px!important;overflow:hidden!important}
  .actions button:not(.hidden) {flex:1 1 23%!important;min-width:0!important;min-height:38px!important;height:38px!important;padding:4px 2px!important;font-size:clamp(10px,2.85vw,12px)!important;white-space:nowrap!important}
  .actions #join:not(.hidden) {flex:0 0 85%!important}
  .actions #leave:not(.hidden) {flex:0 0 85%!important}
  .actions .raise-group:not(.hidden) {display:flex!important;flex:1 1 32%!important;min-width:85px!important;max-width:135px!important;min-height:34px!important;margin:0!important;padding:2px!important;font-size:8px!important;gap:2px!important}
  .actions .raise-group input {width:47px!important;min-width:0!important;height:28px!important;padding:1px!important;font-size:12px!important}
  .dealer-caption,.legend {display:none!important}
  #sidePanel {position:fixed!important;top:0!important;bottom:0!important;right:0!important;left:auto!important;z-index:100!important;width:min(92vw,380px)!important;height:100dvh!important;overflow:auto!important;display:none!important;background:#031910!important;padding:12px!important}
  #sidePanel.side-open {display:block!important}
}
@media screen and (max-width:760px) and (max-height:620px){
  .wrap .top-head {flex-basis:32px!important;height:32px!important}
  .my-hand {height:56px!important}
  .my-hand .hero-cards .poker-card {width:37px!important;height:51px!important}
  .actions button:not(.hidden) {height:33px!important;min-height:33px!important}
}
/* Stretch the flex rows: legacy .layout had align-items:start for desktop. */
@media screen and (max-width:760px) {
  #game .layout {align-items:stretch!important;height:100%!important}
  #game .table-column {height:100%!important;align-self:stretch!important}
}
