/* Snowfold home: the trail map, unfolded in the snow.
   One stylesheet for everything inside #home-screen. Colours and typefaces
   come from powder-atlas-theme.css. Layers, back to front:
   sky and peaks, far snow, the map sheet, the snowbank, pins and notes,
   controls, the cover card, near snow. */

/* ---------- Light ---------- */
@property --sky-top { syntax:"<color>"; inherits:true; initial-value:#86b6d0; }
@property --sky-mid { syntax:"<color>"; inherits:true; initial-value:#c3dce6; }
@property --sky-low { syntax:"<color>"; inherits:true; initial-value:#f3ecda; }

body.home-mode { background:var(--night); }
body.home-mode main { display:none; }

#home-screen {
  /* Day. home-atmosphere.js sets data-sky from the visitor's clock. */
  --sky-top:#86b6d0;
  --sky-mid:#c3dce6;
  --sky-low:#f3ecda;
  --peak:#9bb8c9;
  --peak-shade:#7fa1b6;
  --peak-snow:#fafdfd;
  --hill:#4f7f8f;
  --hill-snow:#e6f0f3;
  --pine:#1f4b45;
  --pine-snow:#f4f9fa;
  --drift:#f8fbfc;
  --drift-shade:#d2e1e8;
  --drift-line:#a5c0cf;
  --orb:#fff7dc;
  --orb-halo:#fff3c85c;
  --scene-ink:var(--powder-ink);
  --sheet-wash:#ffffff;
  --sheet-wash-opacity:0;
  --sheet-shadow:#0b223366;
  --pin-glow:transparent;
  --atlas-label-ink:var(--powder-ink);
  --atlas-label-paper:var(--powder-light);
  --atlas-place-ink:#344e59;

  position:relative;
  isolation:isolate;
  width:100%;
  height:calc(100svh - var(--header-height, 50px));
  min-height:0;
  margin:0;
  overflow:hidden;
  /* The sky's whole range of colour sits in the band above the map, which
     home-atmosphere.js measures as --sky-start to --sky-end. */
  background:linear-gradient(var(--sky-top) var(--sky-start, 0px), var(--sky-mid) calc(var(--sky-start, 0px) + (var(--sky-end, 30%) - var(--sky-start, 0px)) * .6), var(--sky-low) calc(var(--sky-end, 30%) + 20px));
  color:var(--powder-ink);
  font-family:var(--font-sign);
  touch-action:none;
  cursor:grab;
  transition:--sky-top 1.4s ease, --sky-mid 1.4s ease, --sky-low 1.4s ease;
}
#home-screen[data-sky=dawn] {
  --sky-top:#7da0c4;
  --sky-mid:#e9c5b6;
  --sky-low:#fde6c6;
  --peak:#8c9cbd;
  --peak-shade:#75839f;
  --peak-snow:#fff0e6;
  --hill:#566f8a;
  --hill-snow:#f6e2dc;
  --pine:#233f4a;
  --pine-snow:#fbeee8;
  --drift:#fff6f0;
  --drift-shade:#e6d3d6;
  --drift-line:#c3a9b6;
  --orb:#ffe1ad;
  --orb-halo:#ffd59a66;
  --sheet-wash:#ffd9c2;
  --sheet-wash-opacity:.22;
}
#home-screen[data-sky=dusk] {
  --sky-top:#2a4669;
  --sky-mid:#b97c84;
  --sky-low:#f4b47c;
  --peak:#586b8f;
  --peak-shade:#43557a;
  --peak-snow:#f9cfb6;
  --hill:#2f4567;
  --hill-snow:#dcb7b0;
  --pine:#13283c;
  --pine-snow:#e7c6bc;
  --drift:#efe2e4;
  --drift-shade:#b9abc0;
  --drift-line:#8f86a6;
  --orb:#ffc681;
  --orb-halo:#ffb26a70;
  --scene-ink:var(--powder-cream);
  --sheet-wash:#e9b9a4;
  --sheet-wash-opacity:.4;
  --sheet-shadow:#06141f8c;
}
#home-screen[data-sky=night] {
  --sky-top:#06152a;
  --sky-mid:#102d49;
  --sky-low:#25506c;
  --peak:#1d3d59;
  --peak-shade:#152f47;
  --peak-snow:#a8c3d6;
  --hill:#122c44;
  --hill-snow:#7c9db6;
  --pine:#071826;
  --pine-snow:#9bb7ca;
  --drift:#bfd3e0;
  --drift-shade:#86a4bb;
  --drift-line:#5f819c;
  --orb:#f6f3e2;
  --orb-halo:#dfe9f22e;
  --scene-ink:var(--powder-cream);
  --sheet-wash:#6384b6;
  --sheet-wash-opacity:.86;
  --sheet-shadow:#020a12b3;
  --pin-glow:#f0b844;
  --atlas-label-ink:var(--powder-cream);
  --atlas-label-paper:var(--night);
  --atlas-place-ink:#e6edf0;
}

#home-screen:focus-visible { outline:2px solid var(--powder-gold); outline-offset:-3px; }
#home-screen.atlas-dragging { cursor:grabbing; user-select:none; }
#home-screen [hidden] { display:none !important; }

