/* 2026-11-16: ?game=flight now uses the SAME detail-page composition as the
   pool game: a two-column intro (game hero on the left, flat win-rate standings
   on the right), a single-column rules/membership block below, no jumbo CTA,
   no "unlimited flights" promo card and no trophy board. Only the native
   flight page is affected; /index.html keeps the original hero.

   All functional ids (quick-match-preview / create / practice /
   home-difficulty / leaderboard-shell) are preserved so app.js, social-ui.js
   and bot-difficulty-boot.js keep working. The cover is still the animated
   HeroPlane canvas that hero-plane.js prepends to .hero-copy, sized exactly
   like pool's .hero-art. The rules are intentionally self-contained: the
   table shell's table.css / table-home-clean.css are not loaded here. */

html:not([data-native-game="flight"]) #welcome .intro-bottom{display:none}

/* ---- Intro grid: same 1fr + 460px split, right column spans both rows. ---- */
html[data-native-game="flight"] #welcome:not(.hidden){
  display:grid;
  grid-template-columns:minmax(0,1fr) 460px;
  grid-template-rows:auto 1fr;
  column-gap:28px;row-gap:0;
  align-items:start;
  max-width:1225px;
  margin:0 auto;
  padding:30px 30px 32px;
  min-height:0;
}
html[data-native-game="flight"] #welcome.hidden{display:none!important}
html[data-native-game="flight"] #welcome > .intro-grid{display:contents;min-height:0}
html[data-native-game="flight"] #welcome .game-hero{grid-column:1;grid-row:1}
html[data-native-game="flight"] #welcome .intro-bottom{grid-column:1;grid-row:2}
html[data-native-game="flight"] #welcome .leaderboard-shell{grid-column:2;grid-row:1 / span 2}

/* ---- Hero: 230px cover column + copy column, like pool's .game-hero. ---- */
html[data-native-game="flight"] #welcome .game-hero{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,194px) minmax(0,1fr);
  column-gap:22px;row-gap:0;
  align-content:start;align-items:start;
  min-width:0;max-width:none;padding:0;margin:0;
}
html[data-native-game="flight"] #welcome .game-hero::before{display:none}
html[data-native-game="flight"] #welcome .game-hero > .eyebrow,
html[data-native-game="flight"] #welcome .game-hero > .game-kicker{display:none}

/* The animated plane replaces pool's static cover image. */
html[data-native-game="flight"] #welcome .game-hero > .hero-plane-model{
  grid-column:1;grid-row:1 / span 8;
  justify-self:center;align-self:start;
  width:94%!important;height:auto!important;max-height:none!important;aspect-ratio:1 / 1;max-width:none;margin:0;
  border:1px solid #ffffff12;border-radius:14px;
  background:radial-gradient(circle at 28% 22%,#223b6b 0%,#101c38 58%,#0b142c 100%);
  box-shadow:none;overflow:hidden;isolation:isolate;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-plane-model::before,
html[data-native-game="flight"] #welcome .game-hero > .hero-plane-model::after{
  inset:0;border-radius:14px;z-index:0;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-plane-model canvas{
  position:relative;z-index:1;width:100%;height:100%;
  transform:scale(.82) translateY(-8%);transform-origin:50% 42%;
}
/* Caption sits inside the bottom of the cover, as on the supplied animation. */
html[data-native-game="flight"] .flight-hero-caption{
  position:absolute;left:6px;top:158px;width:182px;
  text-align:center;font-size:10px;line-height:1.2;letter-spacing:.02em;
  white-space:nowrap;color:#c7d5f7;z-index:2;pointer-events:none;
  text-shadow:0 1px 4px #081229;
}
html[data-native-game="flight"] #welcome .game-hero > *:not(.hero-plane-model):not(.flight-hero-caption){grid-column:2}
html[data-native-game="flight"] #welcome .game-hero > h1{
  margin:3px 0 6px;font-size:27px;line-height:1.2;letter-spacing:-.3px;
  font-weight:600;color:#dbe4fa;
}
html[data-native-game="flight"] #welcome .game-hero > p{
  max-width:44em;margin:0;font-size:12.5px;line-height:1.6;color:#8e9dbe;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags{
  display:flex;gap:0;flex-wrap:wrap;row-gap:4px;margin:8px 0 9px;
  font-size:11px;color:#7a8aac;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > span{padding:0 12px}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > span:first-child{padding-left:0}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > span+span{border-left:1px solid #ffffff24}

