.game-ad-root{--game-ad-dialog-background:rgba(91,98,108,.42);--game-ad-dialog-filter:blur(14px) saturate(.8);--game-ad-safe-top:env(safe-area-inset-top,0px);--game-ad-safe-bottom:var(--game-device-safe-bottom,env(safe-area-inset-bottom,0px));position:fixed;inset:0;pointer-events:none;z-index:20;font:15px/1.45 system-ui,sans-serif;color:#28332d}.game-ad-root [hidden]{display:none!important}.game-ad-layer{position:absolute;inset:0;background:var(--game-ad-dialog-background);-webkit-backdrop-filter:var(--game-ad-dialog-filter);backdrop-filter:var(--game-ad-dialog-filter);pointer-events:auto;display:flex;align-items:center;justify-content:center;padding:60px 8px calc(20px + var(--game-device-safe-bottom,env(safe-area-inset-bottom,0px)));overflow:auto}.game-ad-label{position:fixed;top:calc(10px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);font-size:13px;color:#58665c}.game-ad-close{position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);width:48px;height:48px;min-height:48px;padding:0;border:0;background:transparent!important;font-size:31px;color:#28332d;cursor:pointer;box-shadow:none}.game-ad-close:focus:not(:focus-visible){outline:none}.game-ad-close:focus-visible{outline:none}.game-ad-root[data-keyboard="true"] .game-ad-close:focus-visible{outline:2px solid #526b4e;outline-offset:-5px}.game-ad-content{text-align:center;max-width:680px;width:100%;pointer-events:auto}.game-ad-content>p{max-width:340px;margin:12px auto 20px}.game-ad-content>button,.game-ad-confirm button{margin:8px;min-height:48px}.game-ad-pair{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.game-ad-card{width:300px;height:250px;max-width:100%;margin:auto;flex:none;background:linear-gradient(145deg,#f4e4a6,#d8e8d3);border:1px solid #99aa87;border-radius:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#334533}.game-ad-card strong{font-size:24px;font-weight:650}.game-ad-test-tag{font-size:12px;letter-spacing:.09em;text-transform:uppercase}.game-ad-card small{font-size:11px;opacity:.75}.game-ad-persistent{position:fixed;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;pointer-events:auto;background:#edf0df;border:1px solid #c3cab4;color:#47543e}.game-ad-top{top:calc(var(--game-ad-anchor-offset) + var(--game-ad-safe-top));height:auto;width:min(var(--game-ad-anchor-width),calc(100vw - 16px));flex-direction:column;border:0;background:transparent;pointer-events:none;font-size:10px;gap:0;overflow:visible}.game-ad-top[data-expanded="false"]{width:var(--game-ad-anchor-toggle-width)}.game-ad-anchor-creative{width:100%;height:var(--game-ad-anchor-height);display:flex;align-items:center;justify-content:center;gap:6px;background:#edf0df;border:1px solid #c3cab4;pointer-events:auto}.game-ad-anchor-toggle{width:var(--game-ad-anchor-toggle-width);height:var(--game-ad-anchor-toggle-height);min-height:44px;padding:4px;margin:0;border:1px solid #a4ae91;border-radius:0 0 7px 7px;background:#edf0df;color:#47543e;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font:9px system-ui;cursor:pointer;pointer-events:auto}.game-ad-anchor-toggle::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(225deg)}.game-ad-top[data-expanded="false"] .game-ad-anchor-toggle::after{transform:rotate(45deg)}.game-ad-anchor-toggle:disabled{cursor:default;opacity:.6}.game-ad-anchor-toggle:focus-visible{outline:2px solid #526b4e;outline-offset:-4px}.game-ad-bottom{bottom:var(--game-ad-safe-bottom);width:320px;height:50px;font-size:11px}.game-ad-persistent strong{font-size:12px;font-weight:500}.game-ad-persistent small{font-size:9px}.game-ad-interstitial{display:none!important}.game-ad-confirm{max-width:340px;background:#fffef8;padding:24px;text-align:center;border:1px solid #c3cab4;border-radius:8px;pointer-events:auto}.game-ad-confirm h2{margin-top:0}.game-ad-toast{position:fixed;left:50%;bottom:calc(70px + var(--game-device-safe-bottom,env(safe-area-inset-bottom,0px)));transform:translateX(-50%);background:#28332ded;color:white;border-radius:7px;padding:12px 18px;max-width:90vw;text-align:center}.game-ad-countdown{font-variant-numeric:tabular-nums}@media(max-height:640px){.game-ad-layer{align-items:flex-start}.game-ad-pair{padding-top:0}}@media(prefers-reduced-motion:reduce){.game-ad-root *{animation:none;transition:none}}
.game-ad-result-reward{position:fixed;bottom:calc(70px + var(--game-device-safe-bottom,env(safe-area-inset-bottom,0px)));left:50%;transform:translateX(-50%);z-index:8;min-height:48px;width:280px;max-width:90vw;background:#f2d568;color:#2d3a2e;border:2px solid #657a50}.game-ad-result-reward[hidden]{display:none}
/* Local test strips stay visible around custom previews; Google-owned UI is untouched. */
.game-ad-root[data-persistent-popup="true"]{background:var(--game-ad-dialog-background);-webkit-backdrop-filter:var(--game-ad-dialog-filter);backdrop-filter:var(--game-ad-dialog-filter)}
.game-ad-root[data-persistent-popup="true"] .game-ad-layer{top:calc(var(--game-ad-anchor-offset) + var(--game-ad-safe-top) + var(--game-ad-anchor-toggle-height) + 8px);bottom:calc(66px + var(--game-device-safe-bottom,env(safe-area-inset-bottom,0px)));padding:8px;background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;z-index:1}
.game-ad-root[data-persistent-popup="true"][data-anchor-expanded="true"] .game-ad-layer{top:calc(var(--game-ad-anchor-offset) + var(--game-ad-safe-top) + var(--game-ad-anchor-height) + var(--game-ad-anchor-toggle-height) + 8px)}
.game-ad-root[data-persistent-popup="true"] .game-ad-persistent{z-index:2}
.game-ad-label,.game-ad-close{z-index:3}
.game-ad-root[data-persistent-popup="true"] .game-ad-layer{align-items:flex-start}
.game-ad-root[data-persistent-popup="true"] :is(.game-ad-content,.game-ad-confirm){margin-block:auto}

.game-ad-display{position:fixed;width:300px;height:270px;pointer-events:auto}.game-ad-display-label{display:block;height:20px;text-align:center;color:#58665c;font-size:11px;line-height:20px}.game-ad-display-slot{width:300px;height:250px}

/* Keep the fixed label and close control legible on the frosted game backdrop. */
.game-ad-root[data-persistent-popup="true"] :is(.game-ad-label,.game-ad-close){color:#202831}

/* Empty startup spaces are retained without imitating filled advertisements. */
.game-ad-card.game-ad-placeholder{background:rgba(192,198,205,.12);border-color:rgba(230,234,239,.22)}
.game-ad-root[data-popup-mode="live"] .game-ad-layer{top:calc(max(var(--game-ad-header-inset,0px),var(--game-ad-safe-top)) + 56px);bottom:calc(66px + var(--game-ad-safe-bottom))}

/* The control row stays at the viewport safe top, independently of anchors.
   Google's higher overlay may cover it; no control or content is displaced. */
.game-ad-header{--game-ad-controls-inset:var(--game-ad-safe-top);position:absolute;inset:0 0 auto;height:calc(48px + var(--game-ad-controls-inset));z-index:3;pointer-events:none}
.game-ad-header .game-ad-label{position:absolute;top:calc(10px + var(--game-ad-controls-inset));pointer-events:none}
.game-ad-header .game-ad-close{position:absolute;top:var(--game-ad-controls-inset);pointer-events:auto}

/* The SDK owns a full-size inner div; its no-fill collapse never shrinks the
   retained 300x250 outer space or moves the fixed popup header. */
.game-ad-card[data-live-slot="true"]{border:0;border-radius:0;outline:1px solid rgba(230,234,239,.22);background:transparent;max-width:none}
/* The footer lives outside the modal root and keeps its own hidden contract. */
.game-ad-bottom[hidden]{display:none!important}