/* ---------- Sky, peaks and snowbank ---------- */
#home-screen :is(.home-scene,.home-drift) {
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
}
#home-screen .home-scene { z-index:0; transform-origin:50% 30%; transition:transform .7s var(--ease-settle); }
/* The country behind recedes a little when the visitor leans in to the map. */
#home-screen[data-atlas-national=false] .home-scene { transform:scale(1.05); }
#home-screen .home-drift {
  z-index:2;
  transition:transform .5s var(--ease-settle), opacity .3s ease;
}
/* The snowbank steps aside once the visitor zooms into the map. */
#home-screen[data-atlas-national=false] .home-drift { transform:translateY(60px); opacity:0; }
#home-screen :is(.home-scene,.home-drift) svg { position:absolute; inset:0; display:block; width:100%; height:100%; }
#home-screen :is(.home-scene,.home-drift) svg * { transition:fill 1.4s ease, stroke 1.4s ease, opacity 1.4s ease; }
.scene-peak { fill:var(--peak); }
.scene-peak-shade { fill:var(--peak-shade); }
.scene-peak-snow { fill:var(--peak-snow); }
.scene-hill { fill:var(--hill); }
.scene-hill-snow { fill:var(--hill-snow); }
.scene-pine { fill:var(--pine); }
.scene-pine-snow { fill:var(--pine-snow); }
.scene-drift { fill:var(--drift); }
.scene-drift-shade { fill:var(--drift-shade); }
.scene-drift-line { fill:none; stroke:var(--drift-line); stroke-width:1.2; stroke-linecap:round; opacity:.7; }
.scene-orb { fill:var(--orb); }
.scene-orb-halo { fill:var(--orb-halo); }
.scene-moon-shade { fill:var(--sky-top); opacity:0; }
.scene-star { fill:#fff8e2; opacity:0; }
.scene-cabin { fill:var(--pine); }
.scene-cabin-light { fill:var(--powder-gold); opacity:0; }
.scene-smoke { fill:none; stroke:var(--drift); stroke-width:2.4; stroke-linecap:round; opacity:.75; }
.scene-lift-line { fill:none; stroke:var(--pine); stroke-width:1; opacity:.75; }
.scene-lift-chair { fill:var(--pine); }
#home-screen[data-sky=night] .scene-moon-shade { opacity:1; }
#home-screen[data-sky=night] .scene-star { opacity:.9; }
#home-screen:is([data-sky=night],[data-sky=dusk]) .scene-cabin-light { opacity:1; }
.scene-star:nth-child(3n) { animation:scene-twinkle 4.6s ease-in-out infinite; }
.scene-star:nth-child(3n+1) { animation:scene-twinkle 6.2s ease-in-out -2.4s infinite; }
.scene-smoke { animation:scene-smoke 7s ease-in-out infinite; transform-box:fill-box; transform-origin:50% 100%; }
.scene-lift-chairs { animation:scene-lift 46s linear infinite; }
.scene-orb-group { transition:transform 1.4s var(--ease-settle); }
@keyframes scene-twinkle { 50% { opacity:.25; } }
@keyframes scene-smoke { 0%,100% { transform:skewX(-5deg) scaleY(.94); opacity:.55; } 50% { transform:skewX(7deg) scaleY(1.06); opacity:.8; } }
@keyframes scene-lift { to { transform:translate(var(--lift-dx), var(--lift-dy)); } }

#home-screen .home-snow {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  contain:strict;
}
#home-screen .home-snow-far { z-index:0; }
#home-screen .home-snow-near { z-index:6; }

/* ---------- The map sheet ---------- */
#home-screen #home-landscape {
  position:absolute;
  inset:0;
  z-index:1;
  overflow:hidden;
  pointer-events:none;
}
/* Paper under the artwork, and the sheet's shadow on the snow. */
#home-screen[data-atlas-national] #home-landscape::before {
  content:"";
  position:absolute;
  inset:var(--atlas-sheet-top) auto auto var(--atlas-sheet-left);
  width:var(--atlas-sheet-width);
  aspect-ratio:3200 / 1445;
  background:var(--paper-grain), var(--powder-paper);
  box-shadow:0 0 0 5px var(--powder-cream), 0 0 0 6px var(--powder-ink), 0 30px 34px -22px var(--sheet-shadow), 7px 9px 0 3px #0b223326;
}
/* Fold creases and the printed neat line, above the artwork. */
#home-screen[data-atlas-national] #home-landscape::after {
  content:"";
  position:absolute;
  inset:var(--atlas-sheet-top) auto auto var(--atlas-sheet-left);
  width:var(--atlas-sheet-width);
  aspect-ratio:3200 / 1445;
  border:1px solid #15344ab3;
  background:
    linear-gradient(90deg, transparent calc(25% - 1px), #15344a2d calc(25% - 1px) 25%, #fffaeb6c 25% calc(25% + 1px), transparent calc(25% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), #fffaeb6c calc(50% - 1px) 50%, #15344a2d 50% calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(75% - 1px), #15344a2d calc(75% - 1px) 75%, #fffaeb6c 75% calc(75% + 1px), transparent calc(75% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), #15344a26 calc(50% - 1px) 50%, #fffaeb60 50% calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, #15344a14, transparent 3% 22%, #15344a12 25%, #fffaeb1f 26%, transparent 31% 46%, #fffaeb1c 50%, #15344a12 51%, transparent 56% 72%, #15344a12 75%, #fffaeb1f 76%, transparent 81% 97%, #15344a14);
  pointer-events:none;
}
#home-screen[data-atlas-national=false] #home-landscape::before { box-shadow:0 0 0 5px var(--powder-cream), 0 0 0 6px var(--powder-ink); }
/* Creases belong to the whole sheet. Up close they would read as scratches. */
#home-screen #home-landscape::after { transition:opacity .3s ease; }
#home-screen[data-atlas-national=false] #home-landscape::after { opacity:0; }
#home-screen[data-art-unavailable=true] #home-landscape::after { background:none; }

#home-screen .atlas-art {
  position:absolute;
  inset:0 auto auto 0;
  transform-origin:0 0;
  pointer-events:none;
}
#home-screen.atlas-moving .atlas-art { will-change:transform; }
#home-screen #atlas-image { display:block; width:100%; height:100%; max-width:none; object-fit:fill; }
#home-screen .atlas-detail {
  position:absolute;
  z-index:2;
  display:block;
  max-width:none;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
#home-screen .atlas-detail.is-visible { opacity:1; transition:opacity .24s ease; }

/* Light on the paper: the time-of-day wash and slow cloud shadows. Both are
   decoration and say nothing about the weather at any resort. */
#home-screen .atlas-paper {
  position:absolute;
  inset:0;
  z-index:4;
  overflow:hidden;
  pointer-events:none;
}
/* Away from midday the whole layer multiplies into the artwork, so the
   paper takes the colour of the hour. At midday nothing needs blending. */