/* Flat, full-width stacked launch buttons; no gradients or 3D shadows. */
html[data-native-game="flight"] #welcome .game-hero > .launch-actions{
  width:100%;max-width:none;margin:0;padding:0;
  display:grid;grid-template-columns:minmax(0,1fr);gap:6px;
}
html[data-native-game="flight"] #welcome .launch-actions > button{
  min-height:38px;margin:0;padding:8px 12px;
  border:1px solid #46518a;border-radius:8px;
  background:#1b254a;box-shadow:none;color:#d3ddf5;
  font-size:14px;font-weight:500;text-align:left;
  display:flex;align-items:center;justify-content:space-between;gap:8px;
}
html[data-native-game="flight"] #welcome .launch-actions > button:hover:not(:disabled){
  background:#293657;border-color:#8d9dff;transform:none;
}
html[data-native-game="flight"] #welcome .launch-actions > button.primary{
  background:#3c54bd;background-image:none;border-color:#6f8bff;
  color:#eef2ff;font-weight:600;
}
html[data-native-game="flight"] #welcome .launch-actions > button.primary:hover:not(:disabled){
  background:#4d66d8;border-color:#8d9dff;
}
html[data-native-game="flight"] #welcome .launch-actions > button.primary span{margin-left:auto}
/* Bot difficulty is a small chip at the end of the tag row, so the launch
   stack stays exactly three buttons like the pool detail page. */
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > .home-difficulty{
  margin-left:auto;padding:0 0 0 12px;min-height:0;
  display:flex;align-items:center;gap:6px;
  border:0;border-left:1px solid #ffffff24;border-radius:0;
  background:none;box-shadow:none;color:#7f8cab;font-size:11px;font-weight:400;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > .home-difficulty:hover:not(:disabled){
  background:none;color:#c8d3ff;transform:none;
}
html[data-native-game="flight"] #welcome .game-hero > .hero-tags > .home-difficulty .home-difficulty-value{
  color:#c3cff0;font-weight:600;
}

/* ---- Standings: the same thin-rule win-rate table as the pool detail. ---- */
html[data-native-game="flight"] #welcome .leaderboard-shell{
  width:100%;max-width:none;align-self:stretch;min-height:0;
  display:flex;flex-direction:column;
  padding:16px 16px 12px;
  border:1px solid #ffffff12;border-radius:10px;
  background:#141b30;box-shadow:none;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-heading{margin:0 0 8px}
html[data-native-game="flight"] #leaderboard-shell .ranking-heading h2{
  margin:0;font-size:15px;letter-spacing:0;color:#dfe6fb;font-weight:600;
}
html[data-native-game="flight"] #leaderboard-shell .period-tabs{
  display:flex;gap:0;padding:0;margin:0 0 6px;
  border:0;border-bottom:1px solid #ffffff14;background:none;border-radius:0;
}
html[data-native-game="flight"] #leaderboard-shell .period-tabs button{
  flex:1 1 0;min-width:0;min-height:0;padding:6px 2px;border-radius:0;
  background:none;border:0;box-shadow:none;font-size:11px;color:#8390b0;
  text-align:center;white-space:nowrap;
}
html[data-native-game="flight"] #leaderboard-shell .period-tabs button:hover:not(:disabled){background:none;color:#c8d3ff;transform:none}
html[data-native-game="flight"] #leaderboard-shell .period-tabs button[aria-pressed="true"]{
  background:none;box-shadow:none;color:#c8d3ff;border-bottom:2px solid #9caaff;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-columns{
  display:grid;grid-template-columns:1fr 60px 60px;column-gap:16px;
  padding:0 0 6px 14px;border-bottom:1px solid #ffffff0c;
  font-size:12px;line-height:13px;color:#7f8cab;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-columns span:not(:first-child){text-align:right}
