/* Slope 26: Home on the real mountain.
   Alone, the home screen shows the game itself behind the cards (body.home-live, set by home-lobby.js): the painted
   sunset, the snow lift that brightened it and the heavy shade over it all step aside. In a party the painting and
   the crew stage stay as they were. */
body.home-live .home-lobby{background:none}
body.home-live .home-lobby::before{display:none}
body.home-live #menu.menu{background:none}
body.home-live .film{opacity:0}
/* Just enough shade behind the cards to keep their words readable over bright snow. */
body.home-live .home-vignette{background:
  linear-gradient(0deg,#06132047,transparent 26%,transparent 78%,#0817273d),
  linear-gradient(90deg,#0716243d,transparent 30%,transparent 74%,#07162433)}
/* The rider is the real one now, so the floating name card over the painting goes. */
body.home-live .home-nameplates.is-solo{display:none}

/* ---------- Today: weather, the daily run and the ride bonus; everything else waiting is a chip ---------- */
@media (orientation:landscape){.home-party-top:has(.home-day){width:min(268px,30vw);gap:8px}}
.home-day{grid-template-columns:minmax(0,1fr);gap:0;margin-top:0;border:1px solid var(--s26-line);border-radius:var(--s26-r-l);background:linear-gradient(160deg,rgba(22,48,63,.93),rgba(9,22,33,.95));box-shadow:var(--s26-lift);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.home-day>header{flex-wrap:wrap;gap:6px 8px;padding:11px 13px 9px;background:none;font:900 italic 17px/1 var(--s26-display);letter-spacing:.06em;color:var(--s26-ink)}
.home-day.is-new>header{background:none;color:var(--s26-ink)}
.home-day>header>b{margin-right:auto;white-space:nowrap}
.home-day.is-new>header>b{font-size:15px;color:var(--s26-accent)}
.home-day.is-new>header>em{display:none}
.home-day-weather{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:var(--s26-r-pill);background:rgba(143,227,245,.12);color:var(--s26-ice);font:800 10px/1 var(--s26-text);font-style:normal;letter-spacing:.09em;white-space:nowrap}
.home-day-weather>i{font-style:normal;font-size:12px;line-height:1}
.home-day>header>em{padding:5px 8px;font:800 9.5px/1 var(--s26-text)}
.home-day .home-today-row{min-height:52px;padding:8px 13px;border-top:1px solid var(--s26-line);background:none}
.home-day button.home-today-row:hover{background:rgba(255,255,255,.06)}
.home-day .home-today-copy>small{font:800 9.5px/1.2 var(--s26-text);letter-spacing:.1em;color:var(--s26-faint)}
.home-day .home-today-copy>strong{font:800 italic 16px/1.1 var(--s26-display);letter-spacing:.04em}
.home-day .home-today-row>em{padding:6px 9px;border-radius:var(--s26-r-pill);border:1px solid var(--s26-line);color:var(--s26-soft);font:800 9.5px/1 var(--s26-text)}
.home-day .home-today-row.is-ready>em{border-color:transparent;border-radius:var(--s26-r-pill)}
.home-day .home-today-row.is-done>em{border-color:rgba(127,224,176,.4)}
.home-day .home-today-row.is-daily:not(.is-done)>em{border-color:transparent;background:var(--s26-ink);color:var(--s26-night)}
.home-day .home-today-row.is-start{background:rgba(81,179,255,.1)}
/* Highlight a rival score that the rider can challenge. */
.home-day .home-today-row.is-rival{display:flex;align-items:stretch;gap:0;padding:0;background:linear-gradient(90deg,rgba(81,179,255,.22),rgba(81,179,255,.06));box-shadow:inset 3px 0 0 var(--s26-accent)}
.home-day .home-today-go{flex:1;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:10px 2px 11px 14px;border:0;background:none;color:inherit;text-align:left;cursor:pointer}
.home-day .home-today-go:hover{background:rgba(255,255,255,.06)}
.home-day .home-today-go small{color:#bae1fe}
.home-day .home-today-go small,.home-day .home-today-go strong{white-space:normal;overflow:visible}
.home-day .home-today-go>em{justify-self:start;padding:7px 11px;border-radius:var(--s26-r-pill);background:var(--s26-accent);color:var(--brand-navy);font:900 9.5px/1 var(--s26-text);font-style:normal;letter-spacing:.06em;white-space:nowrap}
.home-day .home-today-skip{flex:none;align-self:flex-start;width:34px;height:34px;border:0;background:none;color:var(--s26-soft);font:700 16px/1 var(--s26-text);cursor:pointer}
.home-day .home-today-skip:hover{color:var(--s26-ink);background:rgba(255,255,255,.08)}
.home-day .home-today-go:focus-visible,.home-day .home-today-skip:focus-visible{outline:2px solid var(--s26-ice);outline-offset:-2px}
.home-today-strip>button[data-today-chip="rival"]{border-color:var(--s26-accent);background:#0e2539;color:#bae1fe}
.home-day .home-today-week{gap:4px;margin-top:5px}
/* Where you stand on today's daily run, and the weekly streak freeze: one quiet line each under the row's title. */
.home-day .home-today-board,.home-day .home-today-ice{display:block;margin-top:4px;font:800 9.5px/1.25 var(--s26-text);letter-spacing:.07em;color:var(--s26-soft);white-space:normal}
.home-day .home-today-ice::before{content:'';display:inline-block;width:1em;height:1em;vertical-align:-.14em;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5v19M3.8 7.3l16.4 9.4M3.8 16.7l16.4-9.4M9.4 3.9 12 5.8l2.6-1.9M9.4 20.1 12 18.2l2.6 1.9M3.6 10.6l3.1-.3-1.3-2.9M20.4 13.4l-3.1.3 1.3 2.9M3.6 13.4l3.1.3-1.3 2.9M20.4 10.6l-3.1-.3 1.3-2.9M4.3 11.1 7.2 12l-.4 3.3M19.7 12.9 16.8 12l.4-3.3M4.3 12.9 7.2 12 6.8 8.7M19.7 11.1 16.8 12l.4 3.3'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5v19M3.8 7.3l16.4 9.4M3.8 16.7l16.4-9.4M9.4 3.9 12 5.8l2.6-1.9M9.4 20.1 12 18.2l2.6 1.9M3.6 10.6l3.1-.3-1.3-2.9M20.4 13.4l-3.1.3 1.3 2.9M3.6 13.4l3.1.3-1.3 2.9M20.4 10.6l-3.1-.3 1.3-2.9M4.3 11.1 7.2 12l-.4 3.3M19.7 12.9 16.8 12l.4-3.3M4.3 12.9 7.2 12 6.8 8.7M19.7 11.1 16.8 12l.4 3.3'/%3E%3C/svg%3E") center/contain no-repeat;margin-right:5px;font-weight:400}
.home-day .home-today-board::before{content:'';display:inline-block;width:6px;height:6px;margin:0 6px 1px 0;border-radius:50%;background:var(--s26-ice)}
.home-day .home-today-ice{color:var(--s26-faint)}
.home-day .home-today-row.is-frozen{background:linear-gradient(90deg,rgba(150,214,255,.16),rgba(150,214,255,.03));box-shadow:inset 3px 0 0 var(--s26-ice)}
.home-day .home-today-row.is-frozen .home-today-ice{color:var(--s26-ice)}
.home-day .home-today-week>i{width:16px;height:5px;border-radius:3px}
.home-day-more{min-width:0;display:flex;flex-wrap:wrap;gap:6px;padding:9px 11px 11px;border-top:1px solid var(--s26-line)}
.home-day-more>button{min-height:30px;padding:0 10px;border:1px solid var(--s26-line);border-radius:var(--s26-r-pill);background:rgba(255,255,255,.05);color:var(--s26-soft);font:800 9.5px/1 var(--s26-text);letter-spacing:.07em;white-space:nowrap;transition:background .16s,color .16s,transform .1s}
.home-day-more>button:hover{background:rgba(255,255,255,.12);color:var(--s26-ink)}
.home-day-more>button:active{transform:scale(.96)}
.home-day-more>button.is-ready{border-color:#80c7ff;background:#0e2539;color:#bae1fe}
.home-day-more>button.is-ready::before{content:'';display:inline-block;width:6px;height:6px;margin-right:6px;border-radius:50%;background:var(--s26-accent);vertical-align:1px}
.home-day-more>button:focus-visible,.home-shop:focus-visible{outline:2px solid var(--s26-ice);outline-offset:2px}

/* ---------- The shop's best piece today, as the real item ---------- */
.home-shop{--tier:#a6b8c6;display:grid;grid-template-columns:84px minmax(0,1fr);align-items:center;gap:12px;width:100%;padding:9px 12px 9px 9px;border:1px solid color-mix(in srgb,var(--tier) 55%,transparent);border-radius:var(--s26-r-l);background:linear-gradient(150deg,color-mix(in srgb,var(--tier) 16%,#10283a),rgba(9,22,33,.95) 62%);color:var(--s26-ink);text-align:left;box-shadow:0 0 0 1px color-mix(in srgb,var(--tier) 16%,transparent),0 12px 30px color-mix(in srgb,var(--tier) 20%,rgba(4,12,20,.5));backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);transition:transform .16s cubic-bezier(.2,.7,.25,1),box-shadow .16s}
.home-shop:hover{transform:translateY(-2px);box-shadow:0 0 0 1px color-mix(in srgb,var(--tier) 40%,transparent),0 16px 36px color-mix(in srgb,var(--tier) 32%,rgba(4,12,20,.5))}
.home-shop:active{transform:scale(.98)}
.home-shop-art{position:relative;display:block;aspect-ratio:1;border-radius:11px;overflow:hidden;background:radial-gradient(80% 80% at 50% 38%,color-mix(in srgb,var(--tier) 34%,#1b3a4f),#0a1a28)}
.home-shop-art>img{display:block;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity .25s}
.home-shop-art.thumb-ready>img{opacity:1}
.home-shop-art:not(.thumb-ready)::after{content:'';position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.12) 50%,transparent 70%);background-size:220% 100%;animation:home-shop-wait 1.4s linear infinite}
@keyframes home-shop-wait{from{background-position:120% 0}to{background-position:-120% 0}}
.home-shop-copy{display:grid;gap:4px;min-width:0}
.home-shop-copy>small{font:800 9.5px/1.2 var(--s26-text);letter-spacing:.1em;color:var(--s26-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-shop-copy>strong{font:800 italic 17px/1.05 var(--s26-display);letter-spacing:.04em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-shop-tags{display:flex;flex-wrap:wrap;align-items:center;gap:5px 7px;margin-top:2px}
.home-shop-tags>em{padding:4px 7px;border-radius:5px;background:color-mix(in srgb,var(--tier) 22%,transparent);color:var(--tier);font:800 9px/1 var(--s26-text);font-style:normal;letter-spacing:.09em}
.home-shop-tags>b{font:800 12px/1 var(--s26-text);letter-spacing:.05em;color:var(--s26-ice);font-variant-numeric:tabular-nums}
.home-shop-tags>s{font:700 10px/1 var(--s26-text);color:var(--s26-faint);font-variant-numeric:tabular-nums}
.home-shop-tags>i{font:800 10px/1 var(--s26-text);font-style:normal;color:#50b2fe}
body.reduced-motion .home-shop,body.reduced-motion .home-day-more>button{transition:none}
body.reduced-motion .home-shop-art::after{animation:none}
@media(prefers-reduced-motion:reduce){.home-shop,.home-day-more>button{transition:none}.home-shop-art::after{animation:none}}

/* On the wide screen the weather lives on Today, so the run card does not say it twice. */
@media(min-width:901px) and (min-height:541px){.home-lobby:has(.home-day-weather) .home-course-card .home-weather{display:none}}
/* Short wide screens keep the two rows that matter and drop the chips, then the whole card, as the old one did. */
@media (orientation:landscape) and (max-height:640px){.home-day-more{display:none}}
@media (orientation:landscape) and (max-height:600px){.home-shop{display:none}}
/* Phones carry all of this as the strip of chips above the run card. */
@media (orientation:portrait){.home-shop{display:none}}

.home-friends-count{display:none;position:absolute;right:-3px;bottom:-3px;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:9px;background:#7fe0b0;color:#06231a;font:800 10px/1 var(--s26-text);text-decoration:none}
/* Keep the social entry visible next to the run banner in both phone orientations. */
@media (orientation:portrait) and (max-width:580px),(orientation:landscape) and (max-height:480px){
  body.home-live .home-party-top{width:auto;max-width:49vw}
  body.home-live .home-friends{position:relative;width:auto;min-height:44px;gap:7px;padding:6px 10px;border-radius:var(--s26-r-m);background:var(--s26-glass-strong)}
  body.home-live .home-friends>.home-social-label{display:block;font:700 12px/1.15 var(--s26-text);letter-spacing:0;white-space:nowrap}
  body.home-live .home-friends>.home-social-label small,body.home-live .home-friends>i{display:none}
  body.home-live .home-party-top:has(.home-party-code) .home-social-label small{display:block;margin-top:2px;font-size:10px}
  body.home-live .home-friends>svg{width:19px;height:19px}
  body.home-live .home-friends>.home-friends-count{position:static;display:grid;min-width:20px;height:20px;padding:0 4px;background:var(--s26-ice);color:var(--s26-night)}
}
/* A phone on its side: the shortcuts run along the foot of the screen in one line, under the rider, not in a block. */
@media (orientation:landscape) and (max-height:480px){
  body.home-live .home-quick-actions{width:auto;flex-wrap:nowrap;gap:1px}
  body.home-live .home-quick-actions>button{flex:none;min-width:44px;padding-inline:9px}
}

/* ---------- The rider is a button: press them to open the locker ---------- */
.home-rider-tap{display:none}
body.home-live .home-rider-tap{display:grid;align-items:end;justify-items:center;position:absolute;z-index:0;left:50%;top:38%;width:28vh;height:45vh;transform:translateX(-50%);padding:0 0 4px;border:0;border-radius:26px;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.home-rider-tap>span{padding:8px 13px;border:1px solid var(--s26-line-strong);border-radius:var(--s26-r-pill);background:rgba(9,22,33,.86);color:var(--s26-ink);font:800 10px/1 var(--s26-text);letter-spacing:.1em;white-space:nowrap;opacity:0;transform:translateY(6px);transition:opacity .16s,transform .16s}
.home-rider-tap:hover>span,.home-rider-tap:focus-visible>span{opacity:1;transform:none}
.home-rider-tap:focus-visible{outline:2px solid var(--s26-ice);outline-offset:-4px}
@media (max-width:580px),(max-aspect-ratio:4/5){body.home-live .home-rider-tap{top:25%;width:21vh;height:30vh}}
@media (orientation:landscape) and (max-height:480px){body.home-live .home-rider-tap{left:60%;top:38%;width:30vh;height:48vh}}
body.reduced-motion .home-rider-tap>span{transition:none}
@media(prefers-reduced-motion:reduce){.home-rider-tap>span{transition:none}}

/* ---------- The older parts of Home take the design system's shapes, so the screen reads as one piece ---------- */
.home-playlist{border-radius:var(--s26-r-l)}
.home-ride{border-radius:var(--s26-r-m)}
.home-friends,.home-active-friends,.home-party-code,.home-rank{border-radius:var(--s26-r-m)}
.home-quick-actions{border-radius:var(--s26-r-m)}
.home-quick-actions>button{border-radius:10px}
.home-sports>button{border-radius:10px}
.home-quick-drop{border-radius:var(--s26-r-m)}
/* Signed in with friends online, the right-hand column is taller. On a short screen the names line gives way (the
   button above it already says who is riding), and with a rival on the card only the chips that are ready stay. */
@media (min-width:981px) and (max-height:820px){
  body.home-live .home-active-friends{display:none}
  body.home-live .home-day.has-rival .home-day-more>button:not(.is-ready){display:none}
  /* The daily standing and the freeze add a line each: the two chips that are also one tap away elsewhere give way. */
  body.home-live .home-day.has-lines .home-day-more>button:not(.is-ready):is([data-today="missions"],[data-today="tomorrow"]){display:none}
}