#home-screen:is([data-sky=dawn],[data-sky=dusk],[data-sky=night]) .atlas-paper { mix-blend-mode:multiply; }
#home-screen .atlas-paper::before {
  content:"";
  position:absolute;
  inset:0;
  background:var(--sheet-wash);
  opacity:var(--sheet-wash-opacity);
  transition:opacity 1.4s ease, background-color 1.4s ease;
}
#home-screen .atlas-cloud {
  position:absolute;
  top:var(--cloud-top, 8%);
  left:-34%;
  width:34%;
  height:var(--cloud-height, 44%);
  background:radial-gradient(closest-side, #15344a 0, #15344acc 38%, #15344a55 68%, transparent 100%);
  opacity:var(--cloud-opacity, .1);
  animation:atlas-cloud var(--cloud-time, 150s) linear var(--cloud-delay, 0s) infinite;
  will-change:transform;
}
#home-screen .atlas-cloud:nth-child(2) { --cloud-top:42%; --cloud-height:52%; --cloud-time:190s; --cloud-delay:-70s; --cloud-opacity:.085; width:42%; left:-42%; }
#home-screen .atlas-cloud:nth-child(3) { --cloud-top:-6%; --cloud-height:36%; --cloud-time:230s; --cloud-delay:-150s; --cloud-opacity:.075; width:28%; left:-28%; }
#home-screen[data-sky=night] .atlas-cloud { display:none; }
@keyframes atlas-cloud { to { transform:translateX(420%); } }

/* ---------- The cover card ---------- */
#home-screen .home-copy {
  position:absolute;
  z-index:5;
  top:20px;
  left:22px;
  width:304px;
  padding:14px 15px 14px 20px;
  border:1px solid var(--powder-ink);
  border-radius:2px;
  background:var(--paper-grain), var(--powder-cream);
  box-shadow:5px 5px 0 #0b223347;
  cursor:auto;
  pointer-events:auto;
}
#home-screen .home-copy::before {
  content:"";
  position:absolute;
  inset:-1px auto -1px -1px;
  width:6px;
  background:linear-gradient(var(--powder-ink) 0 54%, var(--powder-red) 54% 80%, var(--powder-gold) 80%);
  pointer-events:none;
}
#home-screen .home-eyebrow {
  width:max-content;
  max-width:100%;
  padding:3px 7px 2px;
  background:var(--powder-ink);
  color:var(--powder-cream);
  font:500 10px/1.3 var(--font-data);
  letter-spacing:.11em;
  text-transform:uppercase;
}
#home-screen .home-copy h1 {
  margin:9px 0 5px;
  color:var(--powder-ink);
  font:800 38px/1 var(--font-display);
  letter-spacing:-.035em;
}
#home-screen .home-copy h1 em {
  color:var(--powder-red);
  font-style:italic;
  font-weight:600;
  letter-spacing:-.03em;
}
#home-screen .atlas-title > p {
  margin:0;
  color:var(--powder-ink);
  font:italic 500 15px/1.35 var(--font-display);
}
#home-screen :is(.home-search,.home-state-select) {
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  min-width:0;
  height:40px;
  padding:0 11px;
  border:1px solid var(--powder-rule);
  border-radius:2px;
  background:var(--powder-light);
  color:var(--powder-ink);
}
#home-screen .home-search { margin:13px 0 7px; }
#home-screen .home-state-select { background:var(--powder-tint); }
#home-screen :is(.home-search,.home-state-select) > [data-icon] { display:flex; flex:0 0 17px; width:17px; }
#home-screen :is(.home-search,.home-state-select) .icon { width:17px; height:17px; stroke-width:1.8; }
#home-screen :is(.home-search input,.home-state-select select) {
  width:100%;
  min-width:0;
  height:100%;
  padding:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--powder-ink);
  font:600 14px/1.3 var(--font-sign);
  letter-spacing:.005em;
}
#home-screen .home-search input::placeholder { color:var(--powder-muted); opacity:1; font-weight:500; }
#home-screen .home-search input:placeholder-shown::-webkit-search-cancel-button { display:none; }
#home-screen .home-state-select select {
  appearance:none;
  padding-right:20px;
  text-overflow:ellipsis;
  cursor:pointer;
  background:var(--powder-select-chevron) right 1px center / 11px 8px no-repeat;
}
#home-screen :is(.home-search,.home-state-select):focus-within {
  border-color:var(--powder-ink);
  outline:2px solid var(--powder-ink);
  outline-offset:1px;
}
#home-screen .home-search-results {
  margin-top:11px;
  max-height:min(250px, max(84px, 100svh - 342px));
  overflow-y:auto;
  overscroll-behavior:contain;
  border-top:1px solid var(--powder-line);
}
#home-screen .home-search-results a {
  position:relative;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:9px 26px 8px 4px;
  border-bottom:1px solid var(--powder-line);
  color:var(--powder-ink);
  text-decoration:none;
}
#home-screen .home-search-results a:is(:hover,:focus-visible) { background:var(--powder-tint); }
#home-screen .home-search-results strong { font:700 17px/1.15 var(--font-display); letter-spacing:-.015em; }
#home-screen .home-search-results small { color:var(--powder-muted); font:500 11px/1.4 var(--font-data); }
#home-screen .home-search-results a > span { position:absolute; right:6px; top:12px; color:var(--powder-red); }
#home-screen .home-copy > p.home-empty { margin:12px 0 0; font:500 13px/1.45 var(--font-sign); }
#home-screen .home-season { display:none; }
#home-screen .home-map-status { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

