/* BAI desktop home polish — desktop only. Mobile remains owned by existing styles. */
.desktop-home-nav{display:none}

@media (min-width:900px){
  body[data-page="home"]{padding-bottom:0!important}

  /* Desktop page grid is reserved for the first-screen split only. */
  body[data-page="home"] .v66-home,
  body[data-page="home"] .page{
    width:min(1320px,calc(100vw - 48px))!important;
    max-width:1320px!important;
    margin:0 auto!important;
    padding-top:94px!important;
    display:grid!important;
    grid-template-columns:minmax(350px,.76fr) minmax(0,1.24fr)!important;
    grid-template-rows:156px minmax(0,1fr) auto!important;
    gap:14px 20px!important;
    align-items:start!important;
  }

  /* Desktop header */
  body[data-page="home"] .top{
    position:fixed!important;top:16px!important;left:50%!important;right:auto!important;
    transform:translateX(-50%)!important;width:min(1320px,calc(100vw - 48px))!important;height:62px!important;
    box-sizing:border-box!important;display:grid!important;grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr)!important;
    align-items:center!important;gap:24px!important;padding:0 18px!important;border:1px solid rgba(255,255,255,.09)!important;
    border-radius:22px!important;background:rgba(7,19,38,.76)!important;backdrop-filter:blur(18px)!important;
    -webkit-backdrop-filter:blur(18px)!important;box-shadow:0 14px 42px rgba(0,0,0,.18)!important;z-index:50!important;
  }
  body[data-page="home"] .top>a.ico:first-child{display:none!important}
  body[data-page="home"] .top>img{position:static!important;inset:auto!important;transform:none!important;grid-column:1!important;grid-row:1!important;justify-self:start!important;width:auto!important;height:30px!important;max-width:84px!important;margin:0!important;padding:0!important}
  body[data-page="home"] .desktop-home-nav{position:static!important;display:flex!important;grid-column:2!important;grid-row:1!important;align-items:center!important;justify-content:center!important;gap:6px!important;padding:5px!important;border-radius:16px!important;background:rgba(255,255,255,.045)!important;border:1px solid rgba(255,255,255,.055)!important}
  body[data-page="home"] .desktop-home-nav a{min-width:76px!important;padding:9px 13px!important;border-radius:12px!important;color:rgba(255,255,255,.78)!important;-webkit-text-fill-color:rgba(255,255,255,.78)!important;text-decoration:none!important;text-align:center!important;font-size:13px!important;line-height:1!important;font-weight:750!important;white-space:nowrap!important}
  body[data-page="home"] .desktop-home-nav a:hover{background:rgba(255,255,255,.09)!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
  body[data-page="home"] .desktop-home-nav a.active{background:#fff!important;color:#062744!important;-webkit-text-fill-color:#062744!important}
  body[data-page="home"] .top>div:last-child{position:static!important;transform:none!important;grid-column:3!important;grid-row:1!important;justify-self:end!important;margin:0!important}
  body[data-page="home"] .top .ico{width:40px!important;height:40px!important;border-radius:13px!important}

  /* First screen: tall hero left */
  body[data-page="home"] #homeHero{grid-column:1!important;grid-row:1 / span 2!important;width:100%!important;height:calc(100vh - 112px)!important;min-height:500px!important;max-height:760px!important;aspect-ratio:auto!important;margin:0!important;border-radius:28px!important;box-shadow:0 22px 54px rgba(0,0,0,.2)!important;align-self:start!important}
  body[data-page="home"] .v673-hero-copy{left:clamp(24px,2.5vw,38px)!important;bottom:32px!important;width:84%!important}
  body[data-page="home"] .v673-hero-copy h1{font-size:clamp(36px,3.1vw,52px)!important;line-height:.95!important;letter-spacing:-.045em!important;margin-bottom:11px!important}
  body[data-page="home"] .v673-hero-copy p{font-size:13px!important;line-height:1.45!important;max-width:330px!important}
  body[data-page="home"] .v673-trust{margin-top:14px!important;gap:6px!important;flex-wrap:wrap!important}
  body[data-page="home"] .v673-trust span{font-size:9px!important;padding:7px 8px!important}

  /* First-shell children participate directly in the first-screen grid. */
  body[data-page="home"] .v66-shell{display:contents!important}

  /* Top-right action row */
  body[data-page="home"] .v673-actions{grid-column:2!important;grid-row:1!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;gap:14px!important;width:100%!important;height:156px!important;margin:0!important;transform:none!important;align-self:start!important}
  body[data-page="home"] .v673-actions>.v673-card{width:100%!important;min-width:0!important;height:156px!important;min-height:156px!important;margin:0!important;border-radius:22px!important;overflow:hidden!important;box-shadow:0 14px 34px rgba(0,0,0,.15)!important;border:1px solid rgba(11,42,73,.10)!important;transition:transform .2s ease,box-shadow .2s ease!important}
  body[data-page="home"] .v673-actions>.v673-card:hover{transform:translateY(-4px)!important;box-shadow:0 20px 42px rgba(0,0,0,.22)!important}
  body[data-page="home"] .v673-card .v673-copy{left:14px!important;top:auto!important;bottom:12px!important;z-index:4!important;max-width:58%!important}
  body[data-page="home"] .v673-card .v673-copy>b{font-size:18px!important;line-height:1.05!important}
  body[data-page="home"] .v673-card .v673-copy>small{font-size:10px!important;margin-top:3px!important;line-height:1.2!important}
  body[data-page="home"] .v673-card .v673-copy>em{margin-top:5px!important;font-size:8px!important;line-height:1.15!important}
  body[data-page="home"] .v673-card .v673-icon{top:12px!important;left:12px!important;width:34px!important;height:34px!important}
  body[data-page="home"] .v673-actions>.v673-card .v673-visual,
  body[data-page="home"] .v673-actions>.v673-card .earn-visual{right:0!important;left:auto!important;width:52%!important;height:100%!important;object-fit:cover!important}

  /* Worth the Stop fills the lower-right first-screen area. */
  body[data-page="home"] .v673-actions + .sectionrow{grid-column:2!important;grid-row:2!important;margin:0!important;padding:4px 2px 0!important;align-self:start!important;min-height:44px!important}
  body[data-page="home"] .v673-actions + .sectionrow .k{font-size:9px!important;letter-spacing:.16em!important}
  body[data-page="home"] .v673-actions + .sectionrow h2{font-size:22px!important;line-height:1.05!important;margin-top:3px!important}
  body[data-page="home"] #homeDiscoverCarousel{grid-column:2!important;grid-row:2!important;width:100%!important;max-width:none!important;margin:50px 0 0!important;align-self:start!important;min-height:0!important;display:block!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-preview{display:none!important;width:100%!important;max-width:none!important;min-height:240px!important;height:clamp(240px,calc(100vh - 386px),365px)!important;max-height:365px!important;border-radius:24px!important;overflow:hidden!important;box-shadow:0 16px 40px rgba(0,0,0,.13)!important;border:1px solid rgba(255,255,255,.08)!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-preview.active{display:grid!important;grid-template-columns:minmax(170px,36%) minmax(0,64%)!important;align-items:stretch!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-preview>img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:0!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-copy{padding:18px 22px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-copy h3{font-size:22px!important;line-height:1.08!important;margin:5px 0 7px!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-copy p{font-size:11px!important;line-height:1.4!important;max-width:600px!important;margin:0 0 14px!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-actions{display:grid!important;grid-template-columns:.72fr 1.28fr!important;gap:9px!important;margin-top:auto!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-actions a{min-height:38px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:13px!important}
  body[data-page="home"] #homeDiscoverDots{grid-column:2!important;grid-row:2!important;margin:0 0 4px!important;align-self:end!important;justify-self:center!important;z-index:4!important}

  /* LOWER HOME: structurally separate, full-width curated flow. */
  body[data-page="home"] .v66-lower{
    grid-column:1 / -1!important;
    grid-row:3!important;
    width:100%!important;
    max-width:none!important;
    margin:64px 0 0!important;
    padding:0 0 40px!important;
    display:block!important;
  }
  body[data-page="home"] .v66-lower .sectionrow{margin:0!important;align-items:end!important}
  body[data-page="home"] .v66-lower .sectionrow .k{font-size:9px!important;letter-spacing:.16em!important}
  body[data-page="home"] .v66-lower .sectionrow h2{font-size:30px!important;line-height:1.02!important;letter-spacing:-.025em!important;margin:5px 0 0!important}
  body[data-page="home"] .v66-lower .sectionrow>a{font-size:10px!important;font-weight:900!important;padding:8px 2px!important}

  /* Find your vibe becomes a compact discovery toolbar instead of a full section. */
  body[data-page="home"] .lower-vibe-head{margin-bottom:14px!important}
  body[data-page="home"] .v651-vibe-row{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:10px!important;overflow:visible!important;padding:0!important;margin:0!important}
  body[data-page="home"] .v651-vibe-chip{min-width:0!important;width:100%!important;height:58px!important;border-radius:17px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:0 9px!important;white-space:nowrap!important;border:1px solid rgba(6,39,68,.08)!important;box-shadow:0 8px 20px rgba(6,39,68,.045)!important;transition:transform .2s ease,box-shadow .2s ease!important}
  body[data-page="home"] .v651-vibe-chip:hover{transform:translateY(-2px)!important;box-shadow:0 12px 24px rgba(6,39,68,.08)!important}
  body[data-page="home"] .v651-vibe-chip span{font-size:17px!important}
  body[data-page="home"] .v651-vibe-chip b{font-size:9px!important}

  /* Island Favorites is the primary lower-home visual section. */
  body[data-page="home"] .lower-feature-head{margin-top:58px!important;margin-bottom:18px!important}
  body[data-page="home"] #homePicks{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:20px!important;overflow:visible!important;padding:0!important;margin:0!important}
  body[data-page="home"] #homePicks>.place-mini:nth-child(n+4){display:none!important}
  body[data-page="home"] #homePicks .place-mini{flex:none!important;width:100%!important;min-width:0!important;border-radius:22px!important;overflow:hidden!important;border:1px solid rgba(6,39,68,.08)!important;box-shadow:0 14px 34px rgba(6,39,68,.09)!important;transition:transform .22s ease,box-shadow .22s ease!important}
  body[data-page="home"] #homePicks .place-mini:hover{transform:translateY(-5px)!important;box-shadow:0 20px 42px rgba(6,39,68,.14)!important}
  body[data-page="home"] #homePicks .place-mini img{width:100%!important;height:235px!important;object-fit:cover!important}
  body[data-page="home"] #homePicks .place-mini div{padding:15px 16px 18px!important}
  body[data-page="home"] #homePicks .place-mini small{font-size:8px!important;letter-spacing:.04em!important}
  body[data-page="home"] #homePicks .place-mini b{font-size:16px!important;line-height:1.2!important;margin-top:5px!important}

  /* Popular places is deliberately lighter: compact secondary grid. */
  body[data-page="home"] .lower-more-head{margin-top:58px!important;margin-bottom:16px!important}
  body[data-page="home"] #homePlaces{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;overflow:visible!important;padding:0!important;margin:0!important}
  body[data-page="home"] #homePlaces .place-mini{flex:none!important;width:100%!important;min-width:0!important;border-radius:18px!important;overflow:hidden!important;border:1px solid rgba(6,39,68,.07)!important;box-shadow:0 9px 24px rgba(6,39,68,.065)!important;transition:transform .2s ease,box-shadow .2s ease!important}
  body[data-page="home"] #homePlaces .place-mini:hover{transform:translateY(-3px)!important;box-shadow:0 14px 30px rgba(6,39,68,.105)!important}
  body[data-page="home"] #homePlaces .place-mini img{width:100%!important;height:155px!important;object-fit:cover!important}
  body[data-page="home"] #homePlaces .place-mini div{padding:11px 12px 14px!important}
  body[data-page="home"] #homePlaces .place-mini small{font-size:7px!important}
  body[data-page="home"] #homePlaces .place-mini b{font-size:12px!important;line-height:1.25!important;margin-top:4px!important}

  /* Strong closing driver CTA. */
  body[data-page="home"] .driverbanner{width:100%!important;min-height:108px!important;margin:62px 0 0!important;padding:22px 26px!important;border-radius:26px!important;background:linear-gradient(135deg,#062744,#0a365d)!important;box-shadow:0 20px 44px rgba(6,39,68,.18)!important;display:grid!important;grid-template-columns:52px 1fr auto!important;gap:16px!important;align-items:center!important;color:#fff!important}
  body[data-page="home"] .driverbanner i{width:52px!important;height:52px!important;font-size:20px!important}
  body[data-page="home"] .driverbanner small{font-size:8px!important;letter-spacing:.12em!important;color:#a9bdce!important}
  body[data-page="home"] .driverbanner b{font-size:20px!important;margin-top:4px!important}
  body[data-page="home"] .driverbanner>span{font-size:26px!important;padding-right:4px!important}

  /* Theme separation */
  html[data-bai-theme="light"] body[data-page="home"] .v673-actions>.v673-card{border-color:rgba(6,39,68,.14)!important;box-shadow:0 14px 34px rgba(6,39,68,.12)!important}
  html[data-bai-theme="light"] body[data-page="home"] #homeDiscoverCarousel .home-feature-preview{border-color:rgba(6,39,68,.13)!important;box-shadow:0 16px 38px rgba(6,39,68,.11)!important}
  html[data-bai-theme="light"] body[data-page="home"] .v651-vibe-chip{border-color:rgba(6,39,68,.10)!important}
  html[data-bai-theme="dark"] body[data-page="home"] .v651-vibe-chip,
  html[data-bai-theme="dark"] body[data-page="home"] #homePicks .place-mini,
  html[data-bai-theme="dark"] body[data-page="home"] #homePlaces .place-mini{border-color:rgba(255,255,255,.08)!important}

  body[data-page="home"]>.bottom,
  body[data-page="home"] .bottom{display:none!important}
}

@media (min-width:1200px){
  body[data-page="home"] #homePlaces{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}

@media (min-width:1400px){
  body[data-page="home"] .v66-home,
  body[data-page="home"] .page{grid-template-columns:minmax(390px,.78fr) minmax(0,1.22fr)!important;grid-template-rows:164px minmax(0,1fr) auto!important}
  body[data-page="home"] .v673-actions,
  body[data-page="home"] .v673-actions>.v673-card{height:164px!important;min-height:164px!important}
  body[data-page="home"] #homeDiscoverCarousel .home-feature-preview{height:clamp(260px,calc(100vh - 400px),390px)!important;max-height:390px!important}
  body[data-page="home"] #homePicks .place-mini img{height:255px!important}
}
