/* v20260902_1435 · shared mobile visual-viewport / safe-area guard */
:root{
  --jukdol-vv-height:100dvh;
  --jukdol-vv-top:0px;
  --jukdol-vv-bottom-gap:0px;
  --jukdol-safe-gap:10px;
}

@media (max-width:1024px){
  html,body{max-width:100%;overflow-x:hidden}

  /* Playable screens must use the actually visible mobile viewport, not the layout viewport. */
  body.jukdol-safe-game{
    width:100%!important;
    height:var(--jukdol-vv-height)!important;
    min-height:var(--jukdol-vv-height)!important;
    max-height:var(--jukdol-vv-height)!important;
    overflow:hidden!important;
    overscroll-behavior:none;
  }
  body.jukdol-safe-game>.app-shell,
  body.jukdol-safe-game>.cb-app{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    box-sizing:border-box!important;
  }
  body.jukdol-safe-game>.cb-app{
    overflow:auto!important;
    padding-top:max(10px,env(safe-area-inset-top,0px))!important;
    padding-bottom:max(14px,env(safe-area-inset-bottom,0px))!important;
    -webkit-overflow-scrolling:touch;
  }

  /* Main game chrome stays inside the top/bottom safe area. */
  body.jukdol-safe-game .fish-game-titlebar,
  body.jukdol-safe-game .luck-topbar,
  body.jukdol-safe-game .online-topbar,
  body.jukdol-safe-game .game-titlebar{
    box-sizing:border-box!important;
    padding-top:max(8px,env(safe-area-inset-top,0px))!important;
  }
  body.jukdol-safe-game .fish-game-screen,
  body.jukdol-safe-game .dig-game-screen,
  body.jukdol-safe-game #luckGameScreen,
  body.jukdol-safe-game .online-game-screen{
    max-height:100%!important;
    box-sizing:border-box!important;
  }
  body.jukdol-safe-game .fish-stage,
  body.jukdol-safe-game .luck-stage,
  body.jukdol-safe-game .online-layout,
  body.jukdol-safe-game .dig-game-layout{
    padding-bottom:max(10px,env(safe-area-inset-bottom,0px))!important;
    box-sizing:border-box!important;
  }

  /* Every modal/overlay is clamped to the currently visible part of the mobile browser. */
  #appNoticeModal,
  .player-nickname-overlay,
  .attendance-overlay,
  #reportModal,
  body.jukdol-safe-ui .modal,
  body.jukdol-safe-ui #appExitModal,
  body.jukdol-safe-ui .fish-reset-confirm,
  body.jukdol-safe-ui .global-ranking-overlay,
  body.jukdol-safe-ui .dig-discovery-overlay,
  body.jukdol-safe-ui .cb-event-popup,
  body.jukdol-safe-ui .cb-devil-overlay,
  body.jukdol-safe-ui .cb-confirm,
  body.jukdol-safe-ui .arcade-quick-menu{
    inset:auto!important;
    top:calc(var(--jukdol-vv-top) + max(var(--jukdol-safe-gap),env(safe-area-inset-top,0px)))!important;
    bottom:calc(var(--jukdol-vv-bottom-gap) + max(var(--jukdol-safe-gap),env(safe-area-inset-bottom,0px)))!important;
    left:max(var(--jukdol-safe-gap),env(safe-area-inset-left,0px))!important;
    right:max(var(--jukdol-safe-gap),env(safe-area-inset-right,0px))!important;
    width:auto!important;
    height:auto!important;
    max-width:none!important;
    max-height:none!important;
    box-sizing:border-box!important;
    padding:0!important;
    overflow:hidden!important;
  }

  /* Dialog bodies never grow past the safe container. Long content scrolls inside. */
  #appNoticeModal .app-notice-card,
  .player-nickname-card,
  .attendance-card,
  .report-card,
  body.jukdol-safe-ui .modal-card,
  body.jukdol-safe-ui #appExitModal .app-exit-card,
  body.jukdol-safe-ui .fish-reset-confirm-card,
  body.jukdol-safe-ui .global-ranking-card,
  body.jukdol-safe-ui .dig-discovery-card,
  body.jukdol-safe-ui .cb-event-card,
  body.jukdol-safe-ui .cb-confirm-card,
  body.jukdol-safe-ui .cb-devil-copy,
  body.jukdol-safe-ui .arcade-quick-menu-card{
    width:min(100%,760px)!important;
    max-height:100%!important;
    min-height:0!important;
    box-sizing:border-box!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
  }

  /* Notice: header/buttons stay usable; only long announcement text scrolls. */
  #appNoticeModal .app-notice-card{
    display:flex!important;
    flex-direction:column!important;
    width:min(100%,520px)!important;
  }
  #appNoticeModal .app-notice-icon,
  #appNoticeModal h3,
  #appNoticeModal .app-notice-actions{flex:0 0 auto}
  #appNoticeModal #appNoticeBody{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    padding-right:4px;
  }

  /* Floating controls also stay above Android/iOS navigation areas. */
  #jukdolBgmControl{
    bottom:calc(var(--jukdol-vv-bottom-gap) + max(12px,env(safe-area-inset-bottom,0px)))!important;
  }
  #jukdolBgmControl .jbgm-panel{
    max-height:calc(var(--jukdol-vv-height) - max(82px,calc(env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px) + 64px)))!important;
  }
  #reportFab{
    bottom:calc(var(--jukdol-vv-bottom-gap) + max(72px,calc(env(safe-area-inset-bottom,0px) + 56px)))!important;
  }
}