/* ---------- Resort pins and place names ---------- */
#home-screen #home-map-pins {
  position:absolute;
  inset:0;
  z-index:3;
  overflow:hidden;
  pointer-events:none;
}
#home-screen .atlas-resort-pin {
  position:absolute;
  top:0;
  left:0;
  display:block;
  width:44px;
  height:44px;
  margin:-22px 0 0 -22px;
  border-radius:50%;
  color:var(--powder-red);
  text-decoration:none;
  isolation:isolate;
  touch-action:manipulation;
  pointer-events:none;
}
#home-screen .atlas-dot-stem {
  position:absolute;
  left:22px;
  top:22px;
  overflow:visible;
  pointer-events:none;
  stroke:var(--powder-ink);
  stroke-opacity:.55;
  stroke-width:1;
}
#home-screen[data-sky=night] .atlas-dot-stem {stroke:var(--powder-cream);}
#home-screen .atlas-pin-face {
  position:absolute;
  inset:0;
  transform:translate(var(--atlas-dot-x, 0px), var(--atlas-dot-y, 0px));
  pointer-events:none;
}
/* Give an isolated mountain a larger hit area and split the gap between neighbors. */
#home-screen .atlas-pin-face::before {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:var(--atlas-pin-hit, 44px);
  height:var(--atlas-pin-hit, 44px);
  border-radius:50%;
  transform:translate(-50%, -50%);
  cursor:pointer;
  pointer-events:auto;
}
/* An ink ring spreads from the dot when a pin is pointed at. */
#home-screen .atlas-pin-face::after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:14px;
  height:14px;
  margin:-7px 0 0 -7px;
  border:1.5px solid currentColor;
  border-radius:50%;
  opacity:0;
  pointer-events:none;
}
#home-screen .atlas-resort-pin:is(:hover,:focus-visible,.is-selected) .atlas-pin-face::after { animation:pin-ripple 1.1s var(--ease-settle) infinite; }
@keyframes pin-ripple { from { opacity:.85; transform:scale(.6); } to { opacity:0; transform:scale(2.9); } }
#home-screen :is(.atlas-resort-pin,.atlas-place)[hidden] { display:none !important; }
#home-screen .atlas-resort-pin .atlas-pin-mark {
  position:absolute;
  inset:0;
  margin:auto;
  width:var(--atlas-dot-diameter,14px);
  height:var(--atlas-dot-diameter,14px);
  pointer-events:none;
}
#home-screen[data-atlas-grouped=true] .atlas-resort-pin:is(:hover,:focus-visible,.is-selected) .atlas-pin-mark {transform:scale(1.22);}
#home-screen .atlas-pin-leader {
  position:absolute;
  left:22px;
  top:22px;
  overflow:visible;
  pointer-events:none;
  filter:drop-shadow(0 0 1px var(--atlas-label-paper));
}
#home-screen .atlas-pin-leader line { stroke:var(--powder-ink); stroke-width:1; stroke-linecap:round; vector-effect:non-scaling-stroke; }
#home-screen[data-sky=night] .atlas-pin-leader line { stroke:var(--powder-cream); }
#home-screen .atlas-resort-pin[data-displaced=false] .atlas-pin-leader { display:none; }

#home-screen .atlas-resort-label {
  position:absolute;
  top:0;
  left:22px;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:max-content;
  max-width:200px;
  transform:translate(-50%, -50%);
  cursor:pointer;
  pointer-events:auto;
}
#home-screen .atlas-resort-label > b {
  display:block;
  padding:2px 6px 1px;
  border:1px solid transparent;
  border-radius:2px;
  color:var(--atlas-label-ink);
  font:700 14px/1.15 var(--font-sign);
  letter-spacing:.01em;
  paint-order:stroke fill;
  -webkit-text-stroke:3px var(--atlas-label-paper);
  white-space:nowrap;
  transition:background-color .15s ease, color .15s ease, transform .2s var(--ease-paper);
}
#home-screen .atlas-resort-label > small {
  position:absolute;
  top:calc(100% + 4px);
  min-width:100%;
  padding:5px 8px 4px;
  border:1px solid var(--powder-ink);
  border-radius:2px;
  background:var(--powder-cream);
  box-shadow:2px 2px 0 #15344a40;
  color:var(--powder-ink);
  font:500 10px/1.2 var(--font-data);
  text-align:center;
  white-space:nowrap;
  visibility:hidden;
  pointer-events:none;
}
#home-screen .atlas-resort-pin[data-compact=true] :is(.atlas-resort-label,.atlas-pin-leader) { visibility:hidden; pointer-events:none; }
#home-screen .atlas-resort-pin:is(:hover,:focus-visible,.is-selected) { z-index:9; color:var(--powder-ink); }
#home-screen[data-sky=night] .atlas-resort-pin:is(:hover,:focus-visible,.is-selected) { color:var(--powder-cream); }
#home-screen .atlas-resort-pin:focus-visible { outline:none; }
#home-screen .atlas-resort-pin:focus-visible .atlas-pin-face::before {
  outline:2px solid var(--powder-ink);
  outline-offset:1px;
  box-shadow:0 0 0 4px var(--powder-cream);
}
#home-screen .atlas-resort-pin:is(:hover,:focus-visible) :is(.atlas-resort-label,.atlas-pin-leader,.atlas-resort-label > small) { visibility:visible; }
#home-screen .atlas-resort-pin:is(:hover,:focus-visible,.is-selected) .atlas-resort-label > b {
  background:var(--powder-ink);
  border-color:var(--powder-ink);
  box-shadow:2px 2px 0 #15344a40;
  color:var(--powder-cream);
  -webkit-text-stroke:0;
  transform:translateY(-1px);
}
#home-screen .atlas-resort-pin:focus-visible .atlas-resort-label > b { outline:2px solid var(--powder-gold); }
#home-screen .atlas-resort-pin[data-muted=true] { opacity:.65; }
#home-screen .atlas-resort-pin[data-muted=true]:is(:hover,:focus-visible,.is-selected) { opacity:1; }

#home-screen .atlas-place {
  position:absolute;
  top:0;
  left:0;
  color:var(--atlas-place-ink);
  font:700 10px/1.2 var(--font-sign);
  letter-spacing:.16em;
  paint-order:stroke fill;
  -webkit-text-stroke:2px var(--atlas-label-paper);
  white-space:nowrap;
  pointer-events:none;
}
#home-screen .atlas-place-water {
  color:#fff0cc;
  font:italic 500 16px/1.2 var(--font-display);
  letter-spacing:.04em;
  -webkit-text-stroke:2px #1d4d61;
  text-shadow:0 1px #1d4d61;
}

