/* The front door (/join/): the party header, then the Games list as a page. Phone first (375–430px). Loaded after
   ../css/tokens.css (the only place a token is declared), ../css/bundle.css (TitleCard, CountdownPlate,
   DisplayNumeral, Tag, Surface) and ../css/nav.css (the page geometry and the list's tiles, .game-list--page, shared
   with the Games drawer), so this file holds only the page's backdrop, header and layout. */

/* The stage painting as a dim backdrop (the act's own portrait under a night wash), as on Place your bats.
   The night ground sits on <html>, so the fixed painting (z-index −1) paints above it and below the content. */
html{background:var(--night-950)}
body{min-height:100vh;background:none;padding:0 var(--nav-right) calc(var(--sp-6) + var(--nav-bottom)) 0}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(180deg,var(--scrim) 0%,var(--plate) 30%,var(--shroud) 60%,var(--night-950) 100%),
    var(--act-wash) url("../assets/hero-portrait-v1-720.webp?v=20261121a") center top/cover no-repeat}
html[data-theme="gates-open"] body::before{background:linear-gradient(180deg,var(--scrim) 0%,var(--plate) 30%,var(--shroud) 60%,var(--night-950) 100%),
    var(--act-wash) url("../assets/hero-party-v1-portrait-720.webp?v=20261121a") center top/cover no-repeat}
html[data-theme="morning-after"] body::before{background:linear-gradient(180deg,var(--scrim) 0%,var(--plate) 30%,var(--shroud) 60%,var(--night-950) 100%),
    var(--act-wash) url("../assets/hero-after-v1-portrait-720.webp?v=20261121a") center top/cover no-repeat}

/* Wide screens: the act's landscape painting, washed deeper at the top where the painting carries its own lettering. */
@media (min-aspect-ratio:4/3) and (min-width:900px){
  body::before{background:linear-gradient(180deg,var(--shroud) 0%,var(--plate) 45%,var(--shroud) 75%,var(--night-950) 100%),
    var(--act-wash) url("../assets/bg-1280-v1.webp?v=20261121a") center top/cover no-repeat}
  html[data-theme="gates-open"] body::before{background:linear-gradient(180deg,var(--shroud) 0%,var(--plate) 45%,var(--shroud) 75%,var(--night-950) 100%),
    var(--act-wash) url("../assets/hero-party-v1-landscape-1280.webp?v=20261121a") center top/cover no-repeat}
  html[data-theme="morning-after"] body::before{background:linear-gradient(180deg,var(--shroud) 0%,var(--plate) 45%,var(--shroud) 75%,var(--night-950) 100%),
    var(--act-wash) url("../assets/hero-after-v1-landscape-1280.webp?v=20261121a") center top/cover no-repeat}
}

/* ---------- Header: TitleCard (the title on a plate, like the --after recipe) and the CountdownPlate ---------- */
.join-head{display:flex;flex-direction:column;align-items:center;gap:var(--sp-3);padding:calc(var(--sp-4) + var(--sat)) var(--gutter) 0}
.join-title.bf-title-card{width:min(100%,var(--sheet-w))}
.join-title .bf-title-card__title{width:100%;padding:var(--sp-3);border:var(--hairline) solid var(--plate-line);border-radius:var(--r-card);background:var(--plate)}
.join-cd.bf-countdown-plate,.join-after{width:min(100%,var(--sheet-w))}
.join-after{margin:0;text-align:center;color:var(--text)}
html.has-ribbon .join-head{padding-top:calc(var(--sat) + var(--sp-6) + var(--sp-1) + var(--sp-3))} /* under the 28px ribbon */

/* ---------- The list (its tiles are css/nav.css's .game-list--page) ---------- */
.join-main{max-width:var(--sheet-w);margin:0 auto;padding:var(--sp-6) var(--gutter) 0}
.join-pick{margin:0 0 var(--sp-3);color:var(--text);text-align:center}

.join-foot{margin:var(--sp-8) 0 0;text-align:center}

/* Toasts (the list's "Logged in as" tile, js/me.js) ride above the Dock, as on Place your bats. */
#toasts{--dock-total:var(--nav-bottom)}

/* The preview ribbon: Tag --preview pinned to the top edge ("Preview · nothing is saved"). */
.preview-ribbon{position:fixed;z-index:var(--z-chrome);top:0;left:50%;transform:translateX(-50%);margin:0;border-top:0;border-radius:0 0 var(--r-row) var(--r-row);pointer-events:none}

/* Short phones (375×667 class): a tighter header so the first tile shows above the bar. */
@media (max-height:739px) and (orientation:portrait){
  .join-title .bf-title-card__kicker{display:none}
  .join-cd .bf-numeral--countdown{font-size:var(--fs-36);line-height:42px} /* 42px: t-numeral's compact line box */
}

/* Desktop and landscape tablets: room for the tiles side by side. */
@media (min-width:900px){
  .join-main{max-width:calc(var(--sheet-w) * 2)}
}
/* Landscape phones: a compact header (the list takes two columns beside the rail, css/nav.css). */
@media (orientation:landscape) and (max-height:500px){
  .join-head{gap:var(--sp-2);padding-top:calc(var(--sp-2) + var(--sat))}
  .join-title .bf-title-card__kicker{display:none}
  .join-title .bf-title-card__title{padding:var(--sp-2) var(--sp-3);font-size:var(--fs-32);line-height:36px} /* 36px: t-live's line box at fs-32 */
  .join-cd .bf-numeral--countdown{font-size:var(--fs-36);line-height:42px} /* 42px: t-numeral's compact line box */
  .join-main{max-width:none;padding-top:var(--sp-4)}
  .join-head,.join-main{padding-left:calc(var(--gutter) + var(--sal))} /* the left safe area; the right one is in body's --nav-right */
}