html[data-native-game="flight"] #leaderboard-shell #leaderboard{
  --rank-row:44px;
  flex:1 1 auto;display:grid;grid-auto-rows:minmax(var(--rank-row),1fr);
  min-height:calc(var(--rank-row)*10);max-height:none;height:auto;
  list-style:none;overflow:hidden;margin:0;padding:0;
}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li{
  grid-template-columns:32px minmax(0,1fr) 60px 60px;column-gap:16px;
  padding:0 0 0 14px;margin:0;min-height:0;align-items:center;
  position:relative;display:grid;
  border:0;border-bottom:1px solid #ffffff0c;border-radius:0;background:none;
  transition:background .16s ease;
}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:hover{background:#ffffff0a}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-1){background:linear-gradient(90deg,#f7cd5e26,transparent 68%)}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-2){background:linear-gradient(90deg,#c9d7e622,transparent 68%)}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-3){background:linear-gradient(90deg,#e4b08322,transparent 68%)}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-1)::before,
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-2)::before,
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-3)::before{
  content:"";position:absolute;left:0;top:22%;bottom:22%;width:3px;border-radius:3px;
}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-1)::before{background:#efbe45}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-2)::before{background:#b8c9d8}
html[data-native-game="flight"] #leaderboard-shell #leaderboard li:has(.rank-medal.rank-3)::before{background:#d49a63}
html[data-native-game="flight"] #leaderboard-shell .rank-medal{
  width:28px;height:28px;display:grid;place-items:center;border-radius:50%;
  font-size:12px;font-weight:900;color:#8a9ac0;
  border:0;background:none;box-shadow:none;
}
html[data-native-game="flight"] #leaderboard-shell .rank-medal.rank-1{
  background:linear-gradient(120deg,#fff6b1,#e1af30 55%,#ffdf6d);color:#74501e;
}
html[data-native-game="flight"] #leaderboard-shell .rank-medal.rank-2{
  background:linear-gradient(120deg,#fff,#acbacd,#eef3fa);color:#6a7a91;
}
html[data-native-game="flight"] #leaderboard-shell .rank-medal.rank-3{
  background:linear-gradient(120deg,#f6ddba,#be8851,#f3cc99);color:#785638;
}
html[data-native-game="flight"] #leaderboard-shell .seat{
  display:flex;align-items:center;gap:9px;min-width:0;
  padding:0;border:0;background:none;box-shadow:none;
}
html[data-native-game="flight"] #leaderboard-shell .avatar-shell{
  display:block;width:30px;height:30px;flex:0 0 30px;position:relative;
  border:0;border-radius:0;background:none;
}
html[data-native-game="flight"] #leaderboard-shell .seat-avatar{
  display:block;width:100%;height:100%;object-fit:cover;
  border:0;border-radius:8px;background-color:#1b2743;background-size:cover;background-position:center;
  box-shadow:none;
}
html[data-native-game="flight"] #leaderboard-shell .seat-copy{min-width:0;flex:1}
html[data-native-game="flight"] #leaderboard-shell .seat-name{
  display:flex;align-items:center;flex-wrap:nowrap;gap:3px;min-width:0;
}
html[data-native-game="flight"] #leaderboard-shell .seat-name strong{
  font-size:14px;font-weight:600;color:#dbe4fa;max-width:none;flex:0 1 auto;min-width:0;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html[data-native-game="flight"] #leaderboard-shell .member-label{
  flex:0 0 auto;margin-left:2px;width:36px;height:18px;
  background:url('/assets/member/vip-laurel-v3.png') center/contain no-repeat;
  color:transparent;font-size:0;border:0;box-shadow:none;
}
html[data-native-game="flight"] #leaderboard-shell .member-label.annual{
  background:url('/assets/member/annual-vip-laurel-v3.png') center/contain no-repeat;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-points,
html[data-native-game="flight"] #leaderboard-shell .ranking-games{
  font-size:16px;font-weight:600;line-height:1;text-align:right;
  font-variant-numeric:tabular-nums;float:none;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-points{color:#c8d3ff}
html[data-native-game="flight"] #leaderboard-shell .ranking-games{color:#c8d3ff}
html[data-native-game="flight"] #leaderboard-shell .ranking-footnote{
  margin:8px 0 0;text-align:left;font-size:10px;color:#7f8cab;
}
html[data-native-game="flight"] #leaderboard-shell .demo-tag{color:#6f7fa0}
html[data-native-game="flight"] #leaderboard-shell #stats{
  margin:3px 0 0;text-align:left;font-size:10px;line-height:1.6;color:#8390b0;
}
html[data-native-game="flight"] #leaderboard-shell .ranking-empty{
  grid-column:1/-1;display:flex;align-items:center;justify-content:flex-start;
  min-height:0;padding:14px 0;color:#8390b0;font-size:11px;
}