/* ---------- Characters and field notes ---------- */
#home-screen .atlas-discoveries { position:absolute; inset:0; pointer-events:none; }
#home-screen .atlas-sheet-rose {
  position:absolute;
  z-index:2;
  inset:0 auto auto 0;
  object-fit:contain;
  pointer-events:none;
}
#home-screen .atlas-discovery-marker {
  position:absolute;
  z-index:3;
  inset:0 auto auto 0;
  display:block;
  min-width:44px;
  min-height:44px;
  margin:0;
  padding:0;
  border:0;
  border-radius:16%;
  background:transparent;
  color:var(--powder-ink);
  cursor:pointer;
  pointer-events:auto;
  touch-action:manipulation;
}
#home-screen .atlas-discovery-marker:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
#home-screen .atlas-discovery-sprite {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 1px 0 #fff0cdb0);
  transform-origin:50% 92%;
  animation:discovery-idle 5.2s ease-in-out infinite;
  pointer-events:none;
}
/* Each character keeps its own time. */
#home-screen .atlas-discovery-marker:nth-child(2n) .atlas-discovery-sprite { animation-duration:6.4s; animation-delay:-2.1s; }
#home-screen .atlas-discovery-marker:nth-child(3n) .atlas-discovery-sprite { animation-duration:4.4s; animation-delay:-1.2s; }
#home-screen .atlas-discovery-marker:is(:hover,:focus-visible,[aria-expanded=true]) .atlas-discovery-sprite { animation:discovery-hop .5s var(--ease-paper) both; }
@keyframes discovery-idle {
  0%,100% { transform:translateY(0) rotate(-1.2deg); }
  50% { transform:translateY(-2px) rotate(1.4deg); }
}
@keyframes discovery-hop {
  40% { transform:translateY(-6px) rotate(-5deg) scale(1.06); }
  100% { transform:translateY(-2px) rotate(-3deg) scale(1.04); }
}
#home-screen .atlas-discovery-sign {
  position:absolute;
  right:3px;
  bottom:3px;
  display:grid;
  width:16px;
  height:16px;
  place-items:center;
  border:1px solid currentColor;
  border-radius:50%;
  background:var(--powder-cream);
  color:var(--powder-red);
  font:12px/1 var(--font-sign);
  pointer-events:none;
  animation:discovery-sign 3.4s ease-in-out infinite;
}
@keyframes discovery-sign { 0%,70%,100% { transform:scale(1); } 80% { transform:scale(1.22) rotate(18deg); } }
#home-screen .atlas-discovery-sprite[hidden] + .atlas-discovery-sign { top:50%; right:50%; bottom:auto; margin:-8px -8px 0 0; }
#home-screen .atlas-discovery-marker:is(:hover,:focus-visible,[aria-expanded=true]) .atlas-discovery-sign {
  background:var(--powder-red);
  color:var(--powder-cream);
}
#home-screen .atlas-discovery-card {
  position:absolute;
  z-index:8;
  inset:0 auto auto 0;
  width:min(300px, calc(100% - 24px));
  max-height:calc(100% - 24px);
  overflow:auto;
  box-sizing:border-box;
  padding:16px 16px 15px;
  border:1px solid var(--powder-ink);
  border-radius:2px;
  background:var(--paper-grain), var(--powder-cream);
  color:var(--powder-ink);
  box-shadow:5px 5px 0 #0b223347;
  cursor:auto;
  pointer-events:auto;
  touch-action:pan-y;
  animation:note-unfold .32s var(--ease-paper) both;
  transform-origin:50% 0;
}
@keyframes note-unfold { from { opacity:0; transform:perspective(600px) rotateX(-38deg) scale(.96); } }
#home-screen .atlas-discovery-kicker {
  padding-right:30px;
  color:var(--powder-red);
  font:500 10px/1.4 var(--font-data);
  letter-spacing:.1em;
  text-transform:uppercase;
}
#home-screen .atlas-discovery-title {
  margin:5px 28px 7px 0;
  color:inherit;
  font:800 23px/1.02 var(--font-display);
  letter-spacing:-.025em;
}
#home-screen .atlas-discovery-story { margin:0; color:inherit; font:500 14px/1.5 var(--font-sign); }
#home-screen .atlas-discovery-portrait { float:right; width:64px; height:62px; margin:-1px 0 0 6px; object-fit:contain; }
#home-screen .atlas-discovery-close {
  position:absolute;
  top:2px;
  right:2px;
  display:grid;
  width:44px;
  height:44px;
  place-items:center;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:500 24px/1 var(--font-sign);
  cursor:pointer;
}
#home-screen .atlas-discovery-close:hover { color:var(--powder-red); }
#home-screen .atlas-discovery-close:focus-visible { outline:2px solid currentColor; outline-offset:-5px; }

