/* Parent bridge: the close control must never cover preview controls. */
.idle-preview-exit {
  display: block !important;
  left: 18px !important;
  right: auto !important;
  top: 112px !important;
  bottom: auto !important;
  width: 112px !important;
  height: 42px !important;
  border: 2px solid #d8ebff99 !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, #34558fef, #17234cef) !important;
  box-shadow: 0 5px 0 #0b1635, 0 10px 24px #020817aa, inset 0 1px #fff7 !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}
.idle-preview-exit::before { content: "← 원정 현황"; font-size: 13px; letter-spacing: -.02em; }
.idle-preview-bridge.show { position: fixed !important; inset: 0 !important; z-index: 2147483647 !important; width: 100vw !important; height: 100dvh !important; border-radius: 0 !important; isolation: isolate !important; background:#030817 !important; transform:none !important; }
.idle-preview-bridge.show iframe { display:block !important; position:absolute !important; z-index:1 !important; inset:0 !important; width:100vw !important; height:100dvh !important; opacity:1 !important; visibility:visible !important; pointer-events:auto !important; }
body.idle-battle-open { overflow: hidden !important; }
body.idle-battle-open > :not(.idle-preview-bridge):not(script):not(style) { pointer-events: none !important; }
body.idle-battle-open > .idle-preview-bridge { visibility: visible !important; pointer-events: auto !important; }
.idle-preview-exit:hover { transform: translateY(-1px); filter: brightness(1.12); }
@media (max-width: 760px) {
  .idle-preview-exit { left: 8px !important; top: 106px !important; bottom: auto !important; width: 102px !important; }
  .idle-dungeon-view { min-height: max(680px, calc(100dvh - 84px)); overflow: visible; }
  .idle-shell { min-height: max(680px, calc(100dvh - 84px)); padding: 8px; }
  .idle-topbar { align-items: flex-start; flex-wrap: wrap; }
  .idle-resources { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .idle-resource { min-width: 0; text-align: left; }
  .idle-resource.daily { grid-column: 1/-1; }
  .idle-game { min-height: 590px; overflow: hidden; }
  .idle-lobby { align-items: start; overflow-y: auto; overscroll-behavior: contain; padding: 12px 8px calc(18px + env(safe-area-inset-bottom)); }
  .idle-launch-card { width: 100%; max-height: none; padding: 18px 14px; margin: auto 0; }
  .idle-lobby-emblem { width: 58px; height: 58px; border-radius: 18px; font-size: 28px; }
  .idle-lobby h3 { margin: 9px 0 4px; font-size: 23px; }
  .idle-lobby p { margin-bottom: 12px; font-size: 12px; line-height: 1.45; }
  .idle-launch-stats { margin: 12px 0; }
  .idle-launch-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .idle-start { grid-column: 1/-1; }
  .idle-stop { grid-column: 1; }
  .idle-claim { grid-column: 2; position: sticky; bottom: calc(4px + env(safe-area-inset-bottom)); z-index: 3; min-width: 0; }
  .idle-daily-cap-note { margin-bottom: calc(2px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 430px) and (orientation: portrait) {
  .idle-launch-actions { grid-template-columns: 1fr; }
  .idle-start,.idle-stop,.idle-claim { grid-column: 1; width: 100%; }
  .idle-claim { order: 3; min-height: 62px; box-shadow: 0 10px 28px #06152ccc,inset 0 1px #ffffff35; }
}
