/* Landscape is the primary mobile app play surface. */
.app-status{position:fixed;z-index:300;top:0;left:50%;transform:translate(-50%,-120%);padding:7px 18px;border-radius:0 0 12px 12px;background:#f0c767;color:#4d2c08;font-size:11px;font-weight:700;box-shadow:0 4px 18px #0008;transition:transform .25s;pointer-events:none}.app-status.show{transform:translate(-50%,0)}.app-status.error{background:#bd493d;color:#fff}.app-status.ok{background:#3d8b65;color:#fff}.rotate-device{display:none}
@media (orientation: landscape) and (max-height: 600px),
       (orientation: landscape) and (max-width: 950px) {
  :root{--app-top:42px;--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
  html,body{width:100%;height:100%;overscroll-behavior:none;touch-action:manipulation}body{user-select:none;-webkit-user-select:none}button{min-height:32px}
  .game-shell{min-width:0;min-height:0;width:100vw;height:100dvh;padding-left:var(--safe-left);padding-right:var(--safe-right);background:#05261f}
  .topbar{height:calc(var(--app-top) + var(--safe-top));padding:var(--safe-top) 10px 0;gap:8px}.topbar .brand{min-width:104px}.topbar .brand-mark{padding:3px 6px;border-radius:5px;font-size:12px}.topbar .brand b{font-size:17px}.topbar .brand em{display:none}.room-info{font-size:10px;gap:7px;white-space:nowrap}.room-info i{display:none}.topbar nav{display:flex;align-items:center;margin-left:auto}.topbar nav button{padding:5px 7px;font-size:11px;min-height:30px}
  .table{height:calc(100dvh - var(--app-top) - var(--safe-top));min-height:0;background-position:center;background-size:cover}.table:after{inset:6px 10px;border-radius:42%/54%}.felt-glow{top:19%;height:34%}
  .score-panel{top:6px;left:8px;width:103px;padding:3px 4px;border-radius:6px}.score-panel .team{margin:0 3px}.team small{font-size:8px}.team strong{font-size:18px}.team span{font-size:8px;margin-bottom:3px}.score-panel p{margin:2px -4px -3px;padding:2px;font-size:9px}
  .player{gap:4px}.avatar{width:40px;height:40px;border-width:2px;font-size:14px}.turn-ring{width:48px;height:48px;left:-4px;top:-4px}.player-meta{display:none}.count{padding:2px 6px}.count b{font-size:13px}.count small{font-size:8px}.player.top{top:7px}.player.left{left:18px;top:40%}.player.right{right:18px;top:40%}.player.me{left:12px;bottom:66px}.partner-tag{top:58px;left:calc(50% + 27px);font-size:8px;padding:1px 6px}
  .play-zone{inset:17% 14% 34%}.mini-card{width:32px;height:44px;margin-left:-11px;font-size:10px}.message{top:43%;padding:5px 13px;font-size:11px}
  .hand,.hand.horizontal-cards{bottom:calc(2px + var(--safe-bottom));width:min(86vw,760px);height:94px;min-width:0;padding-left:0;align-items:flex-end;justify-content:center;transform:translateX(-50%)}.card,.hand.horizontal-cards .card{width:53px;height:76px;margin-left:-34px;border-radius:5px}.card:first-child,.hand.horizontal-cards .card:first-child{margin-left:0}.card.selected,.hand.horizontal-cards .card.selected{transform:translateY(-17px)}.card .rank,.hand.horizontal-cards .card .rank{left:4px;top:2px;font-size:17px;line-height:17px}.card .suit,.hand.horizontal-cards .card .suit{left:5px;top:20px;font-size:15px}.card .big-suit,.hand.horizontal-cards .card .big-suit{right:5px;bottom:5px;font-size:25px;display:block}.card .wild{font-size:7px}
  .actions{bottom:calc(90px + var(--safe-bottom));gap:7px}.actions button{min-width:70px;padding:5px 17px;font-size:12px}.timer{left:calc(50% - 132px);bottom:calc(92px + var(--safe-bottom));width:31px;height:31px;font-size:11px}
  .side-tools{right:calc(7px + var(--safe-right));bottom:calc(51px + var(--safe-bottom));gap:4px}.side-tools button{width:38px;min-height:30px;padding:4px 2px;font-size:0}.side-tools button span{margin:0;font-size:15px}.side-tools button b{display:none}.chat-strip{right:calc(7px + var(--safe-right));top:48px;gap:4px}.chat-strip button{min-width:34px;padding:4px;font-size:13px}.quick-chat-panel{right:calc(45px + var(--safe-right));top:47px;width:190px;max-height:calc(100dvh - 58px);overflow:auto}.quick-chat-panel>button{padding:6px}.corner-note{display:none}.record-panel{right:calc(6px + var(--safe-right));top:48px;width:min(280px,42vw);max-height:calc(100% - 56px)}
  .lobby-screen{height:100dvh;padding-left:var(--safe-left);padding-right:var(--safe-right);overflow:hidden}.lobby-header{height:calc(44px + var(--safe-top));padding:var(--safe-top) 12px 0}.lobby-brand{min-width:150px}.lobby-brand .brand-mark{padding:3px 6px;font-size:12px}.lobby-brand b{font-size:17px}.lobby-brand em{display:none}.lobby-wallet{display:flex;gap:9px;padding:3px 5px 3px 12px;font-size:9px}.lobby-wallet button{padding:3px 8px;min-height:24px}.lobby-user{min-width:145px}.small-avatar{width:34px;height:34px}.lobby-user p b{font-size:10px}.lobby-user p small{font-size:8px}.lobby-user>button{font-size:10px;padding:4px}
  .lobby-body{display:grid;height:calc(100dvh - 70px - var(--safe-top));min-height:0;grid-template-columns:112px minmax(0,1fr)}.game-nav{display:flex;padding:8px 5px}.game-nav h3{display:none}.game-nav>button{gap:5px;padding:5px;margin-bottom:3px}.game-nav button i{width:24px;font-size:18px}.game-nav button span{font-size:11px}.game-nav button small{font-size:7px}.lobby-download{display:none}.lobby-main{padding:7px 10px 9px;overflow:auto}.lobby-banner{height:70px;padding:8px 17px;border-radius:8px}.lobby-banner small{font-size:8px}.lobby-banner h1{font-size:18px;margin:3px 0}.lobby-banner p{margin:0;font-size:9px}.banner-cards{transform:scale(.55) rotate(8deg);margin-right:-18px}
  .mode-title{margin:7px 2px 5px}.mode-title h2{font-size:13px}.mode-title span,.mode-title button{font-size:8px}.room-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.room-card{display:grid;grid-template-columns:34px 1fr;gap:5px;padding:7px}.room-icon{width:32px;height:32px;font-size:16px}.room-card h3{font-size:10px}.room-card p,.room-card small{font-size:7px;white-space:nowrap}.room-card em{display:none}.room-card.selected:after{font-size:7px;padding:2px 6px}.match-bar{position:sticky;bottom:0;margin-top:6px;padding:5px 8px}.match-bar span,.match-bar small{font-size:8px}.match-bar b{font-size:10px}.match-bar>button{min-height:32px;padding:5px 29px;font-size:11px}.lobby-side{display:none}.lobby-footer{height:26px;padding:0 10px}.lobby-footer>span{font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lobby-footer nav{display:flex}.lobby-footer button{min-height:22px;padding:2px 5px}
  .matching-layer{inset:calc(44px + var(--safe-top)) 0 26px}.matching-layer h2{font-size:15px;margin:4px}.matching-layer>p{font-size:9px;margin:2px}.matching-cancel{right:12px;top:8px;min-height:26px;padding:3px 12px}.matching-table{width:400px;height:215px;margin-top:2px;transform:scale(.82)}
  .auth-screen{display:grid;height:100dvh;grid-template-columns:minmax(260px,.9fr) minmax(330px,1.1fr);padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left)}.auth-art{position:relative;inset:auto;opacity:1;padding:4vw}.auth-logo b{font-size:20px}.auth-art h1{font-size:23px;margin:12px 0 5px}.auth-art p{font-size:10px;line-height:1.5}.auth-poker{margin:16px 0 0 35px}.auth-poker i{width:55px;height:76px;font-size:21px;border-width:2px}.auth-card{position:relative;width:min(92%,360px);min-height:0;max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px);overflow:auto;padding:12px 20px;border-radius:10px}.auth-tabs{margin-bottom:5px}.auth-tabs button{padding:7px;min-height:30px}.auth-form label{gap:3px;margin:6px 0;font-size:9px}.auth-form input{padding:7px;font-size:10px}.auth-form>button{padding:7px;margin-top:5px;min-height:32px}.auth-error{height:14px;margin:2px;font-size:9px}.auth-agree{margin:5px 0 0;font-size:7px}dialog{max-height:90dvh;overflow:auto;font-size:12px}
}
@media (orientation: landscape) and (max-height: 390px){.lobby-banner{display:none}.mode-title{margin-top:2px}.lobby-main{padding-top:4px}.room-card p{display:none}.match-bar{margin-top:4px}.auth-art p{display:none}.auth-poker{margin-top:8px}.auth-card{padding-top:8px;padding-bottom:8px}}
@media (display-mode: standalone){body{background:#05261f}#installAppBtn{display:none!important}}
@media (orientation: portrait) and (max-width: 700px){.rotate-device{position:fixed;z-index:500;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:30px;background:radial-gradient(circle at 50% 35%,#176148,#062a22 60%,#021510);color:#f7ddb0;text-align:center}.rotate-device .rotate-phone{width:68px;height:108px;display:grid;place-items:center;border:4px solid #dcb867;border-radius:13px;font-size:35px;animation:rotate-hint 1.8s ease-in-out infinite}.rotate-device b{font-size:22px}.rotate-device span{font-size:12px;color:#9eb9af}.rotate-device[aria-hidden="true"]{display:flex}@keyframes rotate-hint{50%{transform:rotate(90deg)}}}