/* ---------- Map controls and margin notes ---------- */
#home-screen .atlas-map-controls {
  position:absolute;
  z-index:4;
  right:22px;
  bottom:20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  cursor:auto;
}
#home-screen .atlas-map-controls button,
#home-screen .atlas-zoom {
  border:1px solid var(--powder-ink);
  border-radius:2px;
  background:var(--powder-cream);
  color:var(--powder-ink);
  box-shadow:3px 3px 0 #0b22334d;
}
#home-screen .atlas-map-controls button {
  display:grid;
  place-items:center;
  width:46px;
  height:44px;
  min-height:0;
  padding:0;
  transition:background-color .15s ease, transform .15s var(--ease-paper);
}
#home-screen .atlas-map-controls button .icon { width:21px; height:21px; stroke-width:1.9; }
#home-screen .atlas-map-controls button:hover:not(:disabled) { background:var(--powder-gold); filter:none; }
#home-screen .atlas-map-controls button:active:not(:disabled) { transform:translate(2px, 2px); }
#home-screen .atlas-map-controls button:focus-visible { outline:2px solid var(--powder-ink); outline-offset:-4px; }
#home-screen .atlas-map-controls button:disabled { color:#15344a70; cursor:default; }
#home-screen .atlas-map-controls #atlas-reset { background:var(--powder-gold); }
#home-screen .atlas-map-controls #atlas-reset:hover { background:#f8d27c; }
/* Says which light was chosen, briefly, beside the light button. */
#home-screen .atlas-light-note {
  position:absolute;
  right:calc(100% + 9px);
  bottom:50px;
  padding:6px 9px 5px;
  border-radius:2px;
  background:var(--powder-ink);
  color:var(--powder-cream);
  font:500 10px/1.2 var(--font-data);
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
  opacity:0;
  transform:translateX(6px);
  transition:opacity .2s ease, transform .2s var(--ease-settle);
  pointer-events:none;
}
#home-screen .atlas-light-note.is-shown { opacity:1; transform:none; }
#home-screen .atlas-zoom { overflow:hidden; }
#home-screen .atlas-zoom button { width:44px; height:44px; border:0; border-radius:0; background:transparent; box-shadow:none; }
#home-screen .atlas-zoom button:active:not(:disabled) { transform:none; background:var(--powder-tint); }
#home-screen .atlas-zoom button + button { border-top:1px solid var(--powder-rule); }
#home-screen .atlas-compass {
  position:relative;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  pointer-events:none;
}
#home-screen .atlas-compass svg { width:44px; height:44px; overflow:visible; }
#home-screen .atlas-compass .compass-ring { fill:var(--powder-cream); stroke:var(--powder-ink); stroke-width:1.2; }
#home-screen .atlas-compass .compass-north { fill:var(--powder-red); }
#home-screen .atlas-compass .compass-south { fill:var(--powder-ink); opacity:.28; }
#home-screen .atlas-compass .compass-tick { fill:none; stroke:var(--powder-ink); stroke-width:1.2; stroke-linecap:round; }
#home-screen .atlas-compass b {
  position:absolute;
  top:-12px;
  left:50%;
  transform:translateX(-50%);
  color:var(--scene-ink);
  font:700 10px/1 var(--font-sign);
  letter-spacing:.04em;
  paint-order:stroke fill;
  -webkit-text-stroke:2px var(--atlas-label-paper);
}
#home-screen[data-sky=dusk] .atlas-compass b { -webkit-text-stroke-color:var(--powder-ink); }

#home-screen :is(.atlas-map-hint,.atlas-map-note) {
  position:absolute;
  z-index:4;
  bottom:20px;
  padding:6px 9px 5px;
  border:1px solid var(--powder-ink);
  border-radius:2px;
  background:var(--powder-cream);
  color:var(--powder-ink);
  font:500 10px/1.2 var(--font-data);
  letter-spacing:.01em;
  white-space:nowrap;
  pointer-events:none;
}
#home-screen .atlas-map-hint { left:22px; display:flex; gap:5px; }
#home-screen .atlas-map-note { right:80px; }
#home-screen :is(.atlas-key-resort,.atlas-key-relief,.atlas-key-summit) {
  display:inline-block;
  vertical-align:-1px;
}
#home-screen .atlas-key-resort {
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--powder-red);
}
#home-screen[data-sky=night] .atlas-key-resort {
  border:1px solid var(--powder-ink);
  background:var(--powder-gold);
}
#home-screen .atlas-key-relief {
  width:12px;
  height:8px;
  margin-inline-start:4px;
  border:1px solid #15344a82;
  background:linear-gradient(142deg, #f8edd5 38%, #95a6ae 38% 67%, #516d7b 67%);
}
#home-screen .atlas-summit-key { display:none; }
@media (width > 760px) {
  #home-screen[data-atlas-national=false] .atlas-summit-key {
    display:inline;
    margin-inline-start:4px;
  }
}
#home-screen .atlas-key-summit {
  position:relative;
  width:9px;
  height:9px;
}
#home-screen :is(.atlas-pinch-hint,.atlas-national-caption) { display:none; }
/* A paper tag tied to the corner of the sheet. */
#home-screen .atlas-national-caption {
  position:absolute;
  z-index:4;
  align-items:baseline;
  gap:5px 8px;
  padding:7px 10px 7px 9px;
  border:1px solid var(--powder-ink);
  border-left:4px solid var(--powder-gold);
  border-radius:2px;
  background:var(--paper-grain), var(--powder-cream);
  box-shadow:3px 3px 0 #0b22333d;
  color:var(--powder-ink);
  font:500 12px/1.35 var(--font-sign);
  pointer-events:none;
}
#home-screen .atlas-national-caption strong {
  color:var(--powder-red);
  font:500 10px/1.15 var(--font-data);
  letter-spacing:.12em;
  text-transform:uppercase;
}
#home-screen .home-credit {
  position:absolute;
  z-index:4;
  left:50%;
  bottom:8px;
  width:max-content;
  max-width:calc(100% - 520px);
  transform:translateX(-50%);
  color:var(--powder-ink);
  font:400 9px/1.3 var(--font-data);
  letter-spacing:.02em;
  text-align:center;
  opacity:.72;
  pointer-events:none;
}
#home-screen[data-atlas-national=false] .home-credit {
  padding:3px 7px;
  background:var(--powder-cream);
  opacity:.9;
}

/* ---------- Arrival: the sheet unfolds ---------- */
/* Once per session the map arrives folded and opens along its creases.
   home-atmosphere.js builds .home-unfold and sizes it to the sheet. While
   it plays, the real map and its annotations wait underneath. */
