/* Компактный интерфейс Анаит Mini App: меню и стол на одном экране. */
@media (max-width: 640px) {
  header { height:49px; padding:4px 12px; gap:8px; }
  header .logo{width:30px;height:41px;}
  header .brand strong{font-size:20px;}
  header .brand small{font-size:8px;}
  .profile-chip{width:34px;height:34px;font-size:16px;}
  #screen{padding:9px 11px 13px;min-height:0;}
  .app{padding-bottom:calc(54px + env(safe-area-inset-bottom,0px));}
  #navbar{height:calc(51px + env(safe-area-inset-bottom,0px));}
  #navbar button{font-size:19px;gap:0;}
  #navbar button span{font-size:9px;}
  .hero{min-height:94px;height:94px;margin-bottom:9px;border-radius:14px;padding:9px 12px;}
  .hero img{height:86px;width:60px;top:-7px;right:3px;}
  .hero h1{font-size:21px;margin-top:3px;}
  .hero p{font-size:10px;margin-top:3px;line-height:1.2;max-width:calc(100% - 65px);}
  .hero .eyebrow{font-size:8px;letter-spacing:.09em;}
  .heading{font-size:22px;margin:3px 0 8px;}
  .tiles{gap:6px;}
  .tile{min-height:70px;max-height:75px;padding:6px 9px;border-radius:13px;gap:10px;}
  .tile img{height:59px;width:62px;object-fit:contain;}
  .tile b{font-size:18px;}
  .tile small{font-size:9px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
  .tile .arrow{font-size:19px;}
  .section-title{font-size:17px;margin:11px 0 7px;}
  #active-short{max-height:min(28vh,182px);overflow-y:auto;overscroll-behavior:contain;}
  #active-short .room-card{min-height:47px;margin-bottom:5px;padding:5px 8px;border-radius:10px;}
  #active-short .room-icon{font-size:19px;width:26px;}
  #active-short .room-card .btn{min-height:28px;padding:5px 8px;font-size:10px;}
  #active-short .details small{font-size:9px;}
  .game-mode .app{padding-bottom:calc(105px + env(safe-area-inset-bottom,0px));}
  .game-mode #screen{padding:5px 8px 10px;min-height:0;}
  .game-mode .game-head{margin-bottom:2px;min-height:35px;}
  .game-mode .game-head .eyebrow{font-size:8px;}
  .game-mode .game-head .room-name{font-size:16px;line-height:1.1;white-space:nowrap;letter-spacing:-.03em;}
  .game-mode .game-head .btn{font-size:11px;min-height:29px;padding:5px 8px;border-radius:8px;}
  .game-mode .table-meta{gap:3px;margin:5px 0 6px;}
  .game-mode .table-meta .badge{padding:5px 2px;font-size:10px;line-height:1.1;}
  .game-mode .board{min-height:0;border-width:2px;border-radius:19px;padding:7px 5px 4px;}
  .game-mode .players-board{flex-wrap:nowrap;justify-content:space-around;gap:2px;}
  .game-mode .player-head{max-width:51px;min-width:0;flex:1;}
  .game-mode .player-head .avatar{width:27px;height:27px;}
  .game-mode .player-head span{font-size:9px;}
  .game-mode .player-head small{font-size:8px;}
  .game-mode .cards-on-table{margin:4px 0 0;min-height:82px;gap:3px;}
  .game-mode .playing-card{height:75px;width:52px;min-width:52px;border-radius:6px;}
  .game-mode .playing-card .face-image{height:61px;}
  .game-mode .playing-card .cornerrank{font-size:12px;}
  .game-mode .playing-card .largesuit{font-size:26px;}
  .game-mode .board .muted{font-size:10px;line-height:1.2;}
  .game-mode .panel.hand-panel{padding:5px 7px 7px;margin:6px 0;border-radius:12px;}
  .game-mode .card-ctrl{margin:2px 0 0;font-size:10px;line-height:1.2;}
  .game-mode .card-ctrl .muted{font-size:10px;}
  .hand-container{width:100%;min-width:0;overflow:visible;}
  .game-mode .hand{display:flex;flex-direction:column;align-items:stretch;gap:0;overflow:visible;padding:2px 0 0;}
  .game-mode .hand-row{width:100%;min-height:79px;display:flex;align-items:flex-start;justify-content:center;padding:2px 0;overflow:visible;}
  .game-mode .hand-row .playing-card{flex:none;margin:0;position:relative;touch-action:manipulation;}
  .game-mode .hand-row .playing-card:not(:first-child){margin-left:calc(var(--card-step) - 52px);}
  .game-mode .hand-row .playing-card:active{transform:translateY(-8px);z-index:10;}
  .game-mode .hand-row .playing-card:focus-visible{outline:2px solid var(--gold);outline-offset:1px;z-index:11;}
  .game-mode .action-ctrl{margin-top:3px;}
  .game-mode .action-ctrl .btn{padding:6px;min-height:30px;font-size:11px;}
  .game-mode .chat-dock{padding:4px 9px calc(5px + env(safe-area-inset-bottom,0px));border-radius:10px 10px 0 0;}
  .game-mode .chat-expand{font-size:10px;}
  .game-mode .chat-line{font-size:10px;min-height:18px;}
  .game-mode .chat-line img{height:21px;width:21px;}
  .game-mode .chat-compose{margin-top:3px;}
  .game-mode .chat-compose input{padding:7px 10px;font-size:11px;}
  .game-mode .iconbtn,.game-mode .send{height:29px;width:29px;font-size:17px;}
  .playing-card:disabled{opacity:1!important;filter:none!important;cursor:default;}

  /* Когда карт много, три ряда остаются компактными. */
  .game-mode .hand.rows-2 .hand-row{min-height:68px;}
  .game-mode .hand.rows-2 .playing-card{height:64px;}
  .game-mode .hand.rows-2 .playing-card .face-image{height:51px;}
  .game-mode .hand.rows-3 .hand-row,.game-mode .hand.rows-4 .hand-row{min-height:58px;}
  .game-mode .hand.rows-3 .playing-card,.game-mode .hand.rows-4 .playing-card{height:54px;}
  .game-mode .hand.rows-3 .playing-card .face-image,.game-mode .hand.rows-4 .playing-card .face-image{height:43px;}
  .game-mode .hand .cornerrank{font-size:10px;left:2px;letter-spacing:-.04em;white-space:nowrap;}
}
@media (max-width: 350px){
  .game-mode .playing-card{height:69px;width:52px;min-width:52px;}
  .game-mode .hand-row{min-height:74px;}
  .game-mode .hand-row .playing-card:not(:first-child){margin-left:calc(var(--card-step) - 52px);}
  .tile b{font-size:16px;}
}
@media (max-height: 630px) and (max-width: 640px){
  .hero{height:72px;min-height:72px;}
  .hero img{height:72px;}
  .hero h1{font-size:18px;}
  .tile{min-height:60px;max-height:60px;}
  .tile img{height:49px;width:54px;}
  .game-mode .players-board .avatar{width:24px;height:24px;}
  .game-mode .cards-on-table{min-height:75px;}
}