/* ---- Bottom: two stacked text blocks plus the four membership figures. ---- */
html[data-native-game="flight"] #welcome .intro-bottom{
  grid-template-columns:1fr;gap:0;
  margin-top:14px;padding-top:14px;border-top:1px solid #ffffff14;
  min-width:0;display:block;
}
html[data-native-game="flight"] #welcome .intro-bottom > section{
  padding:0;background:none;border:0;border-radius:0;
}
html[data-native-game="flight"] #welcome .intro-bottom > section+section{
  margin-top:14px;padding-top:14px;border-left:0;border-top:1px solid #ffffff14;
}
html[data-native-game="flight"] #welcome .intro-bottom h2{
  margin:0 0 6px;font-size:14px;font-weight:600;color:#a9b8dc;
}
html[data-native-game="flight"] #welcome .intro-bottom p{
  margin:0;font-size:12.5px;line-height:1.7;color:#8494b4;
}
html[data-native-game="flight"] #welcome .intro-bottom #score-note{margin-top:8px;color:#7385a6}
html[data-native-game="flight"] #welcome .intro-bottom .member-facts{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:10px;
}
html[data-native-game="flight"] #welcome .intro-bottom .member-facts > div{
  display:flex;flex-direction:column;gap:3px;min-width:0;
  padding:10px 12px;border:1px solid #ffffff12;border-radius:8px;background:#111a2e;
}
html[data-native-game="flight"] #welcome .intro-bottom .member-facts b{
  font-size:15.5px;color:#c6d2f0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html[data-native-game="flight"] #welcome .intro-bottom .member-facts span{font-size:11px;color:#7e8eb0}

/* ---- Narrow screens: one column, cover centred on top. ---- */
@media(max-width:900px){
  html[data-native-game="flight"] #welcome:not(.hidden){
    grid-template-columns:minmax(0,1fr);row-gap:20px;padding:20px 16px 30px;
  }
  html[data-native-game="flight"] #welcome .game-hero,
  html[data-native-game="flight"] #welcome .intro-bottom,
  html[data-native-game="flight"] #welcome .leaderboard-shell{grid-column:1;grid-row:auto}
  html[data-native-game="flight"] #welcome .leaderboard-shell{
    align-self:auto;min-height:0;max-width:520px;
  }
  html[data-native-game="flight"] #leaderboard-shell #leaderboard{flex:none}
}
@media(max-width:560px){
  html[data-native-game="flight"] #welcome .game-hero{
    grid-template-columns:minmax(0,150px) minmax(0,1fr);column-gap:16px;
  }
  html[data-native-game="flight"] #welcome .game-hero > .hero-plane-model{width:100%}
  html[data-native-game="flight"] .flight-hero-caption{top:118px;width:141px;left:0}
  html[data-native-game="flight"] #welcome .game-hero > h1{font-size:21px}
  html[data-native-game="flight"] #welcome .intro-bottom .member-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* Give the player name room on a phone: narrow number columns and a smaller
     VIP badge instead of ellipsising "Ava Mitchell" down to "Av...". */
  html[data-native-game="flight"] #leaderboard-shell .ranking-columns{
    grid-template-columns:1fr 44px 52px;column-gap:8px;padding-left:10px;
  }
  html[data-native-game="flight"] #leaderboard-shell #leaderboard li{
    grid-template-columns:26px minmax(0,1fr) 44px 52px;column-gap:8px;padding-left:10px;
  }
  html[data-native-game="flight"] #leaderboard-shell .member-label{width:28px;height:16px}
  html[data-native-game="flight"] #leaderboard-shell .seat-name strong{font-size:12.5px}
  html[data-native-game="flight"] #leaderboard-shell .ranking-points,
  html[data-native-game="flight"] #leaderboard-shell .ranking-games{font-size:14px}
}