#home-screen.home-unfolding :is(#home-landscape,#home-map-pins,.atlas-discoveries) { visibility:hidden; }
#home-screen .home-unfold {
  --unfold-time:1.15s;
  position:absolute;
  z-index:2;
  perspective:1700px;
  perspective-origin:50% 42%;
  pointer-events:none;
  transform:translateX(37.5%);
  animation:unfold-arrive .5s var(--ease-settle) both;
}
#home-screen .home-unfold.is-open { transform:none; transition:transform var(--unfold-time) var(--ease-settle); }
#home-screen .home-unfold.is-leaving { opacity:0; transition:opacity .24s ease; }
#home-screen .home-unfold-panel {
  position:absolute;
  top:0;
  left:100%;
  width:100%;
  height:100%;
  transform-style:preserve-3d;
  transform-origin:0 50%;
  transform:rotateY(var(--fold));
}
#home-screen .home-unfold > .home-unfold-panel { left:0; width:25%; }
#home-screen .home-unfold.is-open .home-unfold-panel { transform:none; transition:transform var(--unfold-time) var(--ease-settle); }
#home-screen .home-unfold-face,
#home-screen .home-unfold-back {
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  box-shadow:0 0 0 1px #15344a80;
}
#home-screen .home-unfold-face { background-size:400% 100%; background-color:var(--powder-paper); }
/* Each panel is shaded while it is turned away from the light. */
#home-screen .home-unfold-face::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, #15344a61, #15344a1f 34% 66%, #15344a52);
  transition:opacity var(--unfold-time) ease;
}
#home-screen .home-unfold.is-open .home-unfold-face::after { opacity:0; }
#home-screen .home-unfold-back {
  transform:rotateY(180deg);
  background:var(--paper-grain), linear-gradient(90deg, #e9d9b6, var(--powder-cream) 38%, #efe0bd);
}
/* The outside of the folded map is its cover. */
#home-screen .home-unfold-cover {
  position:absolute;
  inset:0;
  display:grid;
  align-content:center;
  justify-items:center;
  gap:.5em;
  padding:8%;
  border-top:.5em solid var(--powder-ink);
  box-shadow:inset 0 .22em 0 var(--powder-red), inset 0 .4em 0 var(--powder-gold);
  color:var(--powder-ink);
  font-size:clamp(9px, 2.3vw, 30px);
  text-align:center;
  container-type:inline-size;
}
#home-screen .home-unfold-cover img { width:min(82%, 6.4em); height:auto; }
#home-screen .home-unfold-cover small { font:italic 500 .52em/1.2 var(--font-display); }
#home-screen .home-unfold-cover em { margin-top:.8em; padding:.4em .7em; background:var(--powder-ink); color:var(--powder-cream); font:500 .32em/1 var(--font-data); letter-spacing:.14em; text-transform:uppercase; }
@keyframes unfold-arrive { from { opacity:0; translate:0 18px; } }

/* When the sheet is open, pins drop in from west to east. */
#home-screen.home-arriving .atlas-resort-pin { animation:pin-drop .46s var(--ease-paper) both; animation-delay:calc(var(--pin-order, 0) * 16ms); }
#home-screen.home-arriving .atlas-discovery-marker { animation:pin-drop .5s var(--ease-paper) .5s both; }
@keyframes pin-drop { from { opacity:0; translate:0 -16px; } }

/* ---------- Layout: desktop and tablet ---------- */
@media (pointer:coarse) {
  #home-screen .atlas-scroll-hint { display:none; }
  #home-screen .atlas-pinch-hint { display:inline; }
}

@media (width > 760px) {
  #home-screen:is([data-state=all],:not([data-state])) .home-copy {
    display:grid;
    grid-template-columns:minmax(0, 1fr) 190px;
    gap:8px 18px;
    width:592px;
    padding:13px 15px 13px 22px;
  }
  #home-screen:is([data-state=all],:not([data-state])) .atlas-title {
    display:flex;
    flex-direction:column;
    justify-content:center;
    grid-area:1 / 1 / 3 / 2;
    min-width:0;
    padding-right:14px;
    border-right:2px dotted var(--powder-rule);
  }
  #home-screen:is([data-state=all],:not([data-state])) .home-copy h1 { margin:7px 0 3px; font-size:46px; }
  #home-screen:is([data-state=all],:not([data-state])) .home-search { grid-area:1 / 2; margin:0; }
  #home-screen:is([data-state=all],:not([data-state])) .home-state-select { grid-area:2 / 2; }
  #home-screen:is([data-state=all],:not([data-state])) .home-copy > :is(.home-search-results,.home-empty) { grid-column:1 / -1; }
}

@media (width >= 1050px) and (height > 790px) and (max-aspect-ratio:11/5) {
  #home-screen[data-atlas-national=true] .atlas-national-caption {
    top:24px;
    right:24px;
    display:flex;
    flex-direction:column;
    align-items:start;
    max-width:236px;
  }
}

/* Keep the Cascades clear when the map reaches into the upper margin. */
@media (width > 760px) and (height <= 790px), (width > 760px) and (min-aspect-ratio:11/5) {
  #home-screen:is([data-state=all],:not([data-state])) .home-copy { left:50%; margin-left:-296px; }
}
@media (width > 760px) and (height <= 540px) {
  #home-screen:is([data-state=all],:not([data-state])) .home-copy {
    top:12px;
    width:500px;
    margin-left:-250px;
    padding-block:8px;
    grid-template-columns:minmax(0, 1fr) 158px;
  }
  #home-screen:is([data-state=all],:not([data-state])) .home-copy h1 { font-size:32px; }
  #home-screen :is(.home-search,.home-state-select) { height:34px; gap:7px; padding-inline:8px; }
  #home-screen .home-credit { display:none; }
}
@media (width <= 1100px) {
  #home-screen .home-credit { display:none; }
}

