/* V131 — the whole Letter Hunt board becomes one keyboard-safe mobile scene. */
@media (max-width:760px), (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:600px) {
  body.ha-v111-playing .game-main,
  body.ha-v111-playing .multi-game,
  body.ha-v111-playing .board-wrap {
    overflow-anchor:none!important;
  }

  body.wos-keyboard-open.ha-v111-playing #gameScreen.active,
  body.wos-keyboard-open.ha-v111-playing #multiScreen.active {
    position:fixed!important;
    top:var(--wos-viewport-top,0)!important;
    right:0!important;
    left:0!important;
    z-index:2147481000!important;
    display:block!important;
    width:100vw!important;
    height:var(--wos-visible-height,520px)!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    background:#eef4f7!important;
  }
  body.wos-keyboard-open.ha-v111-playing .topbar,
  body.wos-keyboard-open.ha-v111-playing .v65-inline-home,
  body.wos-keyboard-open.ha-v111-playing .multi-page-head,
  body.wos-keyboard-open.ha-v111-playing .multi-lobby-grid,
  body.wos-keyboard-open.ha-v111-playing .game-layout > .side {
    display:none!important;
  }
  body.wos-keyboard-open.ha-v111-playing .game-layout {
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
  }
  body.wos-keyboard-open.ha-v111-playing .game-main,
  body.wos-keyboard-open.ha-v111-playing .multi-game {
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:4px 5px 58px!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-game {
    padding-bottom:98px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .hud {
    position:relative!important;
    top:auto!important;
    z-index:2!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr)!important;
    flex:0 0 36px!important;
    min-height:36px!important;
    gap:4px!important;
    margin:0 0 3px!important;
    padding:2px 4px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .hud-left,
  body.wos-keyboard-open.ha-v111-playing .hud-right {
    min-width:0!important;
    gap:3px!important;
    flex-wrap:nowrap!important;
    overflow:hidden!important;
  }
  body.wos-keyboard-open.ha-v111-playing .hud .ghost,
  body.wos-keyboard-open.ha-v111-playing .hud .pill {
    min-width:0!important;
    min-height:30px!important;
    height:30px!important;
    padding:2px 5px!important;
    overflow:hidden!important;
    font-size:8px!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  body.wos-keyboard-open.ha-v111-playing .timer-wrap {
    display:block!important;
    width:82px!important;
    min-width:82px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .timer {
    font-size:18px!important;
    line-height:20px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .timer-bar {
    height:4px!important;
    margin-top:2px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .status {
    display:block!important;
    flex:0 0 auto!important;
    min-height:27px!important;
    max-height:34px!important;
    margin:0 0 3px!important;
    padding:4px 7px!important;
    overflow:auto!important;
    font-size:9px!important;
    line-height:1.18!important;
  }
  body.wos-keyboard-open.ha-v111-playing .board-wrap {
    display:flex!important;
    flex:1 1 auto!important;
    min-height:0!important;
    width:100%!important;
    padding:2px 0 3px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    touch-action:pan-y!important;
    scroll-behavior:auto!important;
  }
  body.wos-keyboard-open.ha-v111-playing .board {
    --cell:clamp(30px,9.1vw,38px)!important;
    align-self:flex-start!important;
    margin:auto!important;
    gap:4px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .row {
    gap:4px!important;
    scroll-margin:5px 0!important;
  }
  body.wos-keyboard-open.ha-v111-playing .cell {
    width:clamp(30px,9.1vw,38px)!important;
    height:clamp(30px,9.1vw,38px)!important;
    border-radius:8px!important;
    font-size:clamp(16px,4.7vw,20px)!important;
  }
  body.wos-keyboard-open.ha-v111-playing .keyboard,
  body.wos-keyboard-open.ha-v111-playing .kbd-hint,
  body.wos-keyboard-open.ha-v111-playing #multiAnswerBox {
    display:none!important;
  }
  body.wos-keyboard-open.ha-v111-playing .mobile-native-entry {
    position:absolute!important;
    right:max(5px,env(safe-area-inset-right))!important;
    bottom:max(4px,env(safe-area-inset-bottom))!important;
    left:max(5px,env(safe-area-inset-left))!important;
    z-index:4!important;
    display:grid!important;
    width:auto!important;
    max-width:none!important;
    height:48px!important;
    margin:0!important;
    transform:none!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-game .mobile-native-entry {
    bottom:45px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .mobile-native-prefix,
  body.wos-keyboard-open.ha-v111-playing .mobile-native-entry input,
  body.wos-keyboard-open.ha-v111-playing .mobile-native-submit {
    height:48px!important;
    min-height:48px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-entry-controls {
    position:absolute!important;
    right:max(5px,env(safe-area-inset-right))!important;
    bottom:max(3px,env(safe-area-inset-bottom))!important;
    left:max(5px,env(safe-area-inset-left))!important;
    z-index:4!important;
    width:auto!important;
    height:38px!important;
    margin:0!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-entry-controls #multiSkipBtn {
    width:100%!important;
    min-height:38px!important;
    height:38px!important;
    font-size:10px!important;
  }
}

@media (max-width:350px), (max-height:620px) {
  body.wos-keyboard-open.ha-v111-playing .cell {
    width:30px!important;
    height:30px!important;
    font-size:16px!important;
  }
}

@media (max-width:820px), (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:600px) {
  body.ha-v111-playing .mobile-native-entry {
    display:grid!important;
  }
  body.ha-v111-playing .status[data-state="rejected"] {
    border-color:#e6a4ad!important;
    background:#fff2f4!important;
    color:#9e2638!important;
    font-weight:850!important;
  }
  body.wos-keyboard-open.ha-v111-playing .toast.active {
    position:fixed!important;
    top:calc(var(--wos-viewport-top,0px) + 38px)!important;
    right:8px!important;
    bottom:auto!important;
    left:8px!important;
    z-index:2147482100!important;
    width:auto!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:46px!important;
    padding:7px 10px!important;
    overflow:hidden!important;
    border-radius:10px!important;
    font-size:10px!important;
    line-height:1.2!important;
    transform:none!important;
  }
}

@media (orientation:landscape) and (pointer:coarse), (orientation:landscape) and (max-height:600px) {
  body.ha-v111-playing .mobile-native-entry {
    grid-template-columns:42px minmax(0,1fr) 76px!important;
    gap:5px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .game-main,
  body.wos-keyboard-open.ha-v111-playing .multi-game {
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(270px,.92fr)!important;
    grid-template-rows:34px 31px minmax(0,1fr)!important;
    gap:3px 8px!important;
    padding:3px 6px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .hud {
    grid-column:1 / -1!important;
    grid-row:1!important;
    min-height:34px!important;
    height:34px!important;
    margin:0!important;
  }
  body.wos-keyboard-open.ha-v111-playing .status {
    grid-column:1 / -1!important;
    grid-row:2!important;
    min-height:31px!important;
    max-height:31px!important;
    margin:0!important;
    padding:4px 7px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .board-wrap {
    grid-column:1!important;
    grid-row:3!important;
    width:100%!important;
    height:100%!important;
    padding:1px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .board {
    --cell:24px!important;
    margin:0 auto!important;
    gap:3px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .cell {
    width:24px!important;
    height:24px!important;
    font-size:13px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .row {
    gap:3px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .mobile-native-entry {
    position:relative!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    grid-column:2!important;
    grid-row:3!important;
    align-self:center!important;
    width:100%!important;
    height:48px!important;
    margin:0!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-game .mobile-native-entry {
    bottom:auto!important;
    align-self:start!important;
    margin-top:12px!important;
  }
  body.wos-keyboard-open.ha-v111-playing .multi-entry-controls {
    position:relative!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    grid-column:2!important;
    grid-row:3!important;
    align-self:end!important;
    width:100%!important;
    height:38px!important;
    margin:0 0 8px!important;
  }
}
