/* ═══════════════════════════════════════════
   天禧棋牌 — 手游移动端 v3
   固定屏 / 无滚动 / 图标网格 / 底部Tab
   ═══════════════════════════════════════════ */

@media screen and (max-width: 1024px) and (orientation: portrait) {
  html { width:100vh!important;height:100vw!important;transform:rotate(90deg)!important;transform-origin:top left!important;position:absolute!important;left:100vw!important;overflow:hidden!important; }
  body { width:100vh!important;height:100vw!important; }
}

@media screen and (max-width: 1024px) and (orientation: landscape),
       screen and (max-height: 500px) {

  html,body { height:100vh!important;overflow:hidden!important;margin:0!important;padding:0!important; }
  ::-webkit-scrollbar { display:none!important; }
  *{scrollbar-width:none!important;}

  /* ═══ 顶栏 ═══ */
  .topbar { height:30px!important;padding:0 6px!important;position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:999!important; }
  .brand-orb { width:20px!important;height:20px!important; }
  .brand-orb-core { font-size:10px!important; }
  .brand-orb-ring,.brand-subtitle { display:none!important; }
  .brand-title { font-size:10px!important; }
  .nav-links { display:none!important; }
  .topbar-right .button { padding:2px 6px!important;font-size:8px!important; }
  .lang-select { display:none!important; }

  /* ═══ 底部Tab ═══ */
  .mobile-tab-bar { display:flex!important;position:fixed!important;bottom:0!important;left:0!important;right:0!important;height:40px!important;z-index:999!important;background:linear-gradient(180deg,#2a1608,#1a0c04)!important;border-top:1px solid rgba(212,160,64,.3)!important;box-shadow:0 -2px 12px rgba(0,0,0,.5)!important; }
  .mobile-tab-bar a { flex:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;text-decoration:none!important;color:#806840!important;font-size:8px!important; }
  .mobile-tab-bar a i { font-size:14px!important; }
  .mobile-tab-bar a.active { color:#ffd060!important; }


@media screen and (min-width:1025px) { .mobile-tab-bar { display:none!important; } }

/* ═══ Profile mobile ═══ */
@media screen and (max-width:1024px) and (orientation:landscape), screen and (max-height:500px) {
  .profile-page { padding:4px!important;margin-top:30px!important;height:calc(100vh - 30px - 40px)!important;overflow-y:auto!important; }
  .profile-header { padding:8px!important;gap:8px!important;margin-bottom:6px!important; }
  .profile-avatar { width:32px!important;height:32px!important;font-size:14px!important; }
  .profile-info h2 { font-size:14px!important; }
  .profile-wallet { gap:4px!important;margin-bottom:6px!important; }
  .pw-item { padding:6px 4px!important; }
  .pw-item i { font-size:12px!important; }
  .pw-item strong { font-size:14px!important; }
  .pw-item span { font-size:8px!important; }
  .profile-actions { gap:4px!important; }
  .pa-btn { padding:4px 8px!important;font-size:10px!important; }
  .profile-section h3 { font-size:12px!important; }
  .record-item { padding:4px 8px!important; }

  /* Games mobile */
  .games-page { padding:4px!important;margin-top:30px!important;height:calc(100vh - 30px - 40px)!important;overflow-y:auto!important; }
  .games-tabs { margin-bottom:6px!important; }
  .games-tabs a { padding:3px 10px!important;font-size:10px!important; }
  .games-grid { grid-template-columns:repeat(5,1fr)!important;gap:3px!important; }
  .game-tile-img { height:44px!important; }
  .game-tile-name { font-size:8px!important;padding:2px!important; }
}

@media screen and (max-width:1024px) and (orientation:landscape),screen and (max-height:500px){
  .leaderboard-page{padding:4px!important;margin-top:30px!important;height:calc(100vh - 70px)!important;overflow-y:auto!important}
  .lb-tab{padding:4px 12px!important;font-size:10px!important}
  .lb-item{padding:6px 8px!important;gap:6px!important}
  .lb-rank{width:24px!important;font-size:12px!important}
  .lb-name{font-size:11px!important}.lb-value{font-size:11px!important}
}


/* ═══ MOBILE LOGIN — 极简单屏 ═══ */
@media screen and (max-width:1024px) and (orientation:landscape),
       screen and (max-height:500px) {
  
  /* 登录页：隐藏所有装饰，只留表单 */
  .app-shell--auth { padding: 0 !important; }
  .app-shell--auth .topbar { display: none !important; }
  .app-shell--auth .mobile-tab-bar { display: none !important; }
  
  .auth-shell, .auth-shell--minimal {
    display: flex !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #0f1923 0%, #1a2d42 50%, #0f1923 100%) !important;
  }
  
  /* 左侧 LOGO 区 */
  .auth-minimal-hero, .auth-minimal-hero--login {
    flex: 0 0 200px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 16px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .auth-minimal-hero__badge {
    background: rgba(79,195,247,.1) !important;
    border: 1px solid rgba(79,195,247,.2) !important;
    color: #4fc3f7 !important;
    padding: 2px 12px !important;
    border-radius: 12px !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
  }
  .auth-minimal-hero h1 {
    font-size: 22px !important;
    margin: 4px 0 !important;
    color: #e0e0e0 !important;
    text-shadow: none !important;
  }
  .auth-minimal-hero p {
    font-size: 10px !important;
    color: #78909c !important;
    margin: 0 !important;
  }
  
  /* 右侧表单卡片 */
  .auth-single-card, .auth-single-card--login {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 20px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  
  /* 卡片头部 */
  .auth-single-card__header {
    padding: 0 0 6px !important;
    border: none !important;
    background: transparent !important;
  }
  .auth-single-card__header .eyebrow { display: none !important; }
  .auth-single-card__header h2 {
    font-size: 14px !important;
    color: #b0bec5 !important;
    font-weight: 500 !important;
  }
  .auth-single-card__header p { display: none !important; }
  
  /* 表单 */
  .auth-single-form, .auth-single-form--login {
    gap: 0 !important;
    background: transparent !important;
  }
  .auth-single-form label {
    margin-bottom: 6px !important;
  }
  .auth-single-form label span {
    font-size: 10px !important;
    color: #78909c !important;
    margin-bottom: 2px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }
  .auth-single-form input {
    padding: 8px 12px !important;
    font-size: 14px !important;
    height: 36px !important;
    border: 1px solid #243b53 !important;
    background: #0f1923 !important;
    color: #e0e0e0 !important;
    border-radius: 6px !important;
    transition: border-color .15s !important;
  }
  .auth-single-form input:focus {
    border-color: #4fc3f7 !important;
    outline: none !important;
  }
  .auth-single-form input::placeholder {
    color: #546e7a !important;
  }
  
  /* 隐藏设备字段和勾选框 */
  .auth-single-form label:has(input[name="device"]) { display: none !important; }
  .auth-single-form label:nth-child(4) { display: none !important; }
  .login-checkbox-row { display: none !important; }
  .form-status { display: none !important; }
  .auth-single-form__note { display: none !important; }
  .field-hint { display: none !important; }
  
  /* 登录按钮 */
  .auth-single-form__actions {
    margin-top: 8px !important;
  }
  .auth-single-form .button.primary {
    padding: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    background: linear-gradient(135deg, #4fc3f7, #29b6f6) !important;
    border: none !important;
    color: #000 !important;
    box-shadow: 0 2px 8px rgba(79,195,247,.3) !important;
    text-shadow: none !important;
  }
  
  /* 底部注册链接 */
  .auth-single-card__footer {
    padding: 8px 0 0 !important;
    margin-top: 8px !important;
    border: none !important;
    background: transparent !important;
  }
  .auth-single-card__footer span {
    font-size: 11px !important;
    color: #78909c !important;
  }
  .auth-single-card__footer .button {
    font-size: 11px !important;
    padding: 4px 12px !important;
    background: transparent !important;
    border: 1px solid #243b53 !important;
    color: #4fc3f7 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
  }
  
  /* ═══ 注册页：同样极简 ═══ */
  .auth-shell--register-flow {
    margin: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #0f1923, #1a2d42) !important;
  }
  .auth-shell--register-flow .topbar { display: none !important; }
  .auth-shell--register-flow .mobile-tab-bar { display: none !important; }
  .auth-onboard-hero { display: none !important; }
  .auth-onboard-copy { display: none !important; }
  .auth-onboard-layout { padding: 0 !important; display: flex !important; align-items: center !important; justify-content: center !important; min-height: 100vh !important; }
  .auth-onboard-card {
    max-width: 380px !important;
    margin: 0 auto !important;
    padding: 12px 20px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .auth-onboard-card__header h2 { font-size: 16px !important; color: #e0e0e0 !important; }
  .auth-onboard-card__header p, .auth-onboard-card__header .eyebrow { display: none !important; }
  .auth-onboard-form label span { font-size: 10px !important; color: #78909c !important; text-transform: uppercase !important; letter-spacing: .5px !important; }
  .auth-onboard-form input {
    padding: 8px 12px !important;
    height: 36px !important;
    font-size: 14px !important;
    background: #0f1923 !important;
    border: 1px solid #243b53 !important;
    color: #e0e0e0 !important;
    border-radius: 6px !important;
  }
  .auth-onboard-form input:focus { border-color: #4fc3f7 !important; outline: none !important; }
  .auth-onboard-form .field-hint { display: none !important; }
  .auth-onboard-form .button.primary {
    background: linear-gradient(135deg, #4fc3f7, #29b6f6) !important;
    color: #000 !important; border: none !important;
    padding: 10px !important; font-size: 14px !important; border-radius: 6px !important;
  }
  .auth-onboard-form .button.secondary {
    background: transparent !important; border: 1px solid #243b53 !important;
    color: #4fc3f7 !important; padding: 8px !important; font-size: 12px !important;
  }
  .auth-onboard-form__actions { gap: 6px !important; }
  .auth-onboard-form__note { display: none !important; }
}

/* ═══ 全页面移动端自适应 v4 ═══ */
@media screen and (max-width:1024px) and (orientation:landscape),
       screen and (max-height:500px) {

  /* ── 全局 ── */
  html,body{height:100vh!important;overflow:hidden!important}
  ::-webkit-scrollbar{display:none!important}*{scrollbar-width:none!important}

  /* ── 导航栏 ── */
  .topbar{height:30px!important;padding:0 6px!important;position:fixed!important;top:0!important;left:0!important;right:0!important;z-index:999!important}
  .brand-orb{width:20px!important;height:20px!important}.brand-orb-core{font-size:10px!important}.brand-orb-ring,.brand-subtitle{display:none!important}
  .brand-title{font-size:10px!important}.nav-links{display:none!important}
  .topbar-right .button{padding:2px 6px!important;font-size:8px!important}.lang-select{display:none!important}

  /* ── 底部Tab ── */
  .mobile-tab-bar{display:flex!important;position:fixed!important;bottom:0!important;left:0!important;right:0!important;height:38px!important;z-index:999!important;background:linear-gradient(180deg,#152232,#0f1923)!important;border-top:1px solid #243b53!important}
  .mobile-tab-bar a{flex:1!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;text-decoration:none!important;color:#546e7a!important;font-size:8px!important}
  .mobile-tab-bar a i{font-size:13px!important}.mobile-tab-bar a.active{color:#4fc3f7!important}

  /* ── 首页大厅 ── */
  .lobby-main{margin-top:30px!important;height:calc(100vh - 30px - 38px)!important;overflow-y:auto!important;padding:0!important}
  .lobby-shell,.lobby-scene-frame{padding:0!important}

  /* 玩家状态栏 */
  .lobby-top-status{margin:2px 4px!important;padding:3px 6px!important;border-radius:4px!important;gap:4px!important}
  .player-panel{gap:3px!important}.player-avatar{width:18px!important;height:18px!important;font-size:8px!important}
  .player-meta strong{font-size:10px!important}.player-meta span{font-size:7px!important}
  .currency-panel{padding:1px 4px!important}.currency-panel i{font-size:9px!important}
  .currency-panel strong{font-size:10px!important}.currency-plus{width:12px!important;height:12px!important;font-size:8px!important}
  .daily-sign-card{padding:1px 4px!important}.daily-sign-card span{font-size:8px!important}.daily-sign-card small{display:none!important}
  .lobby-lantern{display:none!important}

  /* 快捷游戏 */
  .quick-game-grid{grid-template-columns:repeat(6,1fr)!important;gap:2px!important;padding:2px 4px!important}
  .quick-game-item{padding:3px 1px!important;border-radius:4px!important;gap:1px!important}
  .quick-game-item::before{display:none!important}
  .quick-game-icon{width:22px!important;height:22px!important;font-size:10px!important;border-radius:4px!important}
  .quick-game-item strong{font-size:8px!important}.quick-game-item small{display:none!important}

  /* 功能入口 */
  .lobby-entry-deck,.lobby-entry-deck--compact{grid-template-columns:repeat(6,1fr)!important;gap:2px!important;padding:1px 4px!important}
  .lobby-entry-deck .lobby-card,.lobby-entry-deck--compact .lobby-card{padding:3px 1px!important;border-radius:4px!important;gap:1px!important}
  .lobby-card-icon{font-size:12px!important}.lobby-card-visual,.lobby-card-labels{display:none!important}
  .lobby-entry-deck strong,.lobby-entry-deck--compact strong{font-size:8px!important}.lobby-card::after{display:none!important}

  /* 统计栏 */
  .hero-mini-stats{display:none!important}

  /* 区块标题 */
  .page-section{padding:0!important}.compact-section{padding:0!important}
  .section-header{padding:2px 6px 0!important}.section-header h2{font-size:11px!important}.section-header .eyebrow{display:none!important}

  /* 筛选 */
  .filter-strip{padding:1px 4px!important;gap:3px!important}
  .filter-pill{padding:2px 8px!important;font-size:8px!important;border-radius:10px!important}

  /* ── 游戏目录(首页) ── */
  .catalog-grid,.four-col-catalog{grid-template-columns:repeat(5,1fr)!important;gap:2px!important;padding:0 4px!important}
  .catalog-card{border-radius:4px!important}.catalog-card-visual{height:44px!important}
  .catalog-card-body{padding:2px 3px!important}
  .catalog-card-body h3{font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important}
  .catalog-card-body p,.catalog-tags,.catalog-stats,.catalog-meta-row{display:none!important}
  .catalog-actions{margin-top:1px!important;gap:1px!important}
  .catalog-actions .button{padding:1px 4px!important;font-size:7px!important;border-radius:2px!important}
  .catalog-actions .button.tertiary{display:none!important}.catalog-actions .status{padding:0 2px!important;font-size:6px!important}
  .catalog-card:nth-child(n+16){display:none!important}

  /* ── 全部游戏页 ── */
  .games-page{padding:2px 4px!important;margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important}
  .games-tabs{margin-bottom:4px!important}.games-tabs a{padding:3px 10px!important;font-size:9px!important;border-radius:10px!important}
  .games-grid{grid-template-columns:repeat(5,1fr)!important;gap:2px!important}
  .game-tile{border-radius:4px!important}.game-tile-img{height:44px!important}
  .game-tile-name{font-size:8px!important;padding:2px!important}

  /* ── 游戏大厅(二级页) ── */
  .game-hall-shell{margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important;padding-bottom:38px!important}
  .game-hall-header{padding:2px 0!important}.game-hall-back{font-size:11px!important}.game-hall-title{font-size:13px!important}
  .game-hall-currency{padding:2px 6px!important;font-size:9px!important;margin:1px 4px!important;gap:8px!important;border-radius:4px!important}
  .game-hall-rooms{padding:2px!important;gap:2px!important}
  .game-room-card{padding:6px 8px!important;margin:0 2px 2px!important;border-radius:4px!important}
  .game-room-info h3{font-size:12px!important}.game-room-tag{font-size:8px!important;padding:1px 4px!important}
  .game-room-fee,.game-room-mode{font-size:9px!important}.game-room-online{font-size:9px!important}
  .game-room-action .button{font-size:9px!important;padding:2px 6px!important}
  .game-hall-info{padding:2px 6px!important;font-size:9px!important}

  /* ── 游戏牌桌(三级页) = 全屏 ── */
  .game-table-shell{height:100vh!important;margin:0!important;padding:0!important}
  .game-table-top{height:26px!important;padding:0 6px!important}
  .game-table-felt{min-height:calc(100vh - 60px)!important}
  .game-table-me{padding:4px 6px!important}

  /* ── 斗地主 ── */
  .ddz-table{padding:4px!important}
  .ddz-info-bar{padding:3px 8px!important;font-size:10px!important;border-radius:4px!important}
  .ddz-card{width:32px!important;height:46px!important;border-radius:3px!important}
  .ddz-card-rank{font-size:12px!important}.ddz-card-suit{font-size:10px!important}
  .ddz-player-cards .ddz-card{margin-left:-16px!important}
  .ddz-card-selected{margin-top:-8px!important}
  .ddz-opponent{top:40px!important}
  .ddz-opp-cards .ddz-card-back{width:18px!important;height:28px!important}
  .ddz-btn{padding:4px 10px!important;font-size:10px!important}
  .ddz-player-area{padding:4px 8px 6px!important}
  .ddz-player-label{font-size:10px!important}
  .ddz-dizhu-cards .ddz-card{width:24px!important;height:34px!important}
  .ddz-last-cards .ddz-card{width:28px!important;height:40px!important}
  .ddz-result h2{font-size:20px!important}
  .game-back-btn{font-size:10px!important;padding:2px 6px!important;top:4px!important;left:4px!important}

  /* ── 牛牛 ── */
  .niu-table{gap:8px!important}
  .niu-top{padding:4px 10px!important;font-size:11px!important;width:auto!important;border-radius:6px!important}
  .niu-card{width:42px!important;height:60px!important;font-size:14px!important;border-radius:5px!important}
  .niu-label{font-size:11px!important}
  .niu-msg{font-size:14px!important}
  .niu-btn{padding:6px 14px!important;font-size:12px!important}
  .niu-deal{padding:8px 20px!important;font-size:14px!important}
  .niu-bet{font-size:13px!important}
  .niu-coins{font-size:12px!important}

  /* ── 老虎机 ── */
  .slots-machine{gap:8px!important}
  .slots-top{padding:4px 10px!important;font-size:11px!important;width:auto!important;border-radius:6px!important}
  .slots-cell{width:70px!important;height:60px!important;font-size:36px!important;border-radius:6px!important}
  .slots-msg{font-size:13px!important}
  .slots-btn{padding:6px 12px!important;font-size:12px!important}
  .slots-spin{padding:8px 20px!important;font-size:14px!important}
  .slots-bet{font-size:12px!important}
  .slots-paytable{font-size:9px!important}
  .slots-coins{font-size:12px!important}

  /* ── 个人中心 ── */
  .profile-page{padding:4px!important;margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important}
  .profile-header{padding:6px!important;gap:6px!important;margin-bottom:4px!important;border-radius:4px!important}
  .profile-avatar{width:28px!important;height:28px!important;font-size:12px!important}
  .profile-info h2{font-size:13px!important}.profile-id{font-size:9px!important}.profile-vip{font-size:8px!important}
  .profile-wallet{gap:3px!important;margin-bottom:4px!important}
  .pw-item{padding:4px 3px!important;border-radius:4px!important}.pw-item i{font-size:10px!important;margin-bottom:1px!important}
  .pw-item strong{font-size:12px!important}.pw-item span{font-size:7px!important}
  .profile-actions{gap:3px!important;margin-bottom:4px!important}
  .pa-btn{padding:3px 6px!important;font-size:9px!important;border-radius:4px!important}
  .profile-section h3{font-size:11px!important}.record-item{padding:3px 6px!important}
  .record-game,.record-result,.record-gold{font-size:10px!important}

  /* ── 排行榜 ── */
  .leaderboard-page{padding:4px!important;margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important}
  .lb-tabs{margin-bottom:4px!important}.lb-tab{padding:4px 12px!important;font-size:10px!important;border-radius:10px!important}
  .lb-item{padding:5px 8px!important;gap:6px!important;border-radius:4px!important}
  .lb-rank{width:22px!important;font-size:12px!important}.lb-name{font-size:10px!important}.lb-value{font-size:10px!important}

  /* ── VIP/活动/客服(内页) ── */
  .inner-page-shell{margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important;padding:0 4px 38px!important}
  .inner-page-hero,.page-hero-art{padding:6px 8px!important;min-height:auto!important}
  .inner-page-hero h2{font-size:12px!important}.inner-page-hero p{font-size:9px!important}.inner-page-hero .eyebrow{font-size:8px!important}
  .inner-page-card,.split-page-card,.unified-page-card{padding:4px 6px!important;margin-bottom:2px!important;border-radius:4px!important}
  .inner-page-card h3{font-size:11px!important}.inner-page-card p{font-size:10px!important}
  .inner-page-copy{display:none!important}
  .inner-hero-panel{padding:6px 8px!important;min-height:auto!important}

  /* ── 页脚/服务 ── */
  .trust-band,.footer-panel,.compact-section.trust-band,.compact-section.footer-panel{display:none!important}
  .floating-support-main{display:none!important}
}

/* 桌面端隐藏Tab */
@media screen and (min-width:1025px){.mobile-tab-bar{display:none!important}}

/* Wallet mobile */
@media screen and (max-width:1024px) and (orientation:landscape),screen and (max-height:500px){
  .wallet-page{padding:4px!important;margin-top:30px!important;height:calc(100vh - 68px)!important;overflow-y:auto!important}
  .wallet-balance{padding:10px!important;margin-bottom:6px!important;border-radius:6px!important}
  .wb-main i{font-size:16px!important}.wb-main strong{font-size:20px!important}.wb-main span{font-size:10px!important}
  .wb-info{font-size:9px!important;gap:8px!important}
  .wallet-actions{gap:4px!important;margin-bottom:6px!important}
  .wa-btn{padding:8px!important;font-size:12px!important;border-radius:6px!important}
  .wallet-form{padding:8px!important;margin-bottom:6px!important}
  .wallet-form h3{font-size:12px!important;margin-bottom:6px!important}
  .wallet-form input,.wallet-form select{padding:6px 8px!important;font-size:13px!important;height:32px!important}
  .wa-submit{padding:8px!important;font-size:12px!important}
  .wh-item{padding:4px 6px!important;font-size:10px!important}
}
@supports(padding:env(safe-area-inset-left)){
  @media screen and (max-width:1024px) and (orientation:landscape){
    .wallet-page{padding-left:calc(4px + env(safe-area-inset-left))!important;padding-right:calc(4px + env(safe-area-inset-right))!important}
  }
}


/* ═══ iOS SAFE AREA + 灵动岛 ═══ */
@supports(padding:env(safe-area-inset-left)){
 @media screen and (max-width:1024px) and (orientation:landscape),screen and (max-height:500px){
  .topbar{padding-left:calc(6px + env(safe-area-inset-left))!important;padding-right:calc(6px + env(safe-area-inset-right))!important}
  .mobile-tab-bar{padding-bottom:env(safe-area-inset-bottom)!important;height:calc(38px + env(safe-area-inset-bottom))!important;padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important}
  .lobby-main{padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important;height:calc(100vh - 30px - 38px - env(safe-area-inset-bottom))!important}
  .lobby-top-status{margin-left:calc(4px + env(safe-area-inset-left))!important;margin-right:calc(4px + env(safe-area-inset-right))!important}
  .quick-game-grid,.lobby-entry-deck,.lobby-entry-deck--compact,.catalog-grid,.four-col-catalog,.filter-strip,.section-header{padding-left:calc(4px + env(safe-area-inset-left))!important;padding-right:calc(4px + env(safe-area-inset-right))!important}
  .auth-shell,.auth-shell--minimal,.auth-shell--register-flow{padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important}
  .game-hall-shell{padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important;height:calc(100vh - 30px - 38px - env(safe-area-inset-bottom))!important}
  .game-hall-currency{margin-left:calc(4px + env(safe-area-inset-left))!important;margin-right:calc(4px + env(safe-area-inset-right))!important}
  .game-room-card{margin-left:calc(2px + env(safe-area-inset-left))!important;margin-right:calc(2px + env(safe-area-inset-right))!important}
  .game-table-shell{padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)!important}
  .ddz-table{padding-left:calc(4px + env(safe-area-inset-left))!important;padding-right:calc(4px + env(safe-area-inset-right))!important}
  .niu-table,.slots-machine{padding-left:env(safe-area-inset-left)!important;padding-right:env(safe-area-inset-right)!important}
  .inner-page-shell,.profile-page,.leaderboard-page,.games-page,.wallet-page{padding-left:calc(4px + env(safe-area-inset-left))!important;padding-right:calc(4px + env(safe-area-inset-right))!important;height:calc(100vh - 30px - 38px - env(safe-area-inset-bottom))!important}
 }
}

/* ═══ iPhone SE/mini 小屏 (<=375px高) ═══ */
@media screen and (max-height:380px){
 .topbar{height:26px!important}.brand-orb{width:16px!important;height:16px!important}.brand-title{font-size:9px!important}
 .mobile-tab-bar{height:34px!important}.mobile-tab-bar a{font-size:7px!important}.mobile-tab-bar a i{font-size:11px!important}
 .lobby-main{margin-top:26px!important;height:calc(100vh - 60px)!important}
 .player-avatar{width:14px!important;height:14px!important}.player-meta strong{font-size:8px!important}.currency-panel strong{font-size:9px!important}
 .quick-game-icon{width:18px!important;height:18px!important}.quick-game-item strong{font-size:7px!important}
 .catalog-card-visual{height:36px!important}.catalog-card-body h3{font-size:7px!important}.catalog-card:nth-child(n+11){display:none!important}
 .games-grid{grid-template-columns:repeat(4,1fr)!important}.game-tile-img{height:36px!important}.game-tile-name{font-size:7px!important}
 .game-hall-shell,.inner-page-shell,.profile-page,.leaderboard-page,.games-page,.wallet-page{margin-top:26px!important}
 .auth-minimal-hero{flex:0 0 130px!important}.auth-minimal-hero h1{font-size:16px!important}
 .auth-single-form input{height:28px!important;font-size:12px!important}
 .ddz-card{width:26px!important;height:38px!important}.niu-card{width:34px!important;height:48px!important}.slots-cell{width:54px!important;height:46px!important;font-size:28px!important}
}

/* ═══ iPhone Pro Max 大屏 (>=420px高) ═══ */
@media screen and (min-height:420px) and (max-height:500px){
 .catalog-grid{grid-template-columns:repeat(6,1fr)!important}.catalog-card:nth-child(n+19){display:none!important}.catalog-card-visual{height:52px!important}
 .games-grid{grid-template-columns:repeat(6,1fr)!important}.game-tile-img{height:52px!important}
}

/* ═══ CSS旋转安全区 ═══ */
@media screen and (max-width:1024px) and (orientation:portrait){
 html{padding-top:env(safe-area-inset-left)!important}
}

/* ═══ iOS Safari ═══ */
@supports(-webkit-touch-callout:none){
 body{-webkit-text-size-adjust:100%}
 @media screen and (max-height:500px){
  input,select,textarea{font-size:16px!important}
  .lobby-main,.game-hall-shell,.inner-page-shell,.games-page,.profile-page,.leaderboard-page,.wallet-page{-webkit-overflow-scrolling:touch!important}
  .mobile-tab-bar{padding-bottom:max(0px,env(safe-area-inset-bottom))!important}
 }
}