/* ---------- Layout: phones ---------- */
@media (width <= 760px) {
  #home-screen .home-copy {
    top:12px;
    left:12px;
    display:grid;
    grid-template-columns:minmax(0, 1.15fr) minmax(0, 1fr);
    gap:0 7px;
    width:min(420px, calc(100% - 24px));
    padding:12px 12px 12px 17px;
  }
  #home-screen .home-copy > :not(.home-search,.home-state-select) { grid-column:1 / -1; }
  #home-screen .home-copy h1 { margin:8px 0 3px; font-size:clamp(34px, 10.5vw, 44px); }
  #home-screen .home-copy h1 em { white-space:nowrap; }
  #home-screen .atlas-title > p { font-size:14px; }
  #home-screen :is(.home-search,.home-state-select) { height:44px; margin:10px 0 0; gap:7px; padding:0 9px; }
  #home-screen :is(.home-search input,.home-state-select select) { font-size:16px; }
  #home-screen .home-search-results { max-height:min(220px, max(70px, 100svh - 265px)); }
  #home-screen .atlas-resort-label > b { font-size:13px; padding-inline:5px; }
  #home-screen .atlas-place { font-size:9px; letter-spacing:.1em; }
  #home-screen .atlas-place-water { font-size:12px; }
  #home-screen .atlas-map-controls { right:12px; bottom:14px; flex-direction:row; align-items:stretch; }
  #home-screen .atlas-map-controls button { width:44px; }
  #home-screen .atlas-zoom { display:flex; }
  #home-screen .atlas-zoom button + button { border-top:0; border-left:1px solid var(--powder-rule); }
  #home-screen .atlas-compass { display:none; }
  #home-screen .atlas-map-note { display:none; }
  #home-screen .atlas-light-note { right:0; bottom:calc(100% + 8px); }
  /* Two short lines beside the buttons: "Drag to pan" over "Pinch to zoom". */
  #home-screen .atlas-map-hint {
    left:12px;
    bottom:14px;
    flex-direction:column;
    gap:1px;
    padding:6px 8px 5px;
    line-height:1.35;
  }
  #home-screen .atlas-map-hint > [aria-hidden] { display:none; }
  #home-screen[data-atlas-national=true] {
    --atlas-mobile-footer-top:min(calc(100% - 60px), max(180px, calc(var(--atlas-sheet-top) + var(--atlas-sheet-width) * 1445 / 3200 + 16px)));
  }
  #home-screen[data-atlas-national=true] .atlas-map-controls {
    top:var(--atlas-mobile-footer-top);
    right:max(12px, calc(100% - var(--atlas-sheet-left) - var(--atlas-sheet-width)));
    bottom:auto;
  }
  /* Coast to coast, the field-guide tag carries the instructions and sits
     in the snow under the controls, leaving the peaks above the map clear. */
  #home-screen[data-atlas-national=true] .atlas-map-hint { display:none; }
  #home-screen[data-atlas-national=true] .atlas-national-caption {
    display:flex;
    top:calc(var(--atlas-mobile-footer-top) + 58px);
    left:max(12px, var(--atlas-sheet-left));
    right:max(12px, calc(100% - var(--atlas-sheet-left) - var(--atlas-sheet-width)));
    align-items:start;
    flex-direction:column;
    font-size:12px;
  }
  #home-screen .home-credit { display:none; }
}
@media(max-width:360px) {
  #home-screen .home-search-results[data-mode="browse"] { max-height:min(146px, max(70px, 100svh - 265px)); }
}
@media (width <= 760px) and (height < 600px) {
  #home-screen[data-atlas-national=true] .atlas-national-caption { display:none; }
}
@media (width <= 430px) {
  #home-screen .home-copy { grid-template-columns:minmax(0, 1.4fr) minmax(0, 1fr); }
  #home-screen .home-state-select > [data-icon] { display:none; }
}
@media (width <= 359px) {
  #home-screen .home-search > [data-icon] { display:none; }
  #home-screen .home-copy h1 { font-size:32px; }
}

/* ---------- Flying to a mountain ---------- */
.flight-ui { position:fixed; inset:0; z-index:45; pointer-events:none; }
.flight-caption {
  position:absolute;
  left:50%;
  bottom:9%;
  min-width:290px;
  padding:20px 34px;
  transform:translateX(-50%);
  text-align:center;
}
.flight-caption h2 { margin:9px 0 4px; }
.flight-track { height:3px; margin-top:16px; overflow:hidden; }
.flight-track i { display:block; width:0; height:100%; }
.flight-skip { position:absolute; top:29px; right:32px; padding:10px 14px; pointer-events:auto; }
.flight-active { overflow:hidden; }
.flight-active .home-screen { position:fixed; inset:0; z-index:40; display:block !important; height:100svh; min-height:0; }
.flight-active :is(.home-copy,.home-credit,.home-map-status,.home-map-pins,.home-drift,.atlas-map-controls,.atlas-map-hint,.atlas-map-note,.atlas-national-caption) { opacity:0; pointer-events:none; }
.home-screen.flight-exit { opacity:0; transition:opacity .6s; pointer-events:none; }
.flight-cloud {
  position:fixed;
  inset:0;
  z-index:44;
  opacity:0;
  background:
    radial-gradient(ellipse at 20% 30%, var(--snow-fresh) 0%, #eef4f6e0 35%, transparent 70%),
    radial-gradient(ellipse at 85% 65%, var(--snow-drift) 0%, #eef4f6d9 40%, transparent 75%);
  transition:opacity .55s;
  pointer-events:none;
}
.flight-cloud.covered { opacity:1; }
.flight-cloud.approaching:not(.covered) { opacity:.65; }
@media (width <= 760px) {
  .flight-caption { bottom:7%; padding:17px 23px; }
  .flight-skip { top:18px; right:18px; }
}

/* ---------- Stillness ---------- */
/* Reduced motion and Save-Data get the same scene, holding still. */
#home-screen.home-still :is(.atlas-cloud,.scene-star,.scene-smoke,.scene-lift-chairs,.atlas-discovery-sprite,.atlas-discovery-sign) { animation:none; }
#home-screen.home-still .atlas-cloud:nth-child(1) { transform:translateX(150%); }
#home-screen.home-still .atlas-cloud:nth-child(2) { transform:translateX(250%); }
#home-screen.home-still .atlas-cloud:nth-child(3) { transform:translateX(330%); }
@media (prefers-reduced-motion:reduce) {
  #home-screen, #home-screen * { transition:none !important; }
  #home-screen .atlas-cloud:nth-child(1) { transform:translateX(150%); }
  #home-screen .atlas-cloud:nth-child(2) { transform:translateX(250%); }
  #home-screen .atlas-cloud:nth-child(3) { transform:translateX(330%); }
  .home-screen.flight-exit, .flight-cloud { transition:none; }
}

#home-screen[data-state="Alaska"] :is(#atlas-image,.atlas-detail,.atlas-paper,.atlas-geography) { visibility: hidden; }
