/* BY NIGHT MARRAKECH — Guide + Agenda controls V3
   Both sections: matching utility rails. Only Marrakech homepage loads this.
   Keep Guide venue types, sectors and Agenda date/type controls unchanged. */
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-guide-name-search,
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search{
  height:26px!important;
  min-height:26px!important;
  width:78px!important;
  min-width:0!important;
  max-width:78px!important;
  padding:0 4px 0 6px!important;
  gap:3px!important;
  border-radius:7px!important;
  margin:0!important;
  z-index:130!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
:is([data-home-section="guide"] .bn-guide-name-search,
    [data-home-section="events"] .bn-event-name-search) input{
  font-size:10px!important;
  min-width:0!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
:is([data-home-section="guide"] .bn-guide-name-search,
    [data-home-section="events"] .bn-event-name-search) .bn-guide-search-icon{
  width:9px!important;height:9px!important;flex-basis:9px!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search [data-home-event-name-clear]{
  border:0!important;
  border-radius:4px!important;
  min-height:19px!important;
  height:19px!important;
  padding:0 3px!important;
  color:#fff!important;
  background:rgba(255,255,255,.08)!important;
  font-size:15px!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .home-guide-option-switch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:inherit;
  font:600 10px/1.15 "DM Sans",system-ui,sans-serif;
  white-space:nowrap;
  cursor:pointer;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .home-guide-option-switch input{
  accent-color:#e2b857;
}
/* Keep opt-in location dialogs and settings above guide/event cards. */
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
:is([data-home-section="events"],[data-home-section="guide"]) :is(.bn-guide-right-switches,.bn-event-right-switches,.bn-nearby){
  overflow:visible!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-nearby [hidden],
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="guide"] .bn-nearby [hidden]{
  display:none!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .home-events-filter-group{overflow:visible!important;}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-right-switches{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  justify-content:center!important;gap:4px!important;max-width:108px!important;
  position:absolute!important;right:8px!important;top:0!important;
  width:105px!important;z-index:115!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-right-switches > label{
  flex:0 0 auto!important;position:static!important;
  width:auto!important;max-width:100%!important;
  margin:0!important;padding:0!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-right-switches .bn-nearby{
  flex:0 0 auto!important;min-width:0!important;width:auto!important;
  max-width:100%!important;position:relative!important;padding:0!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-right-switches .bn-nearby > label{
  position:static!important;transform:none!important;
  margin:0!important;padding:0!important;
  font-size:9.5px!important;white-space:nowrap!important;
  display:inline-flex!important;align-items:center!important;gap:3px!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-nearby-panel{
  position:absolute!important;right:0!important;left:auto!important;
  top:calc(100% + 8px)!important;z-index:180!important;
  width:min(345px,calc(100vw - 18px))!important;
  background:#17181b!important;
}
/* DESKTOP: two parallel lines; utility controls directly before the venue
   type rows, sector row centered vertically between Open and Near me. */
@media(min-width:1024px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-shell{
  position:relative!important;overflow:visible!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-type-row{
  box-sizing:border-box!important;
  padding-left:94px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search{
  position:absolute!important;
  left:8px!important;right:auto!important;top:66px!important;
  transform:none!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]){
  position:absolute!important;
  left:8px!important;right:auto!important;top:91px!important;
  transform:none!important;
  width:auto!important;min-width:0!important;max-width:80px!important;
  grid-column:auto!important;justify-self:start!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches{
  /* The pair belongs to the type-row DOM; fixed coordinates prevent it from
     being anchored to the LEFT filter grid instead of the RIGHT screen band. */
  position:fixed!important;left:auto!important;right:10px!important;
  top:calc(var(--fixed-logo-size) + 10px)!important;transform:none!important;margin:0!important;
  width:105px!important;max-width:105px!important;
  display:flex!important;flex-direction:column!important;
  align-items:flex-start!important;justify-content:center!important;
  gap:3px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches > .home-guide-option-switch,
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches .bn-nearby > label{
  position:static!important;top:auto!important;left:auto!important;
  transform:none!important;width:auto!important;min-width:0!important;
  max-width:103px!important;justify-content:flex-start!important;
  margin:0!important;padding:0!important;flex:0 0 auto!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches .bn-nearby{
  flex:0 0 auto!important;width:auto!important;max-width:105px!important;
  padding:0!important;margin:0!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-areas{
  box-sizing:border-box!important;
  width:calc(100% - 110px)!important;
  max-width:calc(100% - 110px)!important;
  justify-self:start!important;
  justify-content:safe center!important;
  overflow-x:auto!important;
  translate:0 13px!important;
 }
 /* Agenda has one date row and one event-type row; each is centered between
    its adjacent utility controls, without changing the filters themselves. */
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"].home-screen-events{
  --events-filter-h:calc(var(--marrakech-filter-height) + 55px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-row{
  position:relative!important;
  height:var(--events-filter-h)!important;
  min-height:var(--events-filter-h)!important;
  padding-top:54px!important;
  padding-bottom:0!important;
  box-sizing:border-box!important;
  align-items:center!important;
  grid-template-rows:var(--marrakech-filter-height)!important;
  overflow:visible!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-group--date{
  box-sizing:border-box!important;
  padding-right:110px!important;
  width:100%!important;
  justify-content:safe center!important;
  overflow-x:auto!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-group--venue{
  box-sizing:border-box!important;
  padding-left:90px!important;
  width:100%!important;
  justify-content:safe center!important;
  overflow-x:auto!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search{
  position:absolute!important;top:52px!important;left:8px!important;
  right:auto!important;transform:none!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-alcohol{
  position:absolute!important;top:79px!important;left:8px!important;
  right:auto!important;transform:none!important;
  margin:0!important;z-index:115!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches{
  position:absolute!important;top:52px!important;right:8px!important;
  left:auto!important;transform:none!important;
 }
}
/* PHONE — all four controls on one single line immediately below the logo.
   Search width is one half of the original V2 mobile search field. */
@media(max-width:760px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search,
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 10px)!important;
  left:6px!important;right:auto!important;
  transform:none!important;
  width:calc((100vw - var(--fixed-logo-size)) / 4 - 6px)!important;
  max-width:calc((100vw - var(--fixed-logo-size)) / 4 - 6px)!important;
  min-width:0!important;
  height:23px!important;min-height:23px!important;
  padding:0 3px!important;gap:2px!important;
  z-index:115!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search input,
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search input{
  font-size:9px!important;line-height:1!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]),
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-alcohol{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 10px)!important;
  left:calc((100vw - var(--fixed-logo-size)) / 4 + 1px)!important;
  right:auto!important;
  transform:none!important;
  width:auto!important;min-width:0!important;max-width:none!important;
  margin:0!important;z-index:115!important;
  height:23px!important;min-height:23px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-right-switches,
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 10px)!important;
  left:auto!important;right:5px!important;
  transform:none!important;
  height:23px!important;min-height:23px!important;
  width:calc((100vw - var(--fixed-logo-size)) / 2 - 9px)!important;
  max-width:calc((100vw - var(--fixed-logo-size)) / 2 - 9px)!important;
  flex-flow:row nowrap!important;align-items:center!important;
  justify-content:flex-end!important;gap:3px!important;
  margin:0!important;z-index:117!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches > label{
  font-size:clamp(8px,2.2vw,10px)!important;
  flex:0 0 auto!important;max-width:48%!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches .bn-nearby{
  display:flex!important;flex:1 1 auto!important;
  max-width:100%!important;min-width:0!important;
  margin:0!important;gap:2px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches .bn-nearby > label{
  width:100%!important;min-width:0!important;max-width:100%!important;
  flex:1 1 auto!important;white-space:nowrap!important;
  font-size:clamp(8px,2.05vw,9.5px)!important;letter-spacing:-.01em!important;
  justify-content:flex-start!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .home-guide-filter-shell{
  /* V2 already reserves a dedicated mobile utility row. */
  overflow:visible!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"].home-screen-events{
  --events-filter-h:calc(64px + 47px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-row{
  height:var(--events-filter-h)!important;min-height:var(--events-filter-h)!important;
  position:relative!important;box-sizing:border-box!important;
  padding-top:48px!important;
  grid-template-rows:30px 30px!important;
  gap:2px!important;
  overflow:visible!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-group--date,
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-group--venue{
  width:100%!important;overflow-x:auto!important;
  overflow-y:hidden!important;justify-content:safe center!important;
 }
}
@media(max-width:365px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches .bn-nearby > label span{
  font-size:0!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches .bn-nearby > label span::after{
  content:"≤ " attr(data-short-label);
  font-size:8.5px!important;
  font-weight:600!important;
 }
}

/* Final precision: event controls use the same compact 23px switch height as Guide. */
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] :is(.bn-event-alcohol,.bn-event-now,.bn-event-right-switches .bn-nearby > label){
  height:23px!important;min-height:23px!important;max-height:23px!important;
  box-sizing:border-box!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-right-switches .bn-nearby > label span{
  line-height:1.08!important;
}

/* Agenda name search: explicit field styles. V2 only styled the Guide
   search, so without these rules the Agenda input becomes a white box. */
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search{
  position:absolute!important;display:flex!important;align-items:center!important;
  justify-content:flex-start!important;flex-flow:row nowrap!important;
  gap:3px!important;box-sizing:border-box!important;
  padding:0 4px 0 6px!important;
  border:1px solid rgba(230,226,220,.29)!important;
  border-radius:7px!important;background:rgba(17,18,22,.82)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 1px rgba(255,255,255,.05)!important;
  overflow:hidden!important;
  z-index:115!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search:focus-within{
  border-color:rgba(239,204,116,.76)!important;
  box-shadow:0 0 0 2px rgba(239,204,116,.15)!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search input{
  position:static!important;
  display:block!important;flex:1 1 auto!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  height:100%!important;min-height:0!important;max-height:none!important;
  margin:0!important;padding:0!important;
  color:#f7f7f7!important;
  background:transparent!important;border:0!important;outline:0!important;
  box-shadow:none!important;appearance:none!important;-webkit-appearance:none!important;
  font:500 10px/1 "DM Sans",system-ui,sans-serif!important;
  letter-spacing:0!important;text-overflow:ellipsis!important;
}
html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
[data-home-section="events"] .bn-event-name-search input::placeholder{
  color:rgba(243,244,247,.67)!important;opacity:1!important;
}
/* Tablet: 2 side stacks clear the full-height icon band (761px–1023px). */
@media(min-width:761px) and (max-width:1023px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"].home-screen-events{
  --events-filter-h:calc(64px + 96px)!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .home-events-filter-row{
  height:var(--events-filter-h)!important;min-height:var(--events-filter-h)!important;
  padding-top:88px!important;box-sizing:border-box!important;
  grid-template-rows:30px 30px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 5px)!important;
  left:calc((100vw - var(--fixed-logo-size)) / 4)!important;
  right:auto!important;transform:translateX(-50%)!important;
  width:110px!important;max-width:110px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-alcohol{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 38px)!important;
  left:calc((100vw - var(--fixed-logo-size)) / 4)!important;
  right:auto!important;transform:translateX(-50%)!important;
  width:auto!important;z-index:115!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-right-switches{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 5px)!important;
  left:calc(100vw - (100vw - var(--fixed-logo-size)) / 4)!important;
  right:auto!important;transform:translateX(-50%)!important;
  flex-flow:column nowrap!important;
  align-items:flex-start!important;justify-content:center!important;gap:7px!important;
  width:max-content!important;max-width:190px!important;z-index:118!important;
 }
}

/* Mobile search placement must override the preceding general Agenda selector. */
@media(max-width:760px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search{
  position:fixed!important;
  top:calc(var(--fixed-logo-size) + 10px)!important;
  left:6px!important;right:auto!important;transform:none!important;
  width:calc((100vw - var(--fixed-logo-size)) / 4 - 6px)!important;
  max-width:calc((100vw - var(--fixed-logo-size)) / 4 - 6px)!important;
  min-width:0!important;height:23px!important;min-height:23px!important;
  padding:0 3px!important;gap:2px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search input{
  font-size:9px!important;
 }
}

/* Fine desktop alignment: search and alcohol occupy two distinct 23px rows. */
@media(min-width:1024px){
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="guide"] .bn-guide-name-search{
  top:64px!important;height:23px!important;min-height:23px!important;
 }
 html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
 [data-home-section="events"] .bn-event-name-search{
  height:23px!important;min-height:23px!important;
 }
}


/* BYNIGHT MARRAKECH GUIDE AGENDA FILTER POSITION V4 2026-11-02
   CSS-only correction. No PHP, no JS, no alteration of filter semantics.
   Desktop: type options > Search/Alcohol | logo | Open/Now/Nearby > sector/date.
   Phone: one line directly under four navigation icons, beside central logo.
   Remove the reserved blank V2/V3 padding above the filter rows. */
@media (min-width:1024px) {
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"].home-screen-guide {
    --guide-filter-h:var(--marrakech-filter-height)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-filter-shell {
    height:var(--guide-filter-h)!important;
    min-height:var(--guide-filter-h)!important;
    padding-top:0!important;
    padding-bottom:0!important;
    grid-template-rows:var(--marrakech-filter-height)!important;
    align-items:center!important;
    row-gap:0!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-type-row {
    padding-left:0!important;
    padding-right:90px!important;
    grid-template-columns:minmax(0,1fr) 0px!important;
    column-gap:0!important;
    box-sizing:border-box!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-name-search {
    position:fixed!important;
    top:calc(var(--home-content-top) + 5px)!important;
    left:calc((100vw - var(--fixed-logo-size)) / 2 - 87px)!important;
    right:auto!important;
    transform:none!important;
    height:23px!important;
    min-height:23px!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]) {
    position:fixed!important;
    top:calc(var(--home-content-top) + 31px)!important;
    left:calc((100vw - var(--fixed-logo-size)) / 2 - 87px)!important;
    right:auto!important;
    transform:none!important;
    width:auto!important;
    min-width:0!important;
    max-width:88px!important;
    flex:0 0 auto!important;
    margin:0!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches {
    position:fixed!important;
    top:calc(var(--home-content-top) + 5px)!important;
    left:calc((100vw + var(--fixed-logo-size)) / 2 + 7px)!important;
    right:auto!important;
    transform:none!important;
    width:108px!important;
    max-width:108px!important;
    flex-flow:column nowrap!important;
    align-items:flex-start!important;
    gap:3px!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-filter-areas {
    width:calc(100% - 119px)!important;
    max-width:calc(100% - 119px)!important;
    justify-self:end!important;
    margin:0!important;
    translate:none!important;
    transform:none!important;
    align-self:center!important;
    justify-content:safe center!important;
  }
  /* Agenda: event kinds left, calendar right. Utility pairs occupy the
     INNER edges of those columns, with the logo untouched. */
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"].home-screen-events {
    --events-filter-h:var(--marrakech-filter-height)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-row {
    height:var(--events-filter-h)!important;
    min-height:var(--events-filter-h)!important;
    padding-top:0!important;
    padding-bottom:0!important;
    grid-template-rows:var(--marrakech-filter-height)!important;
    align-items:center!important;
    row-gap:0!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-group--venue {
    padding-left:0!important;
    padding-right:90px!important;
    justify-content:safe center!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-group--date {
    padding-right:0!important;
    padding-left:112px!important;
    justify-content:safe center!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-name-search {
    position:fixed!important;
    top:calc(var(--home-content-top) + 5px)!important;
    left:calc((100vw - var(--fixed-logo-size)) / 2 - 87px)!important;
    right:auto!important;
    transform:none!important;
    width:78px!important;
    max-width:78px!important;
    height:23px!important;
    min-height:23px!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-alcohol {
    position:fixed!important;
    top:calc(var(--home-content-top) + 31px)!important;
    left:calc((100vw - var(--fixed-logo-size)) / 2 - 87px)!important;
    right:auto!important;
    transform:none!important;
    width:auto!important;
    z-index:119!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-right-switches {
    position:fixed!important;
    top:calc(var(--home-content-top) + 5px)!important;
    left:calc((100vw + var(--fixed-logo-size)) / 2 + 7px)!important;
    right:auto!important;
    transform:none!important;
    width:108px!important;
    max-width:108px!important;
    flex-flow:column nowrap!important;
    align-items:flex-start!important;
    gap:3px!important;
    z-index:119!important;
  }
}
/* Tablet: remove 17px of old vertical buffer while keeping both control
   stacks clear of the bottom of the logo and nav icons. */
@media (min-width:761px) and (max-width:1023px) {
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"].home-screen-guide {
    --guide-filter-h:calc(54.2px + var(--home-guide-sector-row-height) + 79px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-filter-shell {
    height:var(--guide-filter-h)!important;
    min-height:var(--guide-filter-h)!important;
    padding-top:72px!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"].home-screen-events {
    --events-filter-h:calc(64px + 79px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-row {
    height:var(--events-filter-h)!important;
    min-height:var(--events-filter-h)!important;
    padding-top:71px!important;
  }
}
/* PHONE: four switches directly below the icon bar, on the left/right sides
   of the untouched central circular logo. Then sectors and types begin
   immediately under the logo without extra V2/V3 spacer rows. */
@media (max-width:760px) {
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-name-search,
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-name-search,
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-option-switch:has([data-guide-alcohol]),
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-alcohol,
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .bn-guide-right-switches,
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .bn-event-right-switches {
    top:calc(var(--fixed-logo-size) - 27px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"].home-screen-guide {
    --guide-filter-h:calc(54.2px + var(--home-guide-sector-row-height) + 8px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="guide"] .home-guide-filter-shell {
    height:var(--guide-filter-h)!important;
    min-height:var(--guide-filter-h)!important;
    padding-top:1px!important;
    padding-bottom:0!important;
    margin:0!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"].home-screen-events {
    --events-filter-h:calc(64px + 9px)!important;
  }
  html body.marrakech-phase1[data-city-theme]:has(.bynight-home-landing)
  [data-home-section="events"] .home-events-filter-row {
    height:var(--events-filter-h)!important;
    min-height:var(--events-filter-h)!important;
    padding-top:10px!important;
    padding-bottom:0!important;
    margin:0!important;
  }
}
