/* Cuenta siempre visible */
.bill{z-index:18;width:138px;padding:1.05rem .85rem 1.2rem;background:#fffdf5;color:#172019;border:2px solid #fff;outline:3px solid #17201924;box-shadow:4px 5px 0 #d6d0c4,8px 10px 0 #756f65,0 24px 42px #000b}
.bill span{display:block;color:#3a423e;font-size:.62rem;font-weight:1000;letter-spacing:.13em}
.bill strong{display:block;margin:.25rem 0;color:#ef523f;font-size:clamp(1.8rem,3vw,2.4rem);line-height:1;text-shadow:0 2px 0 #fff}
.bill small{display:block;color:#59635e;font-size:.68rem;font-weight:800}
.bill:after{content:"TOTAL";position:absolute;left:50%;top:-11px;transform:translateX(-50%);padding:.18rem .5rem;border-radius:99px;background:#172019;color:#fff;font-size:.48rem;font-weight:1000;letter-spacing:.12em}

@media(max-width:700px){
  body{width:100%;min-width:0;overflow:hidden}
  .game{height:100dvh;min-height:0;overflow:hidden}
  .game-header{height:60px;padding:0 .8rem}
  .game-header .brand-mark{width:34px;height:34px}
  .header-actions{gap:.35rem}.round-btn{width:34px;height:34px}
  .game-layout{height:calc(100dvh - 60px - 218px);min-height:350px;overflow:hidden}
  .players-panel{position:absolute;inset:0 0 auto;height:74px;padding:.45rem .5rem;display:block;background:#09130fe8;border-bottom:1px solid #ffffff10;z-index:20;overflow:hidden;pointer-events:auto}
  .players-panel #playersList{position:relative;inset:auto;display:flex;gap:.55rem;height:100%;overflow-x:auto;overflow-y:hidden;padding:.15rem .2rem .4rem;scroll-snap-type:x proximity;scrollbar-width:none}
  .players-panel #playersList::-webkit-scrollbar,.hand::-webkit-scrollbar{display:none}
  .player-row,.player-row.human-seat{position:relative!important;left:auto!important;top:auto!important;transform:none!important;flex:0 0 118px;width:118px;min-width:118px;min-height:56px;padding:.4rem;grid-template-columns:32px 1fr;border-radius:13px;scroll-snap-align:start}
  .player-row:before,.player-row:after{display:none}.player-row .avatar{width:32px;height:32px;border-width:2px}.player-row b{font-size:.7rem}.player-row small{font-size:.56rem}.player-row .money{display:none}
  .turn-badge{top:-3px;left:auto;right:3px;transform:none;font-size:.42rem}
  .turn-compass{top:80px;width:calc(100% - 1rem);min-width:0;max-width:390px;padding:.38rem .6rem;border-radius:14px;justify-content:flex-start}
  .turn-compass>span{flex:0 0 34px}.turn-compass p{grid-template-columns:1fr auto;column-gap:.5rem;width:100%}.turn-compass b{font-size:.72rem}.turn-compass em{font-size:.58rem;align-self:center}
  .table-area{inset:0;padding:0}.round-banner{display:none}
  .table{top:61%;width:94vw;height:63%;min-height:260px;max-height:390px;border-width:8px;border-radius:38% / 43%}.table:before{inset:-7px}
  .piles{inset:18% 3% 19%;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:.22rem}
  .pile{width:100%;max-width:62px;height:92px;margin:auto;border-radius:10px}.pile-card{padding:.3rem;border-radius:9px}.pile-card .type{font-size:.38rem}.pile-card .emoji{margin:.15rem 0;font-size:1.05rem}.pile-card b{font-size:.56rem}.pile-card strong{font-size:.62rem}.empty-icon{font-size:1.15rem!important}.pile .empty-label{bottom:.4rem;font-size:.42rem}
  .coffee-owner{bottom:-15px;max-width:62px;padding:.15rem .3rem;font-size:.38rem;overflow:hidden;text-overflow:ellipsis}.table-brand{font-size:1.25rem}
  .bill{top:-48px;right:2%;bottom:auto;width:106px;padding:.75rem .55rem .85rem;transform:rotate(2deg);box-shadow:3px 4px 0 #d6d0c4,6px 8px 0 #756f65,0 18px 30px #000b}.bill strong{font-size:1.65rem}.bill span{font-size:.48rem}.bill small{font-size:.54rem}
  .message{left:50%;bottom:2%;max-width:88%;padding:.45rem .7rem;font-size:.62rem;transform:translateX(-50%);white-space:nowrap}
  .action-feed{left:.5rem;top:125px;width:130px;gap:.25rem}.action-event{padding:.3rem}.action-event>span{width:25px;height:25px}.action-event b{font-size:.58rem}.action-event small{display:none}.action-event:nth-child(n+3){display:none}
  .hand-area{height:218px;padding:.65rem .55rem 2.7rem}.hand-title{padding:0 .35rem}.hand-title small{max-width:62%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .hand{height:158px;justify-content:flex-start;gap:.65rem;overflow-x:auto;overflow-y:hidden;padding:.85rem .6rem .25rem;scroll-snap-type:x mandatory;scrollbar-width:none}
  .game-card{flex:0 0 101px;width:101px;min-width:101px;height:137px;scroll-snap-align:center;padding:.55rem}.game-card .emoji{font-size:1.7rem}.game-card b{font-size:.78rem}
  .pay-btn{position:absolute;right:.65rem;bottom:.4rem;padding:.62rem .85rem;font-size:.75rem}.selection-toast{position:fixed;top:68px;width:calc(100% - 1rem);padding:.55rem}
  .tip-prompt,.split-prompt{bottom:.45rem;max-height:75dvh;overflow-y:auto}.round-result-card{width:calc(100vw - 1.5rem);max-height:90dvh;padding:1.6rem 1.2rem}.result-avatar{width:56px;height:56px;margin:.8rem auto .5rem}.round-result-card h2{font-size:1.8rem}.round-result-card>strong{font-size:2.2rem}.receipt-items{margin:.75rem 0}.receipt-line{font-size:.66rem}
}

@media(max-width:390px){
  .game-layout{height:calc(100dvh - 58px - 205px);min-height:320px}.game-header{height:58px}.players-panel{height:66px}.player-row,.player-row.human-seat{flex-basis:106px;min-width:106px;min-height:50px}.turn-compass{top:71px}.table{top:62%;height:59%;min-height:235px}.piles{inset:20% 2% 18%}.pile{max-width:54px;height:82px}.bill{top:-42px;width:94px}.bill strong{font-size:1.45rem}.hand-area{height:205px}.hand{height:148px}.game-card{height:128px}.action-feed{top:113px}.message{bottom:1%}
}

@media(max-height:650px) and (max-width:950px){
  .game-header{height:54px}.game-layout{height:calc(100dvh - 54px - 174px);min-height:280px}.hand-area{height:174px;padding-top:.35rem}.hand{height:132px;padding-top:.45rem}.game-card{height:118px;width:90px;min-width:90px;flex-basis:90px}.game-card .emoji{font-size:1.35rem}.players-panel{height:58px;padding:.25rem}.player-row,.player-row.human-seat{min-height:46px;flex-basis:105px;min-width:105px}.turn-compass{top:63px}.table{top:64%;height:62%;min-height:220px}.piles{inset:17% 5%}.pile{height:78px}.bill{top:-40px}.action-feed{top:105px}.message{bottom:0}}
