.ducklife-focus-backdrop{position:fixed;inset:0;z-index:1000;background:#0d1020b8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.ducklife-focus-backdrop[hidden]{display:none}
.ducklife-focus-placeholder{min-width:0;pointer-events:none}
.ducklife-site .adventure-panel.ducklife-section-focused{position:fixed;inset:auto;margin:0;z-index:1001;box-sizing:border-box;transform:none;overflow:auto;box-shadow:0 16px 80px #0008;border:3px solid #111;padding:12px;background-color:var(--paper);max-width:none;min-height:0;overscroll-behavior:contain}
.ducklife-section-focused::backdrop{background:transparent}
.ducklife-site .ducklife-section-focused .demo-stage{aspect-ratio:16/9;transform:none;width:100%;height:auto;min-height:0}
.ducklife-site .ducklife-section-focused .demo-stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.ducklife-site .ducklife-section-focused .adventure-heading{left:0;max-width:420px}
.ducklife-site .ducklife-section-focused .adventure-section-title{padding-right:44px}
.ducklife-site .ducklife-section-focused.adventure-stores>.adventure-heading{width:calc(100% - 44px);max-width:600px}
.ducklife-focus-close{position:absolute;right:8px;top:8px;z-index:5;width:36px;height:36px;display:grid;place-items:center;border:2px solid #111;border-radius:50%;background:#fff02a;color:#111;font:30px/1 Arial,sans-serif;cursor:pointer;box-shadow:2px 2px 0 #111}
.ducklife-focus-close:hover{background:#fff;transform:rotate(8deg)}
.ducklife-focus-close:focus-visible{outline:3px solid #078eff;outline-offset:3px}
@media(max-width:720px){.ducklife-site .adventure-panel.ducklife-section-focused{padding:8px}.ducklife-focus-close{right:5px;top:5px;width:32px;height:32px}.ducklife-site .ducklife-section-focused .adventure-section-title{padding-right:36px}}
@media(prefers-reduced-motion:reduce){.ducklife-focus-close:hover{transform:none}}

/* Closed players use the same corner control as the focused player's close. */
.ducklife-site .adventure-demo{position:relative}
.ducklife-site .adventure-demo .adventure-section-title{padding-right:44px}
.ducklife-site .ducklife-section-focused .ducklife-focus-expand{display:none}
@media(max-width:720px){.ducklife-site .adventure-demo .adventure-section-title{padding-right:36px}}

/* Store focus scales the original panel uniformly; never reflow its layout. */
.ducklife-site .ducklife-section-focused.adventure-stores{overflow:visible}
.ducklife-site .ducklife-section-focused.adventure-stores>.adventure-heading{width:var(--store-heading-width);max-width:none;left:var(--store-heading-left)}

/* Let the backdrop cover iPhone safe areas and keep landscape play nearly edge-to-edge. */
html.ducklife-focus-open:has(body.ducklife-site){background:#000;overflow:hidden;overscroll-behavior:none}
.ducklife-section-focused{--focus-safe-left:env(safe-area-inset-left,0px);--focus-safe-right:env(safe-area-inset-right,0px);--focus-safe-top:env(safe-area-inset-top,0px);--focus-safe-bottom:env(safe-area-inset-bottom,0px)}
@media(orientation:landscape) and (max-height:540px){
 .ducklife-site .adventure-demo.ducklife-section-focused{padding:4px;border-width:2px}
 .ducklife-site .adventure-demo.ducklife-section-focused .adventure-section-title{height:32px;min-height:32px;margin-bottom:4px;gap:8px;padding-right:36px}
 .ducklife-site .adventure-demo.ducklife-section-focused .adventure-heading{width:190px;max-width:36%;flex:0 1 190px}
 .ducklife-site .adventure-demo.ducklife-section-focused .adventure-heading img{max-height:30px;width:100%;object-position:left center}
 .ducklife-site .adventure-demo.ducklife-section-focused .demo-header-time{font-size:11px;flex-direction:row;gap:5px;white-space:nowrap}
 .adventure-demo.ducklife-section-focused .ducklife-focus-close{width:28px;height:28px;right:4px;top:4px;font-size:24px}
}

/* Swipes outside the game should not scroll the page behind it. */
.ducklife-focus-backdrop{touch-action:none;overscroll-behavior:none}