@media (max-width:430px){
  :root{--jukdol-safe-gap:8px}
  #appNoticeModal .app-notice-card{padding:16px 14px 13px!important;border-radius:18px!important}
  #appNoticeModal .app-notice-icon{font-size:30px!important;margin-bottom:5px!important}
  #appNoticeModal h3{font-size:20px!important;margin-bottom:7px!important}
  #appNoticeModal #appNoticeBody{font-size:13px!important;line-height:1.48!important;margin-bottom:10px!important}
  #appNoticeModal .app-notice-actions{gap:7px!important}
  #appNoticeModal button{min-height:46px!important}
}


/* v20260902_1435: Android/WebView final mobile hub tab override */
@media (max-width:700px){
  body[data-page-kind="hub"] #hubScreen .home-game-tabs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
    padding:8px!important;
  }
  body[data-page-kind="hub"] #hubScreen .home-game-tab{
    min-width:0!important;
    width:100%!important;
    min-height:52px!important;
    height:52px!important;
    padding:0 4px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
  }
  body[data-page-kind="hub"] #hubScreen .home-game-tab .tab-icon,
  body[data-page-kind="hub"] #hubScreen .home-game-tab .tab-copy{
    display:none!important;
  }
  body[data-page-kind="hub"] #hubScreen .home-game-tab .tab-state{
    display:block!important;
    position:static!important;
    inset:auto!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#17213a!important;
    -webkit-text-fill-color:#17213a!important;
    opacity:1!important;
    font-size:16px!important;
    line-height:1!important;
    font-weight:1000!important;
    letter-spacing:.06em!important;
    text-shadow:none!important;
  }
  body[data-page-kind="hub"] #hubScreen .home-game-tab.active::after{display:none!important;content:none!important}
}

