/* Loaded only when ads are enabled (src/ads.mjs). The outer box reserves label + unit height before the ad script runs,
   so nothing below moves when an ad arrives; the unit's own size is the inline style Google requires. */
.ad-unit{box-sizing:border-box;max-width:100%;margin:2rem auto;padding:0;text-align:center;min-height:calc(250px + 1.5rem);contain:layout}
@media (min-width:768px){.ad-unit{min-height:calc(280px + 1.5rem)}}
.ad-label{margin:0 0 .25rem;font-size:.75rem;line-height:1.25rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.ad-unit ins.adsbygoogle{max-width:100%;overflow:hidden}
/* Local preview: show where the reserved box is. */
html[data-ads="preview"] .ad-unit ins.adsbygoogle{outline:1px dashed var(--muted);background:repeating-linear-gradient(45deg,transparent 0 8px,rgba(127,127,127,.08) 8px 16px)}
.ad-unit.ad-collapsed{display:none}
/* Pet detail top: a short banner above the pet header (728×90 wide, 320×100 narrow), reserved so the header never jumps. */
.ad-unit.ad-top{margin:0 auto 28px;min-height:calc(100px + 1.5rem)}
@media (min-width:768px){.ad-unit.ad-top{min-height:calc(90px + 1.5rem)}}
/* Pet detail side column: only where the column sits beside the article and the window is at least 800px tall. It sticks to the
   bottom of the (scrollable, sticky) side column, so it stays whole while the facts above it scroll. */
.ad-unit.ad-side{display:none}
@media (min-width:901px) and (min-height:800px){.ad-unit.ad-side{display:block;position:sticky;bottom:0;margin:0;padding-top:10px;min-height:calc(250px + 1.5rem + 10px);background:var(--page)}
 .ad-unit.ad-side::before{content:"";position:absolute;left:0;right:0;top:-28px;height:28px;background:linear-gradient(to bottom,transparent,var(--page));pointer-events:none}}
/* Pet map: a rail in the empty space right of the article column, from the summary list down; hidden where it does not fit. */
.ad-rail-wrap{position:relative}
.ad-unit.ad-rail{display:none}
@media (min-width:1196px){.ad-unit.ad-rail{display:block;position:absolute;top:0;bottom:0;left:calc(100% + 32px);width:160px;margin:0;min-height:0}.ad-rail-inner{position:sticky;top:16px}}
@media (min-width:1476px){.ad-unit.ad-rail{width:300px}}
/* Google's bottom anchor ad overlays the page: public/ads.js measures it into --ad-anchor (0 when there is none or it is
   collapsed), and every control fixed to the bottom edge moves up by that much so it stays visible and tappable. */
.pet-panel{bottom:var(--ad-anchor,0px)}
.save-tip{bottom:calc(18px + var(--ad-anchor,0px))}
.tier-card{bottom:calc(max(16px,env(safe-area-inset-bottom)) + var(--ad-anchor,0px))}
@media (max-width:760px),(max-height:500px){.level-menu{bottom:var(--ad-anchor,0px)}}
@media (max-width:760px) and (min-height:501px){.main-nav{bottom:var(--ad-anchor,0px)}.pd-action{bottom:calc(60px + env(safe-area-inset-bottom) + var(--ad-anchor,0px))}}
@media (max-width:899px){.planner-panel{bottom:var(--ad-anchor,0px)}}
/* Phones: with an anchor on screen, the pet page's sticky "I have it" bar returns to the page flow, so the bottom of the
   screen holds the tab bar and the ad only, not three stacked bars. */
@media (max-width:760px) and (min-height:501px){.ad-anchor-on .pd-action{position:static;border-radius:var(--radius);border-width:1px;box-shadow:var(--shadow-sm)}}
