/* A small phosphor theatre below the working interface: in the page's flow in every layout (never fixed over
   content), with no background. The rain fades out above it (review-rain.js) and the sprite sheets are transparent
   around the figures (scripts/make-mascot-alpha.cjs); the figures blend only with each other, inside the stage. */
body.has-doggy-chase main{min-height:calc(100dvh - 350px)}
#doggy-chase{position:relative;width:min(100%,1100px);margin:0 auto;padding-bottom:12px;pointer-events:none;color:var(--green);contain:layout paint}
#doggy-chase[hidden]{display:none}
.chase-stage{width:100%;height:160px;display:block;overflow:hidden}
.chase-caption{margin:-9px 20px 0;text-align:center;font-size:12px;line-height:1.6;color:var(--text);text-wrap:balance}
.chase-floor{stroke:#648345;stroke-width:.5;opacity:.35}
.chase-label{font:8px var(--mono);letter-spacing:1.4px;fill:#829c6e}
.chase-status{fill:var(--green);letter-spacing:1px}
.chase-prop{stroke:#6e8b53;stroke-width:1.2}
.chase-customer,.chase-dog{mix-blend-mode:lighten}
.chase-customer image,.chase-dog image{image-rendering:pixelated}
.chase-shirt{shape-rendering:crispEdges}
.chase-plant,.chase-rocket{stroke:#b4ee7c;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter;shape-rendering:crispEdges}
.chase-leaves,.chase-rocket-body{fill:#152b10}
.chase-plant>path:not([class]),.chase-rocket>path:not([class]){stroke:#73994f}
.chase-pot{fill:#0b1c08}
.chase-window{fill:#030603}
.chase-passenger{mix-blend-mode:lighten}
.chase-passenger image{image-rendering:pixelated}
.chase-flame{fill:#b4ee7c;stroke:none}
.chase-tether{stroke:#b4ee7c;stroke-width:1.5;stroke-dasharray:3 2}
.chase-review,.chase-check,.chase-spark{stroke:var(--green)}
#doggy-chase[data-motion=paused] *{animation-play-state:paused!important}
body.has-doggy-chase .toast{bottom:206px}
@media(max-width:600px){.chase-label{font-size:7px;letter-spacing:1px}.chase-caption{font-size:11px}}
@media(prefers-reduced-motion:reduce){#doggy-chase *{animation:none!important}}

/* Pages built on the landing section (the landing and the signed-in setup entry screens) share one desktop frame:
   a full-height column, content centred. Never clip or lock scrolling: main grows with its content and never
   shrinks under it, so a window too short for the page scrolls instead of stacking one thing on another. */
@media(min-width:601px) and (min-height:601px){
  body:has(.setup-landing){display:flex;flex-direction:column;min-height:100svh;padding-bottom:0}
  body:has(.setup-landing) .header-inner{min-height:78px}
  body:has(.setup-landing) main{display:flex;flex-direction:column;justify-content:center;flex:1 0 auto;width:100%;min-height:auto;margin:0 auto;padding-top:16px;padding-bottom:4px}
  .setup-landing{padding:0}
  body:has(.setup-landing) .app-footer{width:100%;min-height:0;padding-top:0;padding-bottom:4px}
  body:has(.setup-landing) .app-footer:not(:has(button:not([hidden]),a)){display:none}
}
/* The landing itself (the page with .landing-copy): the whole opening scene in every desktop and tablet window,
   wide-and-short ones included. From 700px of height up every measure is the w6 one (each clamp reaches it at
   exactly 700px); under that the header, gaps, cards and stage scale with the height, so the scene fits down to
   500px (a 1920x1080 laptop at 150% scaling shows 1260x546). These rules repeat the frame above, which stops at
   601px, and follow it so they win at equal specificity. The thresholds sit a hundredth of a pixel above the phone
   layout's: a zoomed window 600.5px wide gets one layout, never neither. */
@media(min-width:600.01px) and (min-height:600.01px), (min-width:900.01px){
  body:has(.landing-copy){display:flex;flex-direction:column;min-height:100svh;padding-bottom:0}
  body:has(.landing-copy) .header-inner{min-height:clamp(50px,calc(14svh - 20px),78px)}
  body:has(.landing-copy) main{display:flex;flex-direction:column;justify-content:center;flex:1 0 auto;width:100%;min-height:auto;margin:0 auto;padding-top:clamp(6px,calc(5svh - 19px),16px);padding-bottom:4px}
  body:has(.landing-copy) .setup-landing{padding:0}
  .landing-copy{margin-bottom:max(8px,min(clamp(16px,2svh,24px),calc(4svh - 12px)))}
  .landing-copy h1{font-size:clamp(22px,4.5svh,40px)}
  .setup-entry{height:clamp(140px,max(25svh,calc(14.66svh + 66.7px)),300px);aspect-ratio:auto;padding:clamp(10px,calc(3svh - 5px),16px) 20px}
  .entry-graphic{position:relative;margin-bottom:clamp(8px,calc(2svh - 2px),12px)}
  .entry-graphic>svg{position:absolute;inset:0;width:100%;height:100%;max-height:100%}
  .review-rain-stage{min-height:clamp(40px,calc(13svh - 25px),66px);margin:0;padding-top:clamp(4px,calc(4svh - 16px),12px);padding-bottom:clamp(4px,calc(4svh - 16px),12px)}
  #review-rain-line{font-size:clamp(17px,2vw,25px)}
  .signin-action{margin:0 0 clamp(6px,calc(2svh - 4px),10px)}
  .signin-action .btn{min-height:clamp(38px,calc(3svh + 23px),44px)}
  .landing-copy~.field-hint{margin:clamp(4px,calc(1svh - 1px),6px) 0 0}
  body:has(.landing-copy) .app-footer{width:100%;min-height:0;padding-top:0;padding-bottom:4px}
  body:has(.landing-copy) .site-links a{min-height:clamp(24px,calc(4svh + 4px),32px)}
  body:has(.landing-copy) #doggy-chase{flex:none;margin:clamp(4px,calc(2svh - 6px),8px) auto 0;padding-bottom:clamp(4px,calc(4svh - 16px),12px)}
  body:has(.landing-copy) .chase-stage{height:clamp(96px,18svh,160px)}
  body:has(.landing-copy) .chase-caption{margin:-3px 20px 0}
}
@media(max-width:600px), (max-width:900px) and (max-height:600px){
  body:has(.setup-landing){display:flex;flex-direction:column;min-height:100svh;padding-bottom:0}
  body:has(.setup-landing) .header-inner{min-height:60px;padding:8px 16px 4px;gap:4px 12px}
  body:has(.setup-landing) .mode-label{display:none}
  body:has(.setup-landing) .account-controls{max-width:clamp(80px,24vw,110px)}
  body:has(.setup-landing) .header-inner nav{gap:10px}
  body:has(.setup-landing) main{display:flex;flex-direction:column;justify-content:center;flex:1 0 auto;width:100%;min-height:auto;margin:0 auto;padding:12px 16px 4px}
  .setup-landing{padding:0}
  .landing-copy{margin-bottom:18px}
  .landing-copy h1{font-size:clamp(25px,6.8vw,36px)}
  .setup-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .setup-entry{display:flex;flex-direction:column;align-items:stretch;aspect-ratio:auto;height:clamp(150px,25svh,200px);min-height:0;padding:12px 8px;gap:0}
  .entry-graphic{position:relative;flex:1;min-height:0;margin:0 0 12px}
  .entry-graphic>svg{position:absolute;inset:0;width:100%;height:100%;max-height:100%}
  .entry-copy{display:block}
  .entry-copy>.icon{display:none}
  .entry-label{gap:4px}
  .entry-title{font-size:12px;line-height:1.35;letter-spacing:0}
  .entry-caption{font-size:10px;line-height:1.3}
  .review-rain-stage{min-height:66px;margin:0;padding:10px 28px 10px 0;justify-content:center}
  #review-rain-line{font-size:clamp(12px,3.3vw,17px);gap:3px .5em}
  .rain-toggle{right:-8px}
  .signin-action{margin:0 0 10px;gap:10px}
  .landing-status{margin:0;gap:8px;font-size:10px}
  .setup-landing>.field-hint{font-size:10px;line-height:1.5;margin:6px 0 0}
  body:has(.setup-landing) .app-footer{width:100%;min-height:0;padding:0 16px 4px}
  body:has(.setup-landing) .app-footer:not(:has(button:not([hidden]),a)){display:none}
  body:has(.setup-landing) #doggy-chase{flex:none;width:100%;margin:8px auto 0;padding-bottom:max(8px,env(safe-area-inset-bottom))}
  body:has(.setup-landing) .chase-stage{height:clamp(96px,19svh,150px)}
  body:has(.setup-landing) .chase-caption{font-size:10px;line-height:1.4;margin:-3px 20px 0}
  body:has(.setup-landing) .toast{bottom:18px}
}
@media(max-width:600px) and (max-height:660px){
  body:has(.setup-landing) main{padding-top:6px}
  .landing-copy{margin-bottom:10px}
  .setup-entry{height:142px;padding-top:8px;padding-bottom:8px}
  .entry-graphic{margin-bottom:8px}
  .review-rain-stage{min-height:54px;padding-top:6px;padding-bottom:6px}
  body:has(.setup-landing) .chase-stage{height:90px}
  body:has(.setup-landing) #doggy-chase{margin-top:4px}
}
@media(max-width:600px) and (max-height:580px){
  body:has(.setup-landing) .header-inner{min-height:52px;padding-top:4px;padding-bottom:0}
  .landing-copy{margin-bottom:8px}
  .setup-entry{height:120px}
  .entry-graphic{margin-bottom:6px}
  body:has(.setup-landing) .chase-stage{height:84px}
}
@media(min-width:601px) and (max-width:900px) and (max-height:600px){
  body:has(.setup-landing) .header-inner{flex-wrap:nowrap;min-height:48px}
  body:has(.setup-landing) .header-inner nav{order:0;width:auto;margin-left:auto}
  body:has(.setup-landing) .account-controls{max-width:90px}
  body:has(.setup-landing) .app-footer{position:absolute;bottom:0;right:0;width:34%}
  body:has(.setup-landing) main{padding-top:4px;padding-right:35%;position:relative}
  .landing-copy{margin-bottom:10px}
  .landing-copy h1{font-size:25px}
  .setup-entry{height:124px;padding:8px}
  .entry-graphic{margin-bottom:6px}
  .entry-title{font-size:11px}
  .entry-caption{font-size:9px}
  .review-rain-stage{min-height:50px;padding-top:4px;padding-bottom:4px}
  #review-rain-line{font-size:12px}
  body:has(.setup-landing) #doggy-chase{position:absolute;right:0;bottom:52px;width:34%;margin:0}
  body:has(.setup-landing) .chase-stage{height:130px}
}
