/* Newb Homebuyer: the loading screen (v187), drawn by public/boot.js while the game loads.
   It picks up where the feed card leaves off: the same painting, title and orange button, with a little
   board path where the description was. Every rule is scoped to #nhbBoot so the game's own stylesheet,
   which arrives while this screen is up, can't restyle it. */
html.nb-loading,html.nb-loading body{overflow:hidden;background:#1b1120}
#nhbBoot{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;overflow:hidden;
  background:#1b1120;color:#fff7ef;font:600 14px/1.35 'Nunito',system-ui,sans-serif;text-align:center;
  -webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:opacity .45s ease}
#nhbBoot *,#nhbBoot *::before,#nhbBoot *::after{box-sizing:border-box}
#nhbBoot [hidden]{display:none!important}
#nhbBoot img{max-width:none;-webkit-user-drag:none;pointer-events:none}
#nhbBoot.nb-out{opacity:0;pointer-events:none}

/* the painting: the feed card's, framed the same way, drifting in slowly (starting a touch in, so its paper
   edge stays off screen on wide windows) */
#nhbBoot .nb-art{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;
  background:linear-gradient(to bottom,#c2683f 0%,#8a3f2a 42%,#4a2128 72%,#1b1120 100%)}  /* Mars at dusk, until the painting is in */
#nhbBoot .nb-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 55%;
  transform-origin:50% 60%;animation:nb-drift 26s cubic-bezier(.2,.6,.4,1) both;opacity:0;transition:opacity .4s ease}
#nhbBoot .nb-art img.in{opacity:1}
#nhbBoot .nb-art::after{content:'';position:absolute;left:0;right:0;bottom:0;height:34%;
  background:linear-gradient(to bottom,rgba(27,17,32,0),#1b1120)}
@keyframes nb-drift{from{transform:scale(1.03)}to{transform:scale(1.09)}}

#nhbBoot .nb-panel{flex:none;display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:2px 20px calc(18px + env(safe-area-inset-bottom,0px))}
#nhbBoot .nb-title{margin:0;font:700 34px/1 'Fredoka',system-ui,sans-serif;letter-spacing:-.025em;color:#fff7ef;
  text-shadow:0 2px 0 #1c0f15,0 0 18px rgba(0,0,0,.45)}

/* the path: six board tiles lying on the ground, then the house. --t is one tile. */
#nhbBoot .nb-path{--t:36px;--gap:6px;position:relative;width:calc(var(--t)*6 + var(--gap)*5 + var(--t)*1.95);
  height:calc(var(--t)*2.45);margin-top:2px}
#nhbBoot .nb-tiles{position:absolute;left:0;bottom:calc(var(--t)*.12);display:flex;gap:var(--gap);
  transform:perspective(calc(var(--t)*7)) rotateX(34deg);transform-origin:50% 100%}
#nhbBoot .nb-tile{position:relative;display:block;width:var(--t);height:var(--t);
  filter:grayscale(.75) brightness(.55);transition:filter .3s ease}
/* a plain square holds each tile's place until its picture arrives */
#nhbBoot .nb-tile::before{content:'';position:absolute;inset:8%;border-radius:18%;background:rgba(255,247,239,.13)}
#nhbBoot .nb-tile img{position:relative;display:block;width:100%;height:100%;opacity:0;transition:opacity .25s ease}
#nhbBoot .nb-tile img.in{opacity:1}
#nhbBoot .nb-tile.lit{filter:none;animation:nb-lit .38s ease-out}
@keyframes nb-lit{0%{transform:translateY(0)}35%{transform:translateY(calc(var(--t)*-.14))}100%{transform:translateY(0)}}
#nhbBoot .nb-house{position:absolute;right:0;bottom:0;width:calc(var(--t)*1.8);height:auto;opacity:0;
  filter:brightness(.7) saturate(.7);transition:opacity .25s ease,filter .35s ease}
#nhbBoot .nb-house.in{opacity:1}
#nhbBoot .nb-house.home{filter:none;animation:nb-home .5s ease-out}
@keyframes nb-home{0%{transform:scale(1)}40%{transform:scale(1.1)}100%{transform:scale(1)}}

/* your astronaut and the shadow under them; boot.js moves both */
#nhbBoot .nb-hero,#nhbBoot .nb-shadow{position:absolute;left:0;top:0;will-change:transform}
#nhbBoot .nb-hero{width:calc(var(--t)*.86);height:calc(var(--t)*1.52)}
#nhbBoot .nb-hero img{display:block;width:100%;height:100%;object-fit:contain;object-position:50% 100%;
  transform-origin:50% 100%;opacity:0;transition:opacity .25s ease;animation:nb-bob 2.1s ease-in-out infinite}
/* waiting on a tile, the astronaut bobs gently, as the pieces do on the game board */
@keyframes nb-bob{0%,100%{translate:0 0}50%{translate:0 -1.5px}}
#nhbBoot .nb-hero img.in{opacity:1}
#nhbBoot .nb-shadow{width:calc(var(--t)*.7);height:calc(var(--t)*.2);border-radius:50%;background:rgba(10,4,12,.45)}

/* the line under the path and the button share one slot, sized for the button, so nothing moves when it appears */
#nhbBoot .nb-slot{display:grid;place-items:center;min-height:62px;width:100%;max-width:340px}
#nhbBoot .nb-slot>*{grid-area:1/1}
#nhbBoot .nb-line{margin:0;padding:0 4px;color:#fff3e6;opacity:.9;text-shadow:0 1px 4px rgba(0,0,0,.6);transition:opacity .25s ease}
#nhbBoot .nb-line.off{opacity:0}
#nhbBoot .nb-go{width:170px;height:54px;margin:0 0 6px;padding:0;cursor:pointer;border:3px solid #1c0f15;border-radius:18px;
  background:#d9663a;color:#fff7ef;font:700 24px/1 'Fredoka',system-ui,sans-serif;letter-spacing:.05em;
  box-shadow:0 6px 0 #9c3d1c,0 6px 0 3px #1c0f15;touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  animation:nb-pop .42s cubic-bezier(.3,1.5,.5,1) both,nb-glow 1.8s ease-in-out .6s infinite}
#nhbBoot .nb-go.long{width:200px}
#nhbBoot .nb-go:active{transform:translateY(4px);box-shadow:0 2px 0 #9c3d1c,0 2px 0 3px #1c0f15}
#nhbBoot .nb-go:focus{outline:none}
#nhbBoot .nb-go:focus-visible{outline:3px solid #fff7ef;outline-offset:4px}
@keyframes nb-pop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes nb-glow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}

@media (max-width:359px){#nhbBoot .nb-path{--t:30px;--gap:5px}#nhbBoot .nb-title{font-size:30px}}
@media (max-height:520px){#nhbBoot .nb-title{font-size:28px}#nhbBoot .nb-panel{gap:4px}#nhbBoot .nb-slot{min-height:60px}}
@media (prefers-reduced-motion:reduce){
  #nhbBoot .nb-art img,#nhbBoot .nb-tile.lit,#nhbBoot .nb-house.home,#nhbBoot .nb-hero img{animation:none}
  #nhbBoot .nb-go{animation:none}
}