/* v20260902_1645 · mobile game controls live in the top bar; no bottom dock */
@media (max-width:1024px){
  :root{--jukdol-mobile-dock-height:0px}

  /* Never shrink the playable area for floating audio buttons. */
  body.jukdol-safe-game:not([data-view="setup"]) > .app-shell,
  body.jukdol-safe-game:not([data-view="setup"]) > .cb-app{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
  }

  /* Notice card itself stays fixed; only its long text area scrolls. */
  #appNoticeModal .app-notice-card{
    overflow:hidden!important;
    max-height:100%!important;
  }
  #appNoticeModal #appNoticeBody{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch!important;
  }

  /* Existing game header rows become horizontally scrollable rather than overlapping. */
  body[data-page-kind="game"] .title-actions,
  body[data-page-kind="game"] .dig-title-actions,
  body[data-page-kind="game"] .fish-title-actions,
  body[data-page-kind="game"] .luck-top-actions,
  body[data-page-kind="game"] .online-top-actions,
  body[data-page-kind="game"] .cb-top-actions{
    display:flex!important;
    align-items:center!important;
    gap:5px!important;
    min-width:0!important;
    max-width:72vw!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    overscroll-behavior-x:contain;
  }
  body[data-page-kind="game"] .title-actions::-webkit-scrollbar,
  body[data-page-kind="game"] .dig-title-actions::-webkit-scrollbar,
  body[data-page-kind="game"] .fish-title-actions::-webkit-scrollbar,
  body[data-page-kind="game"] .luck-top-actions::-webkit-scrollbar,
  body[data-page-kind="game"] .online-top-actions::-webkit-scrollbar,
  body[data-page-kind="game"] .cb-top-actions::-webkit-scrollbar{display:none}

  .jukdol-top-media-btn{
    flex:0 0 auto!important;
    min-width:52px!important;
    height:36px!important;
    min-height:36px!important;
    padding:0 9px!important;
    border:1px solid rgba(45,60,100,.20)!important;
    border-radius:10px!important;
    background:#fff!important;
    color:#1d2d57!important;
    -webkit-text-fill-color:#1d2d57!important;
    box-shadow:0 3px 8px rgba(30,48,90,.10)!important;
    font:1000 12px/1 Pretendard,"Noto Sans KR",system-ui,sans-serif!important;
    white-space:nowrap!important;
    touch-action:manipulation!important;
  }
  .jukdol-top-media-btn.is-playing{background:#eaf8f2!important;color:#1e6655!important}
  .jukdol-top-media-btn.is-muted{background:#f2f3f7!important;color:#697184!important}

  /* Hide the old bottom floating launchers. Their panels still work from top buttons. */
  #jukdolBgmControl .jbgm-fab,
  #jukdolAudioControl .jv-btn{display:none!important}

  /* Audio panels open below the top chrome, inside the visible viewport. */
  #jukdolBgmControl .jbgm-panel{
    position:fixed!important;
    inset:auto!important;
    top:calc(var(--jukdol-vv-top) + max(62px,calc(env(safe-area-inset-top,0px) + 54px)))!important;
    right:max(8px,env(safe-area-inset-right,0px))!important;
    left:auto!important;
    bottom:auto!important;
    transform:none!important;
    width:min(340px,calc(100vw - 16px))!important;
    max-height:calc(var(--jukdol-vv-height) - 82px)!important;
    z-index:2147483640!important;
  }
  #jukdolAudioControl .jv-panel{
    position:fixed!important;
    inset:auto!important;
    top:calc(var(--jukdol-vv-top) + max(62px,calc(env(safe-area-inset-top,0px) + 54px)))!important;
    right:max(8px,env(safe-area-inset-right,0px))!important;
    left:auto!important;
    bottom:auto!important;
    transform:none!important;
    width:min(260px,calc(100vw - 16px))!important;
    max-height:calc(var(--jukdol-vv-height) - 82px)!important;
    overflow:auto!important;
    z-index:2147483641!important;
  }

  /* Ladder: restore vertical page movement; board can still pan sideways. */
  body[data-page-kind="game"][data-view="game"] > .app-shell{
    height:100%!important;
    max-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[data-page-kind="game"][data-view="game"] #step4{
    width:100%!important;
    height:auto!important;
    min-height:100%!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-page-kind="game"][data-view="game"] .playfield{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body[data-page-kind="game"][data-view="game"] .board-wrap{
    overflow-x:auto!important;
    overflow-y:visible!important;
    touch-action:pan-x pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[data-page-kind="game"][data-view="game"] #ladderCanvas{pointer-events:none!important}
  body[data-page-kind="game"][data-view="game"] .label-chip,
  body[data-page-kind="game"][data-view="game"] .player-name-input,
  body[data-page-kind="game"][data-view="game"] .ladder-toggle-btn,
  body[data-page-kind="game"][data-view="game"] .paper-btn,
  body[data-page-kind="game"][data-view="game"] .title-btn{
    pointer-events:auto!important;
    touch-action:manipulation!important;
  }
  /* Duplicate ladder sound toggle is hidden on mobile; the top 효과음 button controls all SFX. */
  body[data-page-kind="game"][data-view="game"] #soundToggleBtn{display:none!important}
}

@media(max-width:430px){
  :root{--jukdol-safe-gap:8px}
  body[data-page-kind="game"] .title-actions,
  body[data-page-kind="game"] .dig-title-actions,
  body[data-page-kind="game"] .fish-title-actions,
  body[data-page-kind="game"] .luck-top-actions,
  body[data-page-kind="game"] .online-top-actions,
  body[data-page-kind="game"] .cb-top-actions{max-width:76vw!important}
  .jukdol-top-media-btn{height:34px!important;min-height:34px!important;min-width:48px!important;padding:0 7px!important;font-size:11px!important}
}


/* v20260902_1645 · native game top buttons + real ladder page scroll */
body[data-page-kind="game"] [data-jukdol-bgm-button],
body[data-page-kind="game"] [data-jukdol-sfx-button]{
  /* Intentionally no custom visual skin: each button keeps its game's native class. */
  touch-action:manipulation;
  white-space:nowrap;
}

/* The old floating launchers are no longer the primary controls on game pages. */
body[data-page-kind="game"] #jukdolBgmControl .jbgm-fab,
body[data-page-kind="game"] #jukdolAudioControl .jv-btn{display:none!important}

@media(max-width:700px){
  /* Undo the 1610 one-size-fits-all flex/scroll rule. Keep each game's native layout. */
  body[data-page-kind="game"] .title-actions{
    display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;
    align-items:center!important;gap:4px!important;max-width:68vw!important;
    overflow:visible!important;
  }
  body[data-page-kind="game"] .dig-title-actions{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:4px!important;max-width:none!important;overflow:visible!important;
  }
  body[data-page-kind="game"] .dig-title-actions .dig-title-btn.back{
    grid-column:1/-1!important;
  }
  body[data-page-kind="game"] .fish-title-actions{
    display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;
    align-items:center!important;gap:4px!important;max-width:64vw!important;overflow:visible!important;
  }
  body[data-page-kind="game"] .luck-top-actions{
    display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;
    align-items:center!important;gap:5px!important;max-width:58vw!important;overflow:visible!important;
  }
  body[data-page-kind="game"] .online-top-actions{
    display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;
    align-items:center!important;gap:4px!important;max-width:62vw!important;overflow:visible!important;
  }
  body[data-page-kind="game"] .cb-top-actions{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;gap:5px!important;max-width:none!important;overflow:visible!important;
  }

  /* Ladder is a normal vertically scrollable mobile page, not a viewport-locked frame. */
  html:has(body[data-boot-kind="ladder"][data-view="game"]){
    height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;
  }
  body[data-boot-kind="ladder"][data-view="game"]{
    height:auto!important;min-height:100dvh!important;max-height:none!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] > .app-shell{
    position:relative!important;inset:auto!important;
    width:100%!important;height:auto!important;min-height:100dvh!important;max-height:none!important;
    overflow:visible!important;transform:none!important;margin:0!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] #step4{
    display:block!important;width:100%!important;height:auto!important;min-height:100dvh!important;
    max-height:none!important;overflow:visible!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .game-titlebar{
    position:sticky!important;top:0!important;z-index:50!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .playfield{
    display:block!important;width:100%!important;height:auto!important;min-height:0!important;
    max-height:none!important;overflow:visible!important;padding:4px!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .ladder-paper{
    display:grid!important;grid-template-rows:auto auto auto!important;
    width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
    overflow:visible!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .board-wrap{
    width:100%!important;height:clamp(430px,58dvh,560px)!important;min-height:430px!important;
    max-height:none!important;overflow-x:auto!important;overflow-y:hidden!important;
    touch-action:pan-x pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .board-inner{
    height:100%!important;min-height:430px!important;
    grid-template-rows:84px minmax(280px,1fr) 52px!important;
  }
  body[data-boot-kind="ladder"][data-view="game"] .paper-footer{
    position:relative!important;min-height:0!important;padding-bottom:max(12px,env(safe-area-inset-bottom,0px))!important;
  }
}

@media(max-width:390px){
  body[data-page-kind="game"] .title-actions{max-width:72vw!important}
  body[data-page-kind="game"] .fish-title-actions{max-width:68vw!important}
  body[data-page-kind="game"] .luck-top-actions{max-width:62vw!important}
  body[data-page-kind="game"] .online-top-actions{max-width:66vw!important}
}

/* v20260902_1645 · definitive mobile ladder/digging interaction repair */
@media (max-width:760px){
  /* LADDER: the document itself scrolls vertically. The ladder board only owns horizontal dragging. */
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"]{
    width:100%!important;
    height:auto!important;
    min-height:var(--jukdol-vv-height,100dvh)!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] > .app-shell{
    width:100%!important;
    height:auto!important;
    min-height:calc(var(--jukdol-vv-height,100dvh) + 240px)!important;
    max-height:none!important;
    overflow:visible!important;
    touch-action:pan-y pinch-zoom!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] #step4,
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] .game-screen{
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] .playfield{
    width:100%!important;
    height:auto!important;
    min-height:calc(var(--jukdol-vv-height,100dvh) + 165px)!important;
    max-height:none!important;
    overflow:visible!important;
    padding:5px 0 10px!important;
    box-sizing:border-box!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] .ladder-paper{
    position:relative!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    width:calc(100% - 10px)!important;
    height:auto!important;
    min-height:calc(var(--jukdol-vv-height,100dvh) + 145px)!important;
    max-height:none!important;
    margin:0 auto!important;
    box-sizing:border-box!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] .board-wrap{
    min-height:430px!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    touch-action:pan-y pinch-zoom!important;
    overscroll-behavior-x:contain!important;
    overscroll-behavior-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.jukdol-safe-game[data-boot-kind="ladder"][data-view="game"] .board-inner{
    min-height:430px!important;
  }

  /* DIGGING: stop squeezing the entire game into one fixed viewport. Let the page flow vertically. */
  body.jukdol-safe-game[data-view="dig-game"]{
    width:100%!important;
    height:auto!important;
    min-height:var(--jukdol-vv-height,100dvh)!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:auto!important;
    touch-action:pan-y pinch-zoom!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] > .app-shell{
    width:100%!important;
    height:auto!important;
    min-height:var(--jukdol-vv-height,100dvh)!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-game-screen:not(.hidden){
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:var(--jukdol-vv-height,100dvh)!important;
    max-height:none!important;
    overflow:visible!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-topbar{
    min-height:0!important;
    padding:7px 8px!important;
    gap:7px!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-title-icon{width:38px!important;height:38px!important;flex:0 0 38px!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-title small{display:none!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-title h2{font-size:15px!important;white-space:nowrap!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-title-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:3px!important;
    margin-left:auto!important;
    max-width:68%!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-title-btn{
    width:100%!important;
    min-width:0!important;
    min-height:32px!important;
    height:32px!important;
    padding:0 4px!important;
    font-size:9px!important;
    border-radius:8px!important;
    white-space:nowrap!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-title-actions .dig-title-btn.back{grid-column:auto!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-statbar{padding:5px 6px!important;gap:4px!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-hud{padding:5px 6px!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-hud strong{font-size:13px!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-world{
    width:100%!important;
    height:360px!important;
    min-height:360px!important;
    max-height:360px!important;
    overflow:hidden!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-machine{
    width:min(220px,58vw)!important;
    top:31%!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-world.at-surface .dig-machine{top:28%!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-bottom-zone{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto auto!important;
    height:auto!important;
    min-height:0!important;
    padding:6px 6px max(12px,env(safe-area-inset-bottom,0px))!important;
    gap:5px!important;
    overflow:visible!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-control-deck{
    grid-row:1!important;
    display:grid!important;
    grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)!important;
    grid-template-areas:"progress start"!important;
    gap:6px!important;
    height:auto!important;
    min-height:76px!important;
    position:relative!important;
    z-index:30!important;
    padding:0!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-toast{display:none!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-progress{
    grid-area:progress!important;
    height:76px!important;
    min-height:76px!important;
    padding:8px!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-start-btn{
    grid-area:start!important;
    position:relative!important;
    z-index:60!important;
    width:100%!important;
    height:76px!important;
    min-height:76px!important;
    pointer-events:auto!important;
    touch-action:none!important;
    user-select:none!important;
    -webkit-user-select:none!important;
    -webkit-touch-callout:none!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-result-card{
    grid-row:2!important;
    height:auto!important;
    min-height:82px!important;
    padding:8px 8px 8px 82px!important;
  }
  body.jukdol-safe-game[data-view="dig-game"] .dig-result-icon{left:7px!important;top:23px!important;width:68px!important;height:55px!important}
  body.jukdol-safe-game[data-view="dig-game"] .dig-tier-rail{grid-row:3!important;height:auto!important;min-height:26px!important;padding:2px 0!important}
}
